/* =============================================
   WhatNext — css/style.css
   FTC color language · Apple-style aesthetics
   ============================================= */

/* ---------- Custom Properties ---------- */
:root {
  /* Core colors (FTC tokens) */
  --bg:            #030712;
  --bg-card:       #111827;
  --bg-nav:        rgba(3, 7, 18, 0.85);
  --border:        #1f2937;
  --border-subtle: #161e2d;

  /* Text */
  --text:          #f9fafb;
  --text-2:        #9ca3af;
  --text-3:        #4b5563;

  /* Accent */
  --accent:        #4f46e5;
  --accent-dim:    rgba(79, 70, 229, 0.14);
  --accent-edge:   rgba(79, 70, 229, 0.30);
  --accent-dark:   #4338ca;

  /* Media-type accents */
  --movies:  #f59e0b;
  --tv:      #60a5fa;
  --books:   #34d399;
  --games:   #a78bfa;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Radii */
  --r-sm:  8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 32px;

  /* Motion */
  --ease: 0.18s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 28px;
}

section {
  padding-block: 96px;
}

/* ---------- Typography helpers ---------- */
h1, h2, h3 {
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-label {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 500px;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-nav);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
}

.nav__logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.045em;
  flex-shrink: 0;
}

.nav__logo:hover { opacity: 0.8; transition: opacity var(--ease); }

.nav__ftc {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--ease);
  white-space: nowrap;
}

.nav__ftc strong {
  color: var(--text-2);
  font-weight: 500;
  transition: color var(--ease);
}

.nav__ftc:hover strong { color: var(--accent); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge--soon {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-edge);
}

