/* OrchestraFinder — design system v1. Mobile-first, no build step. */

:root {
  --paper: #f6f2ea;
  --paper-2: #ede7db;
  --card: #fffdf8;
  --ink: #171923;
  --ink-2: #232633;
  --text: #1f2130;
  --muted: #6a6d7a;
  --line: #e1dacc;
  --gold: #c8a24a;
  --gold-2: #a9852f;
  --wine: #8a1c2b;
  --wine-2: #6e1522;
  --on-dark: #f3eee4;
  --on-dark-muted: #b8b3a7;
  --shadow: 0 1px 2px rgba(20, 22, 35, .05), 0 10px 28px rgba(20, 22, 35, .08);
  --shadow-hover: 0 2px 4px rgba(20, 22, 35, .06), 0 16px 40px rgba(20, 22, 35, .14);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 64px;
  --tab-h: 62px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12141c;
    --paper-2: #181b25;
    --card: #1b1e29;
    --text: #ebe6da;
    --muted: #9d998f;
    --line: #2a2e3c;
    --gold: #d6b25b;
    --wine: #b23a4a;
    --wine-2: #8f2a38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3, .h3 { font-size: 1.25rem; }
.h3 { font-family: var(--font-display); font-weight: 600; margin: 1.6rem 0 .6rem; }
.h3:first-child { margin-top: 0; }
p { margin: 0 0 1em; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-dark); padding: .5rem .8rem; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 44rem; }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-2); margin: 0 0 .5rem;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--gold); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 42rem; }
.hero .lede { color: var(--on-dark-muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(20, 22, 35, .06); }
.is-home .site-header { background: color-mix(in srgb, var(--ink) 80%, transparent); color: var(--on-dark); }
.is-home .site-header.is-scrolled { border-color: #2a2e3c; }
.header-row { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; letter-spacing: -.01em; white-space: nowrap; }
.brand b { font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--gold); }
.brand.small { font-size: 1.15rem; }
.primary-nav { display: none; gap: 1.4rem; margin-left: 1rem; font-weight: 500; }
.primary-nav a { padding: .4rem 0; border-bottom: 2px solid transparent; }
.primary-nav a[aria-current="page"] { border-color: var(--gold); }
.primary-nav a:hover { text-decoration: none; border-color: var(--gold); }
.header-search { margin-left: auto; display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .25rem .15rem .9rem; max-width: 380px; flex: 1; }
.is-home .header-search { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--on-dark); }
.header-search input { border: 0; background: transparent; font: inherit; color: inherit; width: 100%; min-width: 0; outline: none; }
.header-search input::placeholder { color: var(--muted); }
.is-home .header-search input::placeholder { color: var(--on-dark-muted); }
.header-search button { border: 0; background: var(--gold); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.header-search button svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .header-search { display: none; } }
@media (min-width: 900px) { .primary-nav { display: flex; } }

/* Hero */
.hero {
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(200, 162, 74, .28), transparent 60%),
    radial-gradient(700px 400px at 90% 110%, rgba(138, 28, 43, .35), transparent 60%),
    var(--ink);
  color: var(--on-dark);
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem));
}
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 600; max-width: 14ch; margin-bottom: .5em; }
.hero-inner { max-width: 760px; }

