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

/* ── Design tokens (light default) ── */
:root {
  --bg:            #ffffff;
  --surface:       #f5f4ef;
  --surface-2:     #eceae3;
  --border:        #d8d6cf;
  --border-strong: #b0ada6;
  --text:          #0d111f;
  --text-dim:      #4a5264;
  --text-mute:     #5f6673;
  --accent:        #2166CC;
  --accent-hover:  #1a52a6;
  --accent-soft:   rgba(33,102,204,.08);
  --accent-border: rgba(33,102,204,.22);
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --radius-xl:  14px;
  --radius-pill:999px;
  --nav-height: 60px;
}

/* ── Dark theme ── */
[data-theme="dark"] {
  --bg:            #0A0E1E;
  --surface:       #0E1327;
  --surface-2:     #111830;
  --border:        rgba(244,244,240,.08);
  --border-strong: rgba(244,244,240,.18);
  --text:          #F4F4F0;
  --text-dim:      rgba(244,244,240,.60);
  --text-mute:     rgba(244,244,240,.50);
  --accent:        #E8FF3A;
  --accent-hover:  #f0ff60;
  --accent-soft:   rgba(232,255,58,.12);
  --accent-border: rgba(232,255,58,.22);
}

[data-theme="dark"] .nav {
  background: rgba(10,14,30,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(244,244,240,.08);
}

[data-theme="dark"] .nav-cta {
  background: var(--accent);
  color: #0A0E1E;
}
[data-theme="dark"] .nav-cta:hover { opacity: .88; background: var(--accent); }

[data-theme="dark"] .feature-card { background: var(--surface-2); }

[data-theme="dark"] .cta-band { background: var(--surface); }

[data-theme="dark"] footer {
  background: var(--surface-2);
  border-top-color: var(--border);
}

[data-theme="dark"] .hero-mark svg,
[data-theme="dark"] .hero-mark img {
  filter: drop-shadow(0 0 40px rgba(232,255,58,.18));
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ── Skip link ── */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--accent); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; z-index: 9999;
}
.skip-link:focus { top: 16px; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0;
  height: var(--nav-height);
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Lora', Georgia, serif;
  font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}
.nav-brand img {
  width: 28px; height: 28px; border-radius: 6px;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 14px; color: var(--text-dim);
  transition: color .15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px; line-height: 1;
  align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background .15s;
}
.nav-cta:hover { background: var(--accent-hover); }

/* ── Containers ── */
.container       { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow{ max-width: 740px;  margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero {
  padding: 88px 24px 96px;
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 64px;
}
.hero-copy { flex: 1; min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  padding: 4px 12px; margin-bottom: 24px;
  text-transform: uppercase;
}
.hero h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  color: var(--text);
}
.hero h1 .accent { color: var(--accent); }
.hero-tagline {
  font-size: clamp(17px, 2vw, 22px);
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-body {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--accent-border); color: var(--accent);
  font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: var(--radius-md);
  transition: border-color .15s, background .15s;
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Hero mark */
.hero-mark {
  flex-shrink: 0;
  width: clamp(200px, 26vw, 320px);
  display: flex; justify-content: center; align-items: center;
}
.hero-mark svg,
.hero-mark img {
  width: 100%; height: auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.12));
}
.hero-mark img { border-radius: 22%; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Section ── */
.section { padding: 80px 24px; }
.section-header { text-align: center; margin-bottom: 52px; }
.section-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 12px;
}
.section h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--text);
}
.section-sub {
  font-size: 17px; color: var(--text-dim);
  max-width: 520px; margin: 0 auto;
  line-height: 1.65;
}

/* ── Feature grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1120px; margin: 0 auto;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  transition: border-color .2s, box-shadow .2s;
}
.feature-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.feature-icon {
  font-size: 26px; margin-bottom: 16px; line-height: 1;
}
.feature-card h3 {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p {
  font-size: 16px; color: var(--text-dim);
  line-height: 1.65;
}
.feature-highlight {
  color: var(--accent); font-weight: 600;
}

/* ── How it works / Steps ── */
.steps {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step h3 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text);
}
.step p {
  font-size: 16px; color: var(--text-dim); line-height: 1.65;
}

/* ── CTA band ── */
.cta-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px;
  text-align: center;
}
.cta-band h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text);
}
.cta-band p {
  font-size: 17px; color: var(--text-dim);
  margin-bottom: 32px; line-height: 1.65;
}
.cta-actions {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
}

/* ── Footer ── */
footer {
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-brand {
  font-size: 14px; color: var(--text-mute);
}
.footer-brand a {
  color: var(--text-dim);
  transition: color .15s;
}
.footer-brand a:hover { color: var(--accent); }
.footer-links {
  display: flex; gap: 20px; list-style: none;
}
.footer-links a {
  font-size: 14px; color: var(--text-mute);
  transition: color .15s;
}
.footer-links a:hover { color: var(--text); }

/* ── Error pages ── */
.error-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 80vh; text-align: center; padding: 40px 24px;
}
.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 80px; font-weight: 600;
  color: var(--accent);
  line-height: 1; margin-bottom: 16px;
}
.error-page h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}
.error-page p { color: var(--text-dim); font-size: 16px; margin-bottom: 32px; }

/* ── Primary button (general use) ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: var(--radius-md);
  text-decoration: none;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-hover); }
[data-theme="dark"] .btn-primary { color: #0A0E1E; }

/* ── Prose (privacy, support pages) ── */
.prose {
  max-width: 680px; margin: 0 auto;
  padding: 64px 24px 80px;
}
.prose h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text);
}
.prose .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: var(--text-mute); text-transform: uppercase;
  margin-bottom: 44px;
}
.prose h2 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  margin: 32px 0 10px;
  color: var(--text);
}
.prose p, .prose ul {
  font-size: 16px; color: var(--text-dim);
  line-height: 1.75; margin-bottom: 16px;
}
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 22px; margin-bottom: 4px; }
.prose ul li::before {
  content: "-"; position: absolute; left: 2px; color: var(--text-mute);
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { opacity: .8; }

/* support page contact card */
.contact-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 16px 0 32px;
}
.contact-card-text h3 {
  font-size: 15px; font-weight: 600; margin: 0 0 4px;
  color: var(--text);
}
.contact-card-text p {
  font-size: 14px; color: var(--text-dim);
  margin: 0;
}
a.contact-btn {
  display: inline-flex; align-items: center;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 14px;
  padding: 9px 20px; border-radius: var(--radius-md);
  text-decoration: none; white-space: nowrap;
  transition: background .15s;
}
a.contact-btn:hover { background: var(--accent-hover); text-decoration: none; }
[data-theme="dark"] a.contact-btn { color: #0A0E1E; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-direction: column; text-align: center; padding: 64px 24px 72px; gap: 40px; }
  .hero-body { max-width: none; }
  .hero-actions { justify-content: center; }
  .hero-mark { width: clamp(160px, 38vw, 260px); }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .nav-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    padding: 16px 24px;
  }
  .section { padding: 56px 24px; }
  .hero { padding: 48px 20px 56px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { justify-content: center; }
  .cta-band { padding: 56px 20px; }
}

/* Accessibility: keyboard focus + reduced motion */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

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

/* ── Screens ── */
.screens-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 960px; margin: 0 auto;
}
.screens-grid img {
  width: 100%; height: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
@media (max-width: 720px) {
  .screens-grid { grid-template-columns: 1fr; max-width: 320px; }
}
