/* ==========================================================================
   Fernando Henrique de Oliveira — site stylesheet
   Concept: concert programme + historic hall + contemporary arts editorial.
   Palette sampled from the stage photographs (amber stage light, red curtain,
   black piano, warm wood). Mobile first. No framework.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL; latin subset) ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  /* Hall */
  --ink: #0c0705;          /* black piano, dark hall */
  --charcoal: #16100c;     /* wings */
  --umber: #241710;        /* wood in shadow */
  --wine: #3a0c0e;         /* curtain in shadow */
  --burgundy: #6e1a1c;     /* curtain */
  --amber: #e3a15a;        /* stage light (contrast 9:1 on ink) */
  --gold: #c69c6d;         /* aged gilding */
  --ivory: #f3ebdf;        /* programme paper, text on dark (16.9:1) */
  --paper: #ece2d3;        /* light sections */
  --muted: #b3a493;        /* secondary text on dark (8.2:1) */
  --muted-ink: #5c4c40;    /* secondary text on paper (6.4:1) */
  --line: rgba(243, 235, 223, 0.16);
  --line-ink: rgba(12, 7, 5, 0.18);

  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Fluid type scale (Utopia method, https://utopia.fyi): viewport 360 -> 1440 px,
     base 17 -> 19 px, ratio 1.2 -> 1.333. clamp(min, intercept + slope*100vw, max).
     The two negative steps are fixed (13 / 14.4 px): the fluid formula would shrink
     them below 12 px as the ratio grows. */
  --step-n2: 0.8125rem;
  --step-n1: 0.9rem;
  --step-0: clamp(1.0625rem, 1.0208rem + 0.1852vw, 1.1875rem);
  --step-1: clamp(1.2750rem, 1.1724rem + 0.4562vw, 1.5829rem);
  --step-2: clamp(1.5300rem, 1.3366rem + 0.8593vw, 2.1101rem);
  --step-3: clamp(1.8360rem, 1.5104rem + 1.4470vw, 2.8127rem);
  --step-4: clamp(2.2032rem, 1.6878rem + 2.2906vw, 3.7493rem);
  --step-5: clamp(2.6438rem, 1.8592rem + 3.4874vw, 4.9979rem);
  --step-7: clamp(3.8071rem, 2.1160rem + 7.5163vw, 8.8806rem);

  /* Fluid space scale (same viewports; multiples of step 0) and space pairs. */
  --space-2xs: clamp(0.5312rem, 0.5104rem + 0.0926vw, 0.5938rem);
  --space-xs: clamp(0.7969rem, 0.7656rem + 0.1389vw, 0.8906rem);
  --space-s: clamp(1.0625rem, 1.0208rem + 0.1852vw, 1.1875rem);
  --space-m: clamp(1.5938rem, 1.5312rem + 0.2778vw, 1.7812rem);
  --space-l: clamp(2.1250rem, 2.0417rem + 0.3704vw, 2.3750rem);
  --space-xl: clamp(3.1875rem, 3.0625rem + 0.5556vw, 3.5625rem);
  --space-s-l: clamp(1.0625rem, 0.6250rem + 1.9444vw, 2.3750rem);
  --space-m-xl: clamp(1.5938rem, 0.9375rem + 2.9167vw, 3.5625rem);
  --space-l-2xl: clamp(2.1250rem, 1.2500rem + 3.8889vw, 4.7500rem);
  --space-xl-3xl: clamp(3.1875rem, 1.8750rem + 5.8333vw, 7.1250rem);

  --gutter: var(--space-s-l);
  --max: 1240px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
picture { display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
abbr[title] { text-decoration: none; }
button { font: inherit; color: inherit; }
main:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important; /* utility must win over component display rules */
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.muted { color: var(--muted); }
.lead { font-family: var(--serif); font-size: var(--step-1); line-height: 1.45; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(12, 7, 5, 0.94);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.site-header--overlay:not(.is-scrolled):not(.menu-open) {
  background: linear-gradient(to bottom, rgba(12, 7, 5, 0.6), rgba(12, 7, 5, 0));
  border-bottom-color: transparent;
}
.site-header__inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header__name {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  font-family: var(--serif);
  line-height: 1;
  padding: 0.5rem 0;
}
.site-header__first { font-size: 1.15rem; letter-spacing: 0.01em; white-space: nowrap; }
.site-header__last {
  font-size: var(--step-n2);
  font-family: var(--sans);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--amber);
  margin-top: 0.3rem;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.25rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--ink);
  padding: 2rem var(--gutter) 3rem;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}
.site-header.menu-open .site-menu { display: flex; }

.site-nav ul { display: flex; flex-direction: column; }
.site-nav a {
  display: block;
  padding: 0.55rem 0;
  font-family: var(--serif);
  font-size: var(--step-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--amber); }

.lang-switch ul { display: flex; gap: 0.25rem; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch a[aria-current="true"] { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--amber); }
.lang-switch a:hover { color: var(--ivory); }

@media (min-width: 74em) {
  .menu-toggle { display: none; }
  .site-menu,
  .site-header.menu-open .site-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    background: none;
    overflow: visible;
  }
  .site-nav ul { flex-direction: row; gap: 1.75rem; }
  .site-nav a {
    position: relative;
    padding: 0.75rem 0;
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 0;
  }
  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0.45rem;
    height: 1px;
    background: var(--amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
  }
  .site-nav a:hover::after,
  .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav a[aria-current="page"] { color: var(--ivory); }
  .lang-switch { padding-left: 1.5rem; border-left: 1px solid var(--line); }
}

