/* Spookz public pages: landing, auth, legal, dev checkout. Dark-first; tokens mirror app.css. */
:root {
  color-scheme: dark;
  --bg: #050506; --bg-2: #0B0B0D; --surface: #111114; --surface-2: #17171B;
  --text: #F5F5F7; --muted: #A1A1AA; --faint: #71717A;
  --hair: rgba(255,255,255,.08); --hair-strong: rgba(255,255,255,.16);
  --fill: rgba(255,255,255,.06); --fill-strong: rgba(255,255,255,.10);
  --inv: #FFFFFF; --inv-fg: #141414; --danger: #FF5C72; --ok: #22C55E;
  --lift: 0 1px 0 rgba(255,255,255,.05) inset, 0 0 0 .5px rgba(255,255,255,.04), 0 20px 50px -18px rgba(0,0,0,.9);
  --glow-a: hsl(265 90% 60% / .24); --glow-b: hsl(190 95% 50% / .16);
  --violet: hsl(265 90% 66%); --cyan: hsl(190 95% 55%);
  --tile-bg: linear-gradient(160deg, #FFFFFF, #E9E9EF); --tile-ring: rgba(255,255,255,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
  --r-input: 12px; --r-card: 20px; --r-pill: 999px;
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --bar-h: 64px; --wrap: 1120px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF; --bg-2: #F6F6F8; --surface: #FFFFFF; --surface-2: #F6F6F8;
  --text: #141414; --muted: #5F5F66; --faint: #85858C;
  --hair: rgba(20,20,20,.09); --hair-strong: rgba(20,20,20,.16);
  --fill: rgba(20,20,20,.05); --fill-strong: rgba(20,20,20,.09);
  --inv: #141414; --inv-fg: #FFFFFF; --danger: #D5062B; --ok: #16A34A;
  --lift: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -14px rgba(0,0,0,.16);
  --glow-a: hsl(265 90% 70% / .22); --glow-b: hsl(190 90% 60% / .18);
  --violet: hsl(265 80% 52%); --cyan: hsl(195 90% 38%);
  --tile-bg: linear-gradient(160deg, #FFFFFF, #F1F1F5); --tile-ring: rgba(20,20,20,.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
::selection { background: hsl(265 90% 65% / .35); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- wordmark with eyes ---- */
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 22px; letter-spacing: -.035em; line-height: 1; }
.eyes { display: inline-flex; gap: .07em; margin: 0 .03em; --px: .05em; --py: -.04em; }
.eye { position: relative; display: inline-block; width: .58em; height: .58em;
  border: .105em solid currentColor; border-radius: 50%; animation: blink 7s infinite; }
.eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: .21em; height: .21em; border-radius: 50%;
  background: currentColor; transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))); transition: transform .12s ease-out; }
.eye + .eye { animation-delay: .04s; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }

/* ---- glass bar ---- */
.bar {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 74%, transparent); border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
}
.bar-in { height: var(--bar-h); display: flex; align-items: center; gap: 12px; }
.bar-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bar-link { padding: 8px 12px; border-radius: var(--r-pill); color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.bar-link:hover { color: var(--text); background: var(--fill); }
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; display: inline-grid; place-items: center; color: var(--muted); cursor: pointer; }
.theme-btn:hover { background: var(--fill); color: var(--text); }
.theme-btn svg { width: 19px; height: 19px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: var(--r-pill); font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), background .2s, box-shadow .25s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--inv); color: var(--inv-fg); box-shadow: 0 8px 30px -10px hsl(265 90% 60% / .55); }
.btn-primary:hover { box-shadow: 0 10px 40px -8px hsl(265 90% 60% / .7), 0 0 0 4px color-mix(in srgb, var(--inv) 12%, transparent); }
.btn-ghost { background: var(--fill); color: var(--text); border-color: var(--hair); }
.btn-ghost:hover { background: var(--fill-strong); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 15px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.is-soon { background: var(--fill); color: var(--muted); border-color: var(--hair); box-shadow: none; cursor: default; }
.btn.is-soon:active { transform: none; }
.notice { text-align: center; padding: 6px 0 4px; }
.notice p { color: var(--muted); margin: 0 0 20px; font-size: 15.5px; }

/* ---- aurora ---- */
.aurora { position: relative; isolation: isolate; overflow-x: clip; }
.aurora::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -40px; width: min(900px, 140vw); height: 560px; transform: translateX(-50%);
  background: radial-gradient(closest-side at 36% 50%, var(--glow-a), transparent), radial-gradient(closest-side at 66% 44%, var(--glow-b), transparent);
  filter: blur(40px); pointer-events: none; animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translateX(-46%) scale(1.06); } }

