/* rereset waitlist — Ink Dojo. Mobile-first: base styles target phones, media queries scale up. */
:root {
  --bg: #0a0a0a;
  --bg-2: #121110;
  --ink: #ece7df;
  --ink-dim: #a39d94;
  --line: rgba(236, 231, 223, 0.12);
  --red: #c0281e;
  --red-hot: #e0382b;
  --gutter: 20px;
  --max: 1160px;
  --head: "Oswald", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  overflow-x: hidden;
  /* Subtle washi grain over the whole page */
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons: brush-stroke red ---------- */
.btn, .feed-btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 34px;
  font: 600 17px/1 var(--head); letter-spacing: 0.03em;
  color: #fff; background: none; border: 0; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  transition: transform .2s;
}
/* Red paint laid down by a dry brush (img/brush.svg is the stroke shape) */
.btn::before, .feed-btn::before {
  content: ""; position: absolute; inset: -4px -10px; z-index: -1;
  background: var(--red);
  -webkit-mask: url(img/brush.svg) center / 100% 100% no-repeat;
          mask: url(img/brush.svg) center / 100% 100% no-repeat;
  transition: background .2s, transform .3s;
}
.btn:hover::before, .feed-btn:hover::before { background: var(--red-hot); transform: scaleX(1.03); }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) 12px;
  transition: background .3s, backdrop-filter .3s;
}
.nav.scrolled { background: rgba(10,10,10,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 600 22px/1 var(--head); letter-spacing: .01em; }
.nav-links { display: none; }

/* ---------- Hero ---------- */
/* Mobile: the ink scene is in-flow (full screen), headline sits in its dark sky, CTA follows on black */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: relative; display: block; height: 100svh; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; animation: drift 24s ease-in-out infinite alternate; }
.hero-bg::after { /* fade the scene into the page */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,.5) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-1.5%); } }

.hero-head { position: absolute; top: calc(env(safe-area-inset-top) + 92px); left: var(--gutter); right: var(--gutter); }
.hero-cta { position: relative; margin-top: -72px; padding: 0 var(--gutter) 24px; }
.hero-content { max-width: 620px; }
.kicker { margin: 0 0 14px; font: 500 15px/1 var(--head); letter-spacing: .28em; text-transform: uppercase; color: var(--ink-dim); }
.kicker .dot { color: var(--red); }
.hero h1 { font-size: clamp(36px, 10vw, 92px); text-shadow: 0 2px 30px rgba(0,0,0,.6); }
.lead { margin: 0 0 22px; font-size: 17px; color: var(--ink); max-width: 30em; text-shadow: 0 1px 12px rgba(0,0,0,.8); }
.fineprint { margin: 12px 0 0; font-size: 13px; color: var(--ink-dim); }

.scroll-hint {
  display: none;
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim);
}
.scroll-hint span { width: 1px; height: 34px; background: linear-gradient(var(--ink-dim), transparent); animation: hint 2s ease-in-out infinite; }
@keyframes hint { 0%,100% { transform: scaleY(.4); transform-origin: top; } 50% { transform: scaleY(1); } }

/* ---------- Waitlist form ---------- */
.waitlist { display: grid; gap: 10px; max-width: 520px; }
.waitlist input {
  min-height: 52px; padding: 0 16px; width: 100%;
  font: 400 16px var(--body); color: var(--ink);
  background: rgba(10,10,10,.6); border: 1px solid rgba(236,231,223,.25); border-radius: 2px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.waitlist input::placeholder { color: var(--ink-dim); }
.waitlist input:focus { outline: none; border-color: var(--red-hot); }
.form-msg { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--ink-dim); }
.form-msg.ok { color: var(--ink); }
.form-msg.err { color: var(--red-hot); }
.waitlist.done input, .waitlist.done button { display: none; }

/* ---------- Sections ---------- */
.section { padding: 88px var(--gutter); max-width: var(--max); margin: 0 auto; }
.eyebrow { margin: 0 0 14px; font: 500 13px/1 var(--head); letter-spacing: .24em; text-transform: uppercase; color: var(--red-hot); }
.section h2 { font-size: clamp(34px, 8.5vw, 64px); }
.section-lead { margin: 16px 0 0; color: var(--ink-dim); font-size: 17px; max-width: 36em; }

