/* ============================================================
   Skrolla — Landing Page
   Design tokens lifted 1:1 from the real app
   (android/Skrolla/.../ui/theme/Color.kt)
   ============================================================ */

:root {
  --bg-primary: #0B0E15;
  --bg-primary-2: #0B0E15;
  --bg-surface: #171C29;
  --bg-elevated: #1F2537;
  --bg-elevated-2: #10131C;

  --accent: #F0A94A;
  --accent-dim: #C98A38;
  --accent-glow: rgba(240, 169, 74, 0.45);
  --accent-glow-soft: rgba(240, 169, 74, 0.14);

  --text-primary: #F1F3F8;
  --text-secondary: #9AA3B8;
  --text-muted: #5C6478;

  --like: #FF6B81;
  --gold: #C9A44C;
  --separator: #232A3B;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg-primary); }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

/* ============================================================
   Background texture — grain + ambient glow
   ============================================================ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 15% 0%, rgba(240,169,74,0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 30%, rgba(240,169,74,0.09), transparent 60%);
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  transition: transform 0.35s var(--ease-soft), opacity 0.3s var(--ease-soft);
}
.nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.nav-logo .mark {
  /* 30px is the conventional nav-logo size most sites settle on — big enough to read as
     a real mark, small enough to stay a supporting element rather than competing with content. */
  width: 30px; height: 30px;
  border-radius: 9px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}
.nav-logo .mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  transition: all 0.25s var(--ease-soft);
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-glow-soft); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 60px;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow-soft);
  border: 1px solid rgba(240,169,74,0.28);
  padding: 7px 14px 7px 10px;
  border-radius: 100px;
  margin-bottom: 26px;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.8s var(--ease) 0.1s forwards;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.4vw, 74px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) 0.22s forwards;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #FBBF6B 0%, var(--accent) 45%, #C98A38 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) 0.34s forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) 0.46s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 26px;
  border-radius: 14px;
  box-shadow: 0 8px 30px var(--accent-glow);
  transition: transform 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
  border: none;
  cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(240,169,74,0.55); }

.btn-ghost {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 4px;
  transition: color 0.25s;
}
.btn-ghost:hover { color: var(--text-primary); }
.btn-ghost svg { transition: transform 0.25s var(--ease-soft); }
.btn-ghost:hover svg { transform: translateX(3px); }

