/* ══════════════════════════════════════════════════════
   PhotoCal — Liquid Glass Design System
   Inspired by iOS 26 glass morphology + Apple marketing
   ══════════════════════════════════════════════════════ */

/* ─── Tokens ─── */
:root {
  /* Surface */
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --surface: rgba(255,255,255,0.55);
  --surface-solid: rgba(255,255,255,0.85);
  --surface-hover: rgba(255,255,255,0.72);
  --surface-border: rgba(255,255,255,0.5);
  --surface-border-outer: rgba(0,0,0,0.04);

  /* Text */
  --text-1: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;

  /* Accent */
  --accent: #0071e3;
  --accent-hover: #0077ed;

  /* Glass */
  --glass-blur: 24px;
  --glass-sat: 200%;

  /* Shadows — layered for realism */
  --shadow-card:
    0 0 0 0.5px var(--surface-border-outer),
    0 1px 3px rgba(0,0,0,0.03),
    0 4px 12px rgba(0,0,0,0.04),
    0 12px 32px rgba(0,0,0,0.06);
  --shadow-card-hover:
    0 0 0 0.5px var(--surface-border-outer),
    0 2px 6px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.07),
    0 20px 48px rgba(0,0,0,0.10);
  --shadow-elevated:
    0 2px 8px rgba(0,0,0,0.04),
    0 16px 48px rgba(0,0,0,0.12);

  /* Geometry */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;
  --max-w: 1080px;

  /* Motion */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;

  /* Ambient mesh colors */
  --mesh-1: rgba(0,113,227,0.07);
  --mesh-2: rgba(168,85,247,0.06);
  --mesh-3: rgba(59,130,246,0.05);
  --mesh-4: rgba(236,72,153,0.04);
}

/* ─── Dark Mode ─── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #111111;
    --surface: rgba(38,38,40,0.55);
    --surface-solid: rgba(38,38,40,0.85);
    --surface-hover: rgba(50,50,52,0.65);
    --surface-border: rgba(255,255,255,0.08);
    --surface-border-outer: rgba(255,255,255,0.04);
    --text-1: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;
    --accent: #2997ff;
    --accent-hover: #40a9ff;
    --shadow-card:
      0 0 0 0.5px rgba(255,255,255,0.04),
      0 1px 3px rgba(0,0,0,0.12),
      0 4px 12px rgba(0,0,0,0.16),
      0 12px 32px rgba(0,0,0,0.24);
    --shadow-card-hover:
      0 0 0 0.5px rgba(255,255,255,0.06),
      0 2px 6px rgba(0,0,0,0.16),
      0 8px 24px rgba(0,0,0,0.24),
      0 20px 48px rgba(0,0,0,0.36);
    --shadow-elevated:
      0 2px 8px rgba(0,0,0,0.2),
      0 16px 48px rgba(0,0,0,0.4);
    --mesh-1: rgba(41,151,255,0.10);
    --mesh-2: rgba(168,85,247,0.08);
    --mesh-3: rgba(59,130,246,0.06);
    --mesh-4: rgba(236,72,153,0.05);
  }
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #111111;
  --surface: rgba(38,38,40,0.55);
  --surface-solid: rgba(38,38,40,0.85);
  --surface-hover: rgba(50,50,52,0.65);
  --surface-border: rgba(255,255,255,0.08);
  --surface-border-outer: rgba(255,255,255,0.04);
  --text-1: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --accent: #2997ff;
  --accent-hover: #40a9ff;
  --shadow-card:
    0 0 0 0.5px rgba(255,255,255,0.04),
    0 1px 3px rgba(0,0,0,0.12),
    0 4px 12px rgba(0,0,0,0.16),
    0 12px 32px rgba(0,0,0,0.24);
  --shadow-card-hover:
    0 0 0 0.5px rgba(255,255,255,0.06),
    0 2px 6px rgba(0,0,0,0.16),
    0 8px 24px rgba(0,0,0,0.24),
    0 20px 48px rgba(0,0,0,0.36);
  --shadow-elevated:
    0 2px 8px rgba(0,0,0,0.2),
    0 16px 48px rgba(0,0,0,0.4);
  --mesh-1: rgba(41,151,255,0.10);
  --mesh-2: rgba(168,85,247,0.08);
  --mesh-3: rgba(59,130,246,0.06);
  --mesh-4: rgba(236,72,153,0.05);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ─── Ambient Mesh Background ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--mesh-1), transparent),
    radial-gradient(ellipse 60% 80% at 80% 20%, var(--mesh-2), transparent),
    radial-gradient(ellipse 70% 50% at 50% 80%, var(--mesh-3), transparent),
    radial-gradient(ellipse 50% 60% at 90% 70%, var(--mesh-4), transparent);
  pointer-events: none;
}

/* ═══════════════════════
   HEADER — Frosted Nav
   ═══════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-solid);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--surface-border-outer);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--text-1); text-decoration: none; }
.logo img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text-1); text-decoration: none; }

/* Lang switcher */
.nav-controls { display: flex; align-items: center; gap: 0.4rem; }

