:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --primary: #38bdf8;
  --primary-fg: #000000;
  --secondary: #0f172a;
  --secondary-fg: #ffffff;
  --radius: 0.75rem;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}

.dark {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --muted: #a1a1aa;
  --card: #171717;
  --border: #27272a;
  --secondary: #f8fafc;
  --secondary-fg: #0f172a;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
}

@supports not (backdrop-filter: blur(12px)) {
  .header {
    background: var(--bg);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #38bdf8 0%, #ffffff 100%);
  color: #000;
  font-size: 0.875rem;
}

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

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

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-toggle:hover {
  background: var(--border);
  color: var(--fg);
}

.lang-toggle .current {
  color: var(--fg);
}

.menu-toggle,
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.menu-toggle:hover,
.theme-toggle:hover {
  background: var(--border);
  color: var(--fg);
}

.theme-toggle .icon-moon,
.dark .theme-toggle .icon-sun {
  display: none;
}

.dark .theme-toggle .icon-moon {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 50%, #ffffff 100%);
  color: #000;
  padding: 0.625rem 1.25rem;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-fg);
  padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
  padding: 0.625rem 1.25rem;
}

.btn-outline:hover {
  background: var(--border);
}

.btn-white-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.5rem;
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 0.625rem 1rem;
}

.btn-ghost:hover {
  color: var(--fg);
  background: var(--border);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero */
.hero {
  position: relative;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.12), transparent 60%);
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 900px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #38bdf8;
  position: relative;
}

.badge-dot::after {
  content: "";
  position: absolute;
  inset: -0.25rem;
  border-radius: 9999px;
  background: #38bdf8;
  opacity: 0.4;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--muted);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Stats */
.stats {
  padding: 2rem 0 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(56, 189, 248, 0.3);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Features */
.features {
  padding: 4rem 0;
  background: rgba(15, 23, 42, 0.02);
}

.dark .features {
  background: rgba(255, 255, 255, 0.02);
}

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

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(56, 189, 248, 0.3);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(56, 189, 248, 0.1);
  color: #0ea5e9;
  margin-bottom: 1.25rem;
}

.dark .feature-icon {
  color: #38bdf8;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* CTA */
.cta {
  padding: 4rem 0;
}

.cta-card {
  background: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 50%, #ffffff 100%);
  border-radius: 1.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #000;
  box-shadow: var(--shadow-lg);
}

.cta-card h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-card p {
  margin-top: 0.75rem;
  color: rgba(0, 0, 0, 0.7);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

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

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

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

.footer-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--fg);
}

.footer-bottom {
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile nav open state */
.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.nav-open a {
  color: var(--fg);
  font-size: 1rem;
}

/* Responsive */
@media (min-width: 640px) {
  .hero-actions,
  .cta-actions {
    flex-direction: row;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