/* ---------- APP ICON ---------- */
.app-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.app-lockup__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-lockup__name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.app-lockup__platform {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(145deg, #6d65f0 0%, #4f46e5 45%, #7c3aed 100%);
  box-shadow:
    0 8px 32px rgba(79, 70, 229, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* easy to swap: replace this div with an <img> of the real icon */
}

/* ---------- HERO ---------- */
.hero {
  padding-block: 100px 80px;
  overflow: hidden;
  position: relative;
}

/* Subtle background glow */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(79, 70, 229, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 72px;
  align-items: center;
}

/* Media-type eyebrow chips */
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.chip--movies {
  background: rgba(245, 158, 11, 0.12);
  color: var(--movies);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.chip--tv {
  background: rgba(96, 165, 250, 0.12);
  color: var(--tv);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.chip--books {
  background: rgba(52, 211, 153, 0.12);
  color: var(--books);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.chip--games {
  background: rgba(167, 139, 250, 0.12);
  color: var(--games);
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.hero__headline {
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
  color: var(--text);
}

.hero__headline em {
  font-style: normal;
  background: linear-gradient(125deg, var(--accent) 0%, var(--games) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subhead {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 460px;
  margin-bottom: 40px;
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* App Store button — disabled/coming soon state */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  background: rgba(249, 250, 251, 0.08);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font);
  cursor: not-allowed;
  user-select: none;
  text-decoration: none;
  transition: none;
}

.btn-store__icon {
  opacity: 0.5;
  flex-shrink: 0;
}

.btn-store__label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.btn-store__label small {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
}

.btn-store__label span {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero__cta-note {
  font-size: 0.78rem;
  color: var(--text-3);
  padding-left: 2px;
}

/* ---------- DEVICE MOCKUP ---------- */
.device-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  filter: drop-shadow(0 48px 72px rgba(79, 70, 229, 0.22))
          drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
}

.device {
  width: 264px;
  height: 536px;
  background: #08101f;
  border-radius: 52px;
  border: 7px solid #1a2438;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 0 1px #0a1525;
  position: relative;
  overflow: hidden;
  padding: 14px 10px 14px;
  display: flex;
  flex-direction: column;
}

.device__island {
  width: 88px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.device__screen {
  flex: 1;
  background: linear-gradient(168deg, #140e38 0%, #0d1a30 48%, #0b1c12 100%);
  border-radius: 40px;
  overflow: hidden;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Abstract app UI inside the device */
.dui__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.dui__app-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.02em;
}

.dui__dots {
  display: flex;
  gap: 3px;
}

.dui__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.dui__tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.dui__tab {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.35);
}

.dui__tab.active {
  background: rgba(79, 70, 229, 0.28);
  color: rgba(167, 139, 250, 1);
  border: 1px solid rgba(79, 70, 229, 0.4);
}

.dui__section-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.dui__items {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dui__item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dui__cover {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  flex-shrink: 0;
}

.dui__cover--m { background: linear-gradient(135deg, #f59e0b, #d97706); }
.dui__cover--t { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.dui__cover--b { background: linear-gradient(135deg, #34d399, #10b981); }
.dui__cover--g { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }

.dui__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.dui__line {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}

.dui__line--long  { width: 78%; }
.dui__line--short { width: 50%; background: rgba(255, 255, 255, 0.08); }

.dui__stars {
  font-size: 0.45rem;
  color: var(--movies);
  opacity: 0.85;
  letter-spacing: 1px;
}

.dui__picker-btn {
  margin-top: auto;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border: none;
  border-radius: 11px;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 10px;
  text-align: center;
  letter-spacing: -0.01em;
  cursor: default;
  font-family: var(--font);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ---------- MEDIA TYPES ---------- */
.media-types {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.media-types__header {
  margin-bottom: 48px;
}

.media-types__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.media-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: transform var(--ease), border-color var(--ease);
}

.media-card:hover {
  transform: translateY(-3px);
}

.media-card__bar {
  height: 3px;
  width: 36px;
  border-radius: 2px;
  margin-bottom: 8px;
}

.media-card__emoji { font-size: 1.75rem; }

.media-card__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.media-card__desc {
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.6;
}

.media-card--movies .media-card__bar  { background: var(--movies); }
.media-card--movies .media-card__name { color: var(--movies); }
.media-card--movies:hover              { border-color: rgba(245, 158, 11, 0.25); }

.media-card--tv .media-card__bar      { background: var(--tv); }
.media-card--tv .media-card__name     { color: var(--tv); }
.media-card--tv:hover                  { border-color: rgba(96, 165, 250, 0.25); }

.media-card--books .media-card__bar   { background: var(--books); }
.media-card--books .media-card__name  { color: var(--books); }
.media-card--books:hover               { border-color: rgba(52, 211, 153, 0.25); }

.media-card--games .media-card__bar   { background: var(--games); }
.media-card--games .media-card__name  { color: var(--games); }
.media-card--games:hover               { border-color: rgba(167, 139, 250, 0.25); }

/* ---------- FEATURES ---------- */
.features {
  background: var(--bg);
}

.features__header {
  text-align: center;
  margin-bottom: 56px;
}

.features__header .section-sub {
  margin-inline: auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  transition: transform var(--ease), border-color var(--ease);
}

.feat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.35);
}

.feat-card__icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: block;
}

.feat-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.feat-card__body {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ---------- PRIVACY FIRST ---------- */
.privacy-first {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.privacy-first::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(52, 211, 153, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.privacy-first__headline {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.privacy-first__sub {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 64px;
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.7;
}

/* Override margin after mb-64 */
.privacy-first__sub { margin-bottom: 64px; }

.privacy-first__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 48px;
  position: relative;
}

.priv-item__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 16px;
}

.priv-item__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.priv-item__body {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
}

.privacy-first__note {
  font-size: 0.8rem;
  color: var(--text-3);
  position: relative;
}

.privacy-first__note a {
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: color var(--ease);
}

.privacy-first__note a:hover { color: var(--text); }

/* ---------- DATA SOURCES ---------- */
.data-sources {
  background: var(--bg);
  text-align: center;
  padding-block: 80px;
}

.data-sources__heading {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.data-sources__sub {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 32px;
  line-height: 1.65;
  max-width: 420px;
  margin-inline: auto;
}

.data-sources__pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color var(--ease), color var(--ease);
}

a.source-pill:hover {
  border-color: rgba(79, 70, 229, 0.4);
  color: var(--text);
}

.data-sources__link {
  font-size: 0.85rem;
  color: var(--text-3);
}

.data-sources__link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.data-sources__link a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  font-size: 0.82rem;
  color: var(--text-3);
}

.footer__brand strong {
  color: var(--text-2);
  font-weight: 500;
}

.footer__links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.82rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--ease);
}

.footer__links a:hover { color: var(--text-2); }

/* ---------- INNER PAGES (privacy, changelog) ---------- */
.page-nav-spacer {
  height: 62px; /* matches nav height */
}

.inner-page {
  padding-block: 64px 96px;
}

.inner-page__content {
  max-width: 680px;
}

.inner-page h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.inner-page .page-meta {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 48px;
}

.inner-page h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.inner-page p,
.inner-page li {
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.8;
}

.inner-page p + p { margin-top: 12px; }

.inner-page ul {
  margin-left: 20px;
  margin-top: 8px;
}

.inner-page li { margin-bottom: 6px; }

.inner-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Changelog */
.changelog__list {
  margin-top: 8px;
}

.changelog__entry {
  border-left: 2px solid var(--border);
  padding: 0 0 40px 28px;
  position: relative;
}

.changelog__entry::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  position: absolute;
  left: -6px;
  top: 5px;
}

.changelog__entry:last-child {
  padding-bottom: 0;
}

.changelog__version {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  color: var(--text);
}

.changelog__date {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-bottom: 12px;
}

.changelog__status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.changelog__status--soon {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-edge);
}

/* ---------- ENTRANCE ANIMATIONS ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  .anim.is-visible {
    opacity: 1;
    transform: none;
  }

  .anim-d1 { transition-delay: 0.08s; }
  .anim-d2 { transition-delay: 0.16s; }
  .anim-d3 { transition-delay: 0.24s; }
  .anim-d4 { transition-delay: 0.32s; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 56px;
    text-align: center;
  }

  .hero__chips { justify-content: center; }
  .hero__subhead { margin-inline: auto; }
  .hero__cta { align-items: center; }

  .device-wrap {
    order: -1;
  }

  .media-types__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .privacy-first__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .device {
    width: 220px;
    height: 448px;
  }
}

@media (max-width: 640px) {
  section { padding-block: 64px; }
  .hero  { padding-block: 64px 48px; }

  .media-types__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .media-card { padding: 20px 18px; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__links { gap: 16px; }

  .device {
    width: 200px;
    height: 410px;
  }
}