.lang-switcher {
  display: flex;
  gap: 1px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 2px;
  border: 0.5px solid var(--surface-border);
}

.lang-btn {
  border: none;
  background: none;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-family: var(--font);
  border-radius: 14px;
  cursor: pointer;
  color: var(--text-3);
  font-weight: 500;
  transition: all 0.3s var(--ease);
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.lang-btn:hover:not(.active) { color: var(--text-1); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  line-height: 1;
  border-radius: 50%;
  transition: transform 0.4s var(--ease-bounce), opacity 0.3s;
  opacity: 0.6;
}
.theme-toggle:hover { transform: scale(1.2) rotate(15deg); opacity: 1; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.35s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══════════════════════
   HERO — Spectral Glow
   ═══════════════════════ */
.hero {
  position: relative;
  text-align: center;
  padding: 7rem 1.5rem 5.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Ambient glow behind icon */
.hero::before {
  content: "";
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 420px;
  background:
    radial-gradient(circle at 40% 40%, rgba(0,113,227,0.15), transparent 60%),
    radial-gradient(circle at 65% 55%, rgba(168,85,247,0.12), transparent 55%),
    radial-gradient(circle at 50% 65%, rgba(236,72,153,0.08), transparent 50%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: meshRotate 20s linear infinite;
}

@keyframes meshRotate {
  0%   { transform: translateX(-50%) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(360deg); }
}

.hero-icon {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.3),
    var(--shadow-elevated);
  margin: 0 auto 2.5rem;
  display: block;
}

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

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 1.2rem;
}

.hero p {
  position: relative;
  z-index: 1;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto 2.8rem;
  line-height: 1.47;
}

.hero-free-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.5px solid var(--surface-border);
  border-radius: 980px;
  padding: 0.45rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.hero-buttons {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 980px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.4s var(--ease);
  text-decoration: none;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0,113,227,0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,113,227,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--accent);
  padding: 0.8rem 2rem;
  border-radius: 980px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 0.5px solid var(--surface-border);
  transition: all 0.4s var(--ease);
  text-decoration: none;
  min-width: 180px;
  box-shadow: var(--shadow-card);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* ═══════════════════════
   SECTIONS
   ═══════════════════════ */
.section {
  padding: 6rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-divider {
  height: 1px;
  max-width: var(--max-w);
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent,
    var(--surface-border-outer) 20%,
    var(--surface-border-outer) 80%,
    transparent
  );
}

.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 0.6rem;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.section-subtitle {
  text-align: center;
  color: var(--text-2);
  margin-bottom: 3.5rem;
  font-size: 1.1rem;
  line-height: 1.47;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════
   DEVICE TABS
   ═══════════════════════ */
.device-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.device-tab {
  background: var(--surface);
  border: 0.5px solid var(--surface-border);
  border-radius: 980px;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.device-tab:hover {
  color: var(--text-1);
  background: var(--surface-hover);
}

.device-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.device-panel {
  display: none;
}

.device-panel.active {
  display: grid;
}

/* ═══════════════════════
   SCREENSHOTS
   ═══════════════════════ */
.screenshots-carousel {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 0.5rem 0 1.5rem;
}

.screenshots-carousel[data-device="iphone"] {
  grid-template-columns: repeat(4, 1fr);
  max-width: 800px;
  margin: 0 auto;
}

.screenshots-carousel[data-device="mac"] {
  grid-template-columns: repeat(3, 1fr);
}

.screenshot { text-align: center; }

.screenshot img {
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  cursor: pointer;
}
.screenshot:hover img {
  transform: scale(1.04) translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.screenshot-caption {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--text-3);
  font-weight: 500;
}

/* ═══════════════════════
   LIGHTBOX
   ═══════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  cursor: default;
  animation: lbIn 0.4s var(--ease);
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.3rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease);
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), opacity 0.3s var(--ease);
  z-index: 1001;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

/* ═══════════════════════
   FEATURES — Glass Cards
   ═══════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 0.5px solid var(--surface-border);
  border-radius: var(--r-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  overflow: hidden;
}

/* Prismatic top edge — spectral light refraction */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.6) 20%,
    rgba(200,220,255,0.5) 40%,
    rgba(255,200,240,0.4) 60%,
    rgba(255,255,255,0.6) 80%,
    transparent
  );
  opacity: 0.8;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  box-shadow: inset 0 0 0 0.5px var(--surface-border-outer);
}

.feature-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-2);
  font-size: 0.86rem;
  line-height: 1.5;
}

