/* Friendbe cinematic landing. Architecture from the makewavs-cinematic build:
   a fixed glow canvas behind everything, chapter color worlds tweened into
   these variables by scroll.js, word-mask display reveals.
   Radius rule: phones 34px, buttons pill. No content is hidden by CSS;
   GSAP owns all reveal states so a no-JS load reads perfectly. */

:root {
  /* Chapter color world: tweened by GSAP across chapter boundaries */
  --bg: #0e0e11;
  --ink: #f4f2ef;
  --dim: #9c9ca4;
  --accent: #f0824a;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

img { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

#glow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

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

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

/* ---------- Nav: blends with every chapter world ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 6vw;
  mix-blend-mode: difference;
  color: #fff;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; }

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { opacity: 1; }

/* ---------- Chapters ---------- */

.chapter {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 16svh 6vw;
  position: relative;
}

.chapter-inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chapter-media .chapter-inner {
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.chapter-media.media-left .chapter-inner { grid-template-columns: 0.9fr 1.1fr; }
.chapter-media.media-left .chapter-copy { order: 2; }
.chapter-media.media-left .phone { order: 1; }

.display {
  font-family: var(--display);
  font-size: clamp(2.3rem, 7vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 1.6rem;
}

/* word-mask sleeves for the reveal */
.display .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.display .inner { display: inline-block; will-change: transform; }
.display .accent { color: var(--accent); }

.copy {
  font-size: clamp(1rem, 2.2vw, 1.14rem);
  line-height: 1.75;
  color: var(--dim);
  max-width: 36em;
}
.copy + .copy { margin-top: 1.3rem; }
.copy strong, .copy b { color: var(--ink); font-weight: 650; }

/* ---------- Hero ---------- */

.chapter-hero { text-align: center; }
.chapter-hero .display { margin-left: auto; margin-right: auto; max-width: 12em; }

.tagline {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin-bottom: 2rem;
}

.hero-sub {
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--dim);
  max-width: 33em;
  margin: 0 auto 2.6rem;
}

.hero-ctas { display: flex; gap: 1.1rem; justify-content: center; align-items: center; flex-wrap: wrap; }

.cta-button {
  display: inline-block;
  padding: 1.05rem 2.4rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #e4572e, #f0924a);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 34px rgba(228, 87, 46, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-button:hover, .cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(228, 87, 46, 0.45);
}
.cta-button:active { transform: translateY(0) scale(0.99); }

.cta-quiet {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.85;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.cta-quiet:hover { opacity: 1; }

.scroll-hint {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--dim);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.hint-bar {
  width: 1px; height: 44px;
  background: linear-gradient(var(--accent), transparent);
  animation: hint 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes hint { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hint-bar { animation: none; } }

/* ---------- Phones: real app screenshots ---------- */

.phone {
  justify-self: center;
  width: min(320px, 78vw);
  border-radius: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 11px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.phone img { display: block; width: 100%; border-radius: 34px; }

/* ---------- Lists ---------- */

.tick-list { list-style: none; margin-top: 2rem; display: grid; gap: 1.15rem; }
.tick-list li { display: grid; grid-template-columns: 30px 1fr; gap: 0.8rem; align-items: start; }
.tick-list .tick {
  width: 22px; height: 22px; border-radius: 50%; margin-top: 4px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.tick-list b { display: block; color: var(--ink); letter-spacing: -0.01em; }
.tick-list span.d { color: var(--dim); font-size: 0.97rem; }

.safe-list { list-style: none; margin-top: 2.2rem; display: grid; gap: 1.3rem; max-width: 40em; }
.safe-list li {
  padding-left: 1.4rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--dim);
  line-height: 1.7;
}
.safe-list b { color: var(--ink); }

/* ---------- Closing chapter / footer ---------- */

.chapter-denver .cta-button { margin-top: 2.2rem; }

.footer-meta {
  margin-top: 5rem;
  padding-top: 1.6rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.9rem;
}
.footer-meta nav { display: flex; gap: 1.6rem; }
.footer-meta a { color: var(--dim); text-decoration: none; }
.footer-meta a:hover { color: var(--ink); }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .nav { padding: 1rem 5vw; }
  .nav-links { gap: 1.1rem; }
  .nav-links a.hide-m { display: none; }
  .chapter { padding: 12svh 7vw; }
  .chapter-media .chapter-inner,
  .chapter-media.media-left .chapter-inner { grid-template-columns: 1fr; gap: 2.6rem; }
  .chapter-media.media-left .chapter-copy { order: 1; }
  .chapter-media.media-left .phone { order: 2; }
  .display { font-size: clamp(2.2rem, 10.5vw, 3.2rem); }
  .footer-meta { flex-direction: column; gap: 1rem; }
}
