/* ════════════════════════════════════════════════════════════════════════
   Recoms — Warm Cinema (cinema / dark surface family)
   Shared by the /r/:token landing and the / home hero.
   ════════════════════════════════════════════════════════════════════════ */
:root {
  --cinema: #141009;
  --cinema-2: #201a11;
  --cinema-edge: rgba(255, 255, 255, 0.1);
  --cream: #eee4d1;
  --cream-2: #ab9f86;
  --gold: #e0a92e;
  --gold-deep: #9c7a20;
  --gold-soft: rgba(224, 169, 46, 0.16);
  --on-gold: #231a07;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 22px;
  --font-display: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 460px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--cinema);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
}

/* Film grain over the whole surface */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0.04;
  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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-2);
}

/* ─── Default state visibility (driven by body[data-state]) ─────────────── */
.loaded-view, .skeleton, .invalid { display: none; }
body[data-state="loaded"] .loaded-view,
body[data-state="banner"] .loaded-view { display: block; }
body[data-state="loading"] .skeleton { display: block; }
body[data-state="invalid"] .invalid { display: flex; }

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ─── Smart banner ─────────────────────────────────────────────────────── */
.smartbanner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(20, 17, 12, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cinema-edge);
}
body[data-state="banner"] .smartbanner { display: flex; }
.smartbanner .appicon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(150deg, var(--gold), var(--gold-deep));
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(224, 169, 46, 0.35);
}
.smartbanner .appicon span { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--on-gold); }
.smartbanner .sb-text { flex: 1; min-width: 0; line-height: 1.25; }
.smartbanner .sb-text b { font-weight: 800; font-size: 14px; color: var(--cream); display: block; }
.smartbanner .sb-text small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--cream-2); text-transform: uppercase; }
.sb-open {
  flex: none; border: 0; cursor: pointer; text-decoration: none;
  background: var(--gold); color: var(--on-gold);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  padding: 9px 16px; border-radius: 999px; min-height: 40px;
  display: inline-flex; align-items: center;
}
.sb-close { flex: none; background: none; border: 0; cursor: pointer; color: var(--cream-2); font-size: 20px; line-height: 1; padding: 6px; min-height: 40px; min-width: 40px; }

/* ─── Marquee ──────────────────────────────────────────────────────────── */
.marquee {
  position: relative; width: 100%;
  aspect-ratio: 3 / 4; max-height: 560px; overflow: hidden;
  background: #1a140c;
}
.marquee__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); filter: saturate(0.92); }
.marquee__duotone {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 30%, var(--duo-glow, #7a5a2a) 0%, transparent 55%), var(--duo-deep, #241a0d);
}
.marquee__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,17,12,0.45) 0%, rgba(20,17,12,0) 26%, rgba(20,17,12,0.55) 72%, var(--cinema) 100%),
    radial-gradient(130% 100% at 50% 12%, transparent 55%, rgba(0,0,0,0.5) 100%);
}
.marquee__glow {
  position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%);
  width: 90%; height: 40%; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 100%, var(--gold-soft), transparent 70%);
}
.marquee__title { position: absolute; left: 22px; right: 22px; bottom: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 6px; padding: 4px 8px;
  background: rgba(20, 17, 12, 0.25);
}
.film-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(40px, 13vw, 58px); line-height: 0.95; letter-spacing: -0.02em;
  color: #fff; margin: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}
.film-meta { margin-top: 12px; font-size: 13.5px; color: var(--cream); font-weight: 600; opacity: 0.95; }

/* ─── Body ─────────────────────────────────────────────────────────────── */
.body { padding: 4px 22px 0; }

.note { border: 1px solid rgba(224, 169, 46, 0.3); background: rgba(224, 169, 46, 0.1); border-radius: var(--r-md); padding: 18px; margin-top: 18px; }
.note__head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 999px; flex: none; overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: #fff;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.note__who b { display: block; font-weight: 800; font-size: 14.5px; color: #fff; }
.note__who small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cream-2); }
.note__msg { font-size: 18px; line-height: 1.45; color: var(--cream); margin: 0; }
.note__msg:empty { display: none; }

.gist { margin-top: 26px; }
.gist .eyebrow { display: block; margin-bottom: 10px; letter-spacing: 0.16em; }
.gist p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--cream); }

/* ─── CTA ──────────────────────────────────────────────────────────────── */
.cta {
  margin-top: 30px; border: 1px solid var(--cinema-edge);
  background: linear-gradient(180deg, var(--cinema-2), rgba(32, 26, 17, 0.4));
  border-radius: var(--r-lg); padding: 24px 20px 22px; text-align: center;
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; left: 50%; top: -40%; transform: translateX(-50%);
  width: 80%; height: 80%;
  background: radial-gradient(50% 50% at 50% 50%, var(--gold-soft), transparent 70%);
  pointer-events: none;
}
.cta h2 { position: relative; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; color: #fff; }
.cta .sub { position: relative; margin: 8px auto 0; max-width: 30ch; font-size: 14px; color: var(--cream-2); }

.stores { position: relative; display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 18px; border-radius: 13px; text-decoration: none;
  background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.store:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); }
