/* ============================================================
   Hue Lights — Marketing Site Stylesheet
   Author: LapApps, LLC
   Design system: "Ambient Luxury" — deep midnight surfaces with
   painterly Hue color washes. Mobile-first, single source of truth.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Surfaces (deep, slightly violet-tinted) */
  --bg:            #0b0a10;
  --bg-2:          #100e17;
  --surface:       #15131c;
  --surface-2:     #1d1a26;
  --border:        rgba(255, 255, 255, 0.08);
  --border-2:      rgba(255, 255, 255, 0.14);

  /* Text */
  --text:          #f5f3ff;
  --text-2:        #c8c3dc;
  --text-3:        #948dac;
  --text-4:        #6e6783;

  /* Hue spectrum — used as accents and in the gradient mesh */
  --hue-amber:     #ffa45e;
  --hue-coral:     #ff6b8b;
  --hue-magenta:   #c455ff;
  --hue-indigo:    #6b6bff;
  --hue-cyan:      #5fdfff;
  --hue-mint:      #79f5b8;
  --hue-warm:      #ffd8a8;
  --hue-fire:      #ff8a45;
  --hue-sky:       #7ab8ff;
  --hue-rose:      #ff8896;

  /* Primary CTA gradient */
  --grad-primary:  linear-gradient(135deg, var(--hue-amber) 0%, var(--hue-coral) 45%, var(--hue-magenta) 100%);
  --grad-cool:     linear-gradient(135deg, var(--hue-cyan) 0%, var(--hue-indigo) 100%);
  --grad-fire:     linear-gradient(160deg, #ffd166 0%, #ff7a3d 45%, #d93a3a 100%);
  --grad-water:    linear-gradient(160deg, #5fdfff 0%, #4a7dff 60%, #1e2a78 100%);
  --grad-storm:    linear-gradient(160deg, #b3c5e0 0%, #6e7eb0 45%, #1a1f3a 100%);
  --grad-sunrise:  linear-gradient(160deg, #ffe9a8 0%, #ff9d6b 45%, #e85a8b 100%);

  /* Typography */
  --font-display:  "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-body:     "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radius / shadow */
  --r-sm:          8px;
  --r-md:          14px;
  --r-lg:          22px;
  --r-xl:          32px;

  --shadow-sm:     0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:     0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:     0 24px 60px rgba(0,0,0,0.55);
  --glow-amber:    0 0 60px rgba(255, 164, 94, 0.35);
  --glow-coral:    0 0 60px rgba(255, 107, 139, 0.30);

  /* Layout */
  --maxw:          1180px;
  --gutter:        clamp(20px, 5vw, 48px);
  --section-y:     clamp(64px, 10vw, 120px);

  /* Motion */
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Safe areas for iPhone notch */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { border: 0; }

a {
  color: var(--text);
  text-decoration: none;
  transition: color 180ms var(--ease);
}
a:hover { color: var(--hue-warm); }

button { font: inherit; cursor: pointer; }

::selection {
  background: var(--hue-coral);
  color: #1a0a14;
}

:focus-visible {
  outline: 2px solid var(--hue-warm);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { left: 12px; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 120, "SOFT" 30;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 400;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-variation-settings: "opsz" 120, "SOFT" 30, "wght" 450;
}
h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-variation-settings: "opsz" 60, "SOFT" 50, "wght" 500;
  line-height: 1.15;
}
h4 {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-2); }
p.lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--text-2); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1em;
}
.eyebrow.warm {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- LAYOUT PRIMITIVES ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--section-y) 0; position: relative; }

.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(11, 10, 16, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
  padding-top: env(safe-area-inset-top);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-variation-settings: "opsz" 60, "SOFT" 50, "wght" 500;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: url('/img/app-icon.jpg') center/cover no-repeat, #1a1424;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    var(--glow-amber);
  position: relative;
  flex-shrink: 0;
}

