/* Marmot Cinema — website styles.
   Tokens mirror src/constants/colors.ts so the site looks like the app. */

:root {
  color-scheme: dark;

  --bg: #0a0a0c;
  --surface: #14141a;
  --surface-2: #1d1d26;
  --surface-3: #262630;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.12);

  --fg: #f0f0f5;
  --fg-muted: #a8a8b3;
  --fg-dim: #6c6c7a;

  --neon: #38d3fa;
  --neon-bright: #72eeff;
  --neon-dim: #0baed4;
  --neon-glow: rgba(56, 211, 250, 0.35);
  --neon-soft: rgba(56, 211, 250, 0.15);
  --neon-bg: rgba(56, 211, 250, 0.1);
  --down: #e8604a;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: var(--neon); text-underline-offset: 3px; }
a:hover { color: var(--neon-bright); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: var(--r-sm); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--neon); color: #0a0a0c; padding: 10px 16px; border-radius: var(--r-md);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--neon); font-variant-numeric: tabular-nums;
}

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ───────── Header ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--fg); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: none; margin-left: auto; gap: 4px; }
.site-nav a {
  color: var(--fg-muted); text-decoration: none; font-size: 14px;
  padding: 10px 12px; border-radius: var(--r-md);
}
.site-nav a:hover { color: var(--fg); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang {
  display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: 999px; overflow: hidden;
  font-size: 12px; font-weight: 600;
}
.lang a, .lang span { padding: 8px 12px; min-width: 40px; text-align: center; text-decoration: none; }
.lang a { color: var(--fg-muted); }
.lang a:hover { color: var(--fg); background: var(--surface-2); }
.lang [aria-current] { background: var(--neon-bg); color: var(--neon); }
/* The hero already shows the store buttons, so the header one yields space on phones. */
@media (max-width: 519px) { .header-actions .btn { display: none; } .header-actions { margin-left: auto; } }
@media (min-width: 860px) {
  .site-nav { display: flex; }
  .header-actions { margin-left: 8px; }
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-md);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--neon); color: #0a0a0c;
  box-shadow: 0 0 24px -4px var(--neon-glow);
}
.btn-primary:hover { background: var(--neon-bright); color: #0a0a0c; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  flex: 1 1 210px; max-width: 280px;
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 20px 8px 16px;
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r-md);
  color: var(--fg); text-decoration: none; transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.store:hover { border-color: var(--neon); background: var(--surface-2); color: var(--fg); transform: translateY(-1px); }
.store .icon { width: 26px; height: 26px; color: var(--neon); }
.store small { display: block; font-size: 11px; color: var(--fg-muted); line-height: 1.2; }
.store strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }

/* ───────── Hero ───────── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 96px);
  background:
    radial-gradient(60% 55% at 78% 30%, var(--neon-soft), transparent 70%),
    radial-gradient(40% 40% at 8% 90%, rgba(56, 211, 250, 0.06), transparent 70%);
}
.hero .wrap { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); letter-spacing: -0.045em; margin: 14px 0 18px; }
.accent { color: var(--neon); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--fg-muted); max-width: 34em; margin-bottom: 28px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--fg-muted); display: flex; align-items: flex-start; gap: 10px; }
.hero-note .dot { margin-top: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon-glow); flex: none; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
}

/* ───────── Phone mock (decorative) ───────── */
.phone-stage { display: flex; justify-content: center; position: relative; }
.phone-stage::before {
  content: ""; position: absolute; inset: 8% 10%; background: var(--neon-glow); filter: blur(90px); opacity: 0.45; border-radius: 50%;
}
.phone {
  position: relative; width: min(310px, 84vw); aspect-ratio: 310 / 640;
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: 46px; padding: 9px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.screen {
  height: 100%; background: var(--bg); border-radius: 38px; overflow: hidden; padding: 38px 14px 0; position: relative;
}
.screen::before {
  content: ""; position: absolute; top: 11px; left: 50%; width: 84px; height: 22px; transform: translateX(-50%);
  background: #000; border-radius: 999px;
}
.m-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.m-head b { font-size: 17px; letter-spacing: -0.02em; }
.m-head .icon { width: 13px; height: 13px; color: var(--neon); }
.m-meta { font-size: 9px; color: var(--fg-dim); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.m-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--hairline); margin-bottom: 14px; font-size: 11px; color: var(--fg-dim); }
.m-tabs span { padding: 0 0 8px; }
.m-tabs .on { color: var(--fg); box-shadow: 0 2px 0 var(--neon); }
.m-label { display: flex; align-items: center; gap: 6px; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 2px 7px; }
.m-label.win { color: var(--neon); }
.m-label.win::after { content: ""; flex: 1; height: 1px; background: var(--neon-soft); }
.m-label.up { color: var(--fg-dim); margin-top: 12px; }
.m-label .icon { width: 10px; height: 10px; }

