/* M.O. Abbott — Site Styles
   --------------------------------------------------
   This stylesheet pairs with the random theme script
   that updates CSS variables: --bg, --text, --link, --accent.
   -------------------------------------------------- */

/* ===== Variables & Base ===== */
:root {
  --bg: #eaeaea;
  --text: #11400a;
  --link: #915e13;
  --link-hover: #c07a18;
  --accent: #FBB117;
    --page-top-gap: 24px;   /* adjust once, affects every page */
  --maxw: 600px;
    /* global rule thickness you can tweak in one place */
  --rule-thickness: 4px;
  /* optional: make lines follow your text color */
  --rule-color: currentColor; /* or a fixed color like #333 */
  --header-gap: 16px; /* space ABOVE the header across the site */
  --footer-gap: 32px; /* space BELOW the footer across the site */
  --page-gutter: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 100%;
  line-height: 1.6;
  margin: 0;
  text-align: center;

  padding-top: var(--page-top-gap);

  /* creates left/right space on every page */
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);

}

/* Images */
img { display: block; max-width: 100%; height: auto; }
.hero-img {
  padding: 0 0;
}

.hero-img img {
  display: block;
  max-width: 100%;
  height: auto;
}



/* Utility: horizontally center an image */
img.centered {
  display: block;            /* you already have this globally, but safe */
  margin-left: auto;
  margin-right: auto;
}

/* Layout */
/* .container { margin: 0 auto; width: min(95%, var(--maxw)); } */
/* keep your centered content area */
.container {
  margin: 0 auto;
  max-width: var(--maxw); /* you already have --maxw: 600px; */
  width: 100%;           /* fill available width; body gutter handles the sides */
}
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.column { flex: 1 1 300px; display: flex; justify-content: center; align-items: center; text-align: center; }

/* Allow flex children to shrink instead of forcing overflow */
.row, .column { min-width: 0; }
.column > * { min-width: 0; }   /* important if .embed is inside .column */
.embed { min-width: 0; }

/* Links */
/* Base link styles */
a,
a:link,
a:visited,
a:focus,
a:active {
  color: var(--link);
  text-decoration: none;   /* no underline ever */
}

/* Hover state only changes color */
a:hover {
  color: var(--link-hover);
  text-decoration: none;   /* prevent underline on hover */
  cursor: pointer;
}

/* Keyboard focus (optional, accessibility) */
a:focus-visible {
  outline: 2px dashed var(--link);
  outline-offset: 2px;
}