.nav-links { display: none; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--text-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.nav-cta:hover {
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile menu */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0 12px;
  align-items: stretch;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform 200ms var(--ease), opacity 200ms;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  left: 0; right: 0;
  top: 68px;
  background: rgba(11, 10, 16, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 24px var(--gutter) 32px;
  z-index: 40;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  color: var(--text);
}
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .nav-cta { margin-top: 16px; align-self: flex-start; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms;
  min-height: 48px; /* mobile tap target */
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 10px 30px rgba(245, 243, 255, 0.15);
}
.btn-primary:hover {
  color: var(--bg);
  box-shadow: 0 18px 40px rgba(245, 243, 255, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface); }

.appstore-badge {
  display: inline-block;
  transition: transform 180ms var(--ease);
}
.appstore-badge:hover { transform: translateY(-2px); }
.appstore-badge svg, .appstore-badge img { height: 52px; width: auto; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding-top: clamp(60px, 10vw, 100px);
  padding-bottom: clamp(60px, 10vw, 100px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -10% -10% 0 -10%;
  z-index: -1;
  pointer-events: none;
}
.hero-bg::before, .hero-bg::after,
.hero-bg .blob {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite;
}
.hero-bg::before {
  width: 60vw; height: 60vw;
  top: -15%; left: -10%;
  background: radial-gradient(circle, var(--hue-amber), transparent 65%);
}
.hero-bg::after {
  width: 55vw; height: 55vw;
  top: 5%; right: -20%;
  background: radial-gradient(circle, var(--hue-magenta), transparent 65%);
  animation-delay: -7s;
}
.hero-bg .blob {
  width: 45vw; height: 45vw;
  bottom: -20%; left: 30%;
  background: radial-gradient(circle, var(--hue-indigo), transparent 65%);
  animation-delay: -14s;
  opacity: 0.4;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4%, -3%) scale(1.08); }
  66%      { transform: translate(-3%, 4%) scale(0.96); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 .accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 350;
}

.hero-tagline {
  margin: 24px 0 8px;
  color: var(--text-2);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 540px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-3);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--hue-mint);
  box-shadow: 0 0 10px var(--hue-mint);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* iPhone mockup (pure CSS) */
.phone {
  position: relative;
  width: min(280px, 78vw);
  height: min(572px, 159vw);
  margin: 0 auto;
  border-radius: 48px;
  background: linear-gradient(160deg, #2a2630, #14111c);
  padding: 12px;
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.08),
    var(--shadow-lg),
    var(--glow-coral);
  transform: rotate(-3deg);
  transition: transform 600ms var(--ease);
}
.phone:hover { transform: rotate(-1deg) translateY(-4px); }
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #0a0810;
  display: flex;
  flex-direction: column;
}
.phone-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.phone-time {
  position: absolute;
  top: 16px; left: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 4;
  color: white;
}
.phone-content {
  padding: 56px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  padding: 0 4px;
}
.phone-header h5 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
  font-variation-settings: "opsz" 60, "wght" 500;
}
.phone-header span {
  font-size: 0.75rem;
  color: var(--text-3);
}
.phone-scenes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scene-card {
  aspect-ratio: 1;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.scene-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,0.25), transparent 50%);
  pointer-events: none;
}
.scene-card .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}
.scene-card.fire     { background: var(--grad-fire); }
.scene-card.water    { background: var(--grad-water); }
.scene-card.sunrise  { background: var(--grad-sunrise); }
.scene-card.storm    { background: var(--grad-storm); }
.phone-slider {
  margin-top: auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
.phone-slider .icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--grad-primary);
  flex-shrink: 0;
}
.phone-slider .track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  position: relative;
}
.phone-slider .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 72%;
  border-radius: 999px;
  background: var(--grad-primary);
}
.phone-slider .pct { font-size: 0.78rem; color: var(--text-2); font-weight: 600; }

/* ---------- STATS BAR ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015));
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 400;
  line-height: 1;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ---------- SECTION HEADERS ---------- */
.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-head.center {
  margin-left: auto; margin-right: auto;
  text-align: center;
}