.finder { margin-top: 1.6rem; }
.finder-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.finder-row input[type="text"], .finder-row input[type="search"], .finder-row select, .finder-row input[type="date"] {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1.05rem; padding: .85rem 1rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--text);
}
.hero .finder-row input, .hero .finder-row select { border-color: transparent; }
.finder-row select { flex: 0 1 160px; }
.finder-row label { display: flex; align-items: center; gap: .5rem; color: inherit; }
.finder-row label input { flex: 1; }
.finder-dates { margin-top: .6rem; align-items: center; }
.finder-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; }
.finder-hint { font-size: .85rem; }
.hero .finder-hint { color: var(--on-dark-muted); }
.hero .btn-ghost { color: var(--on-dark); border-color: rgba(255, 255, 255, .25); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.stats { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; gap: 1.5rem 2.2rem; flex-wrap: wrap; color: var(--on-dark-muted); font-size: .95rem; }
.stats b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--on-dark); line-height: 1.1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .98rem; padding: .8rem 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-2); box-shadow: 0 6px 18px rgba(138, 28, 43, .3); }
.btn-secondary { background: var(--ink); color: var(--on-dark); }
.btn-secondary:hover { background: var(--ink-2); }
@media (prefers-color-scheme: dark) { .btn-secondary { background: var(--gold); color: var(--ink); } .btn-secondary:hover { background: var(--gold-2); } }
.btn-ghost { background: transparent; color: inherit; border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.btn:disabled { opacity: .6; cursor: wait; }

/* Sections */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark p { color: var(--on-dark-muted); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-head.compact { margin-bottom: .8rem; }
.link-more { font-weight: 600; color: var(--wine); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .link-more { color: var(--gold); } }
.split { display: grid; gap: 2rem; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }

.page-head { padding: clamp(1.8rem, 4vw, 3rem) 0 1.2rem; }
.page-head h1 { margin-bottom: .3em; }
.detail-head { background: var(--paper-2); padding-bottom: 1.8rem; border-bottom: 1px solid var(--line); }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a:hover { color: var(--text); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.actions.center { justify-content: center; }
.notice { background: #fff4e1; border: 1px solid #f0d9a8; color: #6b4a00; padding: .8rem 1rem; border-radius: var(--radius-sm); display: inline-block; }

.filters { display: flex; gap: .8rem; flex-wrap: wrap; align-items: end; margin-top: .8rem; }
.filters label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 500; color: var(--muted); flex: 1 1 160px; }
.filters select, .filters input { font: inherit; font-size: 1rem; padding: .65rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--text); }
.filters .btn { flex: 0 0 auto; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.chip { display: inline-flex; gap: .35rem; align-items: baseline; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: .92rem; font-weight: 500; }
.chip:hover { text-decoration: none; border-color: var(--gold); }
.chip.is-active { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.chip.is-active .muted { color: var(--on-dark-muted); }
@media (prefers-color-scheme: dark) {
  .chip.is-active { background: var(--gold); color: var(--ink); border-color: var(--gold); }
  .chip.is-active .muted { color: var(--ink-2); }
}

/* Grids and cards */
.grid { display: grid; gap: 1rem; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid.people { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card {
  display: flex; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
  min-height: 100%;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--gold); text-decoration: none; }
.card-body { min-width: 0; flex: 1; }
.card-title { font-size: 1.12rem; margin: 0 0 .25rem; }
.card-sub { font-weight: 500; margin: 0 0 .2rem; }
.card-meta { color: var(--muted); font-size: .9rem; margin: 0; }
.card-kicker { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; margin: 0 0 .35rem; }
.date-block {
  flex: none; width: 64px; text-align: center; background: var(--ink); color: var(--on-dark); border-radius: var(--radius-sm);
  padding: .45rem 0; line-height: 1.05; align-self: flex-start;
}
.date-block .dow { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.date-block .day { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin: .1rem 0; }
.date-block .mon { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--on-dark-muted); }
.program-chips { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.program-chips li { font-size: .8rem; background: var(--paper-2); border-radius: 999px; padding: .2rem .6rem; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.program-chips .more { color: var(--muted); background: transparent; }

.person-card { align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-2); }
.avatar-initials { display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; color: var(--gold-2); background: var(--paper-2); }
.portrait { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--card); box-shadow: var(--shadow); font-size: 2rem; }
.person-head-row { display: flex; gap: 1.4rem; align-items: center; }
@media (max-width: 560px) { .person-head-row { flex-direction: column; align-items: flex-start; } .portrait { width: 88px; height: 88px; } }

.day-group { margin-bottom: 1.8rem; }
.day-heading { font-family: var(--font-body); font-size: .95rem; font-weight: 500; color: var(--muted); margin: 0 0 .7rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.day-heading span { color: var(--text); font-weight: 600; }
.state-group { margin-bottom: 2rem; }
.state-heading { margin-bottom: .8rem; }

/* Detail layouts */
.two-col { display: grid; gap: 2rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 3rem; } }
.two-col aside { align-self: start; }
@media (min-width: 900px) { .two-col aside { position: sticky; top: calc(var(--header-h) + 1rem); } }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.artist-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.artist-list li { display: flex; flex-direction: column; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.artist-list .muted { font-size: .85rem; }
.program { padding-left: 1.4rem; margin: 0 0 1.5rem; }
.program li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.program .composer { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-2); font-weight: 600; }
.program .work { font-size: 1.05rem; font-weight: 500; }
.work-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); margin-bottom: .6rem; }
.work-group summary { cursor: pointer; padding: .7rem .9rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.work-group summary::after { content: "+"; color: var(--muted); }
.work-group[open] summary::after { content: "–"; }
.work-group .plain-list { padding: 0 .9rem .5rem; font-size: .95rem; }
.star { color: var(--gold); font-size: .8em; }
.nick { font-style: italic; font-weight: 400; color: var(--muted); }
.result-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.result-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.prose { max-width: 66ch; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }

/* Search typeahead */
.has-suggest { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain;
  text-align: left;
}
.header-search .suggest { min-width: min(92vw, 460px); right: 0; left: auto; top: calc(100% + 8px); }
.suggest-group + .suggest-group { border-top: 1px solid var(--line); }
.suggest-label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); padding: .65rem 1rem .25rem; }
.suggest-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; min-height: 48px; color: var(--text); }
.suggest-item:hover, .suggest-item.is-active { background: var(--paper-2); text-decoration: none; }
.suggest-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-2); }
.suggest-text { display: flex; flex-direction: column; min-width: 0; }
.suggest-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-title mark { background: transparent; color: var(--wine); font-weight: 700; }
@media (prefers-color-scheme: dark) { .suggest-title mark { color: var(--gold); } }
.suggest-sub { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-all { border-top: 1px solid var(--line); font-weight: 600; color: var(--wine); }
@media (prefers-color-scheme: dark) { .suggest-all { color: var(--gold); } }
.notice-block { display: block; margin: 0 0 1.5rem; }
.notice-block a { text-decoration: underline; }

/* Empty states */
.empty { text-align: center; padding: 2.2rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.empty.compact { padding: 1.4rem 1rem; text-align: left; margin-bottom: 1.5rem; }
.empty.tall { padding: 4rem 1rem; }
.empty-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: .3rem; }
.empty .btn { margin-top: .5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 2rem 0 1.5rem; font-size: .95rem; }
.footer-row { display: flex; gap: 2rem; justify-content: space-between; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 1.2rem; flex-wrap: wrap; font-weight: 500; }
.footer-legal { margin-top: 1.5rem; font-size: .85rem; }

/* Mobile tab bar */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
.tab-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 500; color: var(--muted); }
.tab-bar a:hover { text-decoration: none; }
.tab-bar svg { width: 24px; height: 24px; }
.tab-bar a[aria-current="page"] { color: var(--wine); }
@media (prefers-color-scheme: dark) { .tab-bar a[aria-current="page"] { color: var(--gold); } }
@media (min-width: 900px) { .tab-bar { display: none; } body { padding-bottom: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
