:root {
  --paper: #f2ebe0;
  --paper-deep: #e4d8c6;
  --ink: #1c1914;
  --muted: #5e554a;
  --accent: #8b3a2a;
  --line: #a67c5c;
  --field: #6b7a4d;
  --shell: min(1120px, calc(100vw - 2.5rem));
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --text: "Source Serif 4", Georgia, serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(107, 122, 77, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(139, 58, 42, 0.07), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, #ebe2d4 100%);
  font-family: var(--text);
  line-height: 1.55;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.1'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
iframe { border: 0; width: 100%; height: 100%; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: fixed;
  top: calc(10px + var(--safe-t));
  left: calc(10px + var(--safe-l));
  z-index: 9999;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid #1f5fad; outline-offset: 3px; }

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--text);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}
.section-head.compact { margin-bottom: 1.25rem; align-items: start; }
.section-intro { color: var(--muted); max-width: 42rem; }

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

.prose { font-size: 1.05rem; }
.prose .lead { font-size: 1.15rem; }
.credit { margin-top: 1.5rem; color: var(--muted); font-size: 0.92rem; font-style: italic; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(28, 25, 20, 0.06); }
.text-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-underline-offset: 0.2em;
}

/* ---- nav ---- */
.page-nav {
  position: fixed;
  top: 50%;
  right: max(0.6rem, var(--safe-r));
  z-index: 120;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.page-nav.is-visible { opacity: 1; pointer-events: auto; }
.page-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--muted);
}
.page-nav a.is-active { color: var(--ink); }
.page-nav-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.page-nav-label { max-width: 0; overflow: hidden; opacity: 0; transition: 0.25s ease; white-space: nowrap; }
.page-nav a:hover .page-nav-label,
.page-nav a.is-active .page-nav-label,
.page-nav a:focus-visible .page-nav-label {
  max-width: 9rem;
  opacity: 1;
}

/* ---- next rail ---- */
.next-rail {
  position: fixed;
  left: max(0.75rem, var(--safe-l));
  bottom: max(0.75rem, var(--safe-b));
  z-index: 130;
  width: min(17rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  background: rgba(242, 235, 224, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(28, 25, 20, 0.12);
  backdrop-filter: blur(8px);
}
.next-rail-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.next-rail-time {
  margin: 0.25rem 0 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: var(--muted);
}
.next-rail-title {
  margin: 0.2rem 0 0.55rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.25;
}
.next-rail-link {
  font-size: 0.85rem;
  color: var(--accent);
}

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(2.5rem + var(--safe-t)) 0 3rem;
  display: grid;
  align-items: center;
}
.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(242, 235, 224, 0.92) 0%, rgba(242, 235, 224, 0.55) 42%, transparent 70%),
    url("../artwork/hero-henrichau.jpg") right center / cover no-repeat;
  opacity: 0.28;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  width: var(--shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: center;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.hero-facts {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.75rem;
}
.hero-facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-facts dd {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-figure {
  margin: 0;
  background: var(--paper-deep);
  padding: 0.7rem;
  border: 1px solid rgba(166, 124, 92, 0.45);
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 1440 / 1268;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.95);
}
.hero-figure figcaption {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---- next panel ---- */
.next-panel {
  padding: 2.5rem 0 3rem;
  border-block: 1px solid rgba(166, 124, 92, 0.35);
  background: rgba(228, 216, 198, 0.35);
}
.next-card {
  padding: 1.4rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(242, 235, 224, 0.85);
}
.next-card.is-live { border-left-color: var(--field); }
.next-card-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}
.next-card.is-live .next-card-status { color: var(--field); }
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 6px transparent; }
}
.next-card-when {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.next-card-title {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}
.next-card-meta { color: var(--muted); margin: 0; }
.next-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}
.next-card-actions .text-link { margin-top: 0; }

