/* ========== Custom Properties ========== */
:root {
  --ink: #0c0f1d;
  --ink-light: #1a1d2e;
  --ink-muted: #8b8fa8;
  --ink-subtle: #5c6078;
  --surface: #ffffff;
  --surface-raised: #f7f7fa;
  --surface-border: #e8e8ee;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-subtle: rgba(79, 70, 229, 0.06);
  --warm: #f59e0b;
  --green: #10b981;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

a {
  text-decoration: none;
  color: inherit;
}

em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* ========== Grain Overlay ========== */
.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ========== Animations ========== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.feature-card.fade-up:nth-child(1) { transition-delay: 0s; }
.feature-card.fade-up:nth-child(2) { transition-delay: 0.06s; }
.feature-card.fade-up:nth-child(3) { transition-delay: 0.12s; }
.feature-card.fade-up:nth-child(4) { transition-delay: 0.18s; }
.feature-card.fade-up:nth-child(5) { transition-delay: 0.24s; }
.feature-card.fade-up:nth-child(6) { transition-delay: 0.3s; }

.step.fade-up:nth-child(1) { transition-delay: 0s; }
.step.fade-up:nth-child(2) { transition-delay: 0.1s; }
.step.fade-up:nth-child(3) { transition-delay: 0.2s; }

.stat-item.fade-up:nth-child(1) { transition-delay: 0s; }
.stat-item.fade-up:nth-child(3) { transition-delay: 0.08s; }
.stat-item.fade-up:nth-child(5) { transition-delay: 0.16s; }
.stat-item.fade-up:nth-child(7) { transition-delay: 0.24s; }

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.header--scrolled {
  background: rgba(12, 15, 29, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.5px;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
  border-radius: 8px;
}

.logo-text {
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}

.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s;
}

.nav a:hover {
  color: rgba(255, 255, 255, 0.95);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 2px 12px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset, 0 4px 24px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.btn-white:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: 140px 0 100px;
  background: var(--ink);
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-glow--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.25), transparent 70%);
  top: -100px;
  left: -100px;
  animation: float 8s ease-in-out infinite;
}

.hero-glow--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  bottom: -150px;
  right: -50px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  animation: heroIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 20px;
}

.hero h1 em {
  color: var(--accent-light);
  font-size: 52px;
}

.hero-sub {
  font-size: 16px;
  color: var(--ink-muted);
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========== Phone Mockup ========== */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  animation: phoneIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes phoneIn {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.phone-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(60px);
  z-index: 0;
}

.phone-frame {
  width: 260px;
  position: relative;
  z-index: 1;
  background: #1a1a1a;
  border-radius: 44px;
  padding: 14px 12px;
  border: 2px solid #333;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 60px rgba(99, 102, 241, 0.1),
    inset 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Side button details */
.phone-frame::before {
  content: '';
  position: absolute;
  right: -4px;
  top: 100px;
  width: 4px;
  height: 40px;
  background: #333;
  border-radius: 0 2px 2px 0;
}

.phone-frame::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 80px;
  width: 4px;
  height: 28px;
  background: #333;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 40px 0 #333;
}

.phone-screenshot {
  width: 100%;
  display: block;
  border-radius: 32px;
}

/* ========== Stats Bar ========== */
.stats-bar {
  padding: 48px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--accent);
}

.stat-label {
  font-size: 12px;
  color: var(--ink-subtle);
  line-height: 1.45;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--surface-border);
}

/* ========== Section Shared ========== */
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 5px 14px;
  background: var(--accent-subtle);
  border-radius: 100px;
}

.section-tag--light {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

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

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
  line-height: 1.15;
}

.section-header h2 em {
  color: var(--accent);
}

.section-header p {
  font-size: 16px;
  color: var(--ink-muted);
}

/* ========== Features ========== */
.features {
  padding: 110px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.feature-card:hover {
  border-color: rgba(79, 70, 229, 0.15);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.06);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card--accent {
  background: linear-gradient(170deg, rgba(79, 70, 229, 0.04) 0%, var(--surface) 60%);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-subtle), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(79, 70, 229, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.feature-tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ========== How It Works ========== */
.how-it-works {
  padding: 110px 0;
  background: var(--surface-raised);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  position: relative;
}

.step-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.step-number {
  width: 52px;
  height: 52px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.step-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ink), transparent);
  margin-left: 16px;
  opacity: 0.15;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.step p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 300px;
}

/* ========== CTA ========== */
.cta {
  padding: 100px 0;
  background: var(--surface);
}

.cta-inner {
  position: relative;
  text-align: center;
  padding: 72px 48px;
  background: var(--ink);
  border-radius: 24px;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 70%);
  top: -200px;
  right: -100px;
  filter: blur(80px);
  pointer-events: none;
}

.cta-inner h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
  color: #fff;
  position: relative;
  z-index: 1;
}

.cta-inner p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.cta-inner .btn-white {
  position: relative;
  z-index: 1;
}

/* ========== Footer ========== */
.footer {
  padding: 52px 0 0;
  border-top: 1px solid var(--surface-border);
}

.footer .logo-text {
  color: var(--ink);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 36px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 14px;
  color: var(--ink-subtle);
  font-weight: 500;
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--surface-border);
  padding: 20px 0;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}

/* ========== Legal Pages ========== */
.legal-page {
  padding: 120px 0 80px;
}

.legal-page h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.legal-page .legal-updated {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 48px;
}

.legal-page h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-page h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-page p {
  font-size: 15px;
  color: var(--ink-subtle);
  margin-bottom: 16px;
  line-height: 1.75;
}

.legal-page ul,
.legal-page ol {
  font-size: 15px;
  color: var(--ink-subtle);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.75;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  color: var(--ink);
}

.legal-content {
  max-width: 740px;
}

/* Legal pages header override - light theme */
.header--legal {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
}

.header--legal .logo-text {
  color: var(--ink);
}

.header--legal .nav a {
  color: var(--ink-subtle);
}

.header--legal .nav a:hover {
  color: var(--accent);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero h1 {
    font-size: 34px;
    letter-spacing: -0.8px;
  }

  .hero h1 em {
    font-size: 37px;
  }

  .hero-sub {
    font-size: 15px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-frame {
    width: 200px;
    border-radius: 36px;
    padding: 10px 9px;
  }

  .phone-screenshot {
    border-radius: 26px;
  }

  .stats-grid {
    flex-wrap: wrap;
    gap: 24px;
  }

  .stat-divider {
    display: none;
  }

  .stat-item {
    flex: 0 0 calc(50% - 12px);
    justify-content: flex-start;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .step-line {
    display: none;
  }

  .section-header h2 {
    font-size: 30px;
  }

  .cta-inner {
    padding: 48px 24px;
    border-radius: var(--radius);
  }

  .cta-inner h2 {
    font-size: 26px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }

  .legal-page h1 {
    font-size: 28px;
  }

  .legal-page h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero h1 em {
    font-size: 31px;
  }

  .stat-item {
    flex: 0 0 100%;
  }
}
