/* sala.css — the shared look of the Still Alive at… sites.
   One committed look: a dark theater with the house lights down, and
   Playbill-paper panels for anything meant to be read at length.
   Colors are painted explicitly; the sites do not switch themes. */

:root {
  --ink: #0f0a0b;
  --ink-2: #1a1113;
  --ink-3: #26181b;
  --curtain: #6e0d1c;
  --curtain-2: #8f1326;
  --red: #d0283f;
  --gold: #e6b450;
  --gold-2: #f6d98f;
  --paper: #f6efe2;
  --paper-2: #ece0c9;
  --on-paper: #22181a;
  --on-paper-muted: #6a5a55;
  --on-ink: #f3ece4;
  --on-ink-muted: #bcaea5;
  --line-ink: rgba(246, 217, 143, .22);
  --line-paper: rgba(34, 24, 26, .16);
  --display: "Anton", "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --label: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink) radial-gradient(ellipse 90% 55% at 50% -12%, rgba(208, 40, 63, .30), transparent 70%) no-repeat;
  color: var(--on-ink);
  font: 400 18px/1.6 var(--serif);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--gold); color: var(--ink); padding: 8px 12px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 14px; border-bottom: 1px solid var(--line-ink); }
.brand { font: 400 21px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--on-ink); text-decoration: none; }
.brand span { color: var(--gold); }
.editions { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.editions a { display: inline-block; min-width: 44px; text-align: center; font: 500 14px/1 var(--label); letter-spacing: .08em; padding: 9px 11px; border: 1px solid var(--line-ink); border-radius: 999px; color: var(--on-ink-muted); text-decoration: none; }
.editions a:hover { color: var(--on-ink); border-color: var(--gold); }
.editions a[aria-current="page"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.editions a.x { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* ---------- type ---------- */
.eyebrow { font: 500 13px/1.3 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.display { font: 400 clamp(52px, 11vw, 136px)/.9 var(--display); text-transform: uppercase; letter-spacing: .005em; margin: .08em 0 .12em; }
h1, h2 { font-weight: 400; }
h2 { font: 400 clamp(32px, 5vw, 50px)/1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .55em; }
h3 { font: 600 19px/1.3 var(--label); letter-spacing: .05em; text-transform: uppercase; margin: 0 0 .4em; }
.lede { font-size: clamp(19px, 2.3vw, 24px); line-height: 1.5; max-width: 42ch; }
.muted { color: var(--on-ink-muted); }
.small { font-size: 15px; }

/* ---------- status badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.born { color: var(--gold-2); }
.badge.cancelled { color: #c2b8b2; }
.badge.production { color: #ff7788; background: rgba(208, 40, 63, .16); }
.badge.production::before { animation: pulse 1.6s ease-in-out infinite; }
.badge.planned { color: #9fd6c8; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.65); } }

/* ---------- marquee (a box ringed with bulbs) ---------- */
.marquee { position: relative; background: var(--curtain); border-radius: var(--radius); padding: clamp(26px, 4vw, 40px); box-shadow: 0 0 0 2px var(--gold) inset, 0 24px 70px rgba(0, 0, 0, .55); }
.marquee::before, .marquee::after {
  content: ""; position: absolute; inset: 7px; border-radius: calc(var(--radius) - 4px); padding: 6px; pointer-events: none;
  background: radial-gradient(circle, var(--gold-2) 0 2.4px, rgba(246, 217, 143, .28) 3px, transparent 4px) 0 0 / 16px 16px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.marquee::after { background-position: 8px 8px; animation: twinkle 1.1s steps(2, jump-none) infinite; }
@keyframes twinkle { 0% { opacity: 1; } 100% { opacity: .15; } }

/* ---------- the poster ---------- */
.poster {
  container-type: inline-size; position: relative; isolation: isolate;
  width: 100%; max-width: 620px; aspect-ratio: 2 / 3; margin: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #0b0708 radial-gradient(ellipse 70% 45% at 50% 0%, rgba(208, 40, 63, .45), transparent 70%) no-repeat;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(246, 217, 143, .35), 0 34px 90px rgba(0, 0, 0, .65);
}
/* curtains, drawn open */
.poster::before, .poster::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 5.5cqw; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(90deg, #3d0610 0, #8f1326 1.4cqw, #5a0a17 2.4cqw, #3d0610 2.75cqw);
  -webkit-mask: linear-gradient(to bottom, #000 70%, transparent); mask: linear-gradient(to bottom, #000 70%, transparent);
}
.poster::before { left: 0; }
.poster::after { right: 0; transform: scaleX(-1); }
.poster > * { position: relative; z-index: 2; }
:where(.poster) > :where(p, h1) { margin: 0; }
.poster-top { margin-top: 5cqw; font: 500 2.9cqw/1 var(--label); letter-spacing: .34em; padding-left: .34em; text-transform: uppercase; color: var(--gold-2); }
.poster-name { margin-top: 3.4cqw; font: 500 4.4cqw/1 var(--label); letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; color: var(--on-ink); }
.poster-title { margin: 1.4cqw 0 0; font: 400 19cqw/.84 var(--display); text-transform: uppercase; color: #fff; text-shadow: 0 .6cqw 3cqw rgba(0, 0, 0, .6); }
.poster-photo { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; width: 100%; margin-top: -2cqw; }
.poster-photo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 34% 58% at 50% 46%, rgba(246, 217, 143, .30), transparent 72%); }
.poster-photo img {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 100%; width: auto; max-width: none; aspect-ratio: 1156 / 1440; object-fit: cover;
  filter: grayscale(1) sepia(.38) contrast(1.16) brightness(.96);
  -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
  mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
}
.poster-at {
  margin-top: -9cqw; font: 400 11cqw/1 var(--display); letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink); background: var(--gold); padding: 1.1cqw 5cqw 1.5cqw; border-radius: 1.2cqw;
  outline: .95cqw dotted var(--gold-2); outline-offset: 1.3cqw;
  box-shadow: 0 0 7cqw rgba(246, 217, 143, .45);
}
.poster-pulse { width: 78%; height: auto; margin-top: 4.6cqw; color: var(--gold); overflow: visible; }
.poster-tag { margin: 2.6cqw 9cqw 0; font: italic 400 4.3cqw/1.28 var(--serif); color: var(--on-ink); }
.poster-billing { margin: 3.2cqw 9cqw 0; font: 500 2.3cqw/1.6 var(--label); letter-spacing: .13em; text-transform: uppercase; color: var(--on-ink-muted); }
.poster-billing b { color: var(--on-ink); font-weight: 600; }
.poster-date { margin-top: 3.4cqw; font: 400 5.6cqw/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-2); }
.poster-foot { margin: 1.6cqw 0 5cqw; font: 500 2.3cqw/1.4 var(--label); letter-spacing: .22em; padding-left: .22em; text-transform: uppercase; color: var(--on-ink-muted); }

/* ---------- Verso, the AI host (SOMA §22) ---------- */
.verso { background: var(--ink-2); border: 1px solid var(--line-ink); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 16px; }
.verso-head { display: flex; gap: 14px; align-items: center; }
.verso-mark { flex: none; width: 48px; height: 48px; }
.verso-name { font: 600 17px/1.2 var(--label); letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.verso-role { font-size: 14px; color: var(--on-ink-muted); margin: 2px 0 0; }
.verso-log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.msg { padding: 12px 15px; border-radius: 14px; max-width: 94%; font-size: 17px; line-height: 1.5; }
.msg p { margin: 0; white-space: pre-line; }
.msg.verso { background: var(--ink-3); border: 1px solid var(--line-ink); align-self: flex-start; border-top-left-radius: 4px; }
.msg.you { background: var(--curtain); align-self: flex-end; border-top-right-radius: 4px; }
.msg.thinking p { color: var(--on-ink-muted); font-style: italic; }
.msg .go { display: inline-block; margin-top: 8px; font: 500 14px/1.2 var(--label); letter-spacing: .08em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: italic 400 16px/1.25 var(--serif); background: transparent; color: var(--on-ink); border: 1px solid var(--line-ink); border-radius: 999px; padding: 9px 14px; cursor: pointer; text-align: left; }
.chip:hover { border-color: var(--gold); color: var(--gold-2); }
.chip[aria-pressed="true"] { opacity: .45; }
.ask { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; }
.verso-note { font-size: 13px; line-height: 1.45; color: var(--on-ink-muted); margin: 0; }

/* ---------- forms ---------- */
input, select, textarea { font: 400 17px/1.4 var(--serif); padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(246, 217, 143, .38); background: rgba(15, 10, 11, .6); color: var(--on-ink); width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9d8f87; }
.btn { display: inline-block; font: 400 21px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; background: var(--gold); color: var(--ink); border: 0; border-radius: 10px; padding: 15px 24px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--gold-2); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--gold); }
.btn:disabled { opacity: .6; cursor: progress; }
.ask .btn { font-size: 17px; padding: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label, .legend { font: 500 14px/1.3 var(--label); letter-spacing: .09em; text-transform: uppercase; color: var(--gold-2); }
fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.checks { display: grid; gap: 10px; margin-top: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; background: rgba(15, 10, 11, .35); border: 1px solid var(--line-ink); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--gold); }
.check b { font: 600 16px/1.3 var(--label); letter-spacing: .05em; text-transform: uppercase; display: block; }
.check span { font-size: 15px; color: var(--on-ink-muted); }
.row2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 12px 0 0; font-size: 16px; }
.form-status.err { color: #ffb3bd; }
.thanks { font-size: 19px; }
.thanks h3 { color: var(--gold-2); font: 400 34px/1 var(--display); }

/* ---------- Playbill paper ---------- */
.playbill { background: var(--paper); color: var(--on-paper); border-radius: var(--radius); padding: clamp(26px, 5.5vw, 64px); margin-block: 36px; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
.playbill a { color: var(--curtain-2); }
.playbill a:hover { color: var(--on-paper); }
.playbill .eyebrow { color: var(--curtain-2); }
.playbill .muted { color: var(--on-paper-muted); }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
blockquote { margin: 1.3em 0; padding: .1em 0 .1em 1.1em; border-left: 3px solid var(--gold); font-style: italic; }
.playbill blockquote { border-left-color: var(--curtain-2); }
blockquote cite { display: block; margin-top: .5em; font: 500 13px/1.3 var(--label); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--on-paper-muted); }
.sign { font: italic 400 22px/1.3 var(--serif); margin-top: 1.2em; }

.acts { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 1.2em 0 1.4em; }
.act { border-top: 5px solid var(--curtain-2); padding-top: 12px; }
.act .n { font: 400 15px/1 var(--display); letter-spacing: .14em; color: var(--curtain-2); text-transform: uppercase; }
.act p { margin: .35em 0 0; }

ol.plan { list-style: none; counter-reset: step; padding: 0; margin: 1.2em 0 0; }
ol.plan li { counter-increment: step; position: relative; padding-left: 60px; margin-bottom: 22px; }
ol.plan li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 42px; height: 42px; border-radius: 50%; background: var(--curtain-2); color: #fff; font: 400 21px/42px var(--display); text-align: center; }
ol.plan li.done::before { content: "✓"; background: var(--gold); color: var(--ink); }
.when { display: block; font: 600 13px/1.3 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--on-paper-muted); }
ol.plan b { font: 600 19px/1.3 var(--label); letter-spacing: .03em; text-transform: uppercase; }
ol.plan p { margin: .25em 0 0; }

.team { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 1.2em; }
.member { border-top: 1px solid var(--line-paper); padding-top: 14px; }
.member .who { font: 400 26px/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.member .what { font: 600 13px/1.3 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--curtain-2); margin: 4px 0 8px; }
.member p { margin: 0; font-size: 17px; }

/* ---------- help ---------- */
.ways { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-block: 20px 28px; }
.way { background: var(--ink-2); border: 1px solid var(--line-ink); border-radius: var(--radius); padding: 22px; }
.way .icon { font: 400 40px/1 var(--display); color: var(--gold); }
.way p { margin: .4em 0 0; color: var(--on-ink-muted); font-size: 17px; }

/* ---------- hub: the series ---------- */
.series { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-block: 26px 10px; }
.ed { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; min-height: 270px; padding: 22px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-ink); color: var(--on-ink); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.ed:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--on-ink); }
.ed .age { font: 400 104px/.82 var(--display); letter-spacing: -.01em; color: var(--on-ink); }
.ed .age small { font-size: 22px; letter-spacing: .1em; color: var(--on-ink-muted); vertical-align: top; }
.ed .date { font: 500 14px/1.3 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-muted); }
.ed .blurb { margin: 0; font-size: 17px; line-height: 1.45; }
.ed > .badge { align-self: flex-start; justify-self: start; }
.ed .more { margin-top: auto; font: 500 14px/1 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.ed.featured { grid-column: 1 / -1; background: var(--curtain) radial-gradient(ellipse 60% 90% at 90% 10%, rgba(246, 217, 143, .18), transparent 70%) no-repeat; border-color: var(--gold); min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 30px; align-items: center; }
.ed.featured .age { font-size: clamp(110px, 18vw, 200px); color: var(--gold-2); grid-row: span 4; }
.ed.cancelled .age { color: #8e8480; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 7px; }
.stamp { position: absolute; top: 20px; right: -6px; transform: rotate(11deg); font: 400 21px/1 var(--display); letter-spacing: .12em; color: var(--red); border: 3px solid var(--red); padding: 6px 10px; border-radius: 6px; background: rgba(15, 10, 11, .6); }
@media (max-width: 640px) { .ed.featured { grid-template-columns: 1fr; } .ed.featured .age { grid-row: auto; } }

.count { font: 400 clamp(44px, 8vw, 84px)/1 var(--display); color: var(--gold-2); letter-spacing: .01em; margin: 0; }
.stack > .eyebrow { margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 1em 0; }
.facts dt { font: 600 14px/1.5 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--on-paper-muted); }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* ---------- page heroes ---------- */
.hero { padding-block: clamp(30px, 6vw, 70px) 10px; }
.hero-grid { display: grid; gap: clamp(22px, 4vw, 44px); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; padding-block: 28px 10px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-grid .poster { margin-inline: auto; } }
.stack > * + * { margin-top: 18px; }
.center { text-align: center; }

/* ---------- AI door (SOMA §19) ---------- */
.ai-door { margin-top: 18px; }
.ai-door-toggle { background: transparent; color: var(--on-ink-muted); border: 1px dashed var(--line-ink); border-radius: 999px; padding: 8px 14px; font: 500 14px/1.2 var(--label); letter-spacing: .06em; cursor: pointer; }
.ai-door-toggle:hover { color: var(--gold-2); border-color: var(--gold); }
.ai-door-panel { margin-top: 10px; background: var(--ink-2); border: 1px solid var(--line-ink); border-radius: 12px; padding: 14px; }
.ai-door-prompt { white-space: pre-wrap; font: 400 14px/1.5 ui-monospace, Menlo, monospace; color: var(--on-ink); margin: 0 0 10px; max-height: 240px; overflow: auto; }
.ai-door-copy { background: var(--gold); color: var(--ink); border: 0; border-radius: 8px; padding: 8px 14px; font: 600 14px/1 var(--label); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.ai-door-copied { margin-left: 10px; font-size: 14px; color: var(--gold-2); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-ink); margin-top: 56px; padding-block: 30px 90px; font-size: 15px; color: var(--on-ink-muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.foot nav a { color: var(--on-ink); }
.foot p { margin: 6px 0; max-width: 80ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.poster-page { display: flex; justify-content: center; padding-block: 10px 20px; }
.poster-page .poster { max-width: 720px; }

@media print {
  @page { margin: .35in; }
  body { background: #fff; }
  .top, .foot, .verso, .no-print, .ai-door, [class*="soma-feedback"], #soma-feedback-root { display: none !important; }
  .poster { width: 6.8in; max-width: none; margin: 0 auto; box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
  .poster-page { padding: 0; }
}
