/* ============================================================
   PEONY — pyrotechnic design & live fireworks shows
   The sky is always night (fireworks need dark); the page around
   it flips light/dark on :root[data-theme]. Bursts are canvas.
   ============================================================ */

:root {
  --max: 1200px;
  --ease: cubic-bezier(.2, .9, .25, 1);          /* a rising-then-hanging shell */
  --ease-snap: cubic-bezier(.16, 1, .3, 1);
  --gold: #ffcf5c;
  --magenta: #ff3d8b;
  --sky-1: #0a0a14;
  --sky-2: #16112a;
  --font-d: "Cinzel", Georgia, serif;
  --font-b: "Inter", system-ui, sans-serif;
  --font-m: "Space Mono", ui-monospace, monospace;
}

:root[data-theme="dark"] {
  --bg: #0a0a14;
  --bg-2: #10101e;
  --panel: #14142400;
  --panel-solid: #141426;
  --ink: #efeaf6;
  --dim: #b0a9c4;
  --faint: #6b6485;
  --line: rgba(239, 234, 246, .12);
  --line-2: rgba(239, 234, 246, .06);
  --accent: #ff5a9e;
  --accent-2: #ffcf5c;
  --shadow: 0 26px 70px -32px rgba(0, 0, 0, .85);
}
:root[data-theme="light"] {
  --bg: #f3eee6;
  --bg-2: #ece5da;
  --panel: #ffffff00;
  --panel-solid: #fbf7f0;
  --ink: #1a1424;
  --dim: #5c5568;
  --faint: #8c8498;
  --line: rgba(26, 20, 36, .13);
  --line-2: rgba(26, 20, 36, .06);
  --accent: #c62a72;
  --accent-2: #b57e18;
  --shadow: 0 26px 70px -36px rgba(60, 30, 60, .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-b); font-size: clamp(15px, 1vw + 13px, 17px); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
.mono { font-family: var(--font-m); font-variant-ligatures: none; }
.wrap { width: min(100% - 2.4rem, var(--max)); margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: .005em; }
em { font-style: normal; color: var(--accent); }
a { color: inherit; }

.veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 55%);
  opacity: .8;
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: .5rem .9rem; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }
:where(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: min(100% - 2.4rem, var(--max)); margin: .7rem auto 0;
  padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in oklab, var(--bg) 74%, transparent); backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--font-d); font-size: 1.1rem; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a { text-decoration: none; color: var(--dim); font-size: .86rem; padding: .45rem .7rem; border-radius: 9px; transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--ink); background: var(--line-2); }
