/* ============================================
   FLYFY — Website Styles
   Matches iOS app design system (FlyColors, FlySpacing, FlyBorder)
   Light theme — from FlyColors.swift background #FAFAF8
   ============================================ */

:root {
  /* Brand — from FlyColors.swift */
  --primary: #4A9ED6;
  --primary-dark: #3580B5;
  --purple: #8B5CF6;
  --teal: #14B8A6;
  --gold: #F59E0B;
  --accent-gradient: linear-gradient(135deg, #4A9ED6 0%, #8B5CF6 100%);

  /* Surfaces — light theme from FlyColors */
  --bg: #FAFAF8;
  --bg-elevated: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #FFFFFF;
  --card-border: rgba(0, 0, 0, 0.06);

  /* Text — from FlyColors textPrimary/secondary */
  --text: #1A1A2E;
  --text-secondary: #5B6478;
  --text-tertiary: #9CA3AF;

  /* Borders / Dividers */
  --border: rgba(0, 0, 0, 0.06);
  --divider: #F2F2F7;

  /* Shadows — subtle blue-tinted for light bg */
  --shadow-card: 0 2px 12px rgba(74, 100, 180, 0.06);
  --shadow-lg: 0 8px 32px rgba(74, 100, 180, 0.10);
  --shadow-glow: 0 0 40px rgba(74, 158, 214, 0.12);

  /* Radii — from FlyBorder */
  --radius-sm: 8px;    /* radiusSmall */
  --radius-md: 12px;   /* radiusMedium */
  --radius-lg: 16px;   /* radiusLarge */
  --radius-xl: 20px;   /* radiusXL */
  --radius-full: 9999px;

  /* Spacing — from FlySpacing (4pt grid) */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-xxxl: 40px;

  --nav-height: 64px;
  --max-width: 1100px;
  --font: -apple-system, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--primary); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

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

/* ============================================
   NAV — glassmorphic, matches app tab bar
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(250, 250, 248, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav-brand span { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }

/* Right-side nav cluster: quick links + language picker */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--card-border);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 60px) var(--space-lg) 80px;
  position: relative; overflow: hidden;
}

