/* TopoXY Website - Premium Dark Theme */

/* ===== CSS Variables ===== */
:root {
  /* Backgrounds */
  --bg-base: #09090b;
  --bg-surface: #18181b;
  --bg-elevated: #27272a;
  --bg-hover: #3f3f46;

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Brand Colors */
  --accent: #10b981;
  --accent-secondary: #0d9488;
  --accent-glow: rgba(16, 185, 129, 0.4);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);

  /* Spacing */
  --container-max: 1200px;
  --section-padding: 100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Animated Background ===== */
.animated-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -100px;
  animation: float1 20s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-secondary);
  top: 50%;
  right: -150px;
  animation: float2 25s ease-in-out infinite;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  bottom: -100px;
  left: 30%;
  animation: float3 22s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, 100px) scale(1.1); }
  66% { transform: translate(-30px, 50px) scale(0.95); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, -60px) scale(1.05); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-40px, 30px) scale(0.9); }
}

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

@supports (backdrop-filter: blur(12px)) {
  header {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ===== Buttons ===== */
.btn-glow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: all 0.3s ease;
}

.btn-glow:hover {
  box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-glow.btn-large {
  padding: 18px 36px;
  font-size: 18px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-radius: 12px;
  border: 2px solid var(--border-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-btn {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: var(--bg-hover);
}

/* ===== Hero Section ===== */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  padding: 60px 0;
}

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

.hero-content h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

#lottie-hero {
  width: 100%;
  max-width: 450px;
  height: 400px;
}

/* ===== Features Section ===== */
.features {
  padding: var(--section-padding) 0;
  background: var(--bg-surface);
}

.section-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.features h2 {
  text-align: center;
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 64px;
  line-height: 1.2;
}

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

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}

@supports (backdrop-filter: blur(12px)) {
  .feature-card {
    background: rgba(39, 39, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

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

/* ===== How It Works ===== */
.how-it-works {
  padding: var(--section-padding) 0;
}

.how-it-works h2 {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.how-it-works-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 64px;
}

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

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

.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ===== CTA Section ===== */
.cta-section {
  padding: var(--section-padding) 0;
  text-align: center;
  background: var(--bg-surface);
}

#lottie-cta {
  width: 200px;
  height: 200px;
  margin: 0 auto 32px;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 18px;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-section p {
  color: var(--text-secondary);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 8px;
}

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

.footer-section a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Legal Pages ===== */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.legal-page h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.legal-page .last-updated {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 24px;
  margin-top: 48px;
  margin-bottom: 16px;
}

.legal-page h3 {
  font-size: 18px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page ul {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-page ul {
  padding-left: 24px;
}

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

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

.legal-page a:hover {
  text-decoration: underline;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none !important;
  }

  #lottie-hero,
  #lottie-cta {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

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

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

  .hero-content h1 {
    font-size: 44px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }

  @supports (backdrop-filter: blur(12px)) {
    .nav-links {
      background: rgba(24, 24, 27, 0.95);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
  }

  .nav-links.active {
    display: flex;
  }

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

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-buttons {
    justify-content: center;
  }

  .hero-animation {
    order: -1;
    min-height: 250px;
  }

  #lottie-hero {
    max-width: 300px;
    height: 250px;
  }

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

  .features h2 {
    font-size: 32px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
