/* Fonts are self-hosted (no Google Fonts request, so visitors aren't sent to a third party).
   Both are SIL Open Font License, see fonts/OFL-*.txt */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Tektur";
  src: url("../fonts/tektur.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #110808;
  --bg-elevated: #1A0D0C;
  --bg-elevated-2: #231211;
  --border: #4B2924;
  --text-muted: #BBA29B;
  --text: #FFF1E7;
  --accent: #FF5A1F;
  --accent-strong: #F2401A;
  --text-on-accent: #170605;
  --glow: 0;
  --font-body: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-display: "Tektur", var(--font-body);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* subtle grain so the dark sections don't look flat */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* Header */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(24px, 4vw, 48px);
  opacity: 0; transition: opacity 1.2s ease .2s;
}
body.lit .top { opacity: 1; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0; }
.mark svg { width: 18px; height: 22px; }
.top-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top-links a { text-decoration: none; color: var(--text-muted); transition: color .2s; }
.top-links a:hover { color: var(--text); }
.top-links .pill-btn { color: var(--bg); background: var(--text); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.top-links .pill-btn:hover { color: var(--bg); background: #fff; }

/* Hero */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 640px;
  text-align: center; overflow: hidden; isolation: isolate;
}
.firelight {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 92%, rgba(255,70,20,.30), rgba(180,30,10,.12) 45%, transparent 75%);
  opacity: var(--glow);
}
.hero-copy { position: relative; z-index: 2; padding: clamp(96px, 15vh, 150px) 24px 0; max-width: 1000px; margin: 0 auto; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, min(10.5vw, 16vh), 160px);
  line-height: .9; font-weight: 700; letter-spacing: -0.02em; font-stretch: 90%;
  color: var(--text);
  opacity: calc(0.035 + var(--glow) * 0.965);
  text-shadow: 0 0 calc(var(--glow) * 60px) rgba(255,90,30, calc(var(--glow) * .22));
}
.hero-sub {
  margin: 24px auto 0; max-width: 40ch; font-size: clamp(18px, 1.6vw, 21px); color: var(--text-muted);
}
.after-light { opacity: 0; transform: translateY(8px); transition: opacity 1s ease, transform 1s ease; }
body.lit .after-light { opacity: 1; transform: none; }
body.lit .after-light.d2 { transition-delay: .25s; }
body.lit .after-light.d3 { transition-delay: .5s; }

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 16px; font-weight: 600;
  padding: 14px 22px; border-radius: 10px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-amber { background: var(--accent); color: var(--text-on-accent); }
.btn-amber:hover { background: #FF7A45; }
.btn-line { border-color: var(--border); color: var(--text); background: rgba(17,8,8,.5); }
.btn-line:hover { border-color: var(--text-muted); }
.btn svg { width: 18px; height: 18px; }

.platforms { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px 5px 10px;
}
.chip svg { width: 14px; height: 14px; }

.hearth { position: absolute; left: 0; right: 0; bottom: 0; height: 62vh; min-height: 340px; z-index: 1; cursor: pointer; touch-action: manipulation; }
#fire {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  -webkit-mask-image: radial-gradient(ellipse 62% 100% at 50% 100%, #000 52%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 100% at 50% 100%, #000 52%, transparent 100%);
}
#sparks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hearth.nofire { background: radial-gradient(50% 100% at 50% 100%, rgba(255,90,31,.55), transparent 70%); }
.tap-hint { margin-top: 16px; font-size: 13px; color: var(--text-muted); opacity: 0; transition: opacity 1.5s; }
.tap-hint.show { opacity: .8; }

/* Why */
.why { padding: clamp(110px, 14vw, 190px) 0 clamp(40px, 6vw, 80px); }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: clamp(24px, 5vw, 80px); }
.why-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; padding-top: .6em; }
.manifesto {
  font-family: var(--font-display); font-weight: 600; font-stretch: 92%;
  font-size: clamp(32px, 4.3vw, 62px); line-height: 1.06; letter-spacing: -0.01em; max-width: 21ch;
}
.manifesto .w { color: #3A1F1B; transition: color .45s ease, text-shadow .45s ease; }
.manifesto .w.on { color: var(--text); }
.manifesto .w.hot { color: var(--accent); text-shadow: 0 0 18px rgba(255,90,31,.55); }
.why-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(28px, 4vw, 56px); margin-top: clamp(40px, 5vw, 64px); max-width: 860px; }
.why-body p { color: var(--text-muted); font-size: 18px; line-height: 1.65; }
.why-body p.wide { grid-column: 1 / -1; color: var(--text); max-width: 60ch; padding-top: 20px; border-top: 1px solid var(--border); }

/* Sections */
.product { padding: clamp(96px, 14vw, 180px) 0; }
.product + .product { padding-top: 0; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.product-grid.flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.product-grid.flip .copy { order: 2; }

.status {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 22px;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status.beta { color: var(--accent); background: rgba(255,90,31,.1); border: 1px solid rgba(255,90,31,.35); }
.status.beta::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.status.dev { color: var(--text-muted); border: 1px solid var(--border); }
.status.dev::before { background: var(--text-muted); }

h2 { font-family: var(--font-display); font-size: clamp(44px, 6vw, 84px); line-height: .95; letter-spacing: -0.015em; font-weight: 700; font-stretch: 92%; }
.lead { margin-top: 20px; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; max-width: 30ch; }
.privacy {
  display: flex; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 16px; max-width: 46ch;
}
.privacy svg { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--accent); }

.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; max-width: 480px; }
.tiers h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.tiers h4 span { color: var(--text-muted); font-weight: 400; }
.tiers ul { list-style: none; color: var(--text-muted); font-size: 15px; display: grid; gap: 4px; }
.tier-note { margin-top: 16px; font-size: 14px; color: var(--text-muted); }