/* ---------- Layout primitives ---------- */
/* Components adapt to the space they actually get (container queries), not to
   the device: the same block works in a half-screen window or on a phone. */
.section, .page-head, .events-page, .gallery-page, .videos-page, .contact-page,
.repertoire, .legal-page, .site-footer, .timeline, .event-list {
  container-type: inline-size;
}
.section,
.page-head,
.events-page,
.gallery-page,
.videos-page,
.contact-page,
.repertoire,
.legal-page,
.not-found {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding-top: var(--space-xl-3xl); padding-bottom: clamp(1rem, 0.5rem + 2vw, 2rem); }
.section__head { margin-bottom: var(--space-l-2xl); }
.section__more { margin-top: 2.5rem; }

.movement {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--amber);
  font-size: 1.15rem;
}
.movement::after {
  content: "";
  width: 3.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section-title { font-size: var(--step-4); }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.25rem;
}

/* ---------- Links & buttons ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  background-image: linear-gradient(var(--amber), var(--amber));
  background-size: 0 1px;
  background-position: 0 85%;
  background-repeat: no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform 0.4s var(--ease); }
.link-arrow:hover { background-size: 100% 1px; color: var(--amber); }
.link-arrow:hover .icon { transform: translateX(0.3rem); }
.link-quiet { display: inline-block; padding: 0.35rem 0; color: var(--muted); font-size: var(--step-n1); }
.link-quiet:hover { color: var(--ivory); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--amber);
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-wrap: anywhere;
}
.button:hover { background: var(--amber); color: var(--ink); }
.button--quiet { border-color: var(--line); }
.button--quiet:hover { border-color: var(--amber); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; background: var(--wine); }
.hero__media picture,
.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__poster, .hero__video { object-fit: cover; object-position: 38% 50%; }
@media (min-aspect-ratio: 4/3) {
  .hero__poster, .hero__video { object-position: 50% 45%; }
}
.hero__video { opacity: 0; transition: opacity 1.6s var(--ease); }
.hero__video.is-playing { opacity: 1; }
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(12, 7, 5, 0.92) 0%, rgba(12, 7, 5, 0.55) 38%, rgba(12, 7, 5, 0.15) 70%, rgba(12, 7, 5, 0.35) 100%),
    linear-gradient(to right, rgba(12, 7, 5, 0.55), rgba(12, 7, 5, 0) 60%);
}
.hero__content {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) var(--gutter) clamp(7rem, 5rem + 6vw, 9rem);
}
.hero__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 1.25rem;
}
.hero__title { font-size: var(--step-7); line-height: 0.92; letter-spacing: -0.01em; }
.hero__line { display: block; }
.hero__line--accent { font-style: italic; color: var(--amber); padding-left: 0.08em; }
.hero__roles {
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-size: var(--step-1);
  color: var(--paper);
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  min-width: 44px;
  font-size: var(--step-n2);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 2.75rem;
  background: linear-gradient(var(--amber), transparent);
  transform-origin: top;
}
@media (prefers-reduced-motion: no-preference) {
  .hero__scroll::after { animation: breathe 3.2s var(--ease) infinite; }
}
@keyframes breathe {
  0%, 100% { transform: scaleY(0.35); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}
.hero__sound {
  position: absolute;
  right: var(--gutter);
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  background: rgba(12, 7, 5, 0.5);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.8rem;
}

/* ---------- Intro ---------- */
.intro__grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: center; }
.intro__text .lead { margin-bottom: 2rem; max-width: 34ch; }
.intro__figure { margin: 0; position: relative; }
.intro__figure img { width: 100%; }
.intro__figure::before {
  content: "";
  position: absolute;
  inset: var(--space-xs) var(--space-xs) calc(-1 * var(--space-xs)) calc(-1 * var(--space-xs)); /* inside the gutter */
  border: 1px solid var(--gold);
  opacity: 0.45;
  z-index: -1;
}
@container (min-width: 52rem) {
  .intro__grid { grid-template-columns: 5fr 7fr; }
}