/* ---- landing: hero ---- */
.hero { padding: 72px 0 64px; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill);
  background: var(--fill); border: 1px solid var(--hair); color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: 22px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin: 0 0 20px;
  background: linear-gradient(180deg, var(--text) 35%, color-mix(in srgb, var(--text) 58%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .glow { background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 0 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { margin-top: 18px; color: var(--faint); font-size: 14px; }
.art-tile {
  position: relative; width: min(100%, 420px); aspect-ratio: 1; margin-inline: auto; border-radius: 22%;
  overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px -20px hsl(265 90% 50% / .6), 0 0 120px -20px hsl(190 95% 50% / .45);
  transform: rotate(-2deg); transition: transform .6s var(--ease);
}
.art-tile:hover { transform: rotate(0) scale(1.01); }
.art-tile img { width: 100%; height: 100%; object-fit: cover; }
.art-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.16), transparent 40%); }

/* ---- sections ---- */
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.kicker { color: var(--violet); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.section h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; line-height: 1.08; margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: var(--lift); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value { padding: 26px; }
.value-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--tile-bg); color: #141414;
  box-shadow: 0 0 0 1px var(--tile-ring), 0 6px 18px -6px rgba(0,0,0,.5); margin-bottom: 18px; }
.value-ico svg { width: 22px; height: 22px; }
.value h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.value p { margin: 0; color: var(--muted); font-size: 15.5px; }

.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.model { padding: 26px; position: relative; overflow: hidden; }
.model::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px; border-radius: 50%;
  background: hsl(var(--h, 265) 90% 60% / .16); filter: blur(40px); pointer-events: none; }
.model-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.m-tile { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; background: var(--tile-bg); flex: none;
  box-shadow: 0 0 0 1px var(--tile-ring), 0 10px 30px -10px hsl(var(--h, 265) 90% 55% / .7); }
.m-tile svg { width: 44px; height: 44px; }
.model h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.tag { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--fill); border: 1px solid var(--hair); color: var(--muted); }
.model p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; }
.model-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: var(--r-pill); background: var(--fill); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; position: relative; }
.plan.hl { border-color: transparent; background:
  linear-gradient(var(--surface), var(--surface)) padding-box,
  linear-gradient(140deg, var(--violet), var(--cyan)) border-box; border: 1.5px solid transparent;
  box-shadow: var(--lift), 0 30px 80px -30px hsl(265 90% 55% / .55); }
.plan-badge { position: absolute; top: -12px; left: 28px; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 5px 11px;
  border-radius: var(--r-pill); color: #fff; background: linear-gradient(90deg, hsl(265 85% 58%), hsl(195 90% 45%)); }
.plan h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.plan-blurb { color: var(--muted); margin: 4px 0 18px; font-size: 15px; }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 20px; }
.price b { font-size: 46px; letter-spacing: -.04em; line-height: 1; font-weight: 800; }
.price span { color: var(--muted); font-weight: 600; }
.feats { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; flex: 1; }
.feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.feats svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--ok); }
.plans-note { text-align: center; color: var(--faint); margin-top: 22px; font-size: 14.5px; }
.skeleton { min-height: 360px; background: linear-gradient(90deg, var(--fill), var(--fill-strong), var(--fill)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-card); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* faq */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; padding: 0 20px; transition: border-color .2s; }
.faq details[open] { border-color: var(--hair-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--muted); line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.faq a, .prose a, .auth a.inline { color: var(--text); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 3px; }
.faq a:hover, .prose a:hover, .auth a.inline:hover { text-decoration-color: currentColor; }

.closer { text-align: center; padding: 64px 24px; }
.closer { padding-bottom: 88px; }
.closer h2 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -.04em; font-weight: 800; line-height: 1.05; margin: 0 0 10px; }
.closer p { color: var(--muted); margin: 0 0 26px; font-size: 17px; }