.hero-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) 0.58s forwards;
}
.hero-proof .stack {
  display: flex;
}
.hero-proof .stack img {
  width: 30px; height: 45px;
  border-radius: 5px;
  object-fit: cover;
  margin-left: -10px;
  outline: 2.5px solid var(--bg-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.hero-proof .stack img:first-child { margin-left: 0; }
.hero-proof .txt { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.hero-proof .txt b { color: var(--text-secondary); font-weight: 600; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Hero phone stage ---- */

.hero-stage {
  position: relative;
  height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
}

.hero-phone-wrap {
  opacity: 0;
  transform: translateY(40px) rotateY(-8deg) rotateX(4deg) scale(0.92);
  animation: heroPhoneIn 1.2s var(--ease) 0.3s forwards;
  transform-style: preserve-3d;
}

@keyframes heroPhoneIn {
  to { opacity: 1; transform: translateY(0) rotateY(-8deg) rotateX(4deg) scale(1); }
}

.hero-phone-float {
  animation: floaty 6.5s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

.hero-glow-orb {
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,169,74,0.35) 0%, transparent 68%);
  filter: blur(10px);
  z-index: -1;
  animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20,20,20,0.85);
  border: 1px solid var(--separator);
  backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  opacity: 0;
  animation: chipIn 0.8s var(--ease) forwards;
}
.hero-chip.chip-2 { bottom: 16%; right: -8%; animation-delay: 1.3s; }
.hero-chip .ic { font-size: 15px; }

@keyframes chipIn {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Phone frame component (shared)
   ============================================================ */

.phone {
  /* --pw is kept a multiple of 20 everywhere it's set (here and at every breakpoint/inline
     override) so it lands on a whole physical-pixel count at both 125% and 150% Windows
     display scaling (20*1.25=25, 20*1.5=30) — non-integer physical widths force Chromium into
     sub-pixel resampling on every frame, which is what reads as text blur that "fixes itself"
     when you zoom (zooming changes the effective ratio away from the fractional one). */
  --pw: 280px;
  /* height derived from width at the source screenshots' own ~0.485 ratio (776:1600
     average across the Final-covers set) so the frame matches them exactly and
     object-fit: cover never has to crop anything. */
  width: var(--pw);
  height: calc(var(--pw) * 2.061);
  border-radius: 38px;
  border: 2px solid #2A3245;
  background: var(--bg-primary-2);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 90px rgba(0,0,0,0.65),
    inset 0 0 0 1px rgba(255,255,255,0.05),
    0 0 50px rgba(240,169,74,0.08);
  flex-shrink: 0;
}

.phone .notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 9px;
  background: #05060A;
  border-radius: 50%;
  z-index: 100;
  border: 1.5px solid #10131C;
}

.phone .statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 18px 6px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}
.phone .statusbar .icons { display: flex; gap: 4px; align-items: center; opacity: 0.9; }

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

.phone .screen img.app-screen-img {
  width: 100%;
  height: 100%;
  /* .phone's height is derived from --pw at the screenshots' own ~0.485 aspect
     ratio (see below), so cover never actually crops — it just fills exactly. */
  object-fit: cover;
  object-position: top center;
  border-radius: 36px;
  display: block;
  /* Chromium downsamples raster images softly at non-integer DPR (Windows 125%/150%
     display scaling on laptops); phones use clean 2x/3x DPR so this never shows there.
     backface-visibility + translateZ forces a sharper GPU compositing path. */
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.phone-caption {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 18px;
  letter-spacing: 0.02em;
}

/* generic bits reused across screens */
.chip { background: var(--bg-elevated); border: 1px solid var(--separator); border-radius: 8px; padding: 4px 10px; font-size: 10px; font-weight: 500; color: var(--text-secondary); }
.cover { background-size: cover; background-position: center; background-color: var(--bg-elevated); }
.navbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 56px;
  background: rgba(20,20,20,0.95); border-top: 1px solid var(--separator);
  display: flex; align-items: flex-start; padding-top: 8px; z-index: 20;
}
.navbar .item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.navbar .label { font-size: 9px; font-weight: 500; }
.navbar svg { width: 19px; height: 19px; }

/* ============================================================
   Section shell + reveal system
   ============================================================ */

section { position: relative; z-index: 1; }

.showcase {
  padding: 140px 0;
  border-top: 1px solid var(--separator);
}
.showcase:first-of-type { border-top: none; }

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}
.showcase-grid.reverse .showcase-copy { order: 2; }
.showcase-grid.reverse .showcase-visual { order: 1; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.tag .num { color: var(--text-muted); font-weight: 600; }

.showcase-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.16;
  margin-bottom: 18px;
}

.showcase-copy p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 24px;
}

.feature-list { display: flex; flex-direction: column; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 16px 0;
  border-top: 1px solid var(--separator);
}
.feature-list li:first-child { border-top: none; padding-top: 0; }
.feature-list li:last-child { padding-bottom: 0; }
.feature-list .fnum {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 22px;
  padding-top: 1px;
}
.feature-list b { color: var(--text-primary); font-weight: 600; }

.showcase-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
/* No scale() here on purpose: animating transform: scale() on an element that contains a raster
   screenshot promotes it to a GPU layer sized for the animation, and Chromium doesn't always
   re-rasterize it crisply once the transition settles at scale(1) — leaving it permanently soft
   until something forces a repaint (e.g. browser zoom, which is why zooming "fixes" it). Fade +
   slide only, no scale, avoids the problem entirely. */
.reveal-scale.in { opacity: 1; transform: translateY(0); }

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ============================================================
   Connect-stage: the heading crossfades into its own screenshot(s)
   at the same on-screen spot as you scroll, instead of the heading
   scrolling away before the visual ever appears on a "separate page".
   Used on Onboarding and StoryMode. main.js drives --p (0 -> 1) on
   .connect-stage via scroll position; heading fades/lifts out while
   the visual fades/settles in, both pinned to the same centered spot.
   ============================================================ */

