/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* Dark fantasy palette */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111119;
  --bg-tertiary: #1a1a26;
  --bg-card: rgba(22, 22, 35, 0.7);
  --bg-card-hover: rgba(30, 30, 48, 0.85);

  /* Gold/Amber accent system */
  --gold-100: #fff8e1;
  --gold-200: #ffe082;
  --gold-300: #ffd54f;
  --gold-400: #ffca28;
  --gold-500: #ffc107;
  --gold-600: #ffb300;
  --gold-700: #ff8f00;
  --gold-glow: rgba(255, 193, 7, 0.3);
  --gold-glow-strong: rgba(255, 193, 7, 0.5);

  /* Text */
  --text-primary: #f0ece2;
  --text-secondary: #a8a4b8;
  --text-muted: #6b6880;

  /* Functional */
  --border-subtle: rgba(255, 193, 7, 0.1);
  --border-accent: rgba(255, 193, 7, 0.25);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --container-max: 1200px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Typography */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--gold-400);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-200);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.features-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.steps-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.steps-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.steps-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.steps-grid .reveal:nth-child(5) { transition-delay: 0.25s; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 0;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.nav-logo:hover {
  color: var(--gold-400);
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.4rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-400);
  transition: width 0.3s var(--ease-out-expo);
}

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

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

.nav-cta {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: var(--bg-primary) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--gold-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

/* Mobile nav open state */
.nav-toggle.active .hamburger {
  background: transparent;
}
.nav-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 193, 7, 0.06) 0%, transparent 60%),
              var(--bg-primary);
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 143, 0, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.03) 0%, transparent 50%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  background: var(--glass-bg);
  border: 1px solid var(--border-accent);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-300);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600), var(--gold-300));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-image {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
              0 0 40px var(--gold-glow);
  border: 1px solid var(--border-accent);
}

.hero-img-glow {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gold-glow), transparent, var(--gold-glow));
  z-index: -1;
  filter: blur(20px);
  opacity: 0.5;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: var(--bg-primary);
  box-shadow: 0 4px 20px var(--gold-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--gold-glow-strong);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-300);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2.2rem;
  font-size: 1.1rem;
}

.btn-icon {
  font-size: 1.2em;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  background: var(--glass-bg);
  border: 1px solid var(--border-accent);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--border-accent), transparent, var(--border-accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
              0 0 30px rgba(255, 193, 7, 0.05);
}

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

.feature-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.feature-card:hover .feature-img {
  transform: scale(1.05);
}

.feature-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
}

.feature-content {
  padding: 1.5rem;
  position: relative;
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  display: inline-block;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--gold-200);
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
  position: relative;
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  flex: 1;
  max-width: 320px;
  position: relative;
  transition: all 0.4s var(--ease-out-expo);
}

.step-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4),
              0 0 20px rgba(255, 193, 7, 0.05);
  border-color: var(--border-accent);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--gold-200);
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0 1rem;
}

.connector-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-glow), var(--gold-500), var(--gold-glow));
}

.connector-arrow {
  color: var(--gold-500);
  font-size: 1.2rem;
  font-weight: 700;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.cta-card {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.06), rgba(255, 143, 0, 0.03));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.cta-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  position: relative;
}

.cta-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.cta-feature {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.4s var(--ease-out-expo);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.active {
    right: 0;
  }

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

  .steps-grid {
    flex-direction: column;
    gap: 1rem;
  }

  .step-connector {
    transform: rotate(90deg);
    padding: 0.5rem 0;
  }

  .step-card {
    max-width: 100%;
    width: 100%;
  }

  .cta-card {
    padding: 3rem 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    padding-top: 5rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (max-width: 480px) {
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-large {
    width: 100%;
    justify-content: center;
  }

  .cta-features {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