/* ---------- FEATURE GRID ---------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 280ms var(--ease), border-color 280ms;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--hue-warm);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-variation-settings: "opsz" 36, "SOFT" 50, "wght" 550;
}
.feature p {
  font-size: 0.97rem;
  color: var(--text-2);
  margin: 0;
}
.feature.is-featured {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 139, 0.18), transparent 60%),
    var(--surface);
}
.feature.is-featured .feature-icon {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
}

/* ---------- EFFECTS SHOWCASE ---------- */
.effects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.effect-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 32px;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  color: white;
  text-decoration: none;
  transition: transform 280ms var(--ease);
}
.effect-card:hover { transform: translateY(-4px); color: white; }
.effect-card::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
}
.effect-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
  z-index: -1;
}
.effect-card.fire::before    { background: var(--grad-fire); }
.effect-card.water::before   { background: var(--grad-water); }
.effect-card.storm::before   { background: var(--grad-storm); }
.effect-card.sunrise::before { background: var(--grad-sunrise); }

.effect-card h3 {
  font-size: 1.7rem;
  margin-bottom: 8px;
  font-variation-settings: "opsz" 60, "SOFT" 80, "wght" 450;
}
.effect-card p {
  color: rgba(255,255,255,0.88);
  margin: 0;
  font-size: 0.95rem;
}
.effect-card .play {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms;
}
.effect-card:hover .play { background: rgba(255,255,255,0.3); }

/* ---------- HARDWARE / COMPATIBILITY ---------- */
.compat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.compat-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.compat-item .check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-cool);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.compat-item h4 { margin-bottom: 4px; }
.compat-item p { margin: 0; font-size: 0.92rem; color: var(--text-3); }

/* ---------- SCREENSHOTS / GALLERY ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.gallery a {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 240ms var(--ease), border-color 240ms;
  position: relative;
}
.gallery a:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #0a0810;
}
.gallery figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: white;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
}
.gallery figure { margin: 0; position: relative; }

/* ---------- WHAT'S NEW ---------- */
.changelog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 44px);
}
.changelog .row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.version-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 107, 139, 0.12);
  color: var(--hue-coral);
  border: 1px solid rgba(255, 107, 139, 0.25);
}
.changelog ul {
  margin: 0; padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.changelog li {
  padding-left: 28px;
  position: relative;
  color: var(--text-2);
  font-size: 0.97rem;
}
.changelog li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 14px; height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
}

/* ---------- FAQ ---------- */

/* Screen reader only */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Intro */
.faq-intro {
  padding: 80px 0 28px;
}
.faq-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-variation-settings: "opsz" 140, "wght" 350;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 16px 0 18px;
}
.faq-intro .lead {
  max-width: 60ch;
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 24px;
}

/* Search */
.faq-search {
  position: relative;
  max-width: 620px;
}
.faq-search-icon {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.faq-search input[type="search"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 14px 48px 14px 48px;
  outline: none;
  transition: border-color 180ms, box-shadow 180ms;
  -webkit-appearance: none;
  appearance: none;
}
.faq-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.faq-search input[type="search"]:focus {
  border-color: var(--hue-warm);
  box-shadow: 0 0 0 4px rgba(255, 200, 138, 0.12);
}
.faq-search input[type="search"]::placeholder { color: var(--text-3); }
.faq-search-clear {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms;
}
.faq-search-clear:hover { background: var(--border-2); color: var(--text); }
.faq-search-status {
  font-size: 0.88rem;
  color: var(--text-3);
  min-height: 1.2em;
  margin: 8px 0 0;
}

/* Jump buttons (section grid) */
.faq-jump {
  padding: 16px 0 48px;
}
.faq-jump-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.faq-jump-btn {
  --accent: var(--hue-warm);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 92px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: background 180ms, border-color 180ms, transform 180ms var(--ease);
  isolation: isolate;
}
.faq-jump-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 220ms;
  z-index: -1;
}
.faq-jump-btn::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.7;
}
.faq-jump-btn:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  transform: translateY(-1px);
  color: var(--text);
}
.faq-jump-btn:hover::before { opacity: 1; }
.faq-jump-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.faq-jump-btn-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-variation-settings: "opsz" 30, "wght" 550;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.faq-jump-btn-count {
  font-size: 0.82rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Content wrap */
.faq-content-wrap {
  padding-bottom: 64px;
}

/* Section */
.faq-section {
  --accent: var(--hue-warm);
  margin-bottom: 64px;
  scroll-margin-top: 80px;
}
.faq-section.is-hidden { display: none; }
.faq-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.faq-section-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 56px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.faq-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-variation-settings: "opsz" 60, "wght" 450;
  letter-spacing: -0.015em;
  margin: 0;
}
.faq-count {
  font-size: 0.85rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Sub-category */
.faq-subcategory {
  margin-bottom: 24px;
}
.faq-subcategory.is-hidden { display: none; }
.faq-subcat-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-variation-settings: "opsz" 30, "wght" 600;
  color: var(--text-2);
  margin: 16px 0 10px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

/* Question list */
.faq-q-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Question item */
.faq-q-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 180ms, background 180ms;
  scroll-margin-top: 80px;
}
.faq-q-item.is-hidden { display: none; }
.faq-q-item.is-open {
  background: var(--surface-2);
  border-color: var(--border-2);
}