/* footer */
.foot { border-top: 1px solid var(--hair); padding: 32px 0 calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14.5px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a:hover { color: var(--text); }

/* ---- auth ---- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 20px 64px; }
.auth { width: 100%; max-width: 420px; }
.auth-card { padding: 32px 28px; }
.auth-mark { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; margin: 0 auto 18px; background: #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 14px 40px -12px hsl(265 90% 55% / .7); }
.auth h1 { text-align: center; font-size: 28px; letter-spacing: -.035em; margin: 0 0 6px; font-weight: 800; }
.auth .sub { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 15.5px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field input {
  height: 50px; padding: 0 16px; border-radius: var(--r-input); border: 1px solid var(--hair-strong); background: var(--bg-2);
  font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus { border-color: color-mix(in srgb, var(--violet) 70%, transparent); box-shadow: 0 0 0 4px hsl(265 90% 60% / .18); }
.field .hint { color: var(--faint); font-size: 13px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-between a { font-size: 14px; color: var(--muted); font-weight: 600; }
.row-between a:hover { color: var(--text); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 14px; font-size: 15px; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: hsl(265 85% 60%); }
.err { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: 12px; padding: 11px 14px; font-size: 15px; margin-bottom: 16px; }
.okmsg { color: var(--text); background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  border-radius: 12px; padding: 11px 14px; font-size: 15px; margin-bottom: 16px; }
.switch { text-align: center; color: var(--muted); margin: 20px 0 0; font-size: 15px; }
.switch a { color: var(--text); font-weight: 700; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14.5px; font-weight: 600; margin: 22px auto 0; }
.back:hover { color: var(--text); }
.center { text-align: center; }

/* ---- legal ---- */
.legal-main { padding: 40px 0 72px; }
.legal { max-width: 780px; }
.legal-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--fill); border: 1px solid var(--hair);
  width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 32px; scrollbar-width: none; }
.legal-tabs a { padding: 8px 16px; border-radius: var(--r-pill); color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.legal-tabs a:hover { color: var(--text); }
.legal-tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--lift); }
.legal h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 8px; font-weight: 800; }
.updated { color: var(--faint); margin: 0 0 32px; font-size: 14.5px; }
.prose { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose h2 { font-size: 21px; letter-spacing: -.02em; margin: 36px 0 10px; color: var(--text); }
.prose p, .prose li { font-size: 16.5px; line-height: 1.7; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.callout { padding: 16px 18px; border-radius: 14px; background: var(--fill); border: 1px solid var(--hair); margin: 0 0 8px; }

/* ---- dev checkout ---- */
.test-flag { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: hsl(38 95% 55%); background: hsl(38 95% 55% / .12); border: 1px solid hsl(38 95% 55% / .35); padding: 5px 11px; border-radius: var(--r-pill); }
.co-line { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--hair); font-size: 16px; }
.co-line:last-of-type { border-bottom: 0; }
.co-line b { font-weight: 800; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; }
  .art-tile { width: min(64vw, 300px); }
  .hero { padding: 40px 0 48px; text-align: center; }
  .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .values, .models, .plans { grid-template-columns: 1fr; }
  .plans { max-width: 460px; margin: 0 auto; gap: 22px; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .bar-in { gap: 6px; }
  .bar-nav .hide-sm { display: none; }
  .bar-link { padding: 8px 9px; }
  .section { padding: 56px 0; }
  .cta-row .btn { width: 100%; }
  .auth-card { padding: 26px 20px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .eye, .aurora::before, .skeleton { animation: none; }
  .eye::after, .art-tile { transition: none; }
  html { scroll-behavior: auto; }
}
