/* ============================================
   pocketctl Landing Page — Design System
   Dark / Light Dual-Theme · Full-Feature Site
   ============================================ */

/* ---- DARK THEME (default) ---- */
:root,
[data-theme="dark"] {
  --bg:              #0d1117;
  --bg-secondary:    #010409;
  --surface:         #161b22;
  --surface-hover:   #1c2129;
  --surface-active:  #21262d;
  --border:          #21262d;
  --border-light:    #30363d;
  --accent:          #58a6ff;
  --accent-hover:    #79c0ff;
  --accent-muted:    rgba(88, 166, 255, 0.15);
  --accent-subtle:   rgba(88, 166, 255, 0.06);
  --primary-btn:     #238636;
  --primary-btn-hover: #2ea043;
  --fg:              #e6edf3;
  --fg-secondary:    #8b949e;
  --fg-tertiary:     #484f58;
  --error:           #f85149;
  --success:         #3fb950;
  --success-bg:      rgba(35, 134, 54, 0.15);
  --warning:         #d29922;
  --warning-bg:      rgba(210, 153, 34, 0.15);
  --sub-agent:       #c084fc;
  --sub-agent-bg:    #2d1a3e;
  --code-bg:         #010409;
  --overlay:         rgba(1, 4, 9, 0.7);
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.5);
  --shadow-xl:       0 24px 80px rgba(0,0,0,0.6);
  --glow-accent:     rgba(88,166,255,0.12);
  --glow-success:    rgba(63,185,80,0.08);
  --gradient-hero:   radial-gradient(ellipse 80% 60% at 50% -20%, rgba(88,166,255,0.12) 0%, transparent 60%),
                     radial-gradient(ellipse 60% 50% at 80% 80%, rgba(63,185,80,0.06) 0%, transparent 50%);
  --gradient-section: linear-gradient(180deg, var(--bg) 0%, #010409 100%);
  --nav-blur:        rgba(13, 17, 23, 0.85);
}

/* ---- LIGHT THEME ---- */
[data-theme="light"] {
  --bg:              #ffffff;
  --bg-secondary:    #f6f8fa;
  --surface:         #ffffff;
  --surface-hover:   #f3f4f6;
  --surface-active:  #eaeef2;
  --border:          #d0d7de;
  --border-light:    #e1e4e8;
  --accent:          #1f6feb;
  --accent-hover:    #388bfd;
  --accent-muted:    rgba(31, 111, 235, 0.12);
  --accent-subtle:   rgba(31, 111, 235, 0.05);
  --primary-btn:     #1a7f37;
  --primary-btn-hover: #238636;
  --fg:              #1f2328;
  --fg-secondary:    #656d76;
  --fg-tertiary:     #8b949e;
  --error:           #cf222e;
  --success:         #1a7f37;
  --success-bg:      rgba(26, 127, 55, 0.1);
  --warning:         #9a6700;
  --warning-bg:      rgba(154, 103, 0, 0.1);
  --sub-agent:       #8250df;
  --sub-agent-bg:    rgba(130, 80, 223, 0.08);
  --code-bg:         #f6f8fa;
  --overlay:         rgba(175, 184, 193, 0.2);
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.1);
  --shadow-xl:       0 24px 80px rgba(0,0,0,0.12);
  --glow-accent:     rgba(31,111,235,0.08);
  --glow-success:    rgba(26,127,55,0.04);
  --gradient-hero:   radial-gradient(ellipse 80% 60% at 50% -20%, rgba(31,111,235,0.06) 0%, transparent 60%),
                     radial-gradient(ellipse 60% 50% at 80% 80%, rgba(26,127,55,0.03) 0%, transparent 50%);
  --gradient-section: linear-gradient(180deg, var(--bg) 0%, #f6f8fa 100%);
  --nav-blur:        rgba(255, 255, 255, 0.85);
}

/* ---- Typography ---- */
:root {
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'SF Mono', 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --transition:   0.25s ease;
  --max-width:    1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ---- Utility ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(24px, 5vw, 80px); }
