/* ============================================================================
   FirstTakes — marketing site
   Tokens mirror the app's design system (lib/app/theme.dart): minimal
   monochrome on near-black, one restrained amber accent. Display = Space
   Grotesk, UI = Inter, numerals = JetBrains Mono.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0A0A0A;
  --bg-2: #0C0C0C;          /* feature band */
  --surface: #161616;
  --surface-2: #232323;
  --border: rgba(255, 255, 255, 0.10);

  /* Text */
  --text: #FFFFFF;
  --text-muted: #8A8A8A;

  /* Accent — streak / countdown / active record only */
  --accent: #F2B705;
  --accent-soft: rgba(242, 183, 5, 0.14);
  --on-accent: #0A0A0A;

  /* Functional */
  --live: #FF4438;
  --scrim: rgba(0, 0, 0, 0.55);

  /* Radius */
  --r-field: 10px;
  --r-card: 14px;
  --r-overlay: 16px;
  --r-sheet: 20px;
  --r-pill: 999px;

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 220ms;

  /* ── Design-system token aliases ──────────────────────────────────────────
     The compiled component bundle (_ds_bundle.js) and the app screens reference
     the design system's canonical token names. The site only loads this file,
     so the tokens are defined here too (values mirror "FirstTakes Design
     System/tokens/*"). Without these, radius → 0 (square buttons) and the
     `font: var(--text-*)` shorthands fall back to unstyled text. */
  --radius-field: var(--r-field);
  --radius-card: var(--r-card);
  --radius-overlay: var(--r-overlay);
  --radius-sheet: var(--r-sheet);
  --radius-pill: var(--r-pill);

  --text-title: 700 20px/1.2 var(--font-ui);
  --text-heading: 600 18px/1.25 var(--font-ui);
  --text-body: 400 15px/1.4 var(--font-ui);
  --text-body-strong: 600 15px/1.4 var(--font-ui);
  --text-caption: 400 12px/1.35 var(--font-ui);
  --text-micro: 400 11px/1.3 var(--font-ui);

  --motion-fast: 150ms;
  --motion-base: 220ms;
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);

  --shadow-floating: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* --------------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 0 0 var(--r-field) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ------------------------------- Material icons ------------------------------ */
.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased; user-select: none;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}
.ms--fill { font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.ms--10 { font-size: 10px; }
.ms--14 { font-size: 14px; }
.ms--16 { font-size: 16px; }
.ms--20 { font-size: 20px; }
.ms--26 { font-size: 26px; }
.ms--36 { font-size: 36px; }
.ms--play { font-size: 40px; color: rgba(255, 255, 255, 0.85); }

/* ------------------------------- Type helpers ----------------------------- */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; }
.dot { color: var(--accent); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }

.eyebrow {
  text-transform: uppercase; font-weight: 600;
  font-size: 12px; letter-spacing: 1.6px; color: var(--text-muted); margin: 0;
}
.eyebrow--xs { font-size: 10px; letter-spacing: 1.4px; }

/* --------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px;
  border-radius: var(--r-pill); padding: 9px 18px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.btn--solid { background: var(--text); color: var(--on-accent); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn:hover { transform: translateY(-1px); opacity: 0.92; }

.store-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.store-buttons--center { justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 12px 20px; background: var(--surface);
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.store-btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.22); }
.store-btn .ms { font-size: 28px; }
.store-btn__glyph { width: 26px; height: 26px; flex: none; }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn__text small { font-size: 11px; color: var(--text-muted); }
.store-btn__text strong { font-size: 17px; font-weight: 600; }

/* ---------------------------------- Nav ----------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.nav__inner { display: flex; align-items: center; height: 72px; gap: 32px; }
.wordmark { display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.04em; }
.wordmark--lg { font-size: 30px; }
.wordmark--sm { font-size: 16px; }
.logo-mark { width: 24px; height: 24px; margin-right: 9px; flex: none; }
.logo-mark--sm { width: 17px; height: 17px; margin-right: 7px; }
.cta__appicon { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 20px; display: block; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }
.nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__links > a:not(.btn) { color: var(--text-muted); font-size: 14px; transition: color var(--dur) var(--ease-out); }
.nav__links > a:not(.btn):hover { color: var(--text); }
.nav__toggle {
  display: none; margin-left: auto; background: none; border: 0; color: var(--text);
  cursor: pointer; padding: 6px;
}

/* --------------------------------- Hero ----------------------------------- */
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center; padding: 84px 40px 96px;
}
.hero__title { font-size: clamp(40px, 6vw, 64px); line-height: 1.04; margin-top: 18px; }
.lede { font-size: 19px; line-height: 1.55; color: var(--text-muted); max-width: 460px; margin: 22px 0 32px; }
.trustline { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--text-muted); font-size: 13px; }
.trustline .ms { font-size: 18px; }
.hero__device { display: flex; justify-content: center; }