.next-upcoming {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.next-upcoming a {
  display: block;
  text-decoration: none;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(166, 124, 92, 0.4);
  background: rgba(242, 235, 224, 0.55);
  min-height: 100%;
}
.next-upcoming li.is-live a { border-color: var(--field); }
.nu-time {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.35rem;
}
.nu-title {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.3;
}

/* ---- about ---- */
.about-section,
.program-section,
.concert-section,
.heritage-section,
.venue-section,
.gallery-section {
  padding: 4rem 0;
}

.organizers-box {
  padding: 1.25rem 1.35rem;
  border-top: 2px solid var(--accent);
  background: rgba(228, 216, 198, 0.4);
}
.organizers-box ul {
  list-style: none;
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}
.organizers-box li {
  padding-left: 0.9rem;
  border-left: 2px solid var(--line);
}

/* ---- program / timeline ---- */
.day-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.day-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-align: left;
  min-width: 11rem;
}
.day-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.day-tab-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}
.day-tab-date {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.day-panel-head {
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(166, 124, 92, 0.45);
}
.day-panel-head h3 { font-size: 1.55rem; margin-bottom: 0.25rem; }
.day-panel-head p { margin: 0; color: var(--muted); }

.timeline {
  list-style: none;
  display: grid;
  gap: 0;
  border-left: 1px solid rgba(166, 124, 92, 0.55);
  margin-left: 0.35rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.95rem 0 0.95rem 1.2rem;
  position: relative;
  scroll-margin-top: 5rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.28rem;
  top: 1.35rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--paper);
}
.timeline-item.is-highlight::before { background: var(--accent); }
.timeline-item.is-now,
.timeline-item.is-next {
  background: rgba(139, 58, 42, 0.06);
}
.timeline-item.is-now::before {
  background: var(--field);
  box-shadow: 0 0 0 4px rgba(107, 122, 77, 0.25);
}
.timeline-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.92rem;
  padding-top: 0.15rem;
}
.timeline-end { display: block; }
.timeline-badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.timeline-item.is-highlight .timeline-badge { color: var(--accent); }
.timeline-body h4 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.timeline-speaker {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}
.timeline-aff,
.timeline-detail {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.timeline-item.is-break .timeline-body h4,
.timeline-item.is-info .timeline-body h4 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

/* ---- concert ---- */
.concert-section {
  background: linear-gradient(180deg, rgba(28, 25, 20, 0.03), transparent 40%);
}
.concert-when {
  color: var(--muted);
  margin-top: 0.5rem;
}
.concert-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
}
.piece-list {
  list-style: none;
  margin: 0.75rem 0 1.75rem;
  display: grid;
  gap: 0.45rem;
}
.piece-list li {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(166, 124, 92, 0.35);
  font-size: 0.95rem;
}
.performer { margin-bottom: 1rem; }
.performer h4 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.performer p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- heritage / iconography ---- */
.heritage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.heritage-card {
  margin: 0;
  background: var(--paper-deep);
  padding: 0.65rem;
  border: 1px solid rgba(166, 124, 92, 0.4);
}
.heritage-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.heritage-card img {
  width: 100%;
  aspect-ratio: 1440 / 1268;
  object-fit: cover;
}
.heritage-card figcaption {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.65rem;
  font-size: 0.9rem;
}
.heritage-card figcaption span { color: var(--muted); }

.lightbox {
  border: 0;
  padding: 0;
  max-width: min(960px, 94vw);
  background: transparent;
}
.lightbox::backdrop { background: rgba(20, 16, 12, 0.82); }
.lightbox figure {
  margin: 0;
  background: var(--paper);
  padding: 0.75rem;
}
.lightbox img { width: 100%; }
.lightbox figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.lightbox-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  border: 0;
  background: var(--ink);
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

/* ---- venue ---- */
.map-embed {
  min-height: 280px;
  height: 340px;
  border: 1px solid rgba(166, 124, 92, 0.45);
  background: var(--paper-deep);
}
.venue-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 0.5rem 0 0.35rem;
}

/* ---- gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.gallery-item {
  margin: 0;
  background: var(--paper-deep);
  min-height: 10rem;
  display: grid;
  place-items: center;
}
.gallery-item.is-placeholder {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  border: 1px dashed var(--line);
}
.gallery-empty { color: var(--muted); }

/* ---- footer ---- */
.site-footer {
  padding: 2.5rem 0 calc(2.5rem + var(--safe-b));
  border-top: 1px solid rgba(166, 124, 92, 0.45);
  background: rgba(28, 25, 20, 0.04);
}
.footer-inner { display: grid; gap: 0.35rem; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0;
}

/* ---- responsive ---- */
@media (max-width: 960px) {
  .hero-grid,
  .split,
  .concert-grid,
  .heritage-grid {
    grid-template-columns: 1fr;
  }
  .hero-wash { opacity: 0.16; }
  .next-upcoming { grid-template-columns: 1fr 1fr; }
  .page-nav { display: none; }
  .timeline-item { grid-template-columns: 5.2rem 1fr; gap: 0.75rem; }
}

@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: start; }
  .next-upcoming { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .next-rail { width: calc(100vw - 1.5rem); }
  .hero { min-height: auto; padding-top: calc(1.5rem + var(--safe-t)); }
  .timeline-item { grid-template-columns: 1fr; padding-left: 1rem; }
  .timeline-time { display: flex; gap: 0.35rem; }
  .timeline-end { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-dot { animation: none; }
  .page-nav { transition: none; }
}