.m-card {
  display: flex; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); margin-bottom: 7px;
}
.m-card.win { border-color: var(--neon); box-shadow: 0 0 26px -4px var(--neon-soft); padding: 12px; }
.m-poster {
  flex: none; width: 40px; height: 60px; border-radius: 6px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1d4f86, #09131f);
  background: linear-gradient(160deg, oklch(0.45 0.15 var(--h)), oklch(0.1 0.05 var(--h)));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.m-card.win .m-poster { width: 54px; height: 81px; }
.m-poster::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 6px); }
.h-220 { --h: 220; } .h-320 { --h: 320; } .h-145 { --h: 145; } .h-30 { --h: 30; }
.m-body { flex: 1; min-width: 0; }
.m-title { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.m-card.win .m-title { font-size: 14.5px; }
.m-sub { font-size: 9px; color: var(--fg-dim); letter-spacing: 0.05em; margin-top: 3px; }
.m-by { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 8.5px; color: var(--fg-dim); }
.m-av { width: 13px; height: 13px; border-radius: 50%; background: linear-gradient(135deg, oklch(0.65 0.15 var(--h)), oklch(0.35 0.1 var(--h))); }
.m-vote { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 30px; }
.m-vote .btn-v { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--fg-muted); }
.m-vote .btn-v.up { background: var(--neon-bg); color: var(--neon-bright); }
.m-vote .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.m-vote b { font-size: 13px; font-variant-numeric: tabular-nums; }
.m-card.win .m-vote b { font-size: 16px; }

/* ───────── Sections ───────── */
section { scroll-margin-top: 72px; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section.no-top { padding-top: 0; }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin-top: 12px; }
.section-head p { margin-top: 14px; color: var(--fg-muted); font-size: 1.05rem; }
.section-head .eyebrow, .cta .eyebrow { margin: 0; color: var(--neon); font-size: 11px; }
.alt { background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

.steps { list-style: none; display: grid; gap: 16px; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; background: var(--bg); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 24px;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--neon-bg); color: var(--neon); font-weight: 600; margin-bottom: 16px; border: 1px solid var(--neon-soft);
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { color: var(--fg-muted); font-size: 0.95rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.features { list-style: none; display: grid; gap: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.feature:hover { border-color: var(--hairline-strong); transform: translateY(-2px); }
.feature .ico {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-md);
  background: var(--neon-bg); color: var(--neon); margin-bottom: 16px;
}
.feature .ico .icon { width: 22px; height: 22px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--fg-muted); font-size: 0.95rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }

.cta {
  text-align: center; background: var(--surface); border: 1px solid var(--neon-soft); border-radius: var(--r-xl);
  padding: clamp(32px, 6vw, 64px) var(--gutter);
  box-shadow: 0 0 80px -30px var(--neon-glow);
  background-image: radial-gradient(60% 80% at 50% 0%, var(--neon-bg), transparent 70%);
}
.cta h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin: 10px 0 14px; }
.cta p:not(.eyebrow) { color: var(--fg-muted); max-width: 32em; margin: 0 auto 26px; }
.cta .stores { justify-content: center; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--hairline-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--neon); border-bottom: 2px solid var(--neon);
  transform: rotate(45deg); transition: transform 0.2s; margin-right: 4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { color: var(--fg-muted); padding: 0 0 22px; max-width: 40em; }