/* ---------- Areas ---------- */
.areas__list { display: grid; gap: 0; counter-reset: none; }
.area {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.area__index {
  grid-row: span 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1;
  color: var(--amber);
}
.area__title { font-size: var(--step-2); margin-bottom: 0.75rem; }
.area__text { color: var(--muted); max-width: 38ch; }
@container (min-width: 62rem) {
  .areas__list { grid-template-columns: repeat(3, 1fr); }
  .area {
    grid-template-columns: 1fr;
    padding: 0 2rem 0 2rem;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .area:first-child { padding-left: 0; border-left: 0; }
  .area__index { grid-row: auto; margin-bottom: 1.5rem; font-size: var(--step-4); }
}
.areas { padding-bottom: 0; }
.areas__band {
  margin: var(--space-xl-3xl) 0 0; /* inside the content column, never beyond it */
  position: relative;
}
.areas__band img { display: block; }
.areas__band img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 100%;
  max-height: 78vh;
}
@container (min-width: 70rem) {
  .areas__band img { aspect-ratio: 21 / 9; }
}

/* ---------- Path (programme paper) ---------- */
.path {
  max-width: none;
  background: var(--paper);
  color: var(--ink);
  margin-top: 0; /* the stage photo above ends exactly where the programme paper begins */
  padding-bottom: clamp(4rem, 3rem + 5vw, 7rem);
}
.path > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.path .movement, .path .eyebrow { color: var(--burgundy); }
.path__grid { display: grid; gap: 3.5rem; }
@container (min-width: 60rem) {
  .path__grid { grid-template-columns: 7fr 5fr; gap: var(--space-xl); }
}
.timeline__item {
  display: grid;
  gap: 0.25rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-ink);
}
.timeline__item:last-child { border-bottom: 1px solid var(--line-ink); }
.timeline__years {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--burgundy);
  white-space: nowrap;
}
.timeline__title { font-size: var(--step-1); margin-bottom: 0.35rem; }
.timeline__place { font-family: var(--sans); font-size: var(--step-n1); letter-spacing: 0.08em; color: var(--muted-ink); font-style: normal; }
.timeline__body p { color: var(--muted-ink); margin: 0; }
@container (min-width: 30rem) {
  .timeline__item { grid-template-columns: 9.5rem 1fr; }
}
.formation li { padding: 0.9rem 0; border-top: 1px solid var(--line-ink); display: grid; gap: 0.15rem; }
.formation strong { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; line-height: 1.25; }
.formation span { color: var(--muted-ink); font-size: var(--step-n1); }
.formation + .eyebrow { margin-top: 2.5rem; }
.masters { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; }

/* On dark backgrounds (biography aside) the timeline uses dark-theme colors. */
.timeline--compact .timeline__item { border-color: var(--line); grid-template-columns: 1fr; padding: 1.1rem 0; }
.timeline--compact .timeline__years { color: var(--amber); font-size: 1.1rem; }
.timeline--compact .timeline__title { font-size: 1.2rem; }
.timeline--compact .timeline__place,
.timeline--compact .timeline__body p { color: var(--muted); }
.timeline--compact .timeline__item:last-child { border-bottom-color: var(--line); }

