/* Family Affairs Studio box office.
   Matches familyaffairs.studio with the house lights up: warm paper, ink type,
   Bricolage Grotesque titles, Cormorant logo, Geist Mono labels. Amber means live:
   the selected step, the buy button, the test-mode banner. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorant-garamond-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --house: #EAE6DE;
  --paper: #F4F1EB;
  --fg: #161513;
  --muted: #6F695F;
  --unlit: #C9C2B6;
  --line: rgba(22, 21, 19, 0.16);
  --live: #FFB547;
  --live-hi: #FFC872;
  --live-ink: #1A1206;
  --bad: #A3271F;
  --face: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --g: max(16px, 2.2vw);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--house); color: var(--fg);
  font-family: var(--face); font-optical-sizing: auto; font-size: 1.0625rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.m { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---------- bar ---------- */
.test-banner { background: var(--live); color: var(--live-ink); text-align: center; padding: 0.55rem var(--g); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem var(--g); border-bottom: 1px solid var(--line); }
.logo { font-family: "Cormorant Garamond", Georgia, serif; font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.bar .m { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.bar .m::before { content: ""; width: 0.55rem; height: 0.55rem; background: var(--live); transform: rotate(45deg); }

/* ---------- top of an event ---------- */
.top { padding: clamp(2.4rem, 6vw, 5rem) var(--g) clamp(1.4rem, 3vw, 2.2rem); display: grid; row-gap: 0.9rem; }
.kicker { color: var(--muted); display: flex; flex-wrap: wrap; column-gap: 1.1rem; row-gap: 0.25rem; }
.kicker span:first-child { color: var(--live-ink); background: var(--live); padding: 0 0.4rem; border-radius: 3px; }
.title { font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 11vw, 10.5rem); line-height: 0.84; letter-spacing: -0.02em; text-wrap: balance; }
.byline { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 44ch; }

.plate { margin: 0 var(--g); border-radius: 4px; overflow: hidden; background: var(--unlit); }
.plate img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 40%; }
@media (max-width: 700px) { .plate { margin: 0; border-radius: 0; } .plate img { aspect-ratio: 4 / 3; } }

/* ---------- layout: ticket panel beside the story ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); column-gap: clamp(2rem, 5vw, 5rem); padding: clamp(2rem, 4vw, 3.5rem) var(--g) clamp(3rem, 6vw, 6rem); align-items: start; }
.panel { grid-column: 2; grid-row: 1; position: sticky; top: 1rem; }
.about { grid-column: 1; grid-row: 1; display: grid; row-gap: clamp(1.8rem, 3vw, 2.6rem); }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
  .panel, .about { grid-column: 1; grid-row: auto; position: static; }
}

/* ---------- panel ---------- */
.box { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.1rem, 2vw, 1.6rem); display: grid; row-gap: 1.5rem; }
.step { display: grid; row-gap: 0.75rem; }
.step h2 { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 0.55rem; border-bottom: 1px solid var(--fg); font-weight: 500; }
.step h2 .n { color: var(--muted); }
.flash { padding: 0.7rem 0.9rem; border-radius: 4px; background: var(--house); font-size: 0.95rem; }

.dates { display: grid; row-gap: 0.5rem; }
.date { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; text-align: left; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--house); transition: background-color .2s, color .2s, border-color .2s; }
.date:hover:not(:disabled) { border-color: var(--fg); }
.date .day { font-stretch: 78%; font-weight: 700; text-transform: uppercase; font-size: 1.45rem; line-height: 1; letter-spacing: -0.01em; }
.date .time { color: var(--muted); font-size: 0.95rem; }
.date .left { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; grid-row: 1 / span 2; grid-column: 2; color: var(--muted); }
.date[aria-pressed="true"] { background: var(--fg); color: var(--house); border-color: var(--fg); }
.date[aria-pressed="true"] .time, .date[aria-pressed="true"] .left { color: var(--unlit); }
.date[aria-pressed="true"] .left::before { content: "◆ "; color: var(--live); }
.date:disabled { cursor: not-allowed; color: var(--muted); background: transparent; }
.date:disabled .day { text-decoration: line-through; text-decoration-thickness: 2px; }

.tiers { display: grid; }
.tier { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; row-gap: 0.15rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.tier:last-child { border-bottom: 0; }
.tier .name { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.tier .price { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; margin-left: 0.4rem; }
.tier .note { grid-column: 1; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.tier .note:empty { display: none; }
.stepper { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; column-gap: 0.2rem; }
.stepper button { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--fg); font-size: 1.15rem; line-height: 1; transition: background-color .2s, color .2s; }
.stepper button:hover:not(:disabled) { background: var(--fg); color: var(--house); }
.stepper button:disabled { border-color: var(--unlit); color: var(--unlit); cursor: not-allowed; }
.stepper output { width: 2rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1.1rem; }

.gifts { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.95rem; background: var(--house); font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--house); border-color: var(--fg); }
.other { display: none; align-items: center; gap: 0.4rem; }
.other.show { display: flex; }
.other input { width: 8rem; padding: 0.55rem 0.75rem; border-radius: 4px; border: 1px solid var(--fg); background: var(--house); font: inherit; color: var(--fg); }
.gift-note { color: var(--muted); font-size: 0.9rem; }

.summary { display: grid; row-gap: 0.8rem; padding-top: 1.1rem; border-top: 1px solid var(--fg); }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total strong { font-stretch: 78%; font-weight: 800; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.buy { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 3.4rem; border-radius: 999px; background: var(--live); color: var(--live-ink); font-family: var(--mono); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: background-color .2s; }
.buy:hover:not(:disabled) { background: var(--live-hi); }
.buy:disabled { background: var(--unlit); color: var(--muted); cursor: not-allowed; }
.secure { color: var(--muted); text-align: center; }
.error { color: var(--bad); font-size: 0.95rem; }
.error:empty { display: none; }

/* ---------- about column ---------- */
.lead { font-size: clamp(1.35rem, 2.2vw, 1.9rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; max-width: 30ch; }
.facts { display: grid; border-top: 1px solid var(--fg); }
.facts li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.facts .k { color: var(--muted); padding-top: 0.2rem; }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; row-gap: 0.1rem; } }
.press { display: grid; row-gap: 1.4rem; }
.press blockquote { display: grid; row-gap: 0.35rem; }
.press p { font-stretch: 85%; font-weight: 600; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.press cite { font-style: normal; color: var(--muted); }
.photo figcaption { color: var(--muted); margin-top: 0.5rem; }
.photo img { border-radius: 4px; }
.more a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

/* ---------- simple pages ---------- */
.wrap { padding: clamp(2.4rem, 6vw, 5rem) var(--g) clamp(3rem, 6vw, 6rem); display: grid; row-gap: 1.6rem; max-width: 60rem; }
.events { display: grid; border-top: 1px solid var(--fg); }
.events a { display: grid; row-gap: 0.25rem; padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.events .t { font-stretch: 78%; font-weight: 700; text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 0.95; letter-spacing: -0.015em; }
.events a:hover .t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.receipt { display: grid; border-top: 1px solid var(--fg); max-width: 36rem; }
.receipt li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.receipt li.sum { font-weight: 700; border-bottom: 0; }
.wrap > p { max-width: 40rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 1.4rem var(--g) 2rem; display: grid; row-gap: 0.6rem; color: var(--muted); font-size: 0.95rem; }
.foot a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

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

.policy { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line, currentColor); }
.policy .k { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.policy p:last-child { margin: 0; color: var(--muted); line-height: 1.5; }