.section-pad { padding: clamp(80px, 12vh, 140px) 0; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--fg-secondary); }

/* ---- Navigation ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 clamp(24px, 5vw, 80px);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--nav-blur);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--accent); text-decoration: none;
}
.nav-brand svg, .nav-brand img { width: 32px; height: 32px; }
.theme-logo-dark { display: inline; }
.theme-logo-light { display: none; }
[data-theme="light"] .theme-logo-dark { display: none; }
[data-theme="light"] .theme-logo-light { display: inline; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  color: var(--fg-secondary); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 6px 12px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--fg); background: var(--surface-hover); }
.nav-links a.nav-cta {
  background: var(--primary-btn); color: #fff !important;
  padding: 8px 18px; border-radius: 8px; font-weight: 600;
  margin-left: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links a.nav-cta:hover { background: var(--primary-btn-hover); }

/* Nav controls */
.nav-controls { display: flex; align-items: center; gap: 6px; }
.nav-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--fg-secondary);
  font-size: 13px; font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nav-btn:hover { background: var(--surface-hover); color: var(--fg); border-color: var(--border-light); }
.nav-btn.active { background: var(--accent-muted); color: var(--accent); border-color: var(--accent); }

/* Mobile menu */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 24px; gap: 4px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open a.nav-cta { margin-left: 0; text-align: center; }
}

/* ---- Hero ---- */
.hero {
  padding: clamp(120px, 18vh, 200px) 0 clamp(60px, 8vh, 100px);
  position: relative; overflow: hidden;
  background: var(--gradient-hero);
}
.hero .container {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; background: var(--accent-muted);
  border: 1px solid rgba(88,166,255,0.2); border-radius: 9999px;
  font-size: 14px; color: var(--accent); margin-bottom: 28px;
  animation: fade-in-up 0.6s ease;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); animation: pulse-green 2s infinite;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(40px, 7vw, 80px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.03em;
  max-width: 900px; margin-bottom: 24px;
  animation: fade-in-up 0.6s ease 0.1s both;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #79c0ff 50%, var(--accent-hover) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: clamp(16px, 2vw, 20px); color: var(--fg-secondary);
  max-width: 580px; margin-bottom: 40px; line-height: 1.65;
  animation: fade-in-up 0.6s ease 0.2s both;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  animation: fade-in-up 0.6s ease 0.3s both;
}
.btn-hero {
  padding: 15px 32px; border-radius: 12px;
  font-size: 17px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; border: none; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero-primary {
  background: var(--primary-btn); color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 4px 16px rgba(35,134,54,0.3);
}
.btn-hero-primary:hover { background: var(--primary-btn-hover); transform: translateY(-1px); }
.btn-hero-secondary {
  background: var(--accent-muted); color: var(--accent);
  border: 1px solid rgba(88,166,255,0.25);
}
.btn-hero-secondary:hover { background: rgba(88,166,255,0.2); border-color: var(--accent); }

/* Hero device showcase */
.hero-showcase {
  margin-top: clamp(48px, 8vh, 80px);
  display: flex; gap: 24px; align-items: center; justify-content: center;
  flex-wrap: wrap;
  animation: fade-in-up 0.6s ease 0.4s both;
}
.device-mockup {
  width: 280px; height: 580px;
  background: var(--surface); border-radius: 40px;
  border: 3px solid var(--border-light);
  overflow: hidden; position: relative;
  box-shadow: var(--shadow-xl), 0 0 80px var(--glow-accent);
  flex-shrink: 0;
}
.device-mockup .dynamic-island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 32px; background: #000; border-radius: 18px; z-index: 10;
}
.device-mockup .screen {
  margin-top: 52px; height: calc(100% - 52px - 28px);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
}
.device-mockup .mini-card {
  background: var(--bg); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border);
}
.device-mockup .mc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.device-mockup .mc-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse-green 2s infinite;
}
.device-mockup .mc-name { font-size: 11px; font-weight: 600; }
.device-mockup .mc-sub { font-size: 9px; color: var(--fg-tertiary); }
.device-mockup .home-bar {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 4px; background: rgba(128,128,128,0.3); border-radius: 2px;
}

