:root {
  --bg-base: #0A0E14;
  --bg-panel: #10151F;
  --bg-card: #1A2130;
  --bg-card-hover: #202942;
  --text-primary: #E8EAED;
  --text-muted: #8B93A7;
  --text-faint: #5A6274;
  --accent: #5B8DEF;
  --accent-bright: #7BA3F5;
  --positive: #4ADE80;
  --negative: #F87171;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);

  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius-md: 14px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(123, 163, 245, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 163, 245, 0.14) 1px, transparent 1px),
    radial-gradient(ellipse 700px 500px at 50% 0%, rgba(91, 141, 239, 0.1), transparent 70%);
  background-size: 42px 42px, 42px 42px, auto;
  /* Fades the grid out from the top of the page toward the bottom,
     rather than tiling as one flat continuous mesh over everything. */
  -webkit-mask-image: radial-gradient(ellipse 900px 600px at 50% 0%, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 900px 600px at 50% 0%, black 0%, transparent 75%);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* ------------------------------------------------------------------ */
/* Nav                                                                  */
/* ------------------------------------------------------------------ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  max-width: 1240px;
  margin: 24px auto 0;
  background: rgba(26, 33, 48, 0.3); /* bare — page/grid shows through, border stays */
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  backdrop-filter: blur(12px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 24px;
  height: 24px;
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-link.active {
  color: var(--text-primary); /* current page */
}

/* ------------------------------------------------------------------ */
/* Hero                                                                 */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 780px;
  padding: 70px 24px 60px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden; /* keeps the oversized background head from pushing page width out */
}

.hero-canvas-wrap {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  z-index: 0; /* behind the text content */
  pointer-events: none; /* clicks pass through to whatever's visually on top */
  /* Fade only at the very bottom of the section, well past where the
     head's face/chin sit, so nothing gets cropped mid-feature. */
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 82%, transparent 100%);
}

.hero-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1; /* above the head */
  margin-top: 20px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 58px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  /* Subtle backing so the text stays legible sitting in front of the
     bright wireframe head behind it, without a hard box. */
  text-shadow: 0 2px 24px rgba(10, 14, 20, 0.9);
}

.hero-sub {
  font-size: 17px;
  color: var(--text-primary); /* white so it reads clearly over the head */
  max-width: 560px;
  margin: 0 auto;
  text-shadow: 0 2px 16px rgba(10, 14, 20, 0.9);
}

.hero-sub strong {
  font-weight: 700;
}

/* Side CTAs: pinned left/right of the head at eye level (~45% down). */
.hero-ctas-side {
  position: absolute;
  top: 45%;
  left: 24px;
  right: 24px;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  pointer-events: none; /* container is see-through; buttons re-enable */
}

.hero-ctas-side .btn {
  pointer-events: auto;
}

/* Mobile / slim screens: reflow the hero into a vertical stack —
   text first, head tucked up behind the last text line, buttons last. */
@media (max-width: 900px) {
  .hero {
    min-height: 0;
    padding: 12px 16px 48px;
  }

  .hero-content {
    order: 1;
  }

  .hero-canvas-wrap {
    position: relative; /* in-flow, between the text and the buttons */
    order: 2;
    top: auto;
    left: auto;
    transform: none;
    width: min(82vw, 400px);
    height: min(82vw, 400px);
    margin-top: -100px; /* pull the head up so the text just overlaps its crown */
    /* The model's neck-cut ends ~92% down the canvas; dissolve the neck
       into darkness BEFORE that point so the cut edge never appears. */
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 66%, transparent 89%);
    mask-image: linear-gradient(to bottom, black 0%, black 66%, transparent 89%);
  }

  .hero-ctas-side {
    order: 3;
    position: static;
    transform: none;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    gap: 12px;
    margin-top: 28px;
    padding-top: 0;
  }

  /* Stacked buttons share one size so the column looks tidy */
  .hero-ctas-side .btn,
  .hero-ctas .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

.hero-ctas {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.about {
  max-width: 1100px; /* spread the text across the page like the cards below */
  margin: 0 auto;
  padding: 20px 24px 100px;
  text-align: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: justify;
}

.about-text p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

.about .hero-ctas {
  margin-top: 44px; /* breathing room under the about copy */
}

.btn {
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-bright); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  /* Only the start (top-left) chamfer — the end notch is removed. */
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}
.btn-secondary:hover { border-color: var(--accent); }

.btn-primary-inverse {
  background: var(--bg-base);
  color: var(--text-primary);
}
.btn-primary-inverse:hover { background: var(--bg-panel); }

/* ------------------------------------------------------------------ */
/* Features                                                             */
/* ------------------------------------------------------------------ */

.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 120px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 so the visuals breathe */
  gap: 24px;
}

.feature-card {
  background: rgba(26, 33, 48, 0.45); /* translucent body — grid shows through; visual box and border stay solid */
  border: 1px solid var(--border-subtle);
  border-radius: 0; /* sharp rectangle */
  padding: 28px 24px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  background: rgba(32, 41, 66, 0.5);
  border-color: var(--border-medium);
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.card-visual {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 14px 10px 6px;
  margin-bottom: 18px;
}

.card-chart {
  width: 100%;
  height: auto; /* keep the SVG's aspect ratio so the visual fills the card width instead of letterboxing tiny */
  display: block;
}

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

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ------------------------------------------------------------------ */
/* Bottom CTA block                                                     */
/* ------------------------------------------------------------------ */

.cta-block {
  background: var(--accent);
  color: var(--bg-base);
  text-align: center;
  padding: 90px 24px;
}

.cta-block h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.01em;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------------ */
/* Footer                                                               */
/* ------------------------------------------------------------------ */

.footer {
  position: relative;
  background: var(--accent);
  color: var(--bg-base);
  clip-path: polygon(0 24px, 60px 0, 100% 0, 100% 100%, 0 100%);
  padding: 70px 48px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(10, 14, 20, 0.18);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
  margin-bottom: 4px;
}

.footer-link {
  font-size: 14px;
  font-weight: 400; /* normal weight, same subtle look as the rest of the footer */
  opacity: 0.8;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.footer-logo {
  width: 22px;
  height: 22px;
  filter: invert(1); /* nav logo (white) -> black for the blue footer */
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.footer-note {
  font-size: 13.5px;
  max-width: 320px;
  opacity: 0.75;
  line-height: 1.5;
}

.footer-status {
  max-width: 1100px;
  margin: 20px auto 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  opacity: 0.7;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .hero-title { font-size: 38px; }
  .nav { padding: 14px 18px; margin: 16px auto 0; }
  .nav-links { gap: 14px; }
  .cta-block h2 { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .about-text { text-align: left; } /* justify looks ragged at narrow widths */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer { clip-path: none; padding: 50px 24px 24px; }
}