/* ═══════════════════════
   COUNTRIES — Glass Pills
   ═══════════════════════ */
.countries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.country-card {
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 0.5px solid var(--surface-border);
  border-radius: 60px;
  padding: 0.7rem 1.4rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.country-flag { font-size: 1.5rem; line-height: 1; }

.country-card h3 {
  font-size: 0.85rem;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}

/* ═══════════════════════
   CTA — Platform Section
   ═══════════════════════ */
.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.device-badges {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.device-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-2);
  font-weight: 500;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid var(--surface-border);
  border-radius: 980px;
  padding: 0.5rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.device-badge .device-icon { font-size: 1.2rem; }

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.cta-note {
  font-size: 0.88rem;
  color: var(--text-3);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ─── App Store Badges ─── */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #000;
  color: #fff;
  padding: 0.6rem 1.4rem 0.6rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.4s var(--ease);
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 180px;
}
.appstore-badge:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.appstore-badge svg {
  flex-shrink: 0;
}
.appstore-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.appstore-badge-text small {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.appstore-badge-text strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .appstore-badge {
  background: #fff;
  color: #000;
  border-color: rgba(0,0,0,0.1);
}
[data-theme="dark"] .appstore-badge:hover {
  color: #000;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .appstore-badge {
    background: #fff;
    color: #000;
    border-color: rgba(0,0,0,0.1);
  }
  :root:not([data-theme="light"]) .appstore-badge:hover {
    color: #000;
  }
}

.cta-free-promise {
  margin-top: 2.5rem;
  padding: 1.2rem 2rem;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.5px solid var(--surface-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}
.cta-free-promise::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5) 30%, rgba(200,220,255,0.4) 50%, rgba(255,255,255,0.5) 70%, transparent);
  opacity: 0.7;
}

/* ═══════════════════════
   FOOTER
   ═══════════════════════ */
.site-footer {
  background: var(--bg-alt);
  color: var(--text-2);
  padding: 2.5rem 1.5rem 2rem;
  border-top: 0.5px solid var(--surface-border-outer);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-1);
}
.footer-logo img { width: 26px; height: 26px; border-radius: 6px; }

.footer-links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-3);
  font-size: 0.82rem;
  transition: color 0.3s var(--ease);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text-1); text-decoration: none; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding-top: 1.2rem;
  border-top: 0.5px solid var(--surface-border-outer);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-legal-links { display: flex; gap: 1.8rem; }
.footer-legal-links a {
  color: var(--text-3);
  font-size: 0.78rem;
  transition: color 0.3s var(--ease);
  text-decoration: none;
}
.footer-legal-links a:hover { color: var(--text-2); text-decoration: none; }
.footer-bottom small { font-size: 0.78rem; color: var(--text-3); }

/* ═══════════════════════
   SUBPAGES — Content
   ═══════════════════════ */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}
.page-content h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}
.page-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-1);
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}
.page-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.page-content p,
.page-content li {
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  font-size: 0.98rem;
}
.page-content ul { padding-left: 1.5rem; }

/* ─── FAQ Glass Cards ─── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.faq-item {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 0.5px solid var(--surface-border);
  border-radius: var(--r-md);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  overflow: hidden;
}
.faq-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.5) 30%,
    rgba(200,220,255,0.4) 50%,
    rgba(255,255,255,0.5) 70%,
    transparent
  );
  opacity: 0.7;
}
.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.faq-item h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: var(--text-1);
  font-weight: 600;
}
.faq-item p {
  margin-bottom: 0;
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--surface-border-outer));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(0,113,227,0.3);
}
.timeline-item h3 {
  margin-top: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-3);
  margin-bottom: 0.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-item ul { padding-left: 1.2rem; margin-top: 0.5rem; }
.timeline-item li { font-size: 0.92rem; margin-bottom: 0.3rem; color: var(--text-2); }

/* ─── Legal ─── */
.legal-content h1 { margin-bottom: 1rem; }
.legal-content h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal-content p { font-size: 0.92rem; }