/* ---------- Events ---------- */
.event-list { border-top: 1px solid var(--line); }
.event {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  grid-template-areas: "cover cover" "date body";
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
.event__cover { grid-area: cover; margin: 0; overflow: hidden; background: var(--charcoal); }
.event__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 70%; filter: brightness(0.9); }
.event__date { grid-area: date; }
.event__body { grid-area: body; }
.event__where { font-style: normal; display: flex; flex-direction: column; margin: 0 0 0.25rem; color: var(--muted); }
.event__venue { color: var(--paper); }
.event__cta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.event__date { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; font-family: var(--serif); }
.event__day { font-size: 2.6rem; }
.event__month { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-top: 0.4rem; }
.event__year { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }
.event__title { font-size: var(--step-2); margin-bottom: 0.5rem; }
.event__when, .event__where { margin: 0 0 0.25rem; color: var(--muted); }
.event__tz { font-size: var(--step-n1); }
.event__status {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--amber);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}
.event--cancelled .event__title { text-decoration: line-through; text-decoration-thickness: 1px; }
.event__description { margin-top: 0.75rem; max-width: 62ch; }
.event__cta { margin-top: 0.75rem; }
@container (min-width: 40rem) {
  .event { grid-template-columns: 7rem 1fr minmax(12rem, 18rem); grid-template-areas: "date body cover"; gap: 2rem; }
  .event__cover { align-self: start; }
  .event__day { font-size: 3.4rem; }
}
.empty-state {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.empty-state p:first-child { font-family: var(--serif); font-size: var(--step-1); }

/* ---------- Videos ---------- */
.video-grid { display: grid; gap: var(--space-l) var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--charcoal);
  overflow: hidden;
}
.video-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.82);
  transition: filter 0.6s var(--ease), transform 1.2s var(--ease);
}
.video-frame:hover > img { filter: saturate(1) brightness(0.95); transform: scale(1.02); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ivory);
}
.video-frame__play .icon { width: 4rem; height: 4rem; transition: transform 0.4s var(--ease), color 0.3s; }
.video-frame__play:hover .icon,
.video-frame__play:focus-visible .icon { color: var(--amber); transform: scale(1.06); }
.video-frame__play:focus-visible { outline-offset: -4px; }
.video-card__title { font-size: var(--step-1); margin: 1rem 0 0.35rem; }
.video-card__text { color: var(--muted); font-size: var(--step-n1); }
.video-card__link { margin-top: 0.4rem; }
.video-note { margin-top: 2rem; font-size: var(--step-n1); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
.gallery figure { margin: 0; height: 100%; }
.gallery__link { display: block; height: 100%; overflow: hidden; background: var(--charcoal); }
.gallery__link picture, .gallery__link img { height: 100%; width: 100%; }
.gallery__link img {
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 0.8s var(--ease);
  filter: brightness(0.9);
}
.gallery__link:hover img, .gallery__link:focus-visible img { transform: scale(1.035); filter: brightness(1); }
.gallery__link:focus-visible { outline-offset: -3px; }
.gallery figcaption { padding: 0.6rem 0 0; font-size: var(--step-n1); color: var(--muted); }
@container (min-width: 34rem) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 15rem; grid-auto-flow: dense; }
  .gallery--full .gallery__item--portrait { grid-row: span 2; }
  .gallery--full figcaption { display: none; } /* captions are in the lightbox on grid layouts */
}
@container (min-width: 56rem) {
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 16rem; }
  .gallery--full .gallery__item--landscape:nth-child(7n + 1) { grid-column: span 2; grid-row: span 2; }
  /* Home teaser: one large photo, two beside it, a row of three below. */
  .gallery--teaser .gallery__item { grid-row: span 1; }
  .gallery--teaser .gallery__item:first-child { grid-column: span 2; grid-row: span 2; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 7, 5, 0.97);
  color: var(--ivory);
}
.lightbox::backdrop { background: rgba(12, 7, 5, 0.9); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox__stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 4rem 0.5rem 5.5rem; touch-action: pan-y; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-height: 100%; }
.lightbox__figure img { max-width: min(100%, 1600px); max-height: calc(100dvh - 10rem); width: auto; object-fit: contain; }
.lightbox__caption { margin-top: 0.9rem; text-align: center; font-size: var(--step-n1); color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; padding: 0 1rem; }
.lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(12, 7, 5, 0.6);
  border: 1px solid var(--line);
  cursor: pointer;
}
.lightbox__btn:hover { border-color: var(--amber); color: var(--amber); }
.lightbox__btn--close { top: 0.75rem; right: 0.75rem; }
.lightbox__btn--prev { left: 0.75rem; bottom: 1rem; }
.lightbox__btn--next { right: 0.75rem; bottom: 1rem; }
@media (min-width: 50em) {
  .lightbox__btn--prev, .lightbox__btn--next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__btn--prev { left: 1.5rem; }
  .lightbox__btn--next { right: 1.5rem; }
  .lightbox__stage { padding: 4rem 6rem; }
}

