/* ============================================================
   Northbeam Labs — modern dark UI
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-soft: #0e1424;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2ff;
  --muted: #97a3c0;
  --teal: #5eead4;
  --indigo: #818cf8;
  --violet: #c084fc;
  --grad: linear-gradient(120deg, #5eead4 0%, #818cf8 50%, #c084fc 100%);
  --maxw: 1140px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Animated aurora background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(94, 234, 212, 0.08), transparent 55%),
    var(--bg);
}
.aurora__band {
  position: absolute;
  width: 70vw;
  height: 70vw;
  border-radius: 45% 55% 60% 40%;
  filter: blur(70px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora__band--1 { top: -20%; left: -10%; background: radial-gradient(circle at 30% 30%, #1c8f7e, transparent 60%); }
.aurora__band--2 { top: 10%; right: -15%; background: radial-gradient(circle at 50% 50%, #5b4bd6, transparent 60%); animation-delay: -8s; animation-duration: 32s; }
.aurora__band--3 { bottom: -25%; left: 25%; background: radial-gradient(circle at 50% 50%, #7c3aed, transparent 62%); animation-delay: -14s; animation-duration: 30s; }

@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(6%, 8%, 0) rotate(20deg) scale(1.12); }
  100% { transform: translate3d(-5%, -4%, 0) rotate(-12deg) scale(0.96); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand__mark { display: inline-flex; transition: transform 0.5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(180deg); }
.brand__dot { color: var(--teal); }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  transition: color 0.25s;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }

.nav__cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.nav__cta:hover { transform: translateY(-2px); border-color: var(--teal); background: rgba(94,234,212,0.08); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.3s;
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--primary {
  background: var(--grad);
  color: #07101a;
  box-shadow: 0 10px 30px -10px rgba(129, 140, 248, 0.6);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(129, 140, 248, 0.7); }
.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--teal); background: var(--surface-2); }
.btn--block { width: 100%; justify-content: center; margin-top: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
}
.hero__inner { padding-block: 60px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(94, 234, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(2.6rem, 7vw, 5rem);
  max-width: 16ch;
}
.hero__sub {
  margin-top: 24px;
  max-width: 56ch;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  max-width: 760px;
}
.stat__num {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { font-size: 13px; color: var(--muted); }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  display: flex;
  justify-content: center;
}
.scroll-cue span {
  width: 4px; height: 8px;
  margin-top: 7px;
  border-radius: 4px;
  background: var(--teal);
  animation: scrolly 1.8s var(--ease) infinite;
}
@keyframes scrolly { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: scroll-x 32s linear infinite;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  color: var(--muted);
  font-size: 17px;
}
.marquee__track span:nth-child(even) { color: var(--teal); opacity: 0.6; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(70px, 11vw, 130px); position: relative; }
.section__kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 14px;
}
.section__title { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.section__lead { margin-top: 18px; color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
.section__head { max-width: 640px; margin-bottom: 56px; }

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

.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--text);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px -2px rgba(94, 234, 212, 0.5);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 5px; top: 11px;
  width: 4px; height: 7px;
  border: solid #07101a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Info panel */
.panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 26px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.panel__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.panel__row:last-child { border-bottom: 0; }
.panel__label { color: var(--muted); font-size: 14px; }
.panel__value { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.panel__glow {
  position: absolute;
  top: -40%; right: -30%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(129,140,248,0.25), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  padding: 30px 26px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(129,140,248,0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover { transform: translateY(-8px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card__icon {
  font-size: 30px;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card__line {
  position: absolute;
  left: 26px; bottom: 0;
  height: 2px; width: 0;
  background: var(--grad);
  transition: width 0.45s var(--ease);
}
.card:hover .card__line { width: calc(100% - 52px); }

/* ---------- Tech grid + bars ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tech-grid span {
  padding: 18px 14px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.3s, border-color 0.3s, background 0.3s;
}
.tech-grid span:hover {
  transform: translateY(-4px) scale(1.03);
  color: var(--text);
  border-color: var(--teal);
  background: var(--surface-2);
}

.bars { margin-top: 30px; display: grid; gap: 22px; }
.bar__name { display: block; font-size: 14px; margin-bottom: 8px; font-weight: 500; }
.bar__track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.bar__track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  transition: width 1.4s var(--ease);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.step:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.step__num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
.step h3 { margin: 12px 0 8px; font-size: 1.15rem; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- CTA / form ---------- */
.cta {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  padding: clamp(34px, 6vw, 64px);
  overflow: hidden;
  text-align: center;
}
.cta__glow {
  position: absolute;
  top: -60%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(129,140,248,0.22), transparent 60%);
  filter: blur(30px);
  pointer-events: none;
}
.cta .section__lead { margin-inline: auto; }
.form { max-width: 620px; margin: 36px auto 0; text-align: left; position: relative; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(151, 163, 192, 0.5); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.14);
  background: rgba(0,0,0,0.35);
}
.form__note { font-size: 14px; margin: 14px 0 0; min-height: 20px; text-align: center; }
.form__note.is-ok { color: var(--teal); }
.form__note.is-err { color: #fca5a5; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-top: 56px; margin-top: 40px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer__brand .brand__name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; }
.footer__brand p { margin-top: 12px; max-width: 38ch; font-size: 15px; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.footer__cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; }
.footer__cols a { display: block; color: var(--muted); font-size: 15px; padding: 5px 0; transition: color 0.25s, transform 0.25s; }
.footer__cols a:hover { color: var(--text); transform: translateX(3px); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* stagger children inside grids */
.cards [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.cards [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.cards [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.steps [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.steps [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.steps [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .grid-2--flip > div:first-child { order: 2; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 22px 24px 30px;
    background: rgba(10, 14, 26, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { width: 100%; padding: 12px 0; font-size: 17px; }
  .nav__cta { margin-top: 8px; }
  .nav__toggle { display: flex; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}
