/* ══════════════════════════════════════════════════════════
   Snapcards — Marketing Site
   Scroll-driven phone animation + editorial aesthetic
   ══════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --petrol-900: #061E1E;
  --petrol-800: #0A2E2E;
  --petrol-700: #0F4242;
  --petrol-600: #145E5E;
  --petrol-500: #1A7272;
  --petrol-400: #2A9D8F;
  --petrol-300: #5FB8AD;
  --petrol-200: #A8DCD5;
  --petrol-100: #D4EEEA;

  --amber-500: #F59E0B;
  --amber-400: #FBBF24;
  --amber-300: #FCD34D;

  --text: #EDE9E3;
  --text-sub: #7F8C89;
  --bg: #060E0E;
  --card: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.07);
  --surface: rgba(42, 157, 143, 0.06);
  --accent: var(--amber-400);
  --accent-hover: var(--amber-300);
  --primary: var(--petrol-400);
  --success: #34D399;
  --error: #F87171;

  --radius: 14px;
  --max-w: 1200px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 10000;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--petrol-300);
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--petrol-600);
  color: #fff;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  position: relative;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes glow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

@keyframes flashPulse {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Scroll-driven reveals */
@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

/* JS fallback reveals */
.reveal:not(.revealed) {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@supports (animation-timeline: view()) {
  .reveal.revealed {
    /* Let CSS animation handle it */
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Header / Nav ────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(6, 14, 14, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--card-border);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: var(--text-sub);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--text);
}

.lang-switch {
  font-weight: 700;
  font-size: 0.8rem;
  padding: 5px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.lang-switch:hover {
  border-color: var(--petrol-500);
  background: rgba(42, 157, 143, 0.1);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
  position: relative;
  overflow: hidden;
}

/* Atmospheric glow */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--petrol-700) 0%, transparent 60%);
  opacity: 0.45;
  animation: glow 7s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.badge {
  display: inline-block;
  background: rgba(42, 157, 143, 0.1);
  border: 1px solid rgba(42, 157, 143, 0.2);
  color: var(--petrol-300);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 36px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  font-variation-settings: "opsz" 144;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero h1 .dim {
  color: var(--text-sub);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-sub);
  max-width: 520px;
  margin: 0 auto 44px;
  line-height: 1.75;
}

/* Store buttons */
.store-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  background: var(--accent);
  color: var(--petrol-900);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.12);
}

.store-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 40px rgba(251, 191, 36, 0.22);
  color: var(--petrol-900);
}

.store-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.install-help {
  display: block;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.6;
}

.scroll-cue svg {
  animation: bounceDown 2s ease-in-out infinite;
}


/* ══════════════════════════════════════════════════════════
   SCROLL SEQUENCE — The Main Event
   A sticky phone that progresses through 7 phases:
   0: phone entering  |  1: camera  |  2: flash
   3: photo captured   |  4: scanning |  5: results
   6: cards pop out
   ══════════════════════════════════════════════════════════ */

.scroll-sequence {
  height: 450vh;
  position: relative;
}