.connect-stage {
  position: relative;
  border-top: 1px solid var(--separator);
  --p: 0;
}
.connect-stage .wrap { position: relative; min-height: 260vh; }
.connect-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.connect-heading, .connect-visual {
  position: absolute;
  top: 50%; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.connect-heading {
  opacity: calc(1 - var(--p));
  transform: translate(0, -50%);
}
.connect-visual {
  opacity: var(--p);
  filter: blur(calc((1 - var(--p)) * 18px));
  transform: translate(0, -50%) scale(calc(0.15 + var(--p) * 0.85));
}

/* Headline blasts apart from its own center as --p advances — each word
   flies out on its own diagonal (mixing its left/right position with a
   sine-based vertical scatter so it's not a flat left-right line) while
   spinning and blurring away. The visual above grows out of that same
   center point, like it's what the blast revealed. */
.connect-heading h2 .word {
  --wi: 0;
  --wa: 0;
  --vy: 0;
  display: inline-block;
  transform:
    translate(calc(var(--wi) * var(--p) * (60px + var(--wa) * 20px)), calc(var(--p) * var(--vy) * 70px))
    rotate(calc(var(--wi) * var(--p) * 16deg))
    scale(calc(1 - var(--p) * 0.4));
  filter: blur(calc(var(--p) * (2px + var(--wa) * 5px)));
  will-change: transform, filter;
}

@media (max-width: 720px) {
  .connect-stage .wrap { min-height: 220vh; }
}

/* ============================================================
   Onboarding trio section (fanned phones)
   ============================================================ */

.onboarding-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: -40px;
  position: relative;
  width: 100%;
  height: 660px;
}
.onboarding-stage .phone { --pw: 220px; position: absolute; }
.onboarding-stage .phone.p1 { transform: translateX(-108px) rotate(-9deg) scale(0.9); z-index: 1; filter: brightness(0.7); }
.onboarding-stage .phone.p2 { transform: translateX(0) rotate(0deg) scale(1); z-index: 3; }
.onboarding-stage .phone.p3 { transform: translateX(108px) rotate(9deg) scale(0.9); z-index: 1; filter: brightness(0.7); }

.onboarding-stage.in .phone.p1 { transition: transform 1s var(--ease) 0.1s, filter 1s var(--ease) 0.1s; }
.onboarding-stage.in .phone.p2 { transition: transform 1s var(--ease) 0.2s; }
.onboarding-stage.in .phone.p3 { transition: transform 1s var(--ease) 0.1s, filter 1s var(--ease) 0.1s; }

/* ============================================================
   Marquee / logos-ish strip (genre pills)
   ============================================================ */

.pill-strip {
  padding: 40px 20px;
  border-top: 1px solid var(--separator);
  border-bottom: 1px solid var(--separator);
  position: relative;
  z-index: 1;
}
.pill-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 820px;
  margin: 0 auto;
}
.pill {
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s, transform 0.25s;
  cursor: default;
}
.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: rgba(240, 169, 74, 0.05);
  transform: translateY(-1.5px);
}

/* ============================================================
   StoryMode spotlight (dark hero-style section)
   ============================================================ */

.spotlight {
  padding: 150px 0;
  position: relative;
  background: radial-gradient(ellipse 1000px 600px at 50% 0%, rgba(240,169,74,0.12), transparent 70%);
  border-top: 1px solid var(--separator);
}
.spotlight-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 64px;
}
.spotlight-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  line-height: 1.15;
}
.spotlight-head p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
}
.spotlight-head .feature-list li { color: var(--text-secondary); }
.spotlight-head .feature-list b { color: var(--text-primary); }

/* ============================================================
   Final CTA
   ============================================================ */

.final-cta {
  padding: 160px 0 120px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.final-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 22px;
}
.final-cta h2 .grad {
  background: linear-gradient(100deg, #FBBF6B, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.final-cta p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.tester-steps {
  display: flex;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
.tester-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: left;
  text-decoration: none;
  transition: transform 0.25s var(--ease-soft), border-color 0.25s;
}
.tester-step:hover { transform: translateY(-2px); border-color: var(--accent); }
.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft, rgba(240,169,74,0.16));
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}
.step-body { display: flex; flex-direction: column; gap: 2px; }
.step-title { font-weight: 700; font-size: 14.5px; color: var(--text-primary); }
.step-desc { font-size: 12.5px; color: var(--text-muted); }
.form-note { font-size: 12.5px; color: var(--text-muted); margin-top: 18px; }

/* ============================================================
   Footer
   ============================================================ */

footer {
  border-top: 1px solid var(--separator);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}
