/* Shared look for the front door (/welcome), the deck page (/deck) and the thank-you page (/thanks).
   Same tokens as the app in index.html: black starry cover, white cards, coral / gold / blue / green / red. Minimum text 14px. */
:root {
  color-scheme: light;
  --bg: #f2f2f0; --paper: #fff; --ink: #141414; --muted: #5f5f5f; --line: #dcdcd8; --black: #0f0f10;
  --coral: #f25c6b; --gold: #f7b538; --blue: #6fa3d8; --green: #3dbb78; --red: #e8505f;
  --display: "Poppins", "Helvetica Neue", Arial, sans-serif; --body: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --stars: radial-gradient(1.3px 1.3px at 12% 18%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 68% 32%, #fff 60%, transparent 62%),
           radial-gradient(1.8px 1.8px at 38% 72%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 86% 84%, rgba(255,255,255,.7) 60%, transparent 62%),
           radial-gradient(.9px .9px at 52% 50%, rgba(255,255,255,.6) 60%, transparent 62%), radial-gradient(1.2px 1.2px at 24% 92%, rgba(255,255,255,.8) 60%, transparent 62%);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--body); }
.night { background-color: var(--black); background-image: var(--stars); background-size: 150px 150px; color: #f4f4f4; }
/* helix.js drops a faint canvas behind .night content: z-index -1 inside an isolated box keeps it under the text and above the stars */
.night { position: relative; isolation: isolate; }
.helix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
body > .helix { position: fixed; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 7vw, 48px); line-height: 1.12; }
h2 { font-size: clamp(22px, 4.6vw, 30px); line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin: 0; }
.wrap { max-width: 980px; margin: 0 auto; padding-inline: 16px; }
.narrow { max-width: 460px; margin-inline: auto; }
.eyebrow { font: 600 14px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.night .eyebrow { color: #b9b9b9; }
.lead { font-size: 18px; color: var(--muted); }
.night .lead { color: #d0d0d0; }

/* top mark */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.mark { font: 700 18px var(--display); letter-spacing: .22em; color: inherit; text-decoration: none; }
.mark span { color: var(--gold); }
.top a.small { font: 600 15px var(--display); color: inherit; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; padding: 10px 4px; }

/* buttons */
.btn { appearance: none; border: 0; border-radius: 14px; padding: 17px 28px; font: 600 16px var(--display); letter-spacing: .02em; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.black { background: var(--black); color: #fff; }
.btn.white { background: #fff; color: var(--ink); }
.btn.wide { width: 100%; }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn:focus-visible, .door:focus-visible, .link:focus-visible, select:focus-visible, .step button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.link { font: 600 15px var(--display); color: inherit; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; padding: 10px 6px; }

/* cards */
.card { aspect-ratio: 449 / 749; background: #fff center / cover no-repeat; border-radius: 5%; box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 22px 44px -20px rgba(0,0,0,.55); }
.fan { position: relative; height: clamp(250px, 56vw, 330px); width: min(100%, 420px); margin-inline: auto; }
.fan .card { position: absolute; left: 50%; bottom: 0; width: clamp(110px, 28vw, 150px); transform-origin: 50% 110%; transform: translateX(-50%) rotate(var(--r)) translateY(var(--y, 0)); animation: deal .9s cubic-bezier(.2,.85,.25,1.05) both; animation-delay: var(--d, 0s); }
@keyframes deal { from { transform: translateX(-50%) rotate(0) translateY(40px); opacity: 0; } }
.fan .card.hero { width: clamp(130px, 33vw, 176px); z-index: 2; }

/* front door: three choices */
.doors { display: grid; gap: 14px; }
.door { appearance: none; border: 0; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border-radius: 20px; padding: 14px 18px 14px 14px; display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: center; cursor: pointer; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: box-shadow .2s, transform .2s; }
.door:hover { box-shadow: 0 0 0 2px var(--ink); transform: translateY(-2px); }
.door .art { height: 104px; border-radius: 12px; background: #fff center / cover no-repeat; border: 1px solid var(--line); }
.door b { font: 600 19px/1.25 var(--display); display: block; }
.door span.t { color: var(--muted); font-size: 15px; }
.door .go { color: var(--coral); font: 600 15px var(--display); margin-top: 4px; display: inline-block; }
.door.primary { box-shadow: 0 0 0 2px var(--gold), 0 10px 30px -14px rgba(247,181,56,.7); }

/* sections */
section.block { padding-block: 56px; }
.grid2 { display: grid; gap: 28px; align-items: center; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.pills li { padding: 6px 14px; border-radius: 999px; font: 600 14px var(--display); background: var(--paper); border: 1px solid var(--line); }
.facts { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: baseline; }
.facts i { width: 12px; height: 12px; border-radius: 50%; display: block; transform: translateY(2px); }
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 8px 16px 28px; margin-inline: -16px; scroll-snap-type: x proximity; }
.strip .card { width: 150px; flex: none; scroll-snap-align: center; }
.panel { background: var(--paper); border-radius: 22px; padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 30px 60px -36px rgba(0,0,0,.4); color: var(--ink); }
.price { font: 700 40px/1 var(--display); }
.price small { font: 600 15px var(--body); color: var(--muted); margin-left: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
label.k { font: 600 15px var(--display); }
select { font: 16px var(--body); padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); min-height: 48px; max-width: 60%; }
.step { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.step button { appearance: none; border: 0; background: #fff; width: 48px; height: 46px; font: 600 20px var(--display); cursor: pointer; }
.step output { min-width: 40px; text-align: center; font: 600 17px var(--display); }
.note { font-size: 14px; color: var(--muted); }
.note.warn { background: #fff7e3; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 0 10px 10px 0; color: #4a3b10; }
.err { color: #b3202f; font-size: 15px; min-height: 22px; }
.edition { border: 2px dashed var(--line); border-radius: 22px; padding: 22px; display: grid; gap: 10px; background: transparent; }
details { border-top: 1px solid var(--line); padding-block: 4px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { font: 600 17px var(--display); padding: 14px 4px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::after { content: "+"; color: var(--coral); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { padding: 0 4px 16px; color: var(--muted); }
footer { padding-block: 40px 56px; text-align: center; color: var(--muted); font-size: 14px; }
.preview { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; background: var(--coral); color: #fff; text-align: center; font: 600 14px var(--display); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
body { padding-bottom: 44px; }
.rise { animation: rise .6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (min-width: 760px) {
  .grid2 { grid-template-columns: 1fr 1fr; gap: 56px; }
  .doors { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .strip { margin-inline: 0; padding-inline: 0; }
  .strip .card { width: 128px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