/* ---------- Closing ---------- */
.closing {
  position: relative;
  max-width: none;
  padding: 0;
  margin-top: clamp(4rem, 3rem + 6vw, 9rem);
  display: grid;
  isolation: isolate;
}
.closing__figure { margin: 0; grid-area: 1 / 1; }
.closing__figure img { width: 100%; height: 100%; min-height: 34rem; max-height: 88vh; object-fit: cover; object-position: 40% 50%; }
.closing__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--ink) 4%, rgba(12, 7, 5, 0.72) 45%, rgba(12, 7, 5, 0.2) 100%);
}
.closing__content {
  grid-area: 1 / 1;
  align-self: end;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3rem var(--gutter) clamp(3rem, 2rem + 4vw, 6rem);
}
.closing__content .lead { max-width: 40ch; margin: 1.5rem 0 2rem; }
.closing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }

/* ---------- Inner pages ---------- */
.page-head { padding-top: calc(var(--header-h) + var(--space-xl-3xl)); padding-bottom: var(--space-l-2xl); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; font-size: var(--step-n1); color: var(--muted); margin-bottom: 1.75rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.6rem; color: var(--line); }
.breadcrumb ol { align-items: center; }
.breadcrumb a, .breadcrumb [aria-current] { display: inline-block; padding: 0.4rem 0; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ivory); text-decoration: underline; }
.page-title { font-size: var(--step-4); max-width: 18ch; }
.page-intro { margin-top: 1.25rem; font-family: var(--serif); font-size: var(--step-1); color: var(--paper); max-width: 46ch; }
.notice { margin-top: 1.5rem; padding: 1rem 1.25rem; border-left: 2px solid var(--amber); background: var(--charcoal); }
.events-page, .gallery-page, .videos-page, .contact-page, .repertoire, .legal-page { padding-bottom: clamp(4rem, 3rem + 5vw, 8rem); }
.events-page .page-head, .gallery-page .page-head, .videos-page .page-head, .contact-page .page-head,
.repertoire .page-head, .legal-page .page-head { padding-left: 0; padding-right: 0; }

.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin: 2.75rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }

/* Biography */
.biography .page-head { max-width: calc(var(--max) + 2 * var(--gutter)); }
.biography__figure { margin: 0; }
.biography__figure img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; max-height: 75vh; object-position: 30% 40%; }
.biography__body, .biography__aside {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(3rem, 2rem + 4vw, 6rem) var(--gutter) 0;
}
.biography__body > * { max-width: 68ch; } /* reading measure, whatever the column width */
.biography__body .lead { margin-bottom: 2.5rem; max-width: 46ch; }
.biography__section { padding-top: 0.5rem; }
.biography__aside { padding-bottom: clamp(4rem, 3rem + 5vw, 8rem); }
@media (min-width: 70em) {
  .biography {
    display: grid;
    grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, 760px) minmax(0, 380px) minmax(var(--gutter), 1fr);
    column-gap: 4rem;
  }
  .biography__figure { grid-column: 1 / -1; }
  .biography .page-head { grid-column: 2 / 4; padding-left: 0; padding-right: 0; margin: 0; max-width: none; }
  .biography__body { grid-column: 2; padding-left: 0; padding-right: 0; margin: 0; padding-bottom: clamp(4rem, 3rem + 5vw, 8rem); }
  .biography__aside { grid-column: 3; padding-left: 0; padding-right: 0; margin: 0; }
  .biography__aside > * { position: relative; }
}