/* Lecture demo window */
.window {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.titlebar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--bg-elevated-2); }
.titlebar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.titlebar span { margin-left: 10px; font-size: 13px; color: var(--text-muted); }
.win-body { padding: 20px 22px 18px; min-height: 380px; position: relative; }
.rec { display: flex; align-items: center; gap: 14px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #E5533D; box-shadow: 0 0 10px #E5533D; }
.rec-dot.off { background: var(--border); box-shadow: none; }
.rec-time { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 64px; }
.wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 36px; }
.wave b { flex: 1; background: var(--border); border-radius: 2px; height: 15%; transition: height .12s ease, background .4s; }
.window.playing .wave b { background: var(--text-muted); }
.lines { margin-top: 20px; display: grid; gap: 12px; }
.line { display: grid; grid-template-columns: 52px 1fr; gap: 10px; font-size: 15px; line-height: 1.45; opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s; }
.line.show { opacity: 1; transform: none; }
.line time { color: var(--text-muted); font-size: 13px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.line mark { background: linear-gradient(transparent 58%, rgba(255,90,31,.32) 58%); color: inherit; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.card-wrap { margin-top: 20px; perspective: 900px; opacity: 0; transform: translateY(10px); transition: opacity .7s, transform .7s; }
.card-wrap.show { opacity: 1; transform: none; }
.flash { position: relative; height: 92px; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,.7,.2,1); }
.flash.flipped { transform: rotateX(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; padding: 14px 16px;
  background: var(--text); color: var(--text-on-accent); display: flex; flex-direction: column; justify-content: center;
}
.face small { font-size: 12px; color: #8A6257; font-weight: 600; }
.face p { font-size: 15px; font-weight: 600; line-height: 1.35; }
.face.back { transform: rotateX(180deg); background: #FF7A45; }
.face.back small { color: #5E1705; }
.win-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.win-foot .local { display: flex; align-items: center; gap: 6px; }
.win-foot svg { width: 13px; height: 13px; }
.replay { font: inherit; font-size: 13px; color: var(--text-muted); background: none; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; cursor: pointer; opacity: 0; transition: opacity .4s, color .2s; }
.replay.show { opacity: 1; }
.replay:hover { color: var(--text); }

/* The Eye */
.eye-stage { display: grid; place-items: center; aspect-ratio: 1 / 0.85; }
#iris { width: min(420px, 90%); height: auto; overflow: visible; }
#iris .tick { stroke: var(--border); stroke-width: 2; stroke-linecap: round; }
#ticks { transform-box: fill-box; transform-origin: center; animation: sunburst 120s linear infinite; }
@keyframes sunburst { to { transform: rotate(360deg); } }
#iris .tick.warm { stroke: var(--text-muted); }
#pupil-group { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.eye-caption { margin-top: 10px; font-size: 14px; color: var(--text-muted); text-align: center; }

.forge-more { padding: 0 0 clamp(96px, 12vw, 160px); }
.forge-more p { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; max-width: 32ch; color: var(--text-muted); letter-spacing: -0.01em; }
.forge-more p strong { color: var(--text); font-weight: 600; }

/* Promise */
.promise { padding: clamp(96px, 12vw, 160px) 0; background: var(--accent-strong); color: var(--text-on-accent); }
.guarantee { font-family: var(--font-display); font-size: clamp(40px, 6.2vw, 92px); line-height: .98; letter-spacing: -0.015em; font-weight: 700; font-stretch: 92%; max-width: 15ch; }
.promise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 56px; align-items: start; }
.promise-grid p { color: rgba(23,6,5,.8); font-size: 18px; max-width: 44ch; }
.promise-grid p + p { margin-top: 16px; }
.code-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--text-on-accent); padding-bottom: 3px; color: var(--text-on-accent); }
.code-link:hover { color: #fff; border-color: #fff; }
.promise :focus-visible { outline-color: var(--text-on-accent); }
.code-link svg { width: 18px; height: 18px; }

/* Waitlist */
.waitlist { padding: clamp(96px, 12vw, 160px) 0; background: radial-gradient(70% 80% at 85% 100%, rgba(255,70,20,.12), transparent 70%); }
.waitlist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.perks { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.perks li { display: flex; gap: 14px; font-size: 18px; }
.perks li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(255,90,31,.7); }
form { display: flex; gap: 10px; }
label.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input[type=email] {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--text);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; outline: none; transition: border-color .2s;
}
input[type=email]::placeholder { color: #8C716A; }
input[type=email]:focus { border-color: var(--accent); }
.micro { margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.form-msg { margin-top: 10px; font-size: 15px; min-height: 24px; color: var(--accent); }

footer { border-top: 1px solid var(--border); padding: 32px 0; font-size: 14px; color: var(--text-muted); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .product-grid, .product-grid.flip, .promise-grid, .waitlist-grid, .why-grid, .why-body { grid-template-columns: 1fr; }
  .product-grid.flip .copy { order: 0; }
  .top-links a:not(.pill-btn) { display: none; }
  .tiers { grid-template-columns: 1fr 1fr; }
  form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