.sequence-track {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Phone Device ────────────────────────────────────────── */
.phone {
  position: relative;
  z-index: 2;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
}

/* Phase 0: phone entering */
[data-phase="0"] .phone {
  opacity: 0;
  transform: scale(0.85) translateY(60px);
}

[data-phase]:not([data-phase="0"]) .phone {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.phone-bezel {
  width: 260px;
  height: 520px;
  border-radius: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  background: #0C0C0C;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 30px 100px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(42, 157, 143, 0.08);
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #0C0C0C;
  border-radius: 0 0 18px 18px;
  z-index: 20;
}

.phone-notch::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.phone-screen {
  position: absolute;
  inset: 3px;
  border-radius: 37px;
  overflow: hidden;
  background: #111;
}

/* ── Screen Layers (scr) ─────────────────────────────────── */
.scr {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Phase visibility */
[data-phase="1"] .scr-camera,
[data-phase="2"] .scr-camera { opacity: 1; }

[data-phase="3"] .scr-photo,
[data-phase="4"] .scr-photo { opacity: 1; }

[data-phase="4"] .scr-scan { opacity: 1; }

[data-phase="5"] .scr-results,
[data-phase="6"] .scr-results { opacity: 1; }

/* ── Camera Viewfinder ───────────────────────────────────── */
.scr-camera {
  background: #1a1f1e;
}

.camera-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(180, 140, 100, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(42, 157, 143, 0.1) 0%, transparent 50%),
    linear-gradient(145deg, #1a1f1e, #0f1413);
}

.vf-grid {
  position: absolute;
  inset: 40px 10px 80px;
}

.vf-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
}

.vf-h {
  left: 0;
  right: 0;
  height: 1px;
}

.vf-v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.vf-corners {
  position: absolute;
  inset: 50px 20px 90px;
}

.vf-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}

.vf-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.vf-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.vf-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.vf-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.shutter-row {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.shutter-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.shutter-btn::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Flash ────────────────────────────────────────────────── */
.scr-flash {
  background: #fff;
  z-index: 15;
  opacity: 0 !important;
}

.scr-flash.flash-fire {
  animation: flashPulse 0.4s ease-out both;
}

/* ── Captured Photo — Spanish Menu ────────────────────────── */
.scr-photo {
  background: #faf5ef;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 36px;
}

.captured-menu {
  width: 88%;
  text-align: center;
  color: #2c1810;
  font-family: var(--font-body);
}

.menu-awning {
  height: 18px;
  background: repeating-linear-gradient(
    90deg,
    #c0392b 0px,
    #c0392b 14px,
    #f1c40f 14px,
    #f1c40f 28px
  );
  border-radius: 4px 4px 0 0;
  margin-bottom: 14px;
}

.menu-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: #1a0f08;
}

.menu-divider {
  width: 40px;
  height: 1px;
  background: #c0a882;
  margin: 8px auto 12px;
}

.menu-section {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b6914;
  margin: 10px 0 4px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 3px 8px;
  line-height: 1.5;
  color: #3d2914;
}

.menu-item span:last-child {
  color: #7a5c3a;
  font-weight: 500;
}

/* ── Scan Beam ────────────────────────────────────────────── */
.scr-scan {
  z-index: 5;
}

.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 5%, var(--petrol-400), var(--petrol-300), var(--petrol-400), transparent 95%);
  box-shadow: 0 0 24px var(--petrol-400), 0 0 48px rgba(42, 157, 143, 0.4);
  top: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.scan-beam::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: -8px;
  bottom: -8px;
  background: linear-gradient(180deg, transparent, rgba(42, 157, 143, 0.12), transparent);
  pointer-events: none;
}

[data-phase="4"] .scan-beam {
  opacity: 1;
}

.scan-hl {
  position: absolute;
  border: 1.5px solid var(--petrol-400);
  border-radius: 3px;
  background: rgba(42, 157, 143, 0.08);
  opacity: 0;
  transition: opacity 0.25s;
}

.scan-hl-1 { top: 25.5%; left: 6%; width: 88%; height: 4.4%; }
.scan-hl-2 { top: 29.9%; left: 6%; width: 88%; height: 4.4%; }
.scan-hl-3 { top: 39.9%; left: 6%; width: 88%; height: 4.4%; }
.scan-hl-4 { top: 54.3%; left: 6%; width: 88%; height: 4.4%; }

/* ── Results Mini-Cards (inside phone) ───────────────────── */
.scr-results {
  background: var(--bg);
  padding: 40px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.results-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.results-lang {
  font-size: 10px;
  color: var(--text-sub);
  background: var(--card);
  padding: 3px 8px;
  border-radius: 6px;
}

.mini-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: transform 0.4s, opacity 0.4s;
}

