/* ============================================================
   Litebulb — beta / waitlist landing page
   Editorial-brutalist: display type + mono structure + serif
   accents. Warm-paper light theme, mobile-first.
   ============================================================ */

:root {
  --accent: #2a6fdb;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in oklch, var(--accent) 12%, #faf9f6);

  --bg: #faf9f6;          /* warm paper */
  --ink: #131311;         /* near-black */
  --ink-2: #46443d;
  --ink-3: #8c897e;
  --hair: #dddccf;        /* soft hairlines */

  --r-md: 6px;
  --r-pill: 999px;

  --shadow-md: 0 10px 34px rgba(19, 19, 17, .09), 0 2px 8px rgba(19, 19, 17, .05);
  --hard: 4px 4px 0 var(--ink);   /* hard offset shadow */

  --font-display: "Bricolage Grotesque", "Schibsted Grotesk", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 480px;
  --pad: 22px;
}

/* Dark theme tokens — shipped with the design system, ready behind
   [data-mode="dark"]. The default page renders light. */
[data-mode="dark"] {
  --bg: #100f0d;
  --ink: #f4f2ea;
  --ink-2: #b4b1a6;
  --ink-3: #76746a;
  --hair: #2c2a25;
  --accent-soft: color-mix(in oklch, var(--accent) 20%, #100f0d);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: clip;
  border-left: 1px solid var(--hair);
  border-right: 1px solid var(--hair);
}

/* structural grid behind everything — visible but quiet */
.page::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, var(--hair) 0 1px, transparent 1px 25%);
  opacity: .5;
  pointer-events: none; z-index: 0;
}
/* top accent rule */
.page::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent); z-index: 3; pointer-events: none;
}

section, header, footer, main { position: relative; z-index: 1; }
.section { padding: 0 var(--pad); }

/* ---------- shared type ---------- */
.muted { color: var(--ink-3); }

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 11.5vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.h-em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(27px, 8vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 14px 0 0;
  text-wrap: balance;
}

/* ---------- masthead (centered) ---------- */
.masthead {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 34px var(--pad) 30px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 10vw, 46px);
  letter-spacing: -0.04em; line-height: 1;
}
.wordmark .mark {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; flex: 0 0 auto;
  border: 1.5px solid var(--ink); box-shadow: var(--hard);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1.4);
}
.wordmark:hover .mark { transform: rotate(-7deg) scale(1.05); }
.wordmark .mark svg { width: 24px; height: 24px; }

/* ---------- hero (centered) ---------- */
.hero { text-align: center; padding: 18px var(--pad) 46px; }
.hero h1 { margin-bottom: 22px; }
.hero .subhead {
  font-size: 17px; line-height: 1.5; color: var(--ink-2);
  max-width: 33ch; margin: 0 auto 38px; text-wrap: pretty;
}
.hero .subhead b { color: var(--ink); font-weight: 600; }
.hero .subhead .h-em { font-size: 1.12em; }
.hero .cta-wrap { max-width: 360px; margin: 0 auto; }

/* pre-signup incentive pill */
.hero .perk {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  margin: 0 auto 24px; max-width: 100%;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2);
  border: 1.5px solid var(--ink); border-radius: var(--r-pill);
  padding: 9px 16px; background: var(--accent-soft);
}
.hero .perk .amt { color: var(--accent); font-weight: 700; }
.hero .perk .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  position: relative; flex: 0 0 auto;
}
.hero .perk .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: ping 2.4s cubic-bezier(.2, .7, .3, 1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(3.4); opacity: 0; } }

/* ---------- inline waitlist ---------- */
.waitlist { display: flex; flex-direction: column; gap: 16px; }
.waitlist .wl-field .input { text-align: center; font-size: 18px; padding: 11px 2px; }
.waitlist .wl-err {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin: -6px 0 0;
}

.input, .textarea {
  font-family: var(--font-sans); font-size: 17px; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1.5px solid var(--ink);
  border-radius: 0; padding: 9px 2px; width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .textarea:focus {
  outline: none; border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  background: linear-gradient(var(--accent-soft), transparent);
}
.textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.errmsg {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: #c8483f; margin: 0;
}

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer; width: 100%;
  font-family: var(--font-mono); font-weight: 500; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: 1.5px solid var(--ink); border-radius: var(--r-md);
  padding: 17px 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s ease, box-shadow .18s ease, background .2s ease;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--hard); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-primary:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary svg { transition: transform .18s ease; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn[disabled] { opacity: .6; cursor: default; box-shadow: var(--hard) !important; transform: none !important; }

/* ---------- marquee ---------- */
.marquee {
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  background: var(--ink); color: var(--bg);
  overflow: hidden; padding: 7px 0; white-space: nowrap;
}
.marquee .track { display: inline-flex; gap: 0; animation: scroll 26s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0 18px; display: inline-flex; align-items: center; gap: 18px;
}
.marquee .sep { color: var(--accent); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- success ---------- */
.success {
  padding: 70px var(--pad) 80px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.success .badge {
  width: 66px; height: 66px; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink);
  border: 1.5px solid var(--ink); box-shadow: var(--hard);
  display: grid; place-items: center; margin-bottom: 26px;
  animation: pop .5s cubic-bezier(.2, .8, .2, 1.2) both;
}
@keyframes pop { from { transform: scale(.5) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.success h2 { margin: 0 0 14px; }
.success p { color: var(--ink-2); font-size: 16px; max-width: 33ch; margin: 0 auto 8px; text-wrap: pretty; }

/* post-signup carrot + optional enrichment form */
.success .perk-note {
  margin: 28px 0 4px; width: 100%; max-width: 360px; box-sizing: border-box;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2); text-align: left;
  border: 1.5px solid var(--ink); border-radius: var(--r-md);
  background: var(--accent-soft); padding: 13px 15px;
}
.success .perk-note b { color: var(--ink); font-weight: 600; }
.success .perk-note.done {
  display: flex; align-items: center; gap: 9px;
  background: transparent; border-color: var(--hair); color: var(--ink-2);
}
.success .perk-note.done svg { color: var(--accent); flex: 0 0 auto; }

.success .extra {
  margin-top: 18px; width: 100%; max-width: 360px; text-align: left;
  display: flex; flex-direction: column; gap: 22px;
}
.success .extra .field { display: flex; flex-direction: column; gap: 10px; }
.success .extra label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink); font-weight: 500;
}
.success .extra .opt {
  color: var(--ink-3); margin-left: 8px; font-weight: 400;
  letter-spacing: 0; text-transform: none;
}
.success .extra .btn { margin-top: 4px; }

/* ---------- footer ---------- */
.foot {
  padding: 26px var(--pad) 42px; border-top: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.foot .fm { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.foot .fm .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); border: 1px solid var(--ink); }

/* ---------- sticky CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-top: 1.5px solid var(--ink);
  transform: translateY(130%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.sticky-cta.show { transform: translateY(0); }

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(15px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--rd, 0ms); will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee .track { animation: none !important; }
  .hero .perk .dot::after { animation: none !important; }
  html { scroll-behavior: auto; }
}

@media (min-width: 540px) {
  :root { --pad: 32px; }
  .page { box-shadow: var(--shadow-md); }
}