/* ------------------------------- Features --------------------------------- */
.features { border-top: 1px solid var(--border); background: var(--bg-2); padding: 96px 0 120px; }
.features__head { text-align: center; margin-bottom: 24px; }
.features__title { font-size: clamp(30px, 4.5vw, 44px); margin-top: 14px; }
.features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
  align-items: start; margin-top: 40px;
}
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; }
.feature--raised { margin-top: 56px; }
.feature__device { margin-bottom: 28px; }
.feature .eyebrow { margin-top: 4px; }
.feature__title { font-size: 26px; letter-spacing: -0.02em; margin: 12px 0 8px; }
.feature__body { font-size: 15px; line-height: 1.5; color: var(--text-muted); max-width: 280px; margin: 0; }

/* ---------------------------------- CTA ----------------------------------- */
.cta__inner { text-align: center; padding: 110px 40px 130px; }
.cta__title { font-size: clamp(36px, 5.5vw, 56px); margin: 20px 0 28px; }

/* -------------------------------- Footer ---------------------------------- */
.footer { border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; min-height: 80px; gap: 24px; color: var(--text-muted); font-size: 13px; padding-top: 18px; padding-bottom: 4px; }
.footer__spacer { flex: 1; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { transition: color var(--dur) var(--ease-out); }
.footer__links a:hover { color: var(--text); }
.footer__legal { color: var(--text-muted); font-size: 12px; padding-bottom: 28px; margin: 4px auto 0; }

/* ==========================================================================
   PHONE MOCKUPS — recreate the app screens at marketing scale
   Base canvas designed at --pw wide; feature phones scale the same markup.
   ========================================================================== */
.phone {
  --pw: 300px;
  position: relative;
  width: var(--pw);
  aspect-ratio: 300 / 622;
  background: var(--bg);
  border: 10px solid #000;
  border-radius: 44px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  flex: none;
}
.phone--mini { --pw: 232px; border-width: 8px; border-radius: 36px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55); }
.phone__notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 98px; height: 22px; background: #000; border-radius: 0 0 14px 14px; z-index: 5;
}

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }

.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px 2px; font-size: 12px; font-weight: 600; flex: none;
}
.statusbar__icons { display: flex; align-items: center; gap: 5px; }

.appbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px 6px 16px; flex: none; }
.appbar--tight { padding-top: 14px; }
.appbar__title { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }

.streak {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 12px; padding: 4px 9px; border-radius: var(--r-pill);
}
.streak .ms { font-size: 14px; }
.streak--lg { font-size: 13px; padding: 7px 14px; margin-top: 12px; }
.streak--lg .ms { font-size: 16px; }

.screen__body { padding: 6px 14px 16px; flex: 1; overflow: hidden; }
.screen__body--scroll { overflow: hidden; }
.screen__spacer { flex: 1; }