.footer-brand .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-name { font-weight: 800; font-size: 16px; letter-spacing: -0.3px; }
.footer-tag { font-size: 12.5px; color: var(--text-muted); }
.footer-links { display: flex; align-items: center; gap: 22px; }
.footer-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease-soft);
}
.footer-links a:hover { color: var(--accent); }
footer .fine { font-size: 12.5px; color: var(--text-muted); width: 100%; text-align: center; order: 3; }
.social-links { display: flex; align-items: center; gap: 16px; }
.social-links a {
  color: var(--text-secondary);
  display: flex;
  transition: color 0.2s var(--ease-soft), transform 0.2s var(--ease-soft);
}
.social-links a:hover { color: var(--accent); transform: translateY(-2px); }
.social-links svg { width: 18px; height: 18px; fill: currentColor; display: block; }

@media (max-width: 560px) {
  .footer-grid { flex-direction: column; text-align: center; }
  footer .fine { order: unset; }
  .social-links { justify-content: center; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-proof { justify-content: center; }
  .hero-stage { height: 520px; margin-top: 20px; }
  .hero-chip { display: none; }

  .showcase-grid { grid-template-columns: 1fr; text-align: center; gap: 50px; }
  .showcase-grid.reverse .showcase-copy,
  .showcase-grid.reverse .showcase-visual { order: unset; }
  .showcase-copy p { margin-left: auto; margin-right: auto; }
  .feature-list { text-align: left; max-width: 400px; margin: 0 auto; }
  .tag { justify-content: center; width: 100%; }

  .onboarding-stage { height: 560px; }
  .onboarding-stage .phone { --pw: 180px; }
  .onboarding-stage .phone.p1 { transform: translateX(-72px) rotate(-9deg) scale(0.88); }
  .onboarding-stage .phone.p3 { transform: translateX(72px) rotate(9deg) scale(0.88); }

  .tester-steps { flex-direction: column; }
}

@media (max-width: 560px) {
  .phone { --pw: 220px; }
  .hero-stage .phone { --pw: 220px; }
  .showcase { padding: 90px 0; }
  .spotlight { padding: 100px 0; }
  .final-cta { padding: 110px 0 90px; }

  /* Narrower than the container so it reads as a centered block (matching
     the centered heading above it) instead of text flush with both edges. */
  .feature-list { max-width: 300px; }
}

/* ============================================================
   Horizontal Auto-Scrolling Daily Discovery Carousel
   ============================================================ */

.daily-discovery-carousel {
  overflow: hidden;
  width: 100%;
  padding: 12px 18px 0;
  mask-image: linear-gradient(90deg, transparent, black 12px, black calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12px, black calc(100% - 12px), transparent);
}

.daily-discovery-track {
  display: flex;
  gap: 8px;
  width: max-content;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.daily-discovery-card {
  width: 210px;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
  text-align: left;
}

/* ============================================================
   StoryMode Spotlight Interactive Mockup
   ============================================================ */

.sm-screen-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
  z-index: 10;
  padding-top: 40px; /* status bar height */
}

.sm-screen-view.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 12;
}

