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

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

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ===== CSS Custom Properties — Light (default) ===== */
:root {
  --color-primary: #6C5CE7;
  --color-primary-light: #a29bfe;
  --color-primary-dark: #5341d6;
  --color-accent: #00D2D3;
  --color-accent-light: #55efc4;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f0ff;
  --text: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8b8da3;
  --border: #e4e4e8;
  --border-light: #f0f0f4;
  --navbar-bg: rgba(255,255,255,0.85);
  --navbar-border: rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-card: 0 2px 12px rgba(108,92,231,0.08);
  --gradient-hero: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 40%, #e0f7fa 100%);
  --gradient-primary: linear-gradient(135deg, #6C5CE7, #00D2D3);
  --check-color: #00b894;
  --cross-color: #e17055;
  --partial-color: #fdcb6e;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg-alt: #161625;
  --bg-card: #1c1c30;
  --bg-card-hover: #26264a;
  --text: #e8e8f0;
  --text-secondary: #a0a0bc;
  --text-muted: #6c6c88;
  --border: #2a2a42;
  --border-light: #222238;
  --navbar-bg: rgba(15,15,26,0.9);
  --navbar-border: rgba(255,255,255,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 12px rgba(108,92,231,0.15);
  --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1040 40%, #0a2020 100%);
}

/* ===== Fluid Typography ===== */
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-top: 0.75rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* stagger children */
.features-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.features-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.1s; }
.features-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.features-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.2s; }
.features-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.25s; }
.features-grid .animate-on-scroll:nth-child(7) { transition-delay: 0.3s; }
.features-grid .animate-on-scroll:nth-child(8) { transition-delay: 0.35s; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s ease;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,92,231,0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(108,92,231,0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--color-primary);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.btn-block { width: 100%; }

/* ===== Gradient Text ===== */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 0.75rem 0;
}

.navbar.scrolled {
  border-bottom-color: var(--navbar-border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  flex-shrink: 0;
}

.navbar-logo { flex-shrink: 0; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  white-space: nowrap;
}
.navbar-links a:hover { color: var(--color-primary); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  color: var(--text-secondary);
}
.theme-toggle:hover { background: var(--bg-alt); color: var(--color-primary); }

.theme-toggle svg { display: none; }
[data-theme-mode="light"] .icon-sun { display: block; }
[data-theme-mode="dark"] .icon-moon { display: block; }
[data-theme-mode="device"] .icon-monitor { display: block; }
/* default until JS sets it */
.icon-monitor { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.hamburger:hover { background: var(--bg-alt); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-top: 1.25rem;
  max-width: 500px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* Wallet Mockup */
.wallet-mockup {
  display: flex;
  justify-content: center;
}

.mockup-phone {
  width: 280px;
  background: var(--bg-card);
  border-radius: 32px;
  border: 3px solid var(--border);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.mockup-notch {
  width: 100px;
  height: 24px;
  background: var(--bg);
  border-radius: 0 0 16px 16px;
  margin: 0 auto 12px;
  border: 2px solid var(--border-light);
  border-top: none;
}

.mockup-screen {
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 20px 16px;
  min-height: 380px;
}

.mockup-header {
  margin-bottom: 20px;
}

.mockup-greeting {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mockup-balance {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.mockup-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.mockup-card {
  border-radius: 12px;
  padding: 14px;
  position: relative;
  color: #fff;
  min-height: 72px;
}

.mockup-card-1 {
  background: linear-gradient(135deg, #6C5CE7, #a29bfe);
}

.mockup-card-2 {
  background: linear-gradient(135deg, #00D2D3, #55efc4);
}

.mockup-card-chip {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  margin-bottom: 8px;
}

.mockup-card-number {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.mockup-card-brand {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.7;
}

.mockup-actions {
  display: flex;
  justify-content: space-around;
}

.mockup-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.mockup-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

/* ===== Features ===== */
.features {
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--color-primary-light);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(0,210,211,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== How It Works ===== */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 0 1.5rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.step-icon {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.step h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.step-connector {
  display: flex;
  align-items: center;
  padding-top: 2.5rem;
  flex-shrink: 0;
}

.connector-line {
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  opacity: 0.5;
}

/* ===== Comparison ===== */
.comparison {
  background: var(--bg-alt);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  min-width: 640px;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}

.comparison-table th.highlight {
  background: var(--color-primary);
  color: #fff;
}

.comparison-table td.highlight {
  background: rgba(108,92,231,0.05);
}

[data-theme="dark"] .comparison-table td.highlight {
  background: rgba(108,92,231,0.12);
}

.comparison-table tbody tr:last-child td { border-bottom: none; }

.check { color: var(--check-color); font-weight: 700; font-size: 1.1rem; }
.cross { color: var(--cross-color); font-weight: 700; font-size: 1.1rem; }
.partial { color: var(--partial-color); font-weight: 600; font-size: 0.85rem; }

/* ===== Platforms ===== */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  color: var(--color-primary);
  border-color: var(--color-primary-light);
}
.platform-card span {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== Pricing ===== */
.pricing {
  background: var(--bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  transition: all 0.3s ease;
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.pricing-card-popular {
  border-color: var(--color-primary);
  box-shadow: 0 4px 30px rgba(108,92,231,0.15);
  transform: scale(1.03);
}
.pricing-card-popular:hover {
  transform: scale(1.03) translateY(-6px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 1.25rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pricing-tier {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.pricing-price {
  margin-bottom: 0.75rem;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.price-period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.pricing-features {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-features .check { font-size: 0.9rem; }
.pricing-features .cross { font-size: 0.9rem; opacity: 0.5; }

/* ===== FAQ ===== */
.faq {
  background: var(--bg-alt);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: 1rem;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--color-primary); }

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 2.5rem;
}

.footer-brand .navbar-brand {
  margin-bottom: 0.75rem;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  max-width: 260px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--text-secondary);
  transition: all 0.2s;
}
.social-links a:hover {
  background: var(--color-primary);
  color: #fff;
}

.footer-links h4 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--color-primary); }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .platforms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2.5rem; }

  /* Navbar mobile */
  .navbar-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 999;
  }
  .navbar-links.open {
    transform: translateX(0);
  }
  .navbar-links a {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
  }
  .hamburger { display: flex; z-index: 1001; }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { order: -1; }
  .mockup-phone { width: 240px; }
  .mockup-screen { min-height: 320px; }
  .mockup-balance { font-size: 1.6rem; }

  /* Steps */
  .steps { flex-direction: column; align-items: center; gap: 0; }
  .step { max-width: 100%; padding: 1.5rem 0; }
  .step-connector { padding: 0; }
  .connector-line { width: 2px; height: 40px; }

  /* Pricing */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
  .pricing-card-popular { transform: none; }
  .pricing-card-popular:hover { transform: translateY(-6px); }

  /* Platforms */
  .platforms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: span 2; }
  .hero { min-height: auto; padding-top: 6rem; padding-bottom: 3rem; }
  .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
}