/* Challenge card */
.challenge-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-overlay); padding: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.challenge-card__prompt { font-size: 13px; font-weight: 600; line-height: 1.35; margin: 5px 0 0; }
.challenge-card__foot { display: flex; align-items: center; margin-top: 10px; }
.countdown { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; }
.rec-fab {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  background: var(--text); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.rec-fab .ms { font-size: 18px; }
.challenge-card--done .done-row { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; margin-top: 8px; }

/* Locked state */
.locked { margin-top: 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.locked .ms { color: var(--text); }
.locked__title { font-size: 15px; font-weight: 600; margin: 10px 0 3px; }
.locked__sub { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }

/* Tab bar */
.tabbar {
  display: flex; align-items: center; background: var(--surface);
  border-top: 1px solid var(--border); padding: 8px 0 16px; flex: none;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-muted); }
.tab small { font-size: 10px; }
.tab--today { color: var(--accent); }
.tab__bolt {
  display: inline-flex; padding: 8px; border-radius: 50%;
  border: 2px solid var(--accent); background: var(--accent); color: var(--bg);
}
.tab__bolt .ms { font-size: 20px; }

/* Record screen */
.screen--record {  background-image: url(../assets/08A6EB94-A04C-4F95-A550-D5213561B52A_1_105_c.jpeg); background-size: cover; padding: 0; }
.screen--record { padding: 38px 16px 14px; }
.rec-progress { height: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.24); overflow: hidden; }
.rec-progress span { display: block; height: 100%; background: var(--accent); }
.rec-top { display: flex; justify-content: space-between; margin-top: 12px; }
.rec-chip { display: inline-flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, 0.5); border-radius: var(--r-pill); padding: 5px 9px; font-size: 12px; }
.live { color: var(--live); }
.rec-tools { display: flex; gap: 6px; }
.rec-tool { display: inline-flex; background: rgba(0, 0, 0, 0.5); border-radius: var(--r-pill); padding: 7px; }
.rec-prompt { align-self: flex-start; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--border); border-radius: var(--r-field); padding: 8px 11px; max-width: 200px; font-size: 12px; line-height: 1.35; }
.rec-lens { display: flex; justify-content: center; gap: 2px; margin-top: 12px; background: rgba(0, 0, 0, 0.4); border-radius: var(--r-pill); padding: 4px; width: fit-content; margin-inline: auto; }
.rec-lens span { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; color: #fff; }
.rec-lens .is-active { background: #fff; color: #000; }
.rec-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.rec-controls > .ms { color: #fff; }
.rec-button { width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; }
.rec-button__core { width: 24px; height: 24px; border-radius: 6px; background: var(--live); }

/* Take card (feed) */
.take { background: var(--surface); border-radius: var(--r-card); padding: 9px; margin-bottom: 10px; }
.take__head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.take__name { flex: 1; font-size: 13px; font-weight: 600; }
.take__verdicts { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.verdict { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); color: var(--text-muted); font-size: 12px; padding: 4px 9px; border-radius: var(--r-pill); }
.verdict--down { color: var(--live); background: rgba(255, 68, 56, 0.14); }
.take__comment { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 12px; }
.section-label { margin: 14px 0 8px; }

/* Avatar */
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600;
}
.avatar--lg { width: 60px; height: 60px; font-size: 24px; }

/* Badges */
.badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-pill); }
.badge--live { background: rgba(255, 68, 56, 0.18); color: var(--live); }
.badge--overlay { background: rgba(0, 0, 0, 0.6); color: #fff; letter-spacing: 0.5px; }

/* Media tile */
.tile {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--r-field);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 30% 20%, #2a2a2a 0%, var(--surface-2) 55%, #1b1b1b 100%);
}

/* Profile */
.profile { display: flex; flex-direction: column; align-items: center; }
.profile__name { font-size: 17px; font-weight: 600; margin: 9px 0 0; }
.profile__handle { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.profile__label { align-self: flex-start; margin: 18px 0 8px; }
.archive { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tile--sm { border-radius: var(--r-field); }
.tile__meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 5px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  display: flex; align-items: center; gap: 3px;
  font-size: 9px; color: #fff; font-family: var(--font-mono);
}
.tile__late { position: absolute; top: 5px; right: 5px; }

/* ============================== Reveal motion ============================= */
/* Only hide-then-reveal when JS is present; without it, content stays visible. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================== Responsive =============================== */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .nav__links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 24px 20px; }
  .nav__links.is-open { display: flex; }
  .nav__links > a { padding: 12px 0; font-size: 16px; }
  .nav__links .btn { align-self: flex-start; margin-top: 8px; }
  .nav__toggle { display: inline-flex; }

  .hero__grid { grid-template-columns: 1fr; gap: 8px; padding: 56px 24px 72px; text-align: center; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; }
  .lede { margin-inline: auto; }
  .store-buttons { justify-content: center; }
  .hero__device { margin-top: 40px; }

  .features { padding: 72px 0 88px; }
  .features__grid { grid-template-columns: 1fr; gap: 64px; max-width: 360px; margin-inline: auto; }
  .feature--raised { margin-top: 0; }

  .cta__inner { padding: 80px 24px 96px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .store-btn:hover { transform: none; }
}