/* Ambient glow orbs */
.hero::before {
  content: ''; position: absolute;
  top: -20%; left: 15%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(74, 158, 214, 0.10) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute;
  bottom: -10%; right: 5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero-icon {
  width: 120px; height: 120px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  margin: 0 auto var(--space-xxl);
  animation: float 6s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: var(--space-md);
  color: var(--text);
  background: linear-gradient(135deg, #2A6B9C 0%, #3580B5 35%, #6D28D9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 520px;
  margin: 0 auto var(--space-xxxl);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.store-badge {
  display: inline-block; height: 52px;
  transition: transform 0.2s; border-radius: var(--radius-md);
}
.store-badge:hover { transform: translateY(-1px); }

/* Coming-soon Google Play badge — uses the real Google-provided PNG with a SOON ribbon overlay */
.play-badge-wrap {
  display: inline-flex;
  position: relative;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* Google Play PNG is slightly more compact than the Apple SVG at the same
   declared height. Bump Google up a touch so the visible pills line up. */
.play-badge-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.play-badge {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 8px;
  opacity: 0.92;
  filter: saturate(0.92);
  transition: opacity 0.2s, transform 0.2s, filter 0.2s;
}
.play-badge-wrap:hover .play-badge {
  opacity: 1;
  filter: saturate(1);
  transform: translateY(-1px);
}
.play-badge-wrap::after {
  content: 'SOON';
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.6px;
  box-shadow: 0 4px 12px rgba(74, 158, 214, 0.5), 0 0 0 2px var(--bg);
  pointer-events: none;
  z-index: 2;
}
.play-badge-wrap.small .play-badge { height: 42px; }
.store-badge:hover { transform: scale(1.04); }

/* ============================================
   SECTION SHARED
   ============================================ */
.section {
  padding: 96px var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.section-tag {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--primary);
  background: rgba(74, 158, 214, 0.08);
  border: 1px solid rgba(74, 158, 214, 0.18);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================
   FEATURES — 9 cards
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.feat-card:hover {
  border-color: rgba(74, 158, 214, 0.15);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.feat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 20px;
}
.feat-icon.blue    { background: rgba(74, 158, 214, 0.15); color: var(--primary); }
.feat-icon.purple  { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.feat-icon.teal    { background: rgba(20, 184, 166, 0.15); color: var(--teal); }
.feat-icon.gold    { background: rgba(245, 158, 11, 0.15); color: var(--gold); }
.feat-icon.green   { background: rgba(34, 197, 94, 0.15);  color: #22C55E; }
.feat-icon.orange  { background: rgba(249, 115, 22, 0.15); color: #F97316; }

.feat-card h3 {
  font-size: 17px; font-weight: 700;
  margin-bottom: 6px; letter-spacing: -0.2px;
}
.feat-card p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}

/* ============================================
   STATS BAR — gradient band
   ============================================ */
.stats {
  padding: 48px var(--space-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--purple) 100%);
  position: relative; overflow: hidden;
}
.stats::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.stats-grid {
  position: relative; z-index: 1;
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg);
}
.stat { text-align: center; }
.stat-num {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800; letter-spacing: -1px;
  color: #fff; line-height: 1.1;
}
.stat-label {
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.70); margin-top: 4px;
}

/* ============================================
   PRICING — 3 tier cards
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  align-items: stretch;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xxl) var(--space-xl);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.price-card.featured {
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), var(--accent-gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 4px 24px rgba(74, 158, 214, 0.15), 0 4px 24px rgba(139, 92, 246, 0.08);
}

.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-gradient);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 14px; border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}

.price-header {
  text-align: center;
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--divider);
}
.price-header h3 { font-size: 18px; font-weight: 700; margin-bottom: var(--space-sm); }

.price-amount {
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.price-dollar { font-size: 20px; font-weight: 700; }
.price-val { font-size: 44px; font-weight: 800; letter-spacing: -2px; }
.price-period { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

.price-card.featured .price-dollar,
.price-card.featured .price-val {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.price-list { list-style: none; flex: 1; }
.price-list li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.5;
}
.price-list li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 16px; height: 16px;
  background: rgba(74, 158, 214, 0.15);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%234A9ED6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M2 5l2.5 2.5L8 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 10px;
}
.price-list li.trial {
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--divider);
  font-weight: 600; color: var(--gold);
}
.price-list li.trial::before {
  background: rgba(245, 158, 11, 0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%23F59E0B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='5' cy='5' r='4'/%3E%3Cpath d='M5 3v2.5l1.5 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 10px;
}

.pricing-legal {
  text-align: center;
  margin-top: var(--space-xxl);
  font-size: 13px; color: var(--text-tertiary); line-height: 1.6;
}
.pricing-legal a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================
   ABOUT
   ============================================ */
.about {
  text-align: center;
  padding: 96px var(--space-lg);
  max-width: 700px; margin: 0 auto;
}
.about p { font-size: 17px; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--space-xxl); }

.about-pills { display: flex; justify-content: center; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-lg); }
.about-pill {
  padding: 8px 18px;
  background: rgba(74, 158, 214, 0.06);
  border: 1px solid rgba(74, 158, 214, 0.14);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xxxl) var(--space-lg);
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-lg);
}
.footer-left { display: flex; align-items: center; gap: var(--space-xl); flex-wrap: wrap; }
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; gap: var(--space-lg); }
.footer-links a { font-size: 14px; color: var(--text-secondary); }
.footer-right { font-size: 13px; color: var(--text-tertiary); }

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Header — gradient wash to match app hero */
.legal-header {
  padding: calc(var(--nav-height) + 56px) var(--space-lg) var(--space-xxl);
  text-align: center;
  background:
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(74, 158, 214, 0.08), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--divider);
}
.legal-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--space-sm);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.legal-header .date,
.legal-header .last-updated {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--card);
  border: 1px solid var(--card-border);
}

/* Body container — supports both legacy .legal-body and current .legal-content */
.legal-body,
.legal-content {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: var(--space-xxxl) var(--space-lg) 96px;
}

/* Typography for DIRECT children of legal body — this way the TOC
   card nested inside legal-content is not affected and can keep its
   own styles without a specificity war. */
.legal-body > h2,
.legal-content > h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 56px 0 var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--divider);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}
.legal-body > h2:first-of-type,
.legal-content > h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.legal-body > h3,
.legal-content > h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: var(--space-xxl) 0 var(--space-sm);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}
.legal-body > p,
.legal-content > p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-md);
}
.legal-body > ul, .legal-body > ol,
.legal-content > ul, .legal-content > ol {
  margin: var(--space-sm) 0 var(--space-lg);
  padding-left: var(--space-xl);
}
.legal-body > ul > li,
.legal-body > ol > li,
.legal-content > ul > li,
.legal-content > ol > li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}
.legal-body > ul > li::marker,
.legal-body > ol > li::marker,
.legal-content > ul > li::marker,
.legal-content > ol > li::marker {
  color: var(--text-tertiary);
}