/* Monsters: boxless rows, ink art bleeds into the page and the copy overlaps it */
.monsters { display: grid; gap: 24px; margin-top: 24px; }
.monster { position: relative; }
.monster img { width: 118%; max-width: none; margin-left: -9%; transition: transform 1.2s ease; }
.monster.in img { animation: breathe 7s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.04) translateY(-1%); } }
.monster-body { position: relative; margin-top: -26%; }
.monster-no { display: block; margin-bottom: 6px; font: 500 13px/1 var(--head); letter-spacing: .2em; color: var(--red-hot); }
.monster h3 { font-size: clamp(40px, 11vw, 64px); text-transform: uppercase; letter-spacing: .01em; }
.monster p { margin: 8px 0 18px; color: var(--ink-dim); font-size: 16px; max-width: 26em; }
/* Brush-stroke HP bar */
.hp { position: relative; height: 12px; max-width: 360px; background: rgba(236,231,223,.08);
  clip-path: polygon(0 30%, 3% 0, 60% 12%, 100% 0, 99% 70%, 96% 100%, 40% 88%, 1% 100%); }
.hp span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--red); transition: width 1.6s cubic-bezier(.2,.8,.2,1) .3s; }
.hp b { position: absolute; right: 0; top: -22px; font: 500 12px var(--head); letter-spacing: .12em; color: var(--ink-dim); }
.monster .hp { overflow: visible; }
.monster.in .hp span { width: var(--hp); }

/* Forge: ink print fades into the page, no frame */
.forge { display: grid; gap: 8px; }
.forge-media { margin: 0 calc(var(--gutter) * -1); }
.forge-media img { width: 100%; }
.forge-copy { position: relative; margin-top: -12%; }