/* Web preview card alongside phone */
.web-preview {
  width: 480px; height: 340px;
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border-light);
  overflow: hidden; position: relative;
  box-shadow: var(--shadow-xl);
  flex-shrink: 0;
}
.web-preview .wp-topbar {
  height: 40px; background: var(--surface-active);
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  border-bottom: 1px solid var(--border);
}
.web-preview .wp-dot { width: 10px; height: 10px; border-radius: 50%; }
.web-preview .wp-dot.r { background: #f85149; }
.web-preview .wp-dot.y { background: #d29922; }
.web-preview .wp-dot.g { background: #3fb950; }
.web-preview .wp-addr {
  flex: 1; text-align: center; font-size: 11px; color: var(--fg-tertiary);
  background: var(--bg); border-radius: 6px; padding: 4px 12px;
}
.web-preview .wp-content {
  padding: 20px 24px; display: flex; gap: 16px;
}
.web-preview .wp-sidebar {
  width: 160px; background: var(--bg); border-radius: 10px;
  padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.web-preview .wp-sidebar-item {
  height: 8px; border-radius: 4px; background: var(--border);
}
.web-preview .wp-sidebar-item.ac { background: var(--accent); width: 70%; }
.web-preview .wp-main {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
}
.web-preview .wp-card {
  background: var(--bg); border-radius: 10px; padding: 12px; border: 1px solid var(--border);
}
.web-preview .wp-line {
  height: 6px; border-radius: 3px; background: var(--border); margin-bottom: 6px;
}
.web-preview .wp-line.sm { width: 40%; }
.web-preview .wp-line.accent { background: var(--accent); width: 25%; }

@media (max-width: 820px) {
  .web-preview { display: none; }
}

/* ---- Section Common ---- */
.section-label {
  font-size: 13px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.2px;
  text-align: center; margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700; text-align: center; margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.section-desc {
  font-size: 17px; color: var(--fg-secondary); text-align: center;
  max-width: 560px; margin: 0 auto 56px; line-height: 1.6;
}

/* ---- Trust Bar ---- */
.trust-bar {
  padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: center;
}
.trust-bar .trust-text {
  font-size: 13px; color: var(--fg-tertiary); font-weight: 500;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px;
}
.trust-logos {
  display: flex; justify-content: center; align-items: center; gap: 48px;
  flex-wrap: wrap;
}
.trust-logo {
  font-family: var(--font-mono); font-size: 15px; color: var(--fg-tertiary);
  opacity: 0.6; font-weight: 600; letter-spacing: 0.5px;
}

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px;
  transition: border-color 0.2s, box-shadow 0.2s, background var(--transition);
}
.feature-card:hover {
  border-color: rgba(88,166,255,0.25);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 15px; color: var(--fg-secondary); line-height: 1.6; }

/* ---- Architecture Flow ---- */
.arch-section { background: var(--gradient-section); }
.arch-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap; margin-top: 20px;
}
.arch-node {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 24px; text-align: center;
  min-width: 180px; flex: 1; max-width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.arch-node:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.arch-node .an-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.arch-node h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.arch-node .an-sub { font-size: 13px; color: var(--fg-secondary); }
.arch-arrow {
  font-size: 28px; color: var(--accent); flex-shrink: 0;
  opacity: 0.5;
}
@media (max-width: 768px) {
  .arch-flow { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
}

/* ---- How It Works ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px; counter-reset: step;
}
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 28px 28px; position: relative;
  transition: border-color 0.2s;
}
.step-card:hover { border-color: rgba(88,166,255,0.25); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-muted); color: var(--accent);
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.step-card p { font-size: 15px; color: var(--fg-secondary); line-height: 1.6; margin-bottom: 16px; }
.code-snippet {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-secondary);
  line-height: 1.7; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.code-snippet .cmd { color: var(--success); }
.code-snippet .comment { color: var(--fg-tertiary); }

/* ---- Platform Cards ---- */
.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
}
.platform-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 32px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.platform-card:hover {
  border-color: var(--accent); box-shadow: 0 8px 30px var(--glow-accent);
  transform: translateY(-2px);
}
.platform-card .pc-header {
  display: flex; align-items: center; gap: 14px;
}
.platform-card .pc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.platform-card h3 { font-size: 22px; font-weight: 700; }
.platform-card .pc-desc { font-size: 15px; color: var(--fg-secondary); line-height: 1.6; flex: 1; }
.platform-card .pc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 9999px;
  font-size: 13px; font-weight: 600;
}
.pc-badge.ios { background: var(--accent-muted); color: var(--accent); }
.pc-badge.web { background: var(--success-bg); color: var(--success); }
.platform-card .pc-features {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
}
.platform-card .pc-features li {
  font-size: 14px; color: var(--fg-secondary);
  display: flex; align-items: center; gap: 8px;
}
.platform-card .pc-features li::before {
  content: '✓'; color: var(--success); font-size: 12px; font-weight: 700;
}

/* ---- Pricing ---- */
.pricing-grid {
  display: flex; gap: 24px; max-width: 800px; margin: 0 auto;
  flex-wrap: wrap; justify-content: center;
}
.price-card {
  flex: 1; min-width: 300px; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 32px;
  position: relative; transition: border-color 0.2s, box-shadow 0.2s;
}
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 60px var(--glow-accent); }
.price-card .popular-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 5px 16px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; border-radius: 9999px;
}
.price-card h3 { font-size: 21px; font-weight: 600; margin-bottom: 12px; }
.price-card .price {
  font-size: 42px; font-weight: 800; margin-bottom: 4px;
  font-family: var(--font-display);
}
.price-card .price span { font-size: 16px; font-weight: 400; color: var(--fg-secondary); }
.price-card .price-desc { font-size: 14px; color: var(--fg-tertiary); margin-bottom: 28px; }
.price-card ul {
  list-style: none; margin-bottom: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.price-card li {
  font-size: 15px; color: var(--fg-secondary);
  display: flex; align-items: center; gap: 10px;
}
.price-card li .check { color: var(--success); display: inline-flex; align-items: center; }
.price-card li .cross { color: var(--fg-tertiary); display: inline-flex; align-items: center; }
.price-btn {
  width: 100%; padding: 15px; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; border: none; text-align: center; display: block;
  text-decoration: none;
}
.price-btn.primary { background: var(--primary-btn); color: #fff; }
.price-btn.primary:hover { background: var(--primary-btn-hover); }
.price-btn.secondary { background: var(--accent-muted); color: var(--accent); }
.price-btn.secondary:hover { background: rgba(88,166,255,0.2); }

/* ---- CTA ---- */
.cta-section { background: var(--gradient-section); }
.cta-card {
  max-width: 700px; margin: 0 auto; text-align: center;
  padding: 64px 48px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card h2 {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px);
  font-weight: 700; margin-bottom: 16px; position: relative;
}
.cta-card p {
  font-size: 17px; color: var(--fg-secondary); max-width: 480px;
  margin: 0 auto 36px; position: relative;
}
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---- FAQ ---- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 28px; margin-bottom: 12px;
  cursor: pointer; transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-light); }
.faq-item .faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item h4 { font-size: 17px; font-weight: 600; }
.faq-item .faq-chevron {
  color: var(--fg-tertiary); transition: transform 0.2s;
  flex-shrink: 0; display: flex; align-items: center;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-item .faq-a {
  font-size: 15px; color: var(--fg-secondary); line-height: 1.6;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* ---- Footer ---- */
.footer {
  padding: 48px 0; border-top: 1px solid var(--border);
  transition: border-color var(--transition);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand-col .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand-col .brand span {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--accent);
}
.footer-brand-col p { font-size: 14px; color: var(--fg-secondary); line-height: 1.6; max-width: 280px; }
.footer-col h5 {
  font-size: 13px; font-weight: 600; color: var(--fg);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  font-size: 14px; color: var(--fg-secondary); text-decoration: none;
  transition: color 0.15s;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--fg-tertiary);
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--fg-tertiary); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--fg-secondary); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Animations ---- */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(63,185,80,0); }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px 32px;
  max-width: 420px; width: 100%; text-align: center;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modal-in 0.3s ease;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--fg-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--surface-hover); color: var(--fg); }