[data-phase="5"] .mini-card,
[data-phase="6"] .mini-card {
  transform: translateY(0);
  opacity: 1;
}

.mini-card .mc-word {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.mini-card .mc-trans {
  font-size: 10px;
  color: var(--text-sub);
}

.mini-card .mc-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 8px;
  font-weight: 600;
  color: var(--amber-400);
  background: rgba(251, 191, 36, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Floating Vocab Cards (pop out of phone) ─────────────── */
.vc {
  position: absolute;
  width: 280px;
  background: rgba(10, 18, 18, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  z-index: 3;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vc .vc-lang {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--petrol-400);
  margin-bottom: 6px;
}

.vc .vc-word {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.vc .vc-ipa {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.vc .vc-trans {
  font-size: 0.85rem;
  color: var(--petrol-200);
  margin-bottom: 8px;
  line-height: 1.4;
}

.vc .vc-ex {
  font-size: 0.78rem;
  color: var(--text-sub);
  font-style: italic;
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--card);
  border-radius: 8px;
  margin-bottom: 8px;
}

.vc .vc-ff {
  font-size: 0.72rem;
  color: var(--amber-400);
  background: rgba(251, 191, 36, 0.08);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  line-height: 1.4;
}

/* Card positions when visible (phase 6) */
[data-phase="6"] .vc-1 {
  opacity: 1;
  transform: scale(1) translate(-130%, -60%) rotate(-5deg);
  transition-delay: 0s;
}

[data-phase="6"] .vc-2 {
  opacity: 1;
  transform: scale(1) translate(130%, -30%) rotate(4deg);
  transition-delay: 0.1s;
}

[data-phase="6"] .vc-3 {
  opacity: 1;
  transform: scale(1) translate(-20%, 90%) rotate(-2deg);
  transition-delay: 0.2s;
}

/* ── Stage Labels ────────────────────────────────────────── */
.stage-label {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%) translateX(-20px);
  max-width: 300px;
  opacity: 0;
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.stage-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--petrol-400);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.stage-label h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variation-settings: "opsz" 72;
}

.stage-label p {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Show labels by phase */
[data-phase="1"] .stage-label-1,
[data-phase="2"] .stage-label-1 {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

[data-phase="3"] .stage-label-2,
[data-phase="4"] .stage-label-2 {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

[data-phase="5"] .stage-label-3 {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Hide labels when cards pop out — give them space */
[data-phase="6"] .stage-label {
  opacity: 0;
  transform: translateY(-50%) translateX(-20px);
}

/* ── Features ────────────────────────────────────────────── */
.features {
  padding: 140px 0 120px;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--petrol-700), transparent);
}

.features-header {
  text-align: center;
  margin-bottom: 72px;
}

.features-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variation-settings: "opsz" 96;
}

.features-header .dim {
  color: var(--text-sub);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 40px 32px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  background: rgba(42, 157, 143, 0.05);
  border-color: rgba(42, 157, 143, 0.12);
  transform: translateY(-2px);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  color: var(--petrol-400);
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ── Languages Marquee ───────────────────────────────────── */
.languages {
  padding: 60px 0;
  overflow: hidden;
  position: relative;
}

.languages::before,
.languages::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.languages::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.languages::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.lang-marquee {
  overflow: hidden;
}

.lang-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.lang-pill {
  flex-shrink: 0;
  padding: 10px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: border-color 0.3s, background 0.3s;
}

.lang-pill:hover {
  border-color: var(--petrol-500);
  background: rgba(42, 157, 143, 0.08);
}

/* ── Feedback ────────────────────────────────────────────── */
.feedback {
  padding: 120px 0;
  position: relative;
}

.feedback::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--petrol-700), transparent);
}

.feedback .container {
  max-width: 600px;
  text-align: center;
}

.feedback h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
}

.feedback > .container > p {
  color: var(--text-sub);
  font-size: 1.05rem;
  margin-bottom: 44px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  border-color: var(--petrol-500);
  box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.1);
}

