:root {
  --bg: #ece1d0;
  --bg-alt: oklch(0.94 0.015 55);
  --bg-hatch-a: oklch(0.88 0.02 50);
  --bg-hatch-b: oklch(0.93 0.015 50);
  --fg: oklch(0.22 0.02 50);
  --fg-dim: oklch(0.34 0.02 50);
  --fg-dimmer: oklch(0.42 0.02 55);
  --muted: oklch(0.5 0.02 55);
  --label: oklch(0.45 0.02 55);
  --accent: oklch(0.58 0.15 35);
  --accent-light: oklch(0.5 0.14 35);
  --accent-lighter: oklch(0.42 0.14 35);
  --border: oklch(0 0 0 / 0.14);
  --border-soft: oklch(0 0 0 / 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Source Sans Pro', Arial, sans-serif;
  min-height: 100vh;
  overflow-wrap: anywhere;
}

::selection { background: var(--accent); color: oklch(0.97 0.01 60); }

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent-lighter); }

h1, h2 { font-family: "EB Garamond", serif; font-weight: 500; margin: 0; letter-spacing: 5px; }

h3 { font-family: "EB Garamond", serif; font-weight: 500; margin: 0; letter-spacing: 3px; }

img { max-width: 100%; display: block; }

.eyebrow {
  font-family: "EB Garamond", serif;
  font-size: clamp(11px, 1.1vw, 12px);
  letter-spacing: 5px; 
  color: var(--label);
  text-transform: uppercase;
}

.section-label {
  font-family: "EB Garamond", serif;
  font-size: clamp(20px, 2.8vw, 28px);
  letter-spacing: 5px;
  color: var(--accent);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 44px;
}
.section-label.left { text-align: left; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}
.divider span.line { width: 62px; height: 1px; background: oklch(0.8 0.02 55); }
.divider span.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 48px);
  background: #ece1d0e8;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand:hover span:not(.dot) { color: var(--accent); }