/* Question button (replaces <summary>) */
.faq-q-button {
  width: 100%;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  transition: color 160ms;
}
.faq-q-button:hover { color: var(--hue-warm); }
.faq-q-button:focus-visible {
  outline: 2px solid var(--hue-warm);
  outline-offset: -2px;
  border-radius: var(--r-md);
}
.faq-q-text { flex: 1; }
.faq-q-text b { font-weight: 700; color: var(--text); }
.faq-q-chev {
  flex-shrink: 0;
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  transition: transform 240ms var(--ease), background 200ms, color 200ms;
}
.faq-q-item.is-open .faq-q-chev {
  transform: rotate(180deg);
  background: rgba(255, 200, 138, 0.14);
  color: var(--hue-warm);
}

/* Answer panel */
.faq-q-answer {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.7;
  border-top: 1px solid transparent;
}
.faq-q-item.is-open .faq-q-answer {
  border-top-color: var(--border);
  padding-top: 14px;
}
.faq-q-answer[hidden] { display: none; }
.faq-q-answer > *:first-child { margin-top: 0; }
.faq-q-answer > *:last-child { margin-bottom: 0; }
.faq-q-answer p { margin: 0 0 0.9em; }
.faq-q-answer b, .faq-q-answer strong { color: var(--text); font-weight: 600; }
.faq-q-answer code, .faq-q-answer tt {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: var(--hue-warm);
}
.faq-q-answer ul, .faq-q-answer ol {
  margin: 0.6em 0 1em;
  padding-left: 22px;
}
.faq-q-answer li { margin-bottom: 6px; }
.faq-q-answer li::marker { color: var(--text-3); }
.faq-q-answer a {
  color: var(--hue-warm);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 200, 138, 0.35);
}
.faq-q-answer a:hover { text-decoration-color: var(--hue-warm); }
.faq-q-answer hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.4em 0;
}
.faq-q-answer table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92rem;
  background: rgba(0,0,0,0.2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.faq-q-answer table th,
.faq-q-answer table td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
}
.faq-q-answer table th {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 600;
}
.faq-q-answer img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  margin: 0.6em 0;
  display: block;
  border: 1px solid var(--border);
}
.faq-q-answer h3, .faq-q-answer h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 1.2em 0 0.5em;
  font-variation-settings: "opsz" 30, "wght" 600;
  font-size: 1.05rem;
}

/* Loading and error states */
.faq-q-answer.is-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.9rem;
}
.faq-q-answer.is-loading::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid var(--border-2);
  border-top-color: var(--hue-warm);
  border-radius: 50%;
  animation: faq-spin 700ms linear infinite;
}
@keyframes faq-spin {
  to { transform: rotate(360deg); }
}
.faq-q-answer.is-error {
  color: var(--hue-coral);
  background: rgba(255, 107, 139, 0.06);
  border-radius: var(--r-sm);
  padding: 12px 16px;
}

