:root {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --accent-primary: #2563eb;
  --accent-primary-rgb: 37, 99, 235;
  --accent-secondary: #0ea5e9;
  --accent-secondary-rgb: 14, 165, 233;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-subtle: #e2e8f0;
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --navbar-border: rgba(226, 232, 240, 0.9);
  --navbar-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  --nav-drawer-bg: rgba(255, 255, 255, 0.98);
  --layer-bg-start: rgba(255, 255, 255, 0.95);
  --layer-bg-end: rgba(255, 255, 255, 0.85);
  --footer-bg: #f5f7fb;
  --max-width: 1100px;
  --radius: 8px;
}

.theme-dark {
  --bg: #0c101a;
  --bg-elevated: #121827;
  --accent-primary: #2563eb;
  --accent-primary-rgb: 37, 99, 235;
  --accent-secondary: #0ea5e9;
  --accent-secondary-rgb: 14, 165, 233;
  --text-primary: #f5f7ff;
  --text-secondary: #c9d4e5;
  --border-subtle: #1f2a3d;
  --navbar-bg: rgba(12, 16, 26, 0.92);
  --navbar-border: rgba(31, 42, 61, 0.9);
  --navbar-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  --nav-drawer-bg: rgba(12, 16, 26, 0.96);
  --layer-bg-start: rgba(18, 24, 39, 0.95);
  --layer-bg-end: rgba(18, 24, 39, 0.75);
  --footer-bg: #0f1522;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  color: var(--text-primary);
}

p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
}

.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--navbar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navbar-border);
  box-shadow: var(--navbar-shadow);
  z-index: 20;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

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

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(var(--accent-primary-rgb), 0.12);
}

.theme-toggle {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.theme-toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 4px 10px rgba(var(--accent-primary-rgb), 0.25);
}

.theme-toggle-label {
  font-size: 12px;
  opacity: 0.8;
}

.theme-toggle.active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 16px rgba(var(--accent-primary-rgb), 0.25);
  border-color: rgba(var(--accent-primary-rgb), 0.4);
}

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

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 999px;
}

main {
  overflow: hidden;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 20px;
}

.section-header {
  max-width: 780px;
  margin-bottom: 36px;
}

.subtitle {
  margin-top: 4px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-secondary);
  margin-bottom: 10px;
}

.lead {
  font-size: 18px;
  line-height: 1.8;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.16), rgba(var(--accent-secondary-rgb), 0.18));
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  margin-bottom: 10px;
}

.icon-chip.small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.icon-chip svg {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
}
.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 32px;
  position: relative;
}

.hero .content {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.hero .content > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero.animate .content > *:nth-child(1) {
  transition-delay: 0.05s;
}
.hero.animate .content > *:nth-child(2) {
  transition-delay: 0.12s;
}
.hero.animate .content > *:nth-child(3) {
  transition-delay: 0.18s;
}
.hero.animate .content > *:nth-child(4) {
  transition-delay: 0.24s;
}
.hero.animate .content > * {
  opacity: 1;
  transform: translateY(0);
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(140deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(var(--accent-primary-rgb), 0.22);
  background-size: 120% 120%;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-position 0.35s ease;
}

.btn.primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 34px rgba(var(--accent-primary-rgb), 0.24);
  background-position: 100% 50%;
}

.btn.primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(var(--accent-primary-rgb), 0.2);
}

.btn.ghost {
  border-color: var(--border-subtle);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn.ghost:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.6);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn.ghost:active {
  transform: translateY(0);
}

.btn.full {
  width: 100%;
}

.visual {
  width: 100%;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.graph-card {
  width: min(520px, 100%);
  height: 400px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.muted {
  color: var(--text-secondary);
}

.split {
  display: grid;
  gap: 20px;
}

.split .section-body {
  display: grid;
  gap: 16px;
}

.accent-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-primary-rgb), 0.45), transparent);
}

.grid {
  display: grid;
  gap: 20px;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.08), rgba(var(--accent-secondary-rgb), 0.05));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-primary-rgb), 0.6);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.card:hover::after {
  opacity: 1;
}

.card h3 {
  margin-top: 8px;
}

.stack {
  display: grid;
  gap: 14px;
}

.layer-card {
  background: linear-gradient(90deg, var(--layer-bg-start), var(--layer-bg-end));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.layer-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connector {
  position: absolute;
  bottom: -14px;
  left: 24px;
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, rgba(var(--accent-primary-rgb), 0.5), transparent);
}

.layer-card:last-child .connector {
  display: none;
}

.products-grid .card,
.roadmap-grid .card {
  padding-top: 28px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary));
  border: 1px solid rgba(var(--accent-primary-rgb), 0.6);
  font-weight: 700;
}

.tag.live,
.tag.dev,
.tag.beta,
.tag.soon {
  background: linear-gradient(120deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.6);
}

.traction-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.roadmap-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 0.7fr;
  gap: 24px;
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.08), rgba(var(--accent-secondary-rgb), 0.08)), var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid rgba(var(--accent-primary-rgb), 0.5);
}

.contact-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.form-header {
  display: grid;
  gap: 6px;
}
.contact-meta p {
  margin-bottom: 8px;
}

.small {
  font-size: 13px;
}

.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 48px;
  justify-content: center;
}

.social-links a {
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.icon-chip.tiny {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: none;
  background: rgba(var(--accent-primary-rgb), 0.1);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
}

.icon-chip.tiny svg {
  width: 18px;
  height: 18px;
}

.contact-details {
  margin-top: 12px;
  color: var(--text-secondary);
  display: grid;
  gap: 10px;
  text-align: center;
}

.contact-details ul {
  padding-left: 18px;
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-weight: 700;
}

.contact-meta {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 26px 20px 34px;
  background: var(--footer-bg);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  color: var(--text-secondary);
}

.tagline {
  color: var(--accent-secondary);
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
  will-change: opacity, transform, filter;
}

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

/* Staggered reveal for lists/grids */
.cards .card:nth-child(1),
.stack .layer-card:nth-child(1),
.roadmap-grid .card:nth-child(1),
.products-grid .card:nth-child(1) {
  transition-delay: 0.02s;
}
.cards .card:nth-child(2),
.stack .layer-card:nth-child(2),
.roadmap-grid .card:nth-child(2),
.products-grid .card:nth-child(2) {
  transition-delay: 0.08s;
}
.cards .card:nth-child(3),
.stack .layer-card:nth-child(3),
.roadmap-grid .card:nth-child(3),
.products-grid .card:nth-child(3) {
  transition-delay: 0.14s;
}
.cards .card:nth-child(4),
.stack .layer-card:nth-child(4),
.roadmap-grid .card:nth-child(4),
.products-grid .card:nth-child(4) {
  transition-delay: 0.2s;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 64px;
    right: 20px;
    background: var(--nav-drawer-bg);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    flex-direction: column;
    gap: 12px;
    display: none;
  }

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

  .menu-toggle {
    display: inline-flex;
  }

  .section {
    padding: 72px 20px;
  }
}