.nav-cta { color: var(--ink) !important; border: 1px solid var(--line); }
.nav-cta:hover { background: var(--accent) !important; color: #fff !important; border-color: transparent; }
@media (max-width: 780px) { .nav-links a:not(.nav-cta) { display: none; } }
.theme-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-left: .2rem; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--dim); cursor: pointer; transition: color .25s, border-color .25s, transform .2s; }
.theme-btn:hover { color: var(--ink); border-color: var(--accent); }
.theme-btn:active { transform: scale(.92); }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
:root[data-theme="dark"] .ico-sun { display: block; } :root[data-theme="dark"] .ico-moon { display: none; }
:root[data-theme="light"] .ico-sun { display: none; } :root[data-theme="light"] .ico-moon { display: block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; padding: .72rem 1.15rem; border-radius: 11px; font-weight: 600; font-size: .92rem; border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease-snap), box-shadow .25s, border-color .25s, color .25s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- section scaffolding ---------- */
main { position: relative; z-index: 1; }
.sec-head { max-width: 60ch; margin-bottom: 2.6rem; }
.kicker { color: var(--accent); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; margin: 0 0 1rem; }
.eyebrow { color: rgba(239,234,246,.6); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 1.4rem; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.lede { color: var(--dim); font-size: clamp(1rem, 1.4vw, 1.12rem); margin: 1rem 0 0; }
.wm { position: absolute; top: 8%; right: -1%; z-index: 0; pointer-events: none; user-select: none; font-family: var(--font-d); font-size: clamp(4rem, 15vw, 12rem); color: var(--ink); opacity: .04; }

/* ---------- hero — always night ---------- */
.hero { position: relative; min-height: min(92vh, 820px); display: grid; align-items: center; overflow: hidden; background: radial-gradient(120% 120% at 50% 8%, var(--sky-2), var(--sky-1) 62%); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.hero-inner { position: relative; z-index: 2; width: min(100% - 2.4rem, var(--max)); margin-inline: auto; padding: 6rem 0 3rem; pointer-events: none; }
.hero-inner .btn, .hero-inner a { pointer-events: auto; }
.hero-title { font-size: clamp(2.6rem, 7vw, 5rem); color: #f4eefb; margin: .2rem 0 0; text-shadow: 0 2px 40px rgba(0,0,0,.5); }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: block; }
.js .hero-title .line > span { transform: translateY(112%); }
.js .hero.loaded .hero-title .line > span { animation: rise 1s var(--ease) forwards; }
.js .hero.loaded .hero-title .line:nth-child(2) > span { animation-delay: .1s; }
.js .hero.loaded .hero-title .line:nth-child(3) > span { animation-delay: .2s; }
@keyframes rise { to { transform: translateY(0); } }
.hero-sub { color: #cdc6dd; max-width: 44ch; margin: 1.5rem 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.9rem 0 0; }
.sky-hint { margin: 2.4rem 0 0; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); transition: opacity .5s; }

/* ---------- shows ---------- */
.shows { padding: clamp(4rem, 9vw, 7rem) 0; }
.show-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 860px) { .show-grid { grid-template-columns: 1fr; } }
.show { position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); padding: 1.6rem 1.5rem; transition: transform .3s var(--ease), border-color .3s; }
.show:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.show--feature { background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 10%, var(--panel-solid)), var(--panel-solid)); border-color: color-mix(in oklab, var(--accent) 35%, var(--line)); }
.show-dur { font-size: .74rem; color: var(--accent-2); letter-spacing: .12em; }
.show h3 { font-size: 1.6rem; margin: .5rem 0 .2rem; }
.show-price { font-family: var(--font-m); font-size: .9rem; color: var(--ink); margin: 0 0 .8rem; }
.show-note { color: var(--dim); font-size: .92rem; margin: 0 0 1rem; }
.show-list { list-style: none; margin: 0; padding: .9rem 0 0; border-top: 1px solid var(--line-2); display: grid; gap: .3rem; }
.show-list li { font-size: .74rem; color: var(--faint); }
.show-badge { position: absolute; top: 1rem; right: 1rem; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 999px; background: var(--accent); color: #fff; }

/* ---------- shells ---------- */
.shells { padding: clamp(4rem, 9vw, 7rem) 0; background: var(--bg-2); border-block: 1px solid var(--line); overflow: hidden; position: relative; }
.shell-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .shell-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .shell-grid { grid-template-columns: 1fr; } }
.shell { border: 1px solid var(--line); border-radius: 16px; background: var(--panel-solid); overflow: hidden; cursor: pointer; transition: transform .3s var(--ease), border-color .3s; }
.shell:hover, .shell:focus-within { transform: translateY(-4px); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.shell-art { aspect-ratio: 1; background: radial-gradient(90% 90% at 50% 45%, var(--sky-2), var(--sky-1)); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.shell-art svg { width: 100%; height: 100%; }
.shell-art .core { fill: #fff; }
.shell h3 { font-size: 1.2rem; margin: 0; padding: .9rem 1.1rem .2rem; }
.shell-note { color: var(--dim); font-size: .86rem; padding: 0 1.1rem 1.2rem; margin: .3rem 0 0; }
.shell-fine { margin: 1.6rem 0 0; font-size: .74rem; color: var(--faint); }

/* ---------- safety ---------- */
.safety { padding: clamp(4rem, 9vw, 7rem) 0; }
.safety-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }
@media (max-width: 860px) { .safety-grid { grid-template-columns: 1fr; } }
.safety-copy p { color: var(--dim); margin: 1.1rem 0 0; max-width: 58ch; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stat { background: var(--panel-solid); padding: 1.4rem 1.2rem; }
.s-num { font-family: var(--font-d); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--accent); display: block; }
.s-lbl { display: block; margin-top: .3rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* ---------- book ---------- */
.book { padding: clamp(4rem, 9vw, 7rem) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }
@media (max-width: 860px) { .book-grid { grid-template-columns: 1fr; } }
.kicker--spark { color: var(--accent-2); }
.book-sub { color: var(--dim); margin: 1rem 0 1.4rem; max-width: 46ch; }
.book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.book-list li { position: relative; padding-left: 1.3rem; color: var(--dim); font-size: .82rem; }
.book-list li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }
.book-form { border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); padding: 1.4rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field label { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: .4rem; }
.field input, .field select { width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: .92rem; }
.field input::placeholder { color: var(--faint); }
.book-fine { margin: .8rem 0 0; font-size: .7rem; color: var(--faint); text-align: center; }
.book-done { text-align: center; padding: 1.5rem .5rem; }
.book-done strong { font-family: var(--font-d); font-size: 1.4rem; display: block; }
.book-done .mono { display: block; margin-top: .5rem; font-size: .72rem; color: var(--faint); }

/* ---------- footer ---------- */
.footer { padding: 3rem 0 2.4rem; border-top: 1px solid var(--line); }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.4rem; }
.foot-brand { font-family: var(--font-d); font-size: 1.3rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .3rem; }
.foot-links a { text-decoration: none; color: var(--dim); font-size: .84rem; padding: .35rem .6rem; border-radius: 8px; }
.foot-links a:hover { color: var(--ink); background: var(--line-2); }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .72rem; color: var(--faint); }
.foot-bottom a { color: var(--accent); text-decoration: none; }
.foot-bottom a:hover { text-decoration: underline; }

/* ---------- reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero-title .line > span { transform: none !important; animation: none !important; }
  * { scroll-behavior: auto !important; }
}