/* Revive */
.revive-flow { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 36px; position: relative; }
.revive-flow::before { /* dashed path linking the three states */
  content: ""; position: absolute; left: 47px; top: 48px; bottom: 48px; width: 0;
  border-left: 1px dashed rgba(236,231,223,.25);
}
.state { position: relative; display: grid; grid-template-columns: 96px 1fr; column-gap: 20px; align-items: center; }
.state img { grid-row: span 2; width: 96px; height: 96px; transition: filter 1s, opacity 1s, transform 1s; }
.state h3 { font-size: 30px; text-transform: uppercase; }
.state p { margin: 4px 0 0; color: var(--ink-dim); font-size: 15px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
.fallen img { filter: grayscale(1) brightness(.45); transform: rotate(-24deg); }
.fallen h3 { color: var(--ink-dim); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.revived img { filter: drop-shadow(0 0 18px rgba(224,56,43,.55)); }
.revived h3 { color: var(--red-hot); }

.hero h1 em, .revive h2 em { font-style: normal; color: var(--red-hot); }

/* How it works */
/* Rescue feed */
.feed { display: grid; gap: 14px; margin-top: 48px; }
.feed-item { padding: 18px 20px; border-left: 3px solid var(--red); background: linear-gradient(90deg, rgba(192,40,30,.1), transparent 85%); }
.feed-meta { margin: 0 0 6px; font: 500 12px/1.4 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.feed-quote { margin: 0 0 14px; font-size: 17px; }
.feed-btn { min-height: 40px; padding: 0 20px; font-size: 14px; cursor: default; }

/* Smoke rising from the bottom of the screen on every section (drawn by main.js) */
.smoke { position: fixed; left: 0; bottom: 0; width: 100%; height: 42vh; pointer-events: none; z-index: 0; }
main, .footer { position: relative; z-index: 1; }

/* Track stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 40px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg); padding: 20px; }
.stat-wide { grid-column: 1 / -1; }
.stat-label { display: block; font: 500 12px/1.3 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.stat strong { display: block; margin-top: 8px; font: 700 40px/1 var(--head); }
.nights { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; margin-top: 14px; }
.nights i { aspect-ratio: 1; border-radius: 50%; background: var(--red); }
.nights i.x { background: transparent; border: 1px solid rgba(236,231,223,.3); }
.nights i.now { background: transparent; border: 2px solid var(--red-hot); }
.track .fineprint { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 26px 0 0; }
.chips li { padding: 9px 16px; border: 1px solid rgba(236,231,223,.25); border-radius: 999px; font-size: 14px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 0; }
.steps li { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-no { grid-row: span 2; font: 600 22px/1.2 var(--head); color: var(--red-hot); }
.steps h3 { font-size: 28px; }
.steps p { margin: 6px 0 0; color: var(--ink-dim); }

/* FAQ */
.faq { margin-top: 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative;
  font: 500 19px/1.3 var(--head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--red-hot); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--ink-dim); }

/* Final CTA */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; }
.final-enso { width: 140px; margin-bottom: 24px; }
.final .waitlist { width: 100%; margin-top: 28px; }

/* Footer */
.footer { padding: 40px var(--gutter) calc(env(safe-area-inset-bottom) + 40px); border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--ink-dim); font-size: 14px; }
.footer .brand { color: var(--ink); font-size: 18px; }
.footer p { margin: 0; }
.copy { font-size: 12px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 768px) {
  :root { --gutter: 40px; }
  .nav-links { display: flex; gap: 32px; font-size: 15px; color: var(--ink-dim); }
  .nav-links a:hover { color: var(--ink); }
  /* Desktop: scene becomes a full-bleed background, copy on the empty right side */
  .hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: 120px var(--gutter) 96px; }
  .hero-bg { position: absolute; inset: 0; height: auto; z-index: -1; }
  .hero-bg img { object-position: left center; }
  .hero-bg::after { background: linear-gradient(to right, transparent 25%, rgba(10,10,10,.55) 70%), linear-gradient(to bottom, transparent 70%, var(--bg) 100%); }
  .hero-content { width: min(660px, 54%); margin-right: max(0px, calc((100vw - var(--max)) / 2)); }
  .hero-head { position: static; }
  .hero h1 { font-size: clamp(40px, 4.4vw, 68px); }
  .hero-cta { margin-top: 0; padding: 0; }
  .lead { margin-top: 18px; }
  .scroll-hint { display: flex; }
  .waitlist { grid-template-columns: 1fr auto; }
  .waitlist .form-msg { grid-column: 1 / -1; }
  /* Alternating rows: art on one side, copy tucked against it */
  .monsters { gap: 0; margin-top: 8px; }
  .monster { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; }
  .monster img { width: 100%; margin: 0; }
  .monster-body { margin: 0 0 0 -8%; }
  .monster:nth-child(even) img { order: 2; }
  .monster:nth-child(even) .monster-body { margin: 0 -8% 0 0; text-align: right; justify-self: end; }
  .monster:nth-child(even) .hp { margin-left: auto; }
  .monster:nth-child(even) p { margin-left: auto; }
  .forge { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 0; }
  .forge-media { margin: 0 0 0 calc(var(--gutter) * -1); }
  .forge-copy { margin: 0 0 0 -10%; }
  .how .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .feed { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .stats { grid-template-columns: 2fr repeat(4, 1fr); }
  .stat-wide { grid-column: auto; }
  .revive-flow { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .revive-flow::before { left: 48px; right: 48px; top: 48px; bottom: auto; height: 0; width: auto; border-left: 0; border-top: 1px dashed rgba(236,231,223,.25); }
  .state { grid-template-columns: 1fr; row-gap: 16px; }
  .state img { grid-row: auto; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps li, .steps li:last-child { border-bottom: 0; grid-template-columns: 1fr; }
  .step-no { grid-row: auto; margin-bottom: 14px; }
  .faq { max-width: 760px; }
  .final .waitlist { max-width: 560px; }
  .footer { grid-template-columns: auto 1fr auto; justify-items: stretch; text-align: left; }
  .footer p:nth-child(2) { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img, .scroll-hint span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hp span { transition: none; }
  .monster.in img { animation: none; }
}