.feedback-form textarea {
  min-height: 130px;
  resize: vertical;
}

.feedback-form button {
  align-self: center;
  background: var(--accent);
  color: var(--petrol-900);
  border: none;
  padding: 14px 44px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.08);
}

.feedback-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.18);
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.4em;
  text-align: center;
}

.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--card-border);
  padding: 44px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer .footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

footer .footer-links {
  display: flex;
  gap: 28px;
}

footer a {
  color: var(--text-sub);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--text);
}

footer .footer-copy {
  color: var(--text-sub);
  font-size: 0.82rem;
}

/* ── Prose (privacy.html, install.html) ──────────────────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 32px 96px;
}

.prose h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.prose .updated {
  color: var(--text-sub);
  margin-bottom: 48px;
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 12px;
}

.prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}

.prose p,
.prose li {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.prose strong {
  color: var(--text);
}

.prose a {
  color: var(--primary);
}

/* ══════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Stack labels above/below the phone on smaller screens */
  .stage-label {
    left: 50%;
    top: 10%;
    transform: translate(-50%, 0) translateY(-10px);
    text-align: center;
    max-width: 320px;
  }

  [data-phase="1"] .stage-label-1,
  [data-phase="2"] .stage-label-1,
  [data-phase="3"] .stage-label-2,
  [data-phase="4"] .stage-label-2,
  [data-phase="5"] .stage-label-3 {
    transform: translate(-50%, 0) translateY(0);
  }

  [data-phase="6"] .stage-label {
    transform: translate(-50%, 0) translateY(-10px);
  }

  /* Smaller floating cards on tablet */
  .vc {
    width: 220px;
    padding: 16px;
  }

  .vc .vc-word { font-size: 1.15rem; }

  [data-phase="6"] .vc-1 {
    transform: scale(0.9) translate(-110%, -50%) rotate(-5deg);
  }
  [data-phase="6"] .vc-2 {
    transform: scale(0.9) translate(110%, -20%) rotate(4deg);
  }
  [data-phase="6"] .vc-3 {
    transform: scale(0.9) translate(-10%, 85%) rotate(-2deg);
  }
}

@media (max-width: 768px) {
  header { padding: 0 20px; }

  .hero {
    min-height: auto;
    padding: 130px 20px 70px;
  }

  .hero h1 { font-size: 2.4rem; }

  .scroll-cue { display: none; }

  /* Slower scroll sequence on mobile */
  .scroll-sequence { height: 600vh; }

  .phone-bezel {
    width: 200px;
    height: 400px;
    border-radius: 32px;
  }

  .phone-notch {
    width: 80px;
    height: 22px;
    border-radius: 0 0 14px 14px;
  }

  .phone-screen {
    border-radius: 29px;
  }

  /* Hide floating cards on mobile — show only in-phone results */
  .vc { display: none; }

  /* Scan highlights adjusted for smaller phone (200x400) */
  .scan-hl-1 { top: 33.4%; height: 5.7%; }
  .scan-hl-2 { top: 39.1%; height: 5.8%; }
  .scan-hl-3 { top: 52.2%; height: 5.8%; }
  .scan-hl-4 { top: 71.1%; height: 5.7%; }

  /* Labels centered above phone */
  .stage-label {
    top: 6%;
    max-width: 280px;
  }

  .stage-label h2 { font-size: 1.4rem; }
  .stage-label p { font-size: 0.85rem; }

  .features { padding: 100px 0 80px; }
  .features-header { margin-bottom: 48px; }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .feature-card { padding: 28px 24px; }

  .feedback { padding: 80px 0; }

  footer .container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  footer .footer-links { justify-content: center; }

  .nav-links { gap: 16px; }
  .nav-links a:not(.lang-switch) { font-size: 0.8rem; }

  .prose { padding: 100px 20px 80px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large screens — push labels further out */
@media (min-width: 1400px) {
  .stage-label {
    left: 8%;
  }
}