/* Inline elements — safe to use descendant selector because these
   elements are specifically styled inside the TOC anyway (TOC wins
   via higher specificity: .legal-toc li a beats .legal-content a). */
.legal-body strong,
.legal-content strong {
  color: var(--text);
  font-weight: 600;
}
.legal-body a,
.legal-content a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(74, 158, 214, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.legal-body a:hover,
.legal-content a:hover {
  text-decoration-color: var(--primary);
  opacity: 1;
}
.legal-body code,
.legal-content code {
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
  background: rgba(74, 158, 214, 0.08);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Table of contents card — defined AFTER .legal-content typography so
   the TOC heading and links win any remaining specificity ties. */
.legal-toc {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-xxl);
  margin-bottom: var(--space-xxxl);
  box-shadow: var(--shadow-card);
}
.legal-toc h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  margin: 0 0 var(--space-lg);
  padding: 0;
  border: none;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px var(--space-xl);
  margin: 0;
  padding: 0;
}
.legal-toc li {
  counter-increment: toc;
  margin: 0;
  list-style: none;
}
.legal-toc li a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-weight: 500;
}
.legal-toc li a::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 700;
  font-size: 11px;
  color: var(--primary);
  min-width: 22px;
  letter-spacing: 0.5px;
}
.legal-toc li a:hover {
  color: var(--primary);
  text-decoration: none;
  opacity: 1;
}

/* Data-type table (Firebase/Google disclosure) */
.table-wrap {
  margin: var(--space-lg) 0 var(--space-xl);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--card);
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
.data-types-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-types-table thead th {
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  color: var(--text);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: left;
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}
.data-types-table tbody td {
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--divider);
  color: var(--text-secondary);
  line-height: 1.6;
  vertical-align: top;
}
.data-types-table tbody tr:last-child td { border-bottom: none; }
.data-types-table tbody tr:nth-child(even) { background: rgba(74, 158, 214, 0.025); }
.data-types-table tbody tr:hover { background: rgba(74, 158, 214, 0.05); }
.data-types-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

/* Language switcher (static, on legal pages) */
.lang-switcher-static,
.lang-switch {
  display: flex;
  gap: 4px;
  align-items: center;
}
.lang-switcher-static a,
.lang-switch a {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
}
.lang-switcher-static a:hover,
.lang-switch a:hover {
  color: var(--text-secondary);
  background: rgba(74, 158, 214, 0.06);
  opacity: 1;
}
.lang-switcher-static a.active,
.lang-switch a.active {
  color: var(--primary);
  border-color: rgba(74, 158, 214, 0.3);
  background: rgba(74, 158, 214, 0.1);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
  :root { --nav-height: 56px; }
  .nav-inner { padding: 0 var(--space-md); }
  .nav-right { gap: var(--space-md); }
  .nav-links { gap: var(--space-md); }
  .nav-links a { font-size: 13px; }
  .nav-brand span { display: none; }
  .hero { min-height: auto; padding: calc(var(--nav-height) + 32px) var(--space-md) 48px; }
  .hero-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: var(--space-xl); }
  .section { padding: 64px var(--space-md); }
  .section-header { margin-bottom: 40px; }
  .features-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .feat-card { padding: var(--space-lg) var(--space-md); }
  .stats { padding: 36px var(--space-md); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .about { padding: 64px var(--space-md); }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-left { flex-direction: column; gap: var(--space-md); }
  .legal-header { padding: calc(var(--nav-height) + 32px) var(--space-md) var(--space-xl); }
  .legal-body,
  .legal-content { padding: var(--space-xl) var(--space-md) 60px; }
  .legal-toc { padding: var(--space-lg); }
  .legal-toc ol { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .data-types-table { min-width: 560px; }
  .data-types-table thead th,
  .data-types-table tbody td { padding: 10px 12px; font-size: 12px; }
  .store-badge { height: 46px; }
}

@media (max-width: 374px) {
  body { font-size: 16px; }
  .hero-icon { width: 80px; height: 80px; border-radius: 18px; }
}

/* Print — legal pages */
@media print {
  .nav, .footer { display: none; }
  body { background: #fff; }
}
