@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500&display=swap');

/* ── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--base);
  color: var(--snow);
  font-family: var(--ff-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── TOKENS ─────────────────────────────────────── */
:root {
  /* Surfaces */
  --base:    #08111E;
  --surface: #0D1A2E;
  --panel:   #142236;
  --edge:    #1E3A5F;
  --rule:    rgba(96,165,250,0.14);

  /* Accent */
  --blue:      #60A5FA;
  --blue-lt:   #94C2FD;
  --blue-dim:  rgba(96,165,250,0.10);
  --blue-glow: rgba(96,165,250,0.25);

  /* Text */
  --snow:   #E8F1FE;
  --mist:   rgba(232,241,254,0.65);
  --slate:  rgba(232,241,254,0.38);
  --ghost:  rgba(232,241,254,0.18);

  /* Type */
  --ff-head: 'Space Grotesk', sans-serif;
  --ff-body: 'Inter', sans-serif;

  /* Spacing */
  --pad-x:  clamp(20px, 5vw, 60px);
  --pad-section: clamp(56px, 8vw, 96px);

  /* Radius */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
}

/* ── NAV ────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: 96px;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,17,30,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.3s;
}
#nav.scrolled { border-color: rgba(96,165,250,0.22); }

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  height: 52px;
  width: auto;
  display: block;
}
.footer-brand .nav-logo img { height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--blue);
  transition: width 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--snow); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-demo {
  font-family: var(--ff-head);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--base);
  background: var(--blue);
  padding: 7px 18px;
  border-radius: var(--r-sm);
  border: none;
  transition: box-shadow 0.2s, background 0.2s;
}
.nav-demo:hover {
  background: var(--blue-lt);
  box-shadow: 0 0 24px var(--blue-glow);
}

/* Mobile burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--slate);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 96px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  z-index: 800;
  flex-direction: column;
}
.nav-mobile.open { display: flex; }
.nav-mobile a, .nav-mobile button {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
  padding: 14px var(--pad-x);
  border-bottom: 1px solid var(--rule);
  background: none;
  border-left: none; border-right: none; border-top: none;
  text-align: left;
  transition: color 0.2s, background 0.2s;
}
.nav-mobile a:hover, .nav-mobile button:hover { color: var(--snow); background: var(--panel); }
.nav-mobile .m-demo {
  background: var(--blue);
  color: var(--base);
  font-weight: 700;
  margin: 12px var(--pad-x);
  border-radius: var(--r-sm);
  text-align: center;
  border-bottom: none;
}

/* ── SHARED UTILITIES ──────────────────────────── */
.container { padding: 0 var(--pad-x); max-width: 1200px; margin: 0 auto; }
.section-pad { padding: var(--pad-section) var(--pad-x); }
.section-pad-sm { padding: calc(var(--pad-section) * 0.65) var(--pad-x); }
.alt-bg { background: var(--surface); }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--blue);
  flex-shrink: 0;
}

/* Headings */
.h-display {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--snow);
}
.h-section {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--snow);
}
.h-card {
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  color: var(--snow);
}
.text-blue { color: var(--blue); }
.text-mist { color: var(--mist); }
.text-slate { color: var(--slate); }

/* Body text */
.body-lg { font-size: 1rem; line-height: 1.72; color: var(--mist); font-weight: 300; }
.body-md { font-size: 0.88rem; line-height: 1.7; color: var(--mist); }
.body-sm { font-size: 0.78rem; line-height: 1.65; color: var(--slate); }
.caption  { font-size: 0.7rem; letter-spacing: 0.06em; color: var(--slate); }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--base);
  background: var(--blue);
  padding: 10px 22px;
  border-radius: var(--r-sm);
  border: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--blue-lt);
  box-shadow: 0 0 28px var(--blue-glow);
  transform: translateY(-1px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--mist);
  background: none;
  border: 1px solid var(--rule);
  padding: 10px 22px;
  border-radius: var(--r-sm);
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover {
  border-color: rgba(96,165,250,0.4);
  color: var(--snow);
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Rule */
.h-rule { height: 1px; background: var(--rule); border: none; margin: 0; }

/* Tag chip */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 3px 9px;
  border-radius: 20px;
}

/* ── PAGE HEADER ──────────────────────────────── */
.page-header {
  padding: 120px var(--pad-x) 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    linear-gradient(rgba(96,165,250,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 100% at 80% 50%, black, transparent);
  pointer-events: none;
}

/* ── FOOTER ───────────────────────────────────── */
#footer {
  background: #04090F;
  border-top: 1px solid var(--rule);
  padding: 56px var(--pad-x) 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--slate);
  margin-top: 10px;
  max-width: 240px;
}
.footer-col-title {
  font-family: var(--ff-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-col a {
  font-size: 0.82rem;
  color: var(--slate);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.footer-copy { font-size: 0.74rem; color: var(--ghost); }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 0.74rem; color: var(--ghost); transition: color 0.2s; }
.footer-legal a:hover { color: var(--slate); }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 32px; height: 32px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--slate);
  font-size: 0.78rem;
  transition: border-color 0.2s, color 0.2s;
}
.footer-socials a:hover { border-color: rgba(96,165,250,0.4); color: var(--blue); }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 860px) {
  .nav-links, .nav-demo { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
