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

:root {
  --primary: #6C5CE7;
  --primary-light: #8B7ED8;
  --secondary: #E84393;
  --tertiary: #00CEC9;
  --surface: #FDFCFF;
  --surface-alt: #F5F3FF;
  --surface-high: #F8F7FA;
  --on-surface: #2D3436;
  --on-surface-muted: #636E72;
  --outline: #DDD6FE;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(108, 92, 231, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(108, 92, 231, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1A1A2E;
    --surface-alt: #16213E;
    --surface-high: #1F1F3A;
    --on-surface: #E8E8F0;
    --on-surface-muted: #A0A0B8;
    --outline: #2D2D4A;
    --white: #1E1E36;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--on-surface);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== ANIMATIONS ==================== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
}

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

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 252, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  z-index: 101;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--on-surface-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.nav-cta:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* ==================== LANGUAGE TOGGLE ==================== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--on-surface-muted);
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  font-size: inherit;
  font-weight: inherit;
  font-family: var(--font);
  line-height: 1;
}

.lang-btn.active {
  color: var(--primary);
}

.lang-btn:hover:not(.active) {
  color: var(--on-surface);
}

.lang-sep {
  color: var(--on-surface-muted);
  opacity: 0.4;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108, 92, 231, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0, 206, 201, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(232, 67, 147, 0.05) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--on-surface-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Tooltip */
.tooltip-trigger {
  position: relative;
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: help;
}

.tooltip-bubble {
  position: fixed;
  width: 320px;
  padding: 16px;
  background: var(--white);
  color: var(--on-surface);
  font-size: 0.85rem;
  line-height: 1.6;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--outline);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  pointer-events: none;
  z-index: 10;
}

.tooltip-bubble.visible {
  opacity: 1;
  visibility: visible;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--outline);
}

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

.hero-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--surface-alt);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid var(--outline);
}

/* ==================== SECTIONS COMMON ==================== */
.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--on-surface-muted);
  line-height: 1.6;
}

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

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

.feature-card {
  padding: 32px 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin-bottom: 8px;
}

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

/* ==================== MODULES ==================== */
.modules {
  padding: 100px 0;
  background: var(--surface-alt);
}

.modules-group {
  margin-bottom: 48px;
}

.modules-group:last-child {
  margin-bottom: 0;
}

.modules-group-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface-muted);
  margin-bottom: 20px;
  padding-left: 4px;
}

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

.module-card {
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  border-top: 3px solid var(--module-color);
  transition: transform var(--transition), box-shadow var(--transition);
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.module-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--module-color) 10%, transparent);
  color: var(--module-color);
  margin-bottom: 16px;
}

.module-card h4 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--on-surface);
}

.module-card p {
  font-size: 0.85rem;
  color: var(--on-surface-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.module-count {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--module-color);
  padding: 4px 10px;
  background: color-mix(in srgb, var(--module-color) 8%, transparent);
  border-radius: 100px;
}

/* ==================== HOW IT WORKS ==================== */
.how-it-works {
  padding: 100px 0;
  background: var(--surface);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25);
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 650;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--on-surface-muted);
  line-height: 1.6;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--outline);
  margin-top: 28px;
  flex-shrink: 0;
}

/* ==================== FAQ ==================== */
.faq {
  padding: 100px 0;
  background: var(--surface-alt);
}

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

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

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--on-surface);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--on-surface-muted);
  transition: transform var(--transition), color var(--transition);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.faq-answer p {
  padding-bottom: 20px;
  font-size: 0.9rem;
  color: var(--on-surface-muted);
  line-height: 1.7;
}

/* ==================== CTA ==================== */
.cta {
  padding: 100px 0;
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.cta::before {
  display: none;
}

.cta-content {
  position: relative;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.2;
}

.cta-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 36px;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  color: var(--white);
  transition: all var(--transition);
}

.store-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.store-btn small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: 400;
}

.store-btn strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.store-btn--soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ==================== FOOTER ==================== */
.footer {
  padding: 64px 0 0;
  background: #1A1A2E;
  color: #B2B2C8;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  color: var(--white);
  margin-bottom: 12px;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  color: var(--primary-light);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: #B2B2C8;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding: 20px 0;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #6C6C8A;
  text-align: center;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(253, 252, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 100;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

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

  .feature-card {
    padding: 24px 20px;
  }

  .modules-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .step {
    padding: 0;
    margin-bottom: 8px;
  }

  .step-connector {
    width: 2px;
    height: 32px;
    margin: 0;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .store-btn {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 36px;
  }

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

  .features,
  .modules,
  .how-it-works,
  .faq,
  .cta {
    padding: 72px 0;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .hero-badge {
    gap: 8px;
  }

  .badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
}

/* ==================== DARK MODE OVERRIDES ==================== */
@media (prefers-color-scheme: dark) {
  .navbar {
    background: rgba(26, 26, 46, 0.85);
  }

  .hero-bg::before {
    background:
      radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108, 92, 231, 0.15) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0, 206, 201, 0.1) 0%, transparent 50%),
      radial-gradient(ellipse 60% 50% at 20% 80%, rgba(232, 67, 147, 0.1) 0%, transparent 50%);
  }

  .btn-primary {
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
  }

  .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.5);
  }

  .nav-cta:hover {
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
  }

  .faq-question:hover {
    background: var(--surface-high);
  }

  .store-btn {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .cta-content h2 {
    color: #FFFFFF;
  }

  .store-btn {
    color: #FFFFFF;
  }

  @media (max-width: 768px) {
    .nav-links {
      background: rgba(26, 26, 46, 0.98);
    }
  }
}