/* Chat view header */
.sm-header {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--separator);
  flex-shrink: 0;
}
.sm-header-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.sm-header-info .sm-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-header-info .sm-author {
  font-size: 9.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-back-btn {
  cursor: pointer;
  transition: opacity 0.2s;
}
.sm-back-btn:hover {
  opacity: 0.7;
}

/* Chat body */
.sm-chat-body {
  flex: 1;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.sm-msg {
  display: flex;
  width: 100%;
}
.sm-msg.user {
  justify-content: flex-end;
}
.sm-msg.system {
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
}

.sm-bubble {
  max-width: 82%;
  background: rgba(240, 169, 74, 0.16);
  border: 1px solid rgba(240, 169, 74, 0.22);
  border-radius: 16px 3px 16px 16px;
  padding: 9px 12px;
  font-size: 11.5px;
  color: var(--text-primary);
  text-align: left;
}

/* Inline Card Pager in Chat */
.sm-inline-pager {
  width: 100%;
  display: flex;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sm-inline-card {
  flex: 1;
  background: linear-gradient(135deg, #1C1E26 0%, #11131A 100%);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s, border-color 0.2s;
  text-align: left;
}

.sm-inline-card:hover {
  border-color: rgba(240, 169, 74, 0.4);
  transform: translateY(-2px);
}

.sm-card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent);
}

.sm-card-body {
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sm-inline-card-peek {
  width: 14px;
  background: linear-gradient(135deg, rgba(28, 30, 38, 0.4) 0%, rgba(17, 19, 26, 0.4) 100%);
  border: 1px solid rgba(35, 42, 59, 0.5);
  border-right: none;
  border-radius: 16px 0 0 16px;
  flex-shrink: 0;
}

.sm-inline-dots {
  display: flex;
  gap: 5px;
  justify-content: flex-start;
  padding-left: 4px;
}
.sm-inline-dots .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}
.sm-inline-dots .dot.active {
  background: var(--accent);
}

/* Bottom Composer */
.sm-composer {
  padding: 8px 14px 18px;
  flex-shrink: 0;
  border-top: 1px solid var(--separator);
  background: var(--bg-primary-2);
}

.sm-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.sm-chip {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 5px 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sm-chip.active {
  background: rgba(240, 169, 74, 0.22);
  border-color: rgba(240, 169, 74, 0.35);
  color: var(--accent);
}

.sm-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sm-plus-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sm-input {
  flex: 1;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.sm-send-btn {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* DEDICATED CARDS VIEW */
.sm-cards-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
}
.sm-cards-back {
  cursor: pointer;
}
.sm-cards-title-header {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-primary);
}

.sm-cards-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 20px;
  position: relative;
}

.sm-cards-progress {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 14px;
}

.progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s linear;
}

.progress-bar.active .progress-fill {
  width: 100%;
}

.progress-bar.completed .progress-fill {
  width: 100%;
}

.sm-cards-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.sm-cards-meta .brand {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.sm-cards-meta .page-num {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.sm-cards-active-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
  text-align: left;
}

.sm-cards-active-card .card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  color: var(--text-primary);
}

.sm-cards-active-card .card-desc {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.sm-cards-visual-container {
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-top: auto;
  border: 1px solid var(--separator);
}

.sm-cards-visual-container .blur-bg-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.4);
  transform: scale(1.1);
}

.cards-bottom-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  text-align: left;
}

.badge-thumb {
  width: 32px;
  height: 48px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.badge-info {
  display: flex;
  flex-direction: column;
}

.badge-info .b-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
}

.badge-info .b-author {
  font-size: 9px;
  color: var(--text-secondary);
}

/* Touch Region Overlays for Card Navigation */
.sm-cards-nav-overlay {
  position: absolute;
  top: 52px;
  bottom: 0;
  z-index: 10;
  cursor: pointer;
}

.sm-cards-nav-overlay.left {
  left: 0;
  width: 40%;
}

.sm-cards-nav-overlay.right {
  right: 0;
  width: 60%;
}

/* ============================================================
   3-PHONE STORYMODE SECTION
   ============================================================ */

.three-phones {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
  padding-bottom: 40px;
}

.triple-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.triple-phone-wrap.center-phone {
  /* Slightly elevated in the layout */
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.triple-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.triple-label.active {
  color: var(--accent);
}

.swipe-hint {
  display: none;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: -20px;
}
@media (max-width: 860px) {
  .swipe-hint { display: block; }
}

/* Featured (center) phone gets a subtle glow halo */
.featured-phone .screen {
  box-shadow: 0 0 40px rgba(240,169,74,0.15), 0 0 80px rgba(240,169,74,0.07) !important;
}

/* ── Phone 1 & 3: Question chips ── */
.triple-chat-body {
  flex: 1;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  padding: 8px 9px;
  gap: 6px;
}

.tfios-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.tfios-chip {
  background: #1F2537;
  border: 1px solid #232A3B;
  border-radius: 20px;
  padding: 4px 7px;
  font-size: 6px;
  color: #F1F3F8;
  line-height: 1.3;
  cursor: default;
}

.tfios-chip.spoiler-chip {
  background: #2A1E0A;
  border-color: #4A3010;
  color: #F0A94A;
}

.tfios-gen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 8px auto 0;
  background: #1F2537;
  border: 1px solid #2E3750;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 7px;
  color: #F1F3F8;
  font-weight: 600;
  cursor: default;
}

/* ── Phone 2: Inline card pager ── */
.tfios-inline-pager {
  display: flex;
  gap: 6px;
  overflow: hidden;
  border-radius: 14px;
}

.tfios-inline-card {
  flex-shrink: 0;
  width: calc(100% - 14px);
  background: linear-gradient(160deg, #0B1A2A 0%, #0D1520 60%, #0B0E15 100%);
  border-radius: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

/* blurred cover bg inside inline card */
.tfios-inline-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url(../images/fault-in-our-stars.jpg);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.25);
  border-radius: 14px;
}