/* Repertoire */
.repertoire__group { padding-top: 2.5rem; }
.repertoire__group + .repertoire__group { margin-top: 2rem; border-top: 1px solid var(--line); }
.repertoire__group .section-title { font-size: var(--step-2); margin-bottom: 2rem; }
.repertoire__columns { columns: 19rem 3; column-gap: var(--space-xl); }
.composer { break-inside: avoid; padding-bottom: 1.75rem; }
.composer__name { font-size: 1.35rem; margin-bottom: 0.5rem; }
.composer__dates { font-family: var(--sans); font-size: var(--step-n1); color: var(--muted); }
.composer__works li { padding: 0.2rem 0 0.2rem 1rem; position: relative; color: var(--paper); font-size: var(--step-n1); line-height: 1.5; }
.composer__works li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: 0.4rem; height: 1px; background: var(--amber); }

/* Contact */
.contact-grid { display: grid; gap: 3.5rem; }
@container (min-width: 50rem) { .contact-grid { grid-template-columns: 1.3fr 1fr; gap: var(--space-xl); } }
.contact-list > div { padding: 1.25rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.4rem; }
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.contact-list dt .icon { color: var(--amber); }
.contact-list dd { margin: 0; font-family: var(--serif); font-size: var(--step-2); overflow-wrap: anywhere; }
.contact-list dd a { text-decoration: none; background-image: linear-gradient(var(--amber), var(--amber)); background-size: 100% 1px; background-position: 0 92%; background-repeat: no-repeat; }
.contact-list dd a:hover { color: var(--amber); }
.contact-list dd .button { font-family: var(--sans); font-size: 1rem; background-image: none; }
.contact-block > .muted { margin-top: 1.5rem; }

.social-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.social-link { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; text-decoration: none; color: var(--paper); }
.social-link:hover { color: var(--amber); }
.social-list--large { flex-direction: column; gap: 0; }
.social-list--large li { border-top: 1px solid var(--line); }
.social-list--large li:last-child { border-bottom: 1px solid var(--line); }
.social-list--large .social-link { width: 100%; padding: 0.9rem 0; font-family: var(--serif); font-size: var(--step-1); }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 1.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a { min-height: 44px; display: inline-flex; align-items: center; }

/* 404 */
.not-found { padding-top: calc(var(--header-h) + 5rem); padding-bottom: 6rem; }
.not-found__code { font-family: var(--serif); font-style: italic; font-size: var(--step-7); color: var(--burgundy); line-height: 1; margin: 0 0 1rem; }
.not-found__links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--charcoal); margin-top: 0; }
.site-footer__inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(3rem, 2rem + 4vw, 5rem) var(--gutter) 2.5rem;
  display: grid;
  gap: 2.5rem;
}
@container (min-width: 48rem) { .site-footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__name { font-family: var(--serif); font-size: var(--step-2); line-height: 1.1; margin-bottom: 0.4rem; }
.site-footer__roles { color: var(--muted); font-size: var(--step-n1); }
.site-footer__email a { color: var(--paper); text-decoration-color: var(--amber); display: inline-block; padding: 0.5rem 0; overflow-wrap: anywhere; }
.site-footer__nav a { display: inline-block; padding: 0.35rem 0; text-decoration: none; color: var(--paper); }
.site-footer__nav a:hover { color: var(--amber); }
.site-footer__label { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.site-footer__social .social-list { flex-direction: column; gap: 0; }
.site-footer__bottom {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: center;
  font-size: var(--step-n1);
  color: var(--muted);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: var(--muted); display: inline-block; padding: 0.4rem 0; }
.site-footer__bottom a:hover { color: var(--ivory); }
.site-footer__langs { display: flex; gap: 1.25rem; }

/* ---------- Motion ---------- */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;      /* user preference overrides component motion */
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .hero__video { display: none; }
}

@media (forced-colors: active) {
  .hero__veil, .closing__figure::after { display: none; }
  .button, .lightbox__btn { border: 1px solid ButtonText; }
}

@media print {
  .site-header, .hero__media, .site-footer, .video-frame, .lightbox, .hero__scroll { display: none !important; }
  body { background: #fff; color: #000; }
}