.nav-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nav-brand span { font-family: "EB Garamond", serif; font-weight: 500;font-size: 16px; color: var(--fg); letter-spacing: 2px;}
.nav-links { display: flex; flex-wrap: wrap; gap: clamp(16px, 4vw, 36px); }
.nav-links a {
  font-family: 'Source Sans Pro', Arial, sans-serif;
  font-size: clamp(13px, 1.3vw, 14px);
  letter-spacing: 0.3px;
  padding: 4px 0;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.nav-links a.active { color: var(--fg); border-bottom-color: var(--accent); }

/* Hero (split image / copy layout) */
.hero-split {
  display: flex;
  flex-wrap: wrap;
  min-height: clamp(420px, 56vw, 560px);
  margin-bottom: clamp(60px, 10vw, 140px);
}
.hero-image { flex: 1 1 420px; min-height: 320px; position: relative; overflow: hidden; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-copy {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(36px, 5vw, 64px);
  box-sizing: border-box;
}
.hero-copy .eyebrow { margin-bottom: 12px; }
.hero-title { font-family: "EB Garamond", serif;font-weight: 500; font-size: clamp(34px, 5vw, 48px); line-height: 1; color: var(--fg); margin-bottom: 24px; letter-spacing: 5px; transform: scaleY(95%);}
.hero-divider { width: 44px; height: 1px; background: var(--accent); margin: 0 auto 24px; }
.hero-text { font-size: clamp(15px, 1.6vw, 17px); line-height: 1.9; color: var(--fg-dim); margin: 0 0 16px; }
.hero-text:last-child { margin-bottom: 0; }

/* On phone, the eyebrow + title text is swapped for a pre-styled image
   (custom kerning/typography baked in) -- it bleeds past hero-copy's own
   padding to render as large as the fixed-aspect-ratio image allows, capped
   so it doesn't blow up on the wider end of this breakpoint. The text stays
   in the DOM either way: on phone it's visually hidden (not display:none)
   so the real <h1> is still reachable by screen readers/crawlers, while the
   image -- purely decorative at that point -- is marked aria-hidden. */
.hero-title-image { display: none; }

@media (max-width: 700px) {
  .hero-title-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .hero-title-image {
    display: block;
    width: calc(100% + 2 * clamp(36px, 5vw, 64px));
    max-width: 340px;
    margin-bottom: 20px;
  }
}

/* Page header (list/detail/stages) */
.page-header { padding: 110px 48px 60px; text-align: center; }
.page-header h1 { font-size: min(9vw, 72px); line-height: 1; }
.page-header .eyebrow { margin-bottom: 0; }

/* Grid cards */
.card-image img, .media-image img, .team-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
/* Cropped spectacle cards are deliberately rendered larger than their box
   (card-crop.js sets an explicit pixel width/height so zoom can crop into
   overflow:hidden) -- the global `img { max-width: 100% }` would otherwise
   clamp that width straight back down to the box size. */
.card-image img[data-crop-zoom] { max-width: none; }

.detail-image { max-width: 840px; margin: 28px auto 0; overflow: hidden; position: relative; background: var(--bg); }
.detail-image.ratio-3-4-5 { aspect-ratio: 3/4.5; max-width: 480px; }
.detail-image.ratio-16-9 { aspect-ratio: 16/9; }
.detail-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; display: block;
}
/* 3:4.5 shows the whole photo (letterboxed) instead of cropping it -- see
   card-crop.js, which computes the actual sizing; this is only the no-JS
   fallback so the image isn't stretched/cropped before the script runs. */
.detail-image.ratio-3-4-5 img { object-fit: contain; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  width: 100%;
}
@media (max-width: 700px) {
  #spectacles-preview.grid-cards > :nth-child(n+2) { display: none; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  #spectacles-preview.grid-cards { grid-template-columns: repeat(2, 1fr); }
  #spectacles-preview.grid-cards > :nth-child(n+3) { display: none; }
}
.card {
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  overflow: hidden; width: 100%;
  background: none; color: inherit; font: inherit; padding: 0; cursor: pointer;
}
.card-image {
  aspect-ratio: 4/3; box-sizing: border-box;
  display: flex; align-items: flex-end; padding: 10px; overflow: hidden;
  width: 100%; background-color: var(--bg-alt); position: relative;
}
.grid-cards-tall .card-image { aspect-ratio: 3/4.5; }
.card-image.hatch {
  background-image: repeating-linear-gradient(45deg, var(--bg-hatch-a), var(--bg-hatch-a) 8px, var(--bg-hatch-b) 8px, var(--bg-hatch-b) 16px);
}
.card-photo-label { position: relative; z-index: 1; font-family: monospace; font-size: clamp(9px, 1vw, 10px); color: var(--muted); }
.card h3 { font-size: clamp(19px, 2.4vw, 24px); margin: 0 0 20px; }
.card-placeholder { cursor: default; }
.card-placeholder h3 { color: var(--muted); }

.section { padding: 0 48px 100px; margin-left: 5vw; margin-right: 5vw; }

@media (max-width: 700px) {.section{padding: 0 18px 100px;}}

@media (min-width: 701px) and (max-width: 1024px){.section{padding: 0 0px 100px;}}


.more-link-row { text-align: center; margin-top: 40px; display: flex; justify-content: flex-end; }

@media (max-width: 700px) {
  .section-label.left { text-align: center; }
  .more-link-row { justify-content: center; }
}

.btn-outline {
  background: none; color: var(--accent-light);
  border: 1px solid oklch(0.58 0.15 35 / 0.5);
  padding: 12px 28px; font-size: clamp(11px, 1.1vw, 12px); font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn-solid {
  background: var(--accent); color: oklch(0.97 0.01 60); border: none;
  padding: 14px 36px; font-size: clamp(12px, 1.2vw, 13px); font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase; cursor: pointer;
}

/* Team */
.team-section { padding: 0 0 60px; max-width: 900px; margin: 60px auto; }
.team-list { display: flex; flex-direction: column; gap: 120px; margin-top: 32px; }
.team-row { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.team-pair { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; width: 100%; gap: clamp(12px, 4vw, 48px); }
.team-photo { flex: 1 1 0; min-width: 0; max-width: 360px; margin: 0 auto; aspect-ratio: 3/4; position: relative; overflow: hidden; }
.team-role { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; font-size: clamp(11px, 1.3vw, 14px); color: var(--fg-dim); line-height: 1.6; white-space: pre-line; }
.team-name-tag { text-align: center; }
.team-name-tag span { font-family: "EB Garamond",  serif;font-weight: 500; font-size: clamp(14px, 2.4vw, 24px); letter-spacing: 3px;}

@media (max-width: 700px) {
  .team-list {padding: 36px;}
  .team-pair { flex-direction: column; align-items: center; gap: 20px; }
  .team-name-tag span { font-size: 20px; }
  .team-photo { order: 0; flex: 0 0 auto; width: 60%; }
  .team-role {
    order: 1; flex: 0 0 auto; width: 100%;
    font-size: clamp(15px, 1.6vw, 17px); line-height: 1.9; color: var(--fg-dim);
  }
}

@media (min-width: 701px) and (max-width: 1024px){.team-section{padding: 0 5vw 60px;}}

/* Échos du théâtre */
.echo-card {
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 14px;
  overflow: hidden; width: 100%; padding: 20px; box-sizing: border-box;
}
.echo-title { font-size: clamp(19px, 2.4vw, 24px); color: var(--accent); width: 100%; }
.echo-desc { font-size: clamp(13px, 1.3vw, 14px); line-height: 1.6; color: var(--fg-dimmer); margin: 0; width: 100%; white-space: pre-line; }
.echo-link { font-family: 'Source Sans Pro', Arial, sans-serif; font-size: 14px; text-decoration: underline; }
.echo-card-placeholder .echo-title { color: var(--muted); }
.echos-section { padding-top: 80px; padding-bottom: 140px; }

/* Échos carousel: always a slider on phone and tablet (one card per slide on
   phone, two on tablet); on desktop, only when there are 4+ published échos
   (fewer than that lays out as a static 3-up grid via
   .echos-carousel-wrap-compact, matching the old non-carousel layout). */
.echos-carousel-wrap { width: 100%; }
.echos-carousel { display: flex; align-items: center; gap: 12px; width: 100%; }
.echos-track {
  display: flex; gap: 28px; flex: 1; min-width: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.echos-track::-webkit-scrollbar { display: none; }
.echos-track .echo-card { flex: 0 0 calc((100% - 56px) / 3); scroll-snap-align: start; }
@media (max-width: 700px) {
  .echos-section { padding-left: 16px; padding-right: 16px; margin-left: 0; margin-right: 0; padding-top: 0; }
  .echos-track .echo-card { flex: 0 0 100%; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  .echos-track .echo-card { flex: 0 0 calc((100% - 28px) / 2); }
  .echos-section {padding-left: 0px; padding-right: 0px;}
}
@media (min-width: 1025px) {
  .echos-carousel-wrap-compact .echos-track {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    overflow: visible;
  }
  .echos-carousel-wrap-compact .echos-track .echo-card { flex: none; }
  .echos-carousel-wrap-compact .carousel-nav,
  .echos-carousel-wrap-compact .echos-scrollbar { display: none; }
}
.echos-scrollbar {
  position: relative; width: 120px; height: 2px; margin: 20px auto 0;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.echos-scrollbar-thumb {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--accent); border-radius: 2px;
}
.carousel-nav {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: none; border: 1px solid var(--border); color: var(--accent-light);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.carousel-nav:hover { background: oklch(0.58 0.15 35 / 0.1); }

/* Nos partenaires */
.partners-section { padding: 0 0 100px; width: 100%; overflow: hidden; }
.partners-viewport { overflow: hidden; width: 100%; }
.partners-track { display: flex; gap: 56px; width: max-content; animation: partners-scroll 28s linear infinite; }
.partner-item { flex: 0 0 auto; width: 160px; height: 100px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.partner-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes partners-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Spectacles & stages listing rows (shared layout) */
.media-row { padding: 0 48px 100px; max-width: 1080px; margin: 0 auto; }
.media-row-inner { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 4vw, 56px); }
.media-image-wrap { flex: 1 1 320px; display: flex; gap: 16px; }
.media-image {
  flex: 1 1 0; aspect-ratio: 3/4.5; display: flex; align-items: flex-end; padding: 12px;
  background-color: var(--bg-alt); position: relative; overflow: hidden;
}
.media-body { flex: 1 1 320px; min-width: 0; }
.media-body .tag { font-family: "EB Garamond", serif; font-size: clamp(10px, 1.1vw, 11px); letter-spacing: 5px; color: var(--accent-light); text-transform: uppercase; margin-bottom: 8px; }
.media-body h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 16px; }
.media-body p { font-size: clamp(14px, 1.5vw, 16px); line-height: 1.8; color: var(--fg-dim); margin: 0 0 24px; }

/* Detail page */
.back-link { max-width: 1080px; margin: 0 auto; padding: 32px 48px 0; }
.back-link a { background: none; border: none; color: var(--accent-light); font-size: clamp(12px, 1.2vw, 13px); letter-spacing: 0.5px; }
.detail-header { padding: 40px 48px 50px; text-align: center; }
.detail-header .eyebrow { color: var(--accent); margin-bottom: 18px; }
.detail-header h1 { font-size: min(9vw, 100px); line-height: 1; }
.detail-grid { padding: 0 48px 90px; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 56px; }
.detail-grid > div { min-width: 0; }
.detail-grid .label { margin-bottom: 16px; }
.detail-grid p { font-size: clamp(14px, 1.5vw, 16px); line-height: 1.85; color: var(--fg-dim); margin: 0 0 18px; }
.character-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 10px; }
.character-row .name, .character-row .desc { min-width: 0; }
.character-row .name { font-family: "EB Garamond", serif; font-size: clamp(14px, 1.4vw, 15px); letter-spacing: 1px;}
.character-row .desc { font-size: clamp(12px, 1.2vw, 13px); color: var(--muted); }

.dates-section { padding: 0 48px 120px; max-width: 840px; margin: 0 auto; }
.center-label { text-align: center; margin-bottom: 36px; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px 162px; padding: 16px 0; border-top: 1px solid var(--border-soft); }
.date-row .date { min-width: 0; text-align: right; font-family: "EB Garamond", serif; font-size: clamp(15px, 1.6vw, 17px); color: var(--accent-light); letter-spacing: 2px;}
.date-row .venue { min-width: 0; }
.date-row .venue .name { font-size: clamp(14px, 1.4vw, 15px); }
.date-row .venue .city { font-size: clamp(12px, 1.2vw, 13px); color: var(--muted); margin-top: 2px; }

@media (max-width: 700px) {
  .date-row{ gap: 16px 90px;}
}

/* Distribution / équipe artistique (page spectacle) -- generic list of role
   groups ("avec", "mise en scène"...) each holding one or more named
   entries, with an optional smaller note under a name (e.g. an assistant
   credit). Admin chooses per spectacle whether groups stack vertically
   (default, one block per row) or run horizontally (each group its own
   column, side by side). */
.credits-section { padding: 0 48px 120px; max-width: 560px; margin: 0 auto; text-align: center; }
.credits-section-horizontal { max-width: 1280px; }
.credits-groups { display: flex; flex-direction: column; gap: 36px; padding: 40px 0; }
/* Single row on desktop -- groups shrink to fit and, if there truly isn't
   room, the row scrolls horizontally instead of breaking onto a second line.
   The font shrinks with the column (cqw, keyed off .credits-group's own
   width) rather than the viewport, so it stays readable whether there are
   2 groups or 6. On tablet it wraps to 2 rows instead of scrolling (see the
   media query below), and under 700px it's forced back to the plain
   vertical stack so phones never see the horizontal mode. */
.credits-groups-horizontal { flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: 16px 40px; overflow-x: auto; padding-bottom: 8px; }
.credits-groups-horizontal .credits-group { flex: 1 1 0; min-width: 120px; container-type: inline-size; }
.credits-groups-horizontal .credits-name { font-size: clamp(15px, 13px + 3.5cqw, 21px); }
.credits-label { font-family: "EB Garamond", serif; font-size: clamp(11px, 1.1vw, 12px); letter-spacing: 5px; text-transform: uppercase; color: var(--label); margin-bottom: 10px; }
.credits-entry + .credits-entry { margin-top: 6px; }
.credits-name { font-family: "EB Garamond", serif; font-size: clamp(17px, 2.1vw, 21px); color: var(--fg); line-height: 1.35; }
.credits-note { font-size: clamp(12px, 1.2vw, 13px); color: var(--muted); margin-top: 2px; }

@media (min-width: 701px) and (max-width: 1024px) {
  .credits-groups-horizontal { flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; gap: 84px 40px; }
  .credits-groups-horizontal .credits-group { flex: 1 1 160px; }
}
@media (max-width: 700px) {
  .credits-section-horizontal { max-width: 560px; }
  .credits-groups-horizontal {
    flex-direction: column; flex-wrap: wrap; overflow-x: visible; padding-bottom: 0; gap: 36px;
  }
  .credits-groups-horizontal .credits-group { flex: initial; min-width: 0; width: 100%; container-type: normal; }
  .credits-groups-horizontal .credits-name { font-size: clamp(17px, 2.1vw, 21px); }
}

/* Galerie photos (page spectacle) -- static row when a breakpoint has room
   to show every photo at once, slider (same mechanics as the Échos carousel)
   once the count exceeds that breakpoint's per-view capacity: desktop >3,
   tablet >2, phone >1. */
.gallery-section { padding: 0 48px 120px; max-width: 1280px; margin: 0 auto; }
.gallery-photo { position: relative; overflow: hidden; background: var(--bg); }
.gallery-photo.ratio-4-3 { aspect-ratio: 4/3; }
.gallery-photo.ratio-3-4-5 { aspect-ratio: 3/4.5; }
.gallery-photo.ratio-16-9 { aspect-ratio: 16/9; }
.gallery-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; display: block;
}
/* 3:4.5 shows the whole photo (letterboxed) instead of cropping it, matching
   the other per-image croppers -- see card-crop.js for the actual sizing,
   this is only the no-JS fallback. */
.gallery-photo.ratio-3-4-5 img { object-fit: contain; }

.gallery-static { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.gallery-static .gallery-photo { flex: 1 1 280px; max-width: 360px; }

.gallery-carousel-wrap { width: 100%; }
.gallery-carousel { display: flex; align-items: center; gap: 12px; width: 100%; }
.gallery-track {
  display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track .gallery-photo { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; }
.gallery-scrollbar {
  position: relative; width: 120px; height: 2px; margin: 20px auto 0;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.gallery-scrollbar-thumb {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--accent); border-radius: 2px;
}
@media (max-width: 700px) {
  .gallery-section { padding-left: 16px; padding-right: 16px; }
  .gallery-track .gallery-photo { flex: 0 0 100%; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  .gallery-track .gallery-photo { flex: 0 0 calc((100% - 20px) / 2); }
}
/* 2 photos fit in one row from tablet up (>1 is the phone-only threshold),
   so fall back to the static layout there instead of a scrollable carousel. */
@media (min-width: 701px) {
  .gallery-carousel-wrap[data-count="2"] .carousel-nav,
  .gallery-carousel-wrap[data-count="2"] .gallery-scrollbar { display: none; }
  .gallery-carousel-wrap[data-count="2"] .gallery-track {
    overflow: visible; scroll-snap-type: none; flex-wrap: wrap; justify-content: center;
  }
  .gallery-carousel-wrap[data-count="2"] .gallery-track .gallery-photo { flex: 1 1 280px; max-width: 360px; }
}
/* 3 photos fit in one row only on desktop (tablet's threshold is >2). */
@media (min-width: 1025px) {
  .gallery-carousel-wrap[data-count="3"] .carousel-nav,
  .gallery-carousel-wrap[data-count="3"] .gallery-scrollbar { display: none; }
  .gallery-carousel-wrap[data-count="3"] .gallery-track {
    overflow: visible; scroll-snap-type: none; flex-wrap: wrap; justify-content: center;
  }
  .gallery-carousel-wrap[data-count="3"] .gallery-track .gallery-photo { flex: 1 1 280px; max-width: 360px; }
}

/* Stage detail page */
.stage-detail-content { padding: 0 48px 60px; max-width: 840px; margin: 0 auto; }
.stage-detail-image { aspect-ratio: 16/9; margin-bottom: 40px; overflow: hidden; position: relative; background: var(--bg); }
.stage-detail-image.ratio-3-4-5 { aspect-ratio: 3/4.5; max-width: 480px; margin-left: auto; margin-right: auto; }
.stage-detail-image img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; display: block;
}
/* 3:4.5 shows the whole photo (letterboxed) instead of cropping it -- see
   card-crop.js, which computes the actual sizing; this is only the no-JS
   fallback so the image isn't stretched/cropped before the script runs. */
.stage-detail-image.ratio-3-4-5 img { object-fit: contain; }
.stage-detail-content p { font-size: clamp(14px, 1.5vw, 16px); line-height: 1.85; color: var(--fg-dim); margin: 0 0 18px; }
.stage-detail-cta { padding: 0 48px 120px; max-width: 840px; margin: 0 auto; text-align: center; }

/* Contact form */
.contact-section { padding: 20px 48px 130px; max-width: 900px; margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form .row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.contact-form input, .contact-form textarea {
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--fg);
  font-family: 'Source Sans Pro', Arial, sans-serif; font-size: clamp(13px, 1.3vw, 14px);
  padding: 14px 16px; outline: none; width: 100%;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: oklch(0.6 0.01 55); opacity: 1; }
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-alt) inset;
  box-shadow: 0 0 0 1000px var(--bg-alt) inset;
  transition: background-color 9999s ease-in-out 0s;
}
.contact-form textarea { resize: vertical; }
.contact-form button { align-self: flex-start; margin-top: 8px; }
.contact-form button:disabled { opacity: 0.6; cursor: default; }
.form-status { font-size: clamp(13px, 1.3vw, 14px); min-height: 1em; }
.form-status.success { color: oklch(0.5 0.14 145); }
.form-status.error { color: var(--accent-light); }

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { order: -1; text-align: center; }
  .contact-info .section-label { text-align: center; }
  .social-links { justify-content: center; }
  .contact-form button { align-self: center; }
}

/* Custom select / datepicker (matches original mockup widgets) */
.custom-select, .custom-datepicker { position: relative; }
.custom-select-trigger, .custom-datepicker-trigger {
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--fg);
  font-family: 'Source Sans Pro', Arial, sans-serif; font-size: clamp(13px, 1.3vw, 14px);
  padding: 14px 16px; outline: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.custom-datepicker-trigger svg { color: var(--accent-light); flex: none; }
.custom-select-arrow { font-size: 22px; color: var(--accent-light); transition: transform 0.2s; }
.custom-select.open .custom-select-arrow { transform: rotate(180deg); }
.custom-select-label, .custom-datepicker-label { color: oklch(0.6 0.01 55); }
.custom-select-label.filled, .custom-datepicker-label.filled { color: var(--fg); }


.custom-select-options {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-alt); border: 1px solid var(--border); border-top: none; z-index: 10;
}
.custom-select-option { padding: 12px 16px; cursor: pointer; font-size: clamp(13px, 1.3vw, 14px); color: var(--fg); }
.custom-select-option:hover { background: oklch(0.58 0.15 35 / 0.15); }

.calendar-popup {
  position: absolute; top: 100%; left: 0; background: var(--bg-alt); border: 1px solid var(--border);
  z-index: 10; padding: 14px; width: min(280px, 100%); box-sizing: border-box;
}
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.calendar-nav { cursor: pointer; color: var(--accent-light); font-size: 18px; padding: 0 8px; }
.calendar-label { font-family: "EB Garamond", serif; font-size: 16px; color: var(--fg); letter-spacing: 5px;}
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-cell {
  width: 100%; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--fg); background: transparent; cursor: pointer;
}
.calendar-cell:hover:not(.calendar-cell-blank) { background: oklch(0.58 0.15 35 / 0.2); }
.calendar-cell.calendar-cell-blank { cursor: default; color: var(--muted); }
.calendar-cell.selected { background: var(--accent); color: #fff; }

.contact-info p { font-size: clamp(14px, 1.5vw, 16px); line-height: 1.8; color: var(--fg-dim); margin: 0 0 28px; }
.contact-info p.contact-link { margin-top: -16px; }
.contact-info p.contact-link a { text-decoration: underline; }
.social-links { display: flex; gap: 20px; }
.social-links a { color: var(--fg); display: flex; }

/* Footer */
.site-footer {
  padding: 36px 48px; border-top: 1px solid var(--border-soft);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 24px;
  font-size: clamp(11px, 1.1vw, 12px); color: var(--muted);
}
.footer-copyright { justify-self: center; text-align: center; }
.footer-links { justify-self: end; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.site-footer a { color: var(--label); text-decoration: underline; }
.site-footer a:hover { color: var(--fg); }
.footer-link-btn {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: var(--label); text-decoration: underline;
}
.footer-link-btn:hover { color: var(--fg); }

@media (max-width: 700px) {
  .site-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-copyright, .footer-links { justify-self: center; }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px clamp(20px, 5vw, 48px);
  background: var(--bg-alt); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px oklch(0 0 0 / 0.1);
}
.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: clamp(13px, 1.3vw, 14px); line-height: 1.6; color: var(--fg-dim); }
.cookie-banner p a { text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-banner .btn-outline, .cookie-banner .btn-solid { padding: 10px 22px; }

/* Legal / privacy page */
.legal-content { max-width: 760px; margin: 0 auto; padding: 0 48px 100px; }
.legal-content h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: 3px; color: var(--accent); margin: 56px 0 20px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: clamp(15px, 1.8vw, 17px); letter-spacing: 2px; margin: 32px 0 12px; }
.legal-content p { font-size: clamp(14px, 1.5vw, 16px); line-height: 1.85; color: var(--fg-dim); margin: 0 0 4px; }
.legal-content a { text-decoration: underline; }

.empty, .error {
  text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px;
}
.error { color: var(--accent-light); }
.hidden { display: none !important; }