.tfios-inline-card > * { position: relative; z-index: 1; }

.tfios-inline-peek {
  flex-shrink: 0;
  width: 14px;
  background: #1F2537;
  border-radius: 10px;
  opacity: 0.6;
}

/* ── Phone 3: Progress bars ── */
.tfios-pb {
  flex: 1;
  height: 2.5px;
  background: #232A3B;
  border-radius: 2px;
}

.tfios-pb-active {
  background: #F0A94A;
}

/* ── Phone 3: Full-screen story card ── */
.tfios-full-card {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Ambient radial glow — TFIOS cover is sky blue/teal → we use that palette */
.tfios-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 90%, rgba(0, 120, 180, 0.40) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
  /* Colour animates on card change */
  transition: background 400ms ease;
}

.tfios-card-text-overlay {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
}

.tfios-brand-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}

.tfios-brand-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #F0A94A;
  flex-shrink: 0;
}

.tfios-brand-name {
  font-size: 7.5px;
  font-family: 'Newsreader', Georgia, serif;
  color: #F1F3F8;
  font-style: italic;
}

.tfios-card-headline {
  font-size: 13px;
  font-weight: 800;
  color: #F1F3F8;
  line-height: 1.2;
  margin-bottom: 9px;
  font-family: 'Newsreader', Georgia, serif;
  letter-spacing: -0.3px;
  /* Text swap animation */
  transition: opacity 250ms ease, transform 250ms ease;
}

.tfios-card-body {
  font-size: 7px;
  color: #9AA3B8;
  line-height: 1.6;
  font-family: var(--font);
  /* Text swap animation */
  transition: opacity 250ms ease, transform 250ms ease;
}

/* Animation classes for card text swap */
.tfios-card-headline.exit,
.tfios-card-body.exit {
  opacity: 0;
  transform: translateX(-10px);
}

.tfios-card-headline.enter,
.tfios-card-body.enter {
  opacity: 0;
  transform: translateX(10px);
}

/* Book visual at bottom of card */
.tfios-book-visual {
  position: relative;
  z-index: 1;
  margin: 0 10px 10px;
  border-radius: 10px;
  overflow: hidden;
  height: 110px;
  background: #0D1520;
  border: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

/* Blurred cover fills the book visual area */
.tfios-book-cover-large {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: blur(2px) brightness(0.45);
  border-radius: 10px;
}

/* Gradient fade top of book visual */
.tfios-book-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #0B0E15 0%, rgba(11,14,21,0.5) 35%, transparent 65%, rgba(11,14,21,0.7) 100%);
  z-index: 1;
  border-radius: 10px;
}

/* Badge bar at bottom of book visual */
.tfios-book-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(11,14,21,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 5px 7px;
}

.tfios-badge-thumb {
  width: 18px;
  height: 26px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Invisible tap zones for prev/next on phone 3 */
.tfios-tap-prev,
.tfios-tap-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  cursor: pointer;
}

.tfios-tap-prev { left: 0; width: 40%; }
.tfios-tap-next { right: 0; width: 60%; }

/* Responsive: the laptop version pins the heading and scroll-crossfades it
   into the 3-phone visual (see .connect-stage above) — that scroll-jacked
   pin doesn't translate to mobile (a 100vh-capped, overflow:hidden pin has
   nowhere near enough height for 3 stacked phones, and the effect itself
   reads as janky on a touch scroll). Below 860px we drop the pin entirely,
   let the heading and visual sit in normal flow, and turn the 3 phones into
   a swipeable horizontal carousel instead of a tall vertical stack. */
