:root {
  --bg: #0a0e17;
  --bg-alt: #0d1220;
  --surface: #121828;
  --surface-2: #161d31;
  --border: #232b40;
  --text: #eef1f8;
  --text-dim: #9aa4bd;
  --accent: #5ee7d0;
  --accent-2: #5b8def;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --max-w: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }

p { margin: 0 0 1em; color: var(--text-dim); }

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

.bg-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(91, 141, 239, .18), transparent 60%),
    radial-gradient(50rem 35rem at 110% 10%, rgba(94, 231, 208, .14), transparent 60%),
    var(--bg);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 23, .72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand em { font-style: normal; color: var(--accent); }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }

.tabs {
  display: flex;
  gap: 1.75rem;
  margin: 0 auto;
}

.tab-link {
  position: relative;
  padding: .3rem 0;
  color: var(--text-dim);
  font-size: .92rem;
  font-weight: 500;
  transition: color .2s ease;
}

.tab-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transition: transform .25s ease;
}

.tab-link:hover { color: var(--text); }
.tab-link.is-active { color: var(--text); }
.tab-link.is-active::after { transform: scaleX(1); }

.nav-cta { margin-left: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  margin-left: auto;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--grad);
  color: #06121a;
  box-shadow: 0 8px 24px -8px rgba(94, 231, 208, .45);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px rgba(94, 231, 208, .6); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-2); }

.btn-sm { padding: .55rem 1.15rem; font-size: .85rem; }

/* Sections */
.section { position: relative; padding: 7rem 0; }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .9rem;
}

.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 42rem; }
.section-lede { font-size: 1.05rem; max-width: 38rem; margin-bottom: 3rem; }

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

/* Hero */
.hero { padding-top: 8rem; padding-bottom: 6rem; overflow: hidden; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-size: clamp(2.4rem, 5.4vw, 4rem); max-width: 46rem; }
.hero-sub { font-size: 1.1rem; max-width: 36rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 3.5rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 42rem;
}
.stat dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: .35rem; }
.stat dd { margin: 0; font-weight: 600; font-family: var(--font-head); font-size: 1rem; color: var(--text); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.25rem;
}

.card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(94, 231, 208, .35); }
.card h3 { font-size: 1.08rem; }
.card p { margin-bottom: 0; font-size: .95rem; }

.card-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  margin-bottom: 1.1rem;
  background: rgba(94, 231, 208, .1);
  color: var(--accent);
}
.card-icon svg { width: 22px; height: 22px; }

/* Timeline */
.timeline {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.timeline-step {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.timeline-index {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .65rem;
  margin-bottom: 1rem;
}
.timeline-step h3 { font-size: 1.05rem; }
.timeline-step p { font-size: .92rem; margin-bottom: 0; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--text-dim); }
.field input, .field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem .9rem;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, .2);
}

.form-status { min-height: 1.2em; font-size: .88rem; margin: .75rem 0 0; }
.form-status[data-state="ok"] { color: var(--accent); }
.form-status[data-state="error"] { color: #ff8686; }

.scheduler-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.scheduler-card .btn { margin-top: .5rem; }
.scheduler-note { font-size: .88rem; margin-top: .75rem; margin-bottom: 0; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2.25rem 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .85rem;
  color: var(--text-dim);
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .tabs, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open .tabs {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
  }
  .nav.is-open .nav-cta {
    display: inline-flex;
    position: absolute;
    top: 100%; left: 1.5rem;
    margin-top: calc(1rem + 4 * 2.3rem);
  }
  .timeline { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; gap: .9rem; }
}
