/* ── Reset & Base ──────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.47059;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Design Tokens ────────────────────────────────────── */

:root {
  --bg-primary: #000000;
  --bg-secondary: #161617;
  --bg-tertiary: #1d1d1f;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --accent: #2997ff;
  --accent-hover: #0077ed;
  --border: rgba(255, 255, 255, 0.08);

  --section-padding: 200px;
  --content-width: 980px;
  --narrow-width: 692px;
  --wide-width: 1060px;
}

/* ── Typography ───────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-primary);
}

/* ── Navigation ───────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 100;
  transition: background 0.36s cubic-bezier(0.32, 0.08, 0.24, 1),
              border-color 0.36s cubic-bezier(0.32, 0.08, 0.24, 1);
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(29, 29, 31, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-wordmark {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.nav-wordmark:hover {
  color: var(--text-primary);
  text-decoration: none;
  opacity: 0.88;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: #fff;
  background: var(--accent);
  padding: 4px 14px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0;
}

.nav-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.nav-lang a {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-lang a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-lang a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 400;
  padding: 11px 22px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
  letter-spacing: 0;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn-outline {
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ── Section Layout ───────────────────────────────────── */

.section {
  padding: var(--section-padding) 0;
  text-align: center;
  margin: 0 auto;
  max-width: var(--content-width);
  padding-left: 22px;
  padding-right: 22px;
}

.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-narrow {
  max-width: var(--narrow-width);
  margin: 0 auto;
}

.section h2 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.003em;
  margin-bottom: 22px;
}

.section .section-body {
  font-size: 21px;
  line-height: 1.381;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: var(--narrow-width);
  margin: 0 auto 56px;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 180px 22px 100px;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.009em;
  margin-bottom: 16px;
}

.hero .hero-tagline {
  font-size: 24px;
  line-height: 1.33;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
}

.hero .hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-image {
  max-width: var(--wide-width);
  margin: 0 auto;
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06),
              0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

.hero-caption {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 20px;
  letter-spacing: 0.005em;
}

.hero-video {
  max-width: var(--wide-width);
  margin: 56px auto 0;
  text-align: center;
}

.hero-video video {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06),
              0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

.hero-video-caption {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 20px;
  letter-spacing: 0.005em;
}

/* ── Complications Grid ───────────────────────────────── */

.complications-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.complication-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 36px;
  text-align: left;
  transition: background 0.2s;
}

.complication-card:hover {
  background: #1c1c1e;
}

.complication-card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.003em;
  line-height: 1.17;
  margin-bottom: 4px;
}

.complication-card .card-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 16px;
}

.complication-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Showcase (image + text sections) ─────────────────── */

.showcase {
  padding: var(--section-padding) 22px;
  text-align: center;
}

.showcase-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.showcase h2 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.003em;
  margin-bottom: 14px;
}

.showcase .showcase-body {
  font-size: 21px;
  line-height: 1.381;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: var(--narrow-width);
  margin: 0 auto 56px;
}

.showcase-image {
  max-width: var(--wide-width);
  margin: 0 auto;
}

.showcase-image img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.06),
              0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

.showcase-caption {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 20px;
  letter-spacing: 0.005em;
}

/* ── Feature Grid ─────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 32px;
  text-align: left;
  transition: background 0.2s;
}

.feature-card:hover {
  background: #1c1c1e;
}

.feature-card h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.21;
  letter-spacing: 0.011em;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Final CTA ────────────────────────────────────────── */

.final-cta {
  padding: var(--section-padding) 22px;
  text-align: center;
}

.final-cta h2 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.final-cta .cta-subtitle {
  font-size: 21px;
  line-height: 1.381;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.final-cta .cta-helper {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 40px;
  line-height: 1.5;
}

.final-cta .cta-helper a {
  color: var(--accent);
}

/* ── Section Dividers ─────────────────────────────────── */

.section + .section,
.section + .showcase,
.showcase + .section,
.showcase + .showcase {
  border-top: 1px solid var(--border);
}

/* ── Footer ───────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 40px 22px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

footer .footer-brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

footer .footer-links {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

footer .footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

footer .footer-links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

footer .footer-links .divider {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.12);
}

footer .footer-copyright {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Subpages (Privacy, Helper) ───────────────────────── */

.subpage-header {
  text-align: center;
  padding: 180px 22px 60px;
}

.subpage-header h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.005em;
}

.subpage-header .subpage-subtitle {
  font-size: 21px;
  line-height: 1.381;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 14px;
}

.subpage-content {
  max-width: var(--narrow-width);
  margin: 0 auto;
  padding: 0 22px 120px;
}

.subpage-content h2 {
  font-size: 28px;
  font-weight: 700;
  text-align: left;
  color: var(--text-primary);
  letter-spacing: 0.004em;
  line-height: 1.14;
  margin-top: 64px;
  margin-bottom: 20px;
}

.subpage-content h2:first-child {
  margin-top: 0;
}

.subpage-content p {
  font-size: 17px;
  line-height: 1.47059;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.subpage-content ol,
.subpage-content ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.subpage-content li {
  font-size: 17px;
  line-height: 1.47059;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.subpage-content li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.subpage-content code {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.82em;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
}

.subpage-content .note {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-top: 64px;
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Helper page download button */
.helper-download {
  margin-bottom: 48px;
}

/* ── Scroll Animations ────────────────────────────────── */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: show everything if JS is disabled */
.no-js .animate-on-scroll {
  opacity: 1;
  transform: none;
}

/* ── Responsive: Tablet (max-width: 1068px) ──────────── */

@media (max-width: 1068px) {
  :root {
    --section-padding: 140px;
  }

  .hero {
    padding-top: 140px;
    padding-bottom: 80px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero .hero-tagline {
    font-size: 21px;
  }

  .section h2,
  .showcase h2 {
    font-size: 40px;
  }

  .final-cta h2 {
    font-size: 44px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .subpage-header {
    padding-top: 140px;
  }

  .subpage-header h1 {
    font-size: 44px;
  }
}

/* ── Responsive: Mobile (max-width: 734px) ────────────── */

@media (max-width: 734px) {
  :root {
    --section-padding: 100px;
  }

  .hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 36px;
    letter-spacing: -0.005em;
  }

  .hero .hero-tagline {
    font-size: 19px;
  }

  .hero .hero-cta {
    margin-bottom: 50px;
  }

  .section h2,
  .showcase h2 {
    font-size: 32px;
  }

  .final-cta h2 {
    font-size: 36px;
  }

  .section .section-body,
  .showcase .showcase-body,
  .final-cta .cta-subtitle {
    font-size: 19px;
  }

  .complications-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-image img,
  .showcase-image img,
  .hero-video video {
    border-radius: 12px;
  }

  .complication-card {
    padding: 28px 24px 24px;
    border-radius: 16px;
  }

  .feature-card {
    padding: 28px 24px 24px;
    border-radius: 16px;
  }

  .subpage-header {
    padding-top: 120px;
    padding-bottom: 40px;
  }

  .subpage-header h1 {
    font-size: 36px;
  }

  .subpage-header .subpage-subtitle {
    font-size: 19px;
  }

  .subpage-content h2 {
    font-size: 24px;
    margin-top: 48px;
  }
}