/* ═══════════════════════
   ANIMATIONS
   ═══════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger — features */
.features-grid .fade-in:nth-child(1) { transition-delay: 0s; }
.features-grid .fade-in:nth-child(2) { transition-delay: 0.05s; }
.features-grid .fade-in:nth-child(3) { transition-delay: 0.1s; }
.features-grid .fade-in:nth-child(4) { transition-delay: 0.15s; }
.features-grid .fade-in:nth-child(5) { transition-delay: 0.2s; }
.features-grid .fade-in:nth-child(6) { transition-delay: 0.25s; }
.features-grid .fade-in:nth-child(7) { transition-delay: 0.3s; }
.features-grid .fade-in:nth-child(8) { transition-delay: 0.35s; }

/* Stagger — countries */
.countries-grid .fade-in:nth-child(1) { transition-delay: 0s; }
.countries-grid .fade-in:nth-child(2) { transition-delay: 0.03s; }
.countries-grid .fade-in:nth-child(3) { transition-delay: 0.06s; }
.countries-grid .fade-in:nth-child(4) { transition-delay: 0.09s; }
.countries-grid .fade-in:nth-child(5) { transition-delay: 0.12s; }
.countries-grid .fade-in:nth-child(6) { transition-delay: 0.15s; }
.countries-grid .fade-in:nth-child(7) { transition-delay: 0.18s; }
.countries-grid .fade-in:nth-child(8) { transition-delay: 0.21s; }
.countries-grid .fade-in:nth-child(9) { transition-delay: 0.24s; }

/* Stagger — screenshots */
.screenshots-carousel .fade-in:nth-child(1) { transition-delay: 0s; }
.screenshots-carousel .fade-in:nth-child(2) { transition-delay: 0.07s; }
.screenshots-carousel .fade-in:nth-child(3) { transition-delay: 0.14s; }
.screenshots-carousel .fade-in:nth-child(4) { transition-delay: 0.21s; }
.screenshots-carousel .fade-in:nth-child(5) { transition-delay: 0.28s; }
.screenshots-carousel .fade-in:nth-child(6) { transition-delay: 0.35s; }

/* Stagger — FAQ */
.faq-list .fade-in:nth-child(1) { transition-delay: 0s; }
.faq-list .fade-in:nth-child(2) { transition-delay: 0.04s; }
.faq-list .fade-in:nth-child(3) { transition-delay: 0.08s; }
.faq-list .fade-in:nth-child(4) { transition-delay: 0.12s; }
.faq-list .fade-in:nth-child(5) { transition-delay: 0.16s; }
.faq-list .fade-in:nth-child(6) { transition-delay: 0.20s; }
.faq-list .fade-in:nth-child(7) { transition-delay: 0.24s; }
.faq-list .fade-in:nth-child(8) { transition-delay: 0.28s; }

/* ═══════════════════════
   RESPONSIVE
   ═══════════════════════ */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-solid);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.8rem;
    border-bottom: 0.5px solid var(--surface-border-outer);
  }
  .nav-links.open { display: flex; }
  .lang-switcher { align-self: flex-start; }

  .hero { padding: 5rem 1.5rem 3.5rem; }
  .hero::before { width: 300px; height: 300px; filter: blur(40px); }
  .hero-icon { width: 100%; max-width: 100%; border-radius: 12px; }

  .screenshots-carousel { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .screenshots-carousel[data-device="iphone"] { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .screenshots-carousel[data-device="mac"] { grid-template-columns: 1fr; }

  .features-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .feature-card {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.2rem;
  }
  .feature-icon { flex-shrink: 0; margin-bottom: 0; }

  .countries-grid { gap: 0.5rem; }
  .country-card { padding: 0.5rem 1rem; }
  .country-flag { font-size: 1.2rem; }
  .country-card h3 { font-size: 0.78rem; }

  .device-badges { gap: 0.6rem; }
  .device-badge { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal-links { justify-content: center; }

  .section { padding: 4rem 1.5rem; }
  .cta-section { padding: 4rem 1.5rem; }
  .section-subtitle { margin-bottom: 2.5rem; }

  .page-content { padding: 3rem 1.5rem 5rem; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; height: 48px; }

  .btn-primary, .btn-secondary { width: 100%; min-width: unset; }
  .hero-buttons, .cta-buttons { flex-direction: column; align-items: center; }
  .appstore-badge { min-width: 200px; justify-content: center; }

  .screenshot-caption { font-size: 0.74rem; }
  .features-grid { gap: 0.5rem; }
}

@media (min-width: 769px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
}