/* Contact card */
.faq-contact {
  padding: 24px 0 100px;
}
.faq-contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.faq-contact-card::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 160%;
  background: radial-gradient(ellipse at center top, rgba(255, 200, 138, 0.08), transparent 60%);
  pointer-events: none;
}
.faq-contact-card > * { position: relative; }
.faq-contact-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-variation-settings: "opsz" 60, "wght" 450;
  margin: 0 0 12px;
}
.faq-contact-card p {
  color: var(--text-2);
  max-width: 58ch;
  margin: 0 auto 24px;
}
.faq-contact-card code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(0,0,0,0.3);
  color: var(--hue-warm);
}
.faq-contact-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer fine print */
.footer-fine {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.82rem;
  line-height: 1.6;
}
.footer-fine p { margin: 0 0 6px; }
.footer-fine em { font-style: italic; color: var(--text-2); }

/* ---------- CTA BLOCK ---------- */
.cta-block {
  position: relative;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) clamp(24px, 5vw, 56px);
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 164, 94, 0.25), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(196, 85, 255, 0.22), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}
.cta-block h2 { margin-bottom: 16px; }
.cta-block .hero-ctas { justify-content: center; }

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 64px 0 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  margin-top: var(--section-y);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h5 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: 0.95rem; }
.footer-col a:hover { color: var(--text); }
.footer-brand p {
  color: var(--text-3);
  font-size: 0.92rem;
  margin: 12px 0 0;
  max-width: 360px;
}
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-4);
  font-size: 0.85rem;
}
.footer-legal a { color: var(--text-3); }
.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-4);
  max-width: 100%;
  margin-top: 12px;
  line-height: 1.6;
}

/* ---------- SUB-PAGE HEADERS ---------- */
.page-header {
  padding: clamp(80px, 12vw, 140px) 0 clamp(40px, 6vw, 64px);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: -20% -20% 0 -20%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 164, 94, 0.18), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(196, 85, 255, 0.15), transparent 55%);
  z-index: -1;
}
.page-header h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.page-header p { max-width: 640px; }

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 20px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--text-4); }

/* ---------- PROSE (for long-form pages) ---------- */
.prose {
  max-width: 720px;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.7;
}
.prose h2 { margin: 56px 0 16px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.prose h3 { margin: 36px 0 12px; font-size: 1.3rem; }
.prose p { margin-bottom: 1.2em; }
.prose ul { padding-left: 22px; margin: 0 0 1.4em; }
.prose ul li { margin-bottom: 6px; }
.prose a {
  color: var(--hue-warm);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 216, 168, 0.4);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--hue-warm);
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ---------- TOC (Table of Contents) ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 40px;
}
.toc h2 {
  font-size: 0.85rem !important;
  font-family: var(--font-body) !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 16px !important;
}
.toc ul { list-style: none; padding: 0; margin: 0; columns: 1; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a {
  color: var(--text-2);
  font-size: 0.93rem;
  display: block;
  padding: 4px 0;
}
.toc a:hover { color: var(--hue-warm); }

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
/* Tablet (iPad portrait and up) */
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 60px; }
  .phone { width: 320px; height: 654px; margin: 0; transform: rotate(-4deg); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .effects { grid-template-columns: repeat(2, 1fr); }
  .compat-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .changelog ul { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .toc ul { columns: 2; column-gap: 32px; }
  .faq-jump-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop (iPad landscape and up) */
@media (min-width: 980px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .effect-card { min-height: 320px; }
  .toc ul { columns: 3; }
  .faq-jump-grid { grid-template-columns: repeat(5, 1fr); }
  .faq-jump-btn { min-height: 100px; }
  .faq-intro { padding-top: 100px; }
}

/* Larger desktop */
@media (min-width: 1200px) {
  .effects { grid-template-columns: repeat(4, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Print */
@media print {
  .site-header, .site-footer, .cta-block, .hero-bg { display: none; }
  body { color: black; background: white; }
  a { color: black; text-decoration: underline; }
}