/* ───────── Footer ───────── */
.site-footer { border-top: 1px solid var(--hairline); padding: 48px 0 40px; color: var(--fg-muted); font-size: 14px; }
.foot-grid { display: grid; gap: 32px; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.foot-links a { color: var(--fg-muted); text-decoration: none; }
.foot-links a:hover { color: var(--fg); text-decoration: underline; }
.tmdb { max-width: 460px; }
.tmdb img { width: 150px; height: auto; margin-bottom: 12px; }
.tmdb p { font-size: 12.5px; line-height: 1.55; }
.copy { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 12.5px; color: var(--fg-dim); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ───────── Legal pages ───────── */
.legal { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.prose { max-width: 740px; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0 12px; }
.prose .updated { color: var(--fg-muted); font-size: 14px; margin-bottom: 32px; }
.prose .intro { color: var(--fg-muted); font-size: 1.05rem; margin-bottom: 8px; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.05rem; margin: 24px 0 8px; letter-spacing: -0.01em; }
.prose p, .prose li { color: #cfcfd8; }
.prose p { margin-bottom: 14px; }
.prose ul { padding-left: 1.25em; margin-bottom: 14px; }
.prose li { margin-bottom: 8px; padding-left: 4px; }
.prose li::marker { color: var(--neon); }
.prose ol { padding-left: 1.4em; margin-bottom: 14px; }
.request-box {
  margin: 0 0 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md); color: var(--fg); font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.prose strong { color: var(--fg); font-weight: 600; }
.prose .toc { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; padding: 0; }
.toc a {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--hairline-strong); border-radius: 999px;
  color: var(--fg-muted); font-size: 13px; text-decoration: none;
}
.toc a:hover { color: var(--fg); border-color: var(--neon); }
mark.todo { background: rgba(232, 96, 74, 0.18); color: #ffb9ab; padding: 1px 6px; border-radius: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; color: var(--fg-muted); margin-bottom: 20px; }
.back:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ───────── Deep-link hand-off pages (/join/<code>, /auth/confirm) ───────── */
[hidden] { display: none !important; }
.handoff { text-align: left; }
.handoff h2 { margin-top: 44px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; border-radius: var(--r-lg); }
.actions { margin: 28px 0 14px; }
.hint { color: var(--fg-muted); font-size: 14px; max-width: 34em; }
.code-card {
  display: inline-flex; flex-direction: column; gap: 6px; margin-top: 28px; padding: 16px 22px;
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r-lg);
}
.code-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.9rem; letter-spacing: 0.12em; color: var(--neon); font-variant-numeric: tabular-nums; }
.notice {
  margin-top: 28px; padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(232, 96, 74, 0.1); border: 1px solid rgba(232, 96, 74, 0.35); color: #ffc9be;
}
.handoff .stores { margin-top: 18px; }

/* Termly-generated privacy policy (web/privacy). Its markup carries editor classes and inline
   styles; those are stripped at build time and the look is restored here with the site tokens. */
.termly { max-width: 800px; }
.termly, .termly [data-custom-class='body_text'] { font-size: 15px; line-height: 1.6; }
.termly [data-custom-class='body_text'], .termly li, .termly td, .termly th, .termly p, .termly div { color: #cfcfd8; }
.termly [data-custom-class='title'] h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0 12px; color: var(--fg); }
.termly [data-custom-class='subtitle'] { color: var(--fg-muted); font-size: 14px; }
.termly [data-custom-class='heading_1'] h2, .termly h2 { font-size: 1.35rem; margin: 40px 0 12px; letter-spacing: -0.02em; color: var(--fg); }
.termly [data-custom-class='heading_2'] h3, .termly h3 { font-size: 1.05rem; margin: 24px 0 8px; color: var(--fg); }
.termly strong { color: var(--fg); }
.termly a, .termly [data-custom-class='link'] { color: var(--neon); overflow-wrap: anywhere; }
.termly ul { list-style: square; padding-left: 1.25em; margin: 8px 0 14px; }
.termly ul ul { margin-bottom: 4px; }
.termly li { margin-bottom: 6px; }
.termly table { width: 100%; border-collapse: collapse; margin: 14px 0; display: block; overflow-x: auto; }
.termly th, .termly td { border: 1px solid var(--hairline-strong) !important; padding: 8px 10px; vertical-align: top; }
.termly [data-custom-class='body'] * { background: transparent !important; }