.store svg { flex: none; }
.store .store__txt { text-align: left; line-height: 1.1; }
.store .store__txt small { display: block; font-size: 9.5px; letter-spacing: 0.04em; color: #cfcfcf; }
.store .store__txt b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

.valueprop {
  position: relative; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--cinema-edge);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-2);
}
.valueprop b { color: var(--gold); font-weight: 700; }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.foot { padding: 28px 22px calc(40px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 9px; }
.foot__dot { width: 9px; height: 9px; border-radius: 999px; background: var(--gold); border: 3px solid var(--gold-soft); box-sizing: content-box; }
.foot span:last-child { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-2); }

/* ─── Loading skeleton ─────────────────────────────────────────────────── */
.sk { background: linear-gradient(100deg, var(--cinema-2) 30%, #2b2316 50%, var(--cinema-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-banner { width: 100%; aspect-ratio: 3 / 4; max-height: 560px; border-radius: 0; }
.sk-line { height: 14px; margin: 12px 22px; }

/* ─── Invalid / expired ────────────────────────────────────────────────── */
.invalid { flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 100vh; padding: 40px 28px; gap: 4px; }
.invalid__icon { width: 84px; height: 84px; border-radius: 999px; display: grid; place-items: center; margin-bottom: 22px; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(224, 169, 46, 0.3); }
.invalid h1 { font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: -0.02em; margin: 0 0 8px; color: #fff; }
.invalid p { margin: 0 0 26px; max-width: 32ch; color: var(--cream-2); font-size: 15px; }
.invalid .stores { position: static; }

/* ─── Desktop / wide viewport ──────────────────────────────────────────── */
@media (min-width: 880px) {
  :root { --maxw: 980px; }
  body[data-state="loaded"] .shell,
  body[data-state="banner"] .shell {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; padding: 0; min-height: 100vh;
  }
  .smartbanner { grid-column: 1 / -1; }
  .marquee { aspect-ratio: auto; height: 100vh; max-height: none; position: sticky; top: 0; }
  .marquee__title { bottom: 40px; left: 40px; right: 40px; }
  .film-title { font-size: clamp(48px, 5vw, 72px); }
  .body { padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; }
  .note { margin-top: 0; }
}

/* ─── Home hero (recoms.app/) — pre-launch teaser ──────────────────────── */
body.home { display: grid; place-items: center; min-height: 100svh; }
.home-hero {
  max-width: 600px; padding: 48px 28px calc(40px + env(safe-area-inset-bottom));
  text-align: center; position: relative; z-index: 1;
}
.home-hero::before {
  content: ""; position: absolute; left: 50%; top: -4%; transform: translateX(-50%);
  width: 130%; height: 70%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 30%, var(--gold-soft), transparent 70%);
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px; position: relative; }
.wordmark__dot { width: 9px; height: 9px; border-radius: 999px; background: var(--gold); border: 3px solid var(--gold-soft); box-sizing: content-box; }
.wordmark__name { font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--cream-2); }

.home-eyebrow {
  position: relative; font-family: var(--font-mono); font-weight: 700;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.home-hero h1 {
  position: relative; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(36px, 9.5vw, 60px); line-height: 1.0; letter-spacing: -0.025em;
  color: #fff; margin: 0; text-wrap: balance;
}
.home-accent { color: var(--gold); }
.home-lead {
  position: relative; font-size: clamp(16px, 4.2vw, 18px); line-height: 1.6;
  color: var(--cream-2); margin: 22px auto 0; max-width: 42ch;
}

/* Waitlist (email capture) */
.waitlist { position: relative; margin: 34px auto 0; max-width: 420px; }
.waitlist__label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-2); margin-bottom: 10px; }
.waitlist__row { display: flex; gap: 8px; }
.waitlist__row input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 16px;
  background: rgba(255, 255, 255, 0.04); color: var(--cream);
  border: 1px solid var(--cinema-edge); border-radius: 13px;
  font-family: var(--font-display); font-size: 16px; font-weight: 500;
  outline: none; transition: border-color 0.15s ease;
}
.waitlist__row input::placeholder { color: var(--cream-2); opacity: 0.7; }
.waitlist__row input:focus { border-color: var(--gold); }
.waitlist__row button {
  flex: none; min-height: 52px; padding: 0 22px; cursor: pointer;
  background: var(--gold); color: var(--on-gold);
  border: 0; border-radius: 13px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 20px rgba(224, 169, 46, 0.28);
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.waitlist__row button:hover { transform: translateY(-1px); }
.waitlist__row button:disabled { opacity: 0.7; cursor: default; transform: none; }
.waitlist.is-done .waitlist__row input { opacity: 0.6; }
.waitlist__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* Empty until Cloudflare needs a challenge (interaction-only) — no gap/box
   against the email field in the normal case; spacing only when it has content. */
.waitlist__captcha { display: flex; justify-content: center; }
.waitlist__captcha:not(:empty) { margin-top: 14px; }
.waitlist__msg { min-height: 18px; margin: 12px 0 0; font-size: 13.5px; }
.waitlist__msg.is-ok { color: var(--gold); }
.waitlist__msg.is-err { color: #e58a6f; }

/* Coming-soon teaser — non-interactive platform hint, no store links */
.coming { position: relative; margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.coming__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-2); opacity: 0.85; }
.platforms { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.platform {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--cinema-edge); background: rgba(255, 255, 255, 0.03);
  color: var(--cream); font-weight: 700; font-size: 14px;
}
.platform svg { opacity: 0.92; }

/* ─── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .sk { background-position: 0 0; }
  .marquee__art { transform: none; }
}