@media (max-width: 860px) {
  .connect-stage .wrap { min-height: auto; }
  .connect-pin {
    position: static;
    height: auto;
    overflow: visible;
    padding: 70px 0;
  }
  .connect-heading, .connect-visual {
    position: static;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .three-phones {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    align-self: stretch;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 24px;
    margin: 40px -20px 0;
    padding: 4px 20px 44px;
    scroll-padding: 0 20px;
  }
  .triple-phone-wrap {
    flex: 0 0 auto;
    scroll-snap-align: center;
  }
  .triple-phone-wrap.center-phone { order: unset; }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 10;
  cursor: pointer;
  transition: color 0.25s;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1.5s forwards;
}
.scroll-indicator:hover {
  color: var(--text-primary);
}
.scroll-indicator svg {
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ============================================================
   Legal pages (Privacy Policy / Terms & Conditions)
   ============================================================ */

.legal-header {
  padding: 150px 0 56px;
  border-bottom: 1px solid var(--separator);
  position: relative;
  z-index: 1;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 22px;
  transition: color 0.2s;
}
.legal-back:hover { color: var(--accent); }
.legal-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.legal-updated {
  font-size: 13.5px;
  color: var(--text-muted);
}

.legal-body {
  padding: 56px 0 120px;
  position: relative;
  z-index: 1;
}
.legal-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding-right: 8px;
}
.legal-toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc;
}
.legal-toc a {
  display: block;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 7px 10px;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}
.legal-toc a:hover { color: var(--text-primary); background: var(--bg-surface); }
.legal-toc a.active { color: var(--accent); background: var(--accent-glow-soft); }

.legal-content {
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}
.legal-content > .legal-intro {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.legal-content section {
  padding: 34px 0;
  border-top: 1px solid var(--separator);
  scroll-margin-top: 100px;
}
.legal-content section:first-of-type { border-top: none; padding-top: 0; }
.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.legal-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 22px 0 8px;
}
.legal-content p { margin-bottom: 14px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content .legal-tldr {
  font-size: 13.5px;
  color: var(--accent);
  background: var(--accent-glow-soft);
  border: 1px solid rgba(240,169,74,0.24);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.legal-content .legal-tldr b { font-weight: 700; }
.legal-content ul, .legal-content ol.legal-list {
  margin: 0 0 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-content li { padding-left: 2px; }
.legal-content a.legal-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(240,169,74,0.4);
}
.legal-content a.legal-link:hover { text-decoration-color: var(--accent); }
.legal-content strong { color: var(--text-primary); font-weight: 700; }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13.5px;
}
.legal-content th, .legal-content td {
  border: 1px solid var(--separator);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal-content th {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 12.5px;
}
.legal-content .legal-address {
  font-style: normal;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; max-height: none; }
}

/* Extra Mobile Optimizations */
@media (max-width: 560px) {
  .nav {
    /* Vertical padding was previously 0 here, which left the logo/CTA
       flush against the top of the viewport (touching the browser's own
       address bar on a phone) — restore it, plus the device's safe-area
       inset for notched screens. */
    padding: max(16px, env(safe-area-inset-top, 16px) + 6px) 20px 16px;
  }
  .onboarding-stage {
    height: 480px;
  }
  .onboarding-stage .phone {
    --pw: 160px;
  }
  .onboarding-stage .phone.p1 {
    transform: translateX(-56px) rotate(-7deg) scale(0.86);
  }
  .onboarding-stage .phone.p2 {
    transform: translateX(0) scale(1);
    z-index: 3;
  }
  .onboarding-stage .phone.p3 {
    transform: translateX(56px) rotate(7deg) scale(0.86);
  }
}

@media (max-width: 375px) {
  .nav {
    padding: max(14px, env(safe-area-inset-top, 14px) + 6px) 14px 14px;
  }
  .nav-logo {
    font-size: 15px;
  }
  .nav-cta {
    padding: 8px 14px;
    font-size: 12.5px;
  }
  .phone {
    --pw: 200px !important;
  }
  .hero-stage .phone {
    --pw: 200px !important;
  }
}

/* ============================================================
   Reduced motion — every scroll/hover-driven transform+blur on the
   site collapses to a plain opacity fade (or nothing) for users who
   have asked the OS not to animate. Content still ends up in its
   final, fully-revealed state either way — nothing stays hidden.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .connect-heading h2 .word {
    transform: none;
    filter: none;
  }
  .connect-heading, .connect-visual {
    transform: none;
    filter: none;
    transition: opacity 0.3s linear;
  }
  .reveal, .reveal-scale {
    transform: none !important;
    transition: opacity 0.3s linear;
  }
  .onboarding-stage .phone.p1,
  .onboarding-stage .phone.p2,
  .onboarding-stage .phone.p3 {
    transition: filter 0.3s linear;
  }
  .tfios-card-headline.exit,
  .tfios-card-body.exit,
  .tfios-card-headline.enter,
  .tfios-card-body.enter {
    transform: none;
  }
  .hero-phone-wrap {
    transition: none !important;
  }
}