.modal-icon { margin-bottom: 16px; display: flex; justify-content: center; color: var(--fg); }
.modal-title {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 700; margin-bottom: 10px;
}
.modal-desc {
  font-size: 15px; color: var(--fg-secondary);
  line-height: 1.6; margin-bottom: 24px;
}
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-input {
  padding: 13px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); font-size: 15px; font-family: var(--font-body);
  outline: none; transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--accent); }
.modal-input::placeholder { color: var(--fg-tertiary); }
.modal-submit {
  padding: 14px; border-radius: 12px; border: none;
  background: var(--primary-btn); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.modal-submit:hover { background: var(--primary-btn-hover); }
.modal-submit:active { transform: scale(0.98); }
.modal-success {
  margin-top: 16px; font-size: 15px; color: var(--success);
  font-weight: 500; display: flex; align-items: center; gap: 6px;
}

/* ---- Legal pages ---- */
.legal-page {
  min-height: 100vh; background: var(--gradient-hero); color: var(--fg);
}
.legal-nav { position: fixed; }
.legal-nav-actions { display: flex; align-items: center; gap: 8px; }
.legal-back-link {
  color: var(--fg-secondary); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 7px 12px; border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.legal-back-link:hover { color: var(--fg); background: var(--surface-hover); }
.legal-content {
  max-width: 920px; margin: 0 auto;
  padding: 128px clamp(24px, 5vw, 64px) 96px;
}
.legal-hero { text-align: center; margin-bottom: 42px; animation: fade-in-up 0.5s ease; }
.legal-eyebrow {
  display: inline-block; color: var(--accent); font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; margin-bottom: 14px;
}
.legal-hero h1 {
  font-family: var(--font-display); font-size: clamp(36px, 6vw, 56px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.025em;
}
.legal-hero > p:not(.legal-date) {
  max-width: 620px; margin: 18px auto 0; color: var(--fg-secondary);
  font-size: 17px; line-height: 1.7;
}
.legal-date { margin-top: 14px; color: var(--fg-tertiary); font-size: 14px; }
.legal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow-md);
  animation: fade-in-up 0.5s ease 0.08s both;
}
.legal-section { padding: 30px 0; border-top: 1px solid var(--border); }
.legal-section:first-child { padding-top: 0; border-top: 0; }
.legal-section:last-child { padding-bottom: 0; }
.legal-section h2 {
  font-family: var(--font-display); font-size: 20px; font-weight: 650;
  margin-bottom: 12px; color: var(--fg);
}
.legal-section p {
  white-space: pre-line; color: var(--fg-secondary); font-size: 15px; line-height: 1.85;
}
.legal-section ol {
  margin: 10px 0 12px; padding-left: 24px; color: var(--fg-secondary);
  font-size: 15px; line-height: 1.75;
}
.legal-section li { margin-bottom: 7px; padding-left: 4px; }
.legal-section a { color: var(--accent); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }
[data-legal-lang][hidden] { display: none; }
.legal-footer { background: var(--bg-secondary); }
.legal-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; margin-bottom: 32px;
}
.legal-footer .footer-bottom-links a[aria-current="page"] { color: var(--accent); }
@media (max-width: 600px) {
  .legal-content { padding: 108px 18px 64px; }
  .legal-card { border-radius: 16px; padding: 24px 20px; }
  .legal-section { padding: 24px 0; }
  .legal-back-link { display: none; }
  .legal-footer-row { align-items: flex-start; flex-direction: column; }
  .legal-footer .footer-bottom-links { flex-wrap: wrap; gap: 12px 18px; }
}

/* Scroll animation for stats */
.stat-number { font-variant-numeric: tabular-nums; }