/* Headings */
h1 { color: var(--text); font-size: clamp(2rem, 7vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: .08em; margin-top: 0; margin-bottom: 8px; text-align: center; }
h3 { color: var(--text); font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 24px; text-align: center; }

/* Rules & text */
/* hr { margin: 48px auto; width: min(100%, var(--maxw)); border: 0; border-top: 1px solid #333; } */

hr {
  margin: 24px auto;
  width: min(100%, var(--maxw));
  border: 0;
  border-top: var(--rule-thickness) solid var(--rule-color);
  /* optional: soften the line a bit if using currentColor */
  opacity: .4;
}

p { margin: 24px 0; }
strong { color: var(--accent); font-weight: 700; }
.emph { color: var(--accent); }

/* Sections & utility classes */
.biglist { color: var(--accent); font-size: 28px; font-weight: 700; margin-top: 24px; margin-bottom: 24px; text-align: center; }
.biglist p { margin: 8px 0; }

/* .events { margin-top: 48px; margin-bottom: 48px; } */
.events { margin-top: 48px; }

.event { font-weight: bold; margin-top: 64px; margin-bottom: 64px; }
.event p { margin: 0; }

.eventtitle {
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 700;
  text-align: center;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;   /* supported in modern Safari/Chrome; ignored elsewhere */
}

.eventdetails {
  font-size: clamp(13px, 3.5vw, 16px);
  font-weight: 700;
  text-align: center;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.eventtitle p,
.eventdetails p { margin: 0; }

.menu {
  margin: 16px auto 0;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;  /* prevent wrapping */
}
.menu p { margin: 0; }

.header {
  margin: 16px auto 0; /* keep space BELOW header; above gap handled by body padding */
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.header p { margin: 0; }

.footer {
  margin: 50px auto 0; /* keep space ABOVE footer; below gap handled by body padding */
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.footer p { margin: 0; }

.inst {
  font-size: clamp(12px, 3.2vw, 16px);
  font-weight: 400;
  margin: 0;
}
.inst p { margin: 0; }

.privacy { font-size: 12px; font-weight: 400; margin-top: 0; margin-bottom: 0; }
.privacy p { margin: 0; }

.prose { font-size: 18px; text-align: justify; padding: 12px 0px 12px 0px;}

.sitemenu {
  margin: 16px auto;
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;  /* prevent wrapping */
}
.sitemenu p { margin: 0; }

.relatives {
  margin: 16px auto;
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;  /* prevent wrapping */
}
.relatives p { margin: 0; }

.subrelatives {
  margin: 16px auto;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;  /* prevent wrapping */
}
.relatives p { margin: 0; }

.sections { margin-top: 24px; margin-bottom: 24px; }

.section { margin-top: 32px; margin-bottom: 48px; }
.section p { margin: 0; }

/*.sectiontitle { font-size: 20px; font-weight: 700; margin-top: 0; margin-bottom: 0; text-align: center; white-space: nowrap; }*/

.sectiontitle {
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 700;
  text-align: center;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;   /* supported in modern Safari/Chrome; ignored elsewhere */
}

.sectiontitle p { margin: 0; }

.ske { font-size: 12px; font-weight: 700; margin: 50px auto; text-align: center; }
.ske p { margin: 0; }

/* Responsive tweaks */
@media (max-width: 1081px) {
  body { width: 100%; text-align: center; }
}

@media (min-width: 900px) {
  :root {
    --page-gutter: 64px;
  }
}

/* Add real, scrollable space after all content */
body::after {
  content: "";
  display: block;
  height: var(--footer-gap, 96px);
}
@supports (height: env(safe-area-inset-bottom)) {
  body::after { height: calc(var(--footer-gap, 96px) + env(safe-area-inset-bottom)); }
}


/* Safety: ignore fixed widths from pasted embed code */
iframe[width] { width: 100% !important; }

/*iframe.embed { clip-path: inset(1px); }*/

/* ===== Embeds / iframes ===== */

.embed {
  margin: 24px auto;
  max-width: var(--maxw, 600px);
  overflow: hidden;
  background: var(--bg);
}

/* default iframe behavior */
.embed > iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* videos (16:9 wrapper) */
.embed.tall {
  position: relative;
  width: 100%;
  max-width: var(--maxw, 600px);
  margin: 24px auto;
}
.embed.tall::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.embed.tall > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.01);
  transform-origin: center;
}

/* SoundCloud / short embeds: add breathing room */
.embed.short {
  padding-left: 16px;
  padding-right: 16px;
}

/* soundcloud / short embeds */
.embed.short > iframe {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: clamp(120px, 30vh, 160px);
  transform: none;
  clip-path: inset(2px);
}

/* Safety: ignore fixed widths from pasted embed code */
iframe[width] { width: 100% !important; }

/* ===== Mobile overrides LAST ===== */
@media (max-width: 500px) {
  .sectiontitle { white-space: normal; }

  .embed {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

/* Center the whole repertoire block on desktop AND keep padding on mobile */
.rep {
  max-width: 60rem;       /* adjust to taste */
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2.0rem;
}

/* ===== Mobile / default: stacked + centered ===== */
.rep-group {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.4rem;
  justify-items: center;   /* centers composer + works block */
}

.composer {
  font-weight: 700;        /* bold */
  text-align: center;
  white-space: normal;
}

.works {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: center;      /* center piece titles on mobile */
}

/* ===== Desktop: two columns ===== */
@media (min-width: 700px) {
  .rep-group {
    display: grid;
    grid-template-columns: clamp(7rem, 18vw, 12rem) minmax(0, 1fr);
    column-gap: 1.2rem;

    /* IMPORTANT: stop centering inherited from mobile */
    justify-items: stretch;
  }

  .composer {
    font-weight: 700;
    text-align: right;
    justify-self: end;      /* composer hugs the gap */
    white-space: nowrap;
  }

  .works {
    text-align: left;
    justify-self: start;    /* works hugs the gap */
  }
}
