/* ---------- Tokens ---------- */
:root {
  --bg:        #060B16;
  --bg-soft:   #0A1122;
  --teal:      #17C3A0;
  --violet:    #7B61FF;
  --ice:       #F4F7FF;
  --gold:      #FFE9B0;

  --text:      #F4F7FF;
  --text-mute: rgba(244, 247, 255, 0.62);
  --text-faint:rgba(244, 247, 255, 0.38);
  --hairline:  rgba(244, 247, 255, 0.10);

  --glass:     rgba(244, 247, 255, 0.035);
  --glass-edge:rgba(244, 247, 255, 0.10);

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0 0 1.1em; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Sky: starfield + aurora ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse 120% 80% at 50% -10%, #0E1730 0%, var(--bg) 62%); }

.aurora-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  filter: blur(64px) saturate(1.1);
  opacity: 0; transition: opacity 1.2s ease;
}
.aurora-canvas.on { opacity: .30; }
/* the blurred blobs stay as the fallback, and step back once canvas runs */
.sky.canvas-on .aurora { opacity: .14; }

.chart-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,247,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,247,255,.045) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 110% 65% at 50% 0%, #000 5%, transparent 72%);
  mask-image: radial-gradient(ellipse 110% 65% at 50% 0%, #000 5%, transparent 72%);
}

/* --- The guide star: fixed, so everything else moves past it --- */
.guide-star {
  position: absolute;
  top: 6vh; right: 7vw;
  width: clamp(220px, 30vw, 460px); height: auto;
  overflow: visible;
  will-change: opacity, transform;
}
.guide-star-body {
  fill: var(--ice);
  animation: breathe 9s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(244,247,255,.55)) drop-shadow(0 0 60px rgba(23,195,160,.35));
  opacity: .92;
}
@keyframes breathe {
  0%, 100% { opacity: .78; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.035); }
}

.stars {
  position: absolute; inset: -50%;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%,  rgba(244,247,255,.85), transparent),
    radial-gradient(1px 1px   at 65% 12%,  rgba(244,247,255,.55), transparent),
    radial-gradient(1.6px 1.6px at 82% 46%, rgba(244,247,255,.75), transparent),
    radial-gradient(1px 1px   at 12% 68%,  rgba(244,247,255,.45), transparent),
    radial-gradient(1.2px 1.2px at 42% 82%, rgba(244,247,255,.60), transparent),
    radial-gradient(1px 1px   at 91% 76%,  rgba(244,247,255,.40), transparent),
    radial-gradient(1.3px 1.3px at 33% 52%, rgba(244,247,255,.55), transparent),
    radial-gradient(1px 1px   at 75% 90%,  rgba(244,247,255,.35), transparent);
  background-size: 620px 620px, 430px 430px, 780px 780px, 340px 340px, 560px 560px, 690px 690px, 500px 500px, 400px 400px;
  opacity: .7;
  animation: drift 200s linear infinite;
}
@keyframes drift { to { transform: translate3d(-260px, -160px, 0); } }

.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; will-change: transform; }
.aurora-a { width: 60vw; height: 46vw; top: -14vw; left: -8vw;  background: radial-gradient(circle, var(--teal) 0%, transparent 68%); animation: sway 26s ease-in-out infinite alternate; }
.aurora-b { width: 52vw; height: 40vw; top: -6vw;  right: -10vw; background: radial-gradient(circle, var(--violet) 0%, transparent 68%); animation: sway 32s ease-in-out infinite alternate-reverse; }
.aurora-c { width: 70vw; height: 30vw; top: 46vh;  left: 18vw;  background: radial-gradient(circle, var(--teal) 0%, transparent 72%); opacity: .14; animation: sway 40s ease-in-out infinite alternate; }
@keyframes sway {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 3vw, 0) scale(1.12); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 11, 22, 0.55);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.site-header.scrolled { background: rgba(6, 11, 22, 0.88); border-bottom-color: var(--hairline); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.star { width: 18px; height: 18px; fill: var(--ice); filter: drop-shadow(0 0 7px rgba(244,247,255,.55)); flex: none; }

.nav { display: flex; align-items: center; gap: 34px; font-size: .94rem; color: var(--text-mute); }
.nav a { transition: color .2s ease; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text); border: 1px solid var(--glass-edge); border-radius: 999px;
  padding: 7px 18px; background: var(--glass); transition: border-color .2s ease, background .2s ease;
}
.nav-cta:hover { border-color: rgba(23,195,160,.55); background: rgba(23,195,160,.10); }

.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px 0; transition: transform .25s ease, opacity .25s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; padding: 8px var(--gutter) 24px; border-top: 1px solid var(--hairline); }
.mobile-nav a { padding: 14px 0; color: var(--text-mute); border-bottom: 1px solid var(--hairline); }
.mobile-nav.open { display: flex; }

/* ---------- Constellation spine ---------- */
.spine {
  position: absolute; top: 0; bottom: 0;
  left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(244,247,255,.10) 12%, rgba(244,247,255,.10) 88%, transparent);
  transform: translateX(-22px);
}
main { position: relative; }

.label { position: relative; }
.label::before {
  content: ''; position: absolute; left: -26px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  background: var(--teal); border-radius: 50%;
  box-shadow: 0 0 0 3px var(--bg), 0 0 14px rgba(23,195,160,.9);
}

/* ---------- Shared ---------- */
.label {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal); font-weight: 500; margin-bottom: 18px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 400; margin-bottom: 26px;
}
.grad {
  background: linear-gradient(100deg, var(--teal) 0%, var(--ice) 45%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-mute); max-width: 60ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: .96rem; font-weight: 500;
  padding: 14px 30px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn-primary {
  background: linear-gradient(100deg, var(--teal), #3FD8BC);
  color: #04120E; font-weight: 600;
  box-shadow: 0 6px 30px rgba(23,195,160,.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(23,195,160,.42); }
.btn-ghost { border-color: var(--glass-edge); color: var(--text); background: var(--glass); }
.btn-ghost:hover { border-color: rgba(244,247,255,.30); transform: translateY(-2px); }

.section { padding: clamp(84px, 11vw, 150px) 0; }
.section h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 52px; max-width: 22ch; }

/* ---------- Hero ---------- */
.bearing {
  position: absolute; top: 15vh; right: 19vw;
  width: 1px; height: 15vh; pointer-events: none;
  transform: rotate(9deg); transform-origin: top center;
  opacity: .8;
}
.bearing i { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,195,160,.55), transparent); }
.bearing em {
  position: absolute; bottom: -6px; left: 9px;
  font-family: var(--font-mono); font-size: .58rem; font-style: normal;
  letter-spacing: .12em; color: rgba(23,195,160,.6); white-space: nowrap;
}
.coords {
  position: absolute; left: var(--gutter); bottom: 34px;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em;
  color: var(--text-faint);
}

.hero { position: relative; min-height: 88vh; display: flex; align-items: center; padding: 120px 0 90px; }
.hero h1 { font-size: clamp(3.1rem, 10vw, 6.6rem); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 30px; }
.hero .lede { margin-bottom: 42px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-hint { position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%); }
.scroll-hint span { display: block; width: 1px; height: 52px; background: linear-gradient(to bottom, transparent, var(--text-faint)); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- Credibility ---------- */
.credibility { border-block: 1px solid var(--hairline); padding: 42px 0; background: rgba(10,17,34,.35); }
.cred-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.cred { display: flex; flex-direction: column; gap: 4px; }
.cred strong { font-variant-numeric: tabular-nums; font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 600; color: var(--ice); }
.cred span { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; color: var(--text-mute); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  position: relative; padding: 38px 34px 34px;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.card {
  background-image: radial-gradient(420px circle at 15% -10%, rgba(23,195,160,0), transparent 60%);
  transition: transform .35s ease, border-color .35s ease, background-color .35s ease, background-image .4s ease;
}
.card::before, .card::after {
  content: ''; position: absolute; width: 13px; height: 13px;
  border: 1px solid rgba(23,195,160,.45); pointer-events: none;
  transition: border-color .35s ease;
}
.card::before { top: 11px; left: 11px;  border-right: 0; border-bottom: 0; }
.card::after  { bottom: 11px; right: 11px; border-left: 0; border-top: 0; }
.card:hover::before, .card:hover::after { border-color: var(--teal); }
.card:hover { transform: translateY(-5px); border-color: rgba(23,195,160,.35); background: rgba(244,247,255,.055); }
.card:hover { background-image: radial-gradient(420px circle at 15% -10%, rgba(23,195,160,.16), transparent 60%); }
.card-num { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; color: var(--teal); display: block; margin-bottom: 16px; }
.card h3 { font-size: 1.32rem; margin-bottom: 14px; }
.card p { color: var(--text-mute); font-size: .97rem; margin: 0; }

/* ---------- Steps ---------- */
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Drawn course: scales out from the first waypoint once the section is in view */
.course-line {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--teal), rgba(23,195,160,.35) 70%, transparent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.6s cubic-bezier(.22,.7,.3,1);
}
.steps.plotted .course-line { transform: scaleX(1); }
.step { position: relative; padding-top: 30px; }
.step-num {
  position: absolute; top: -17px; left: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid rgba(23,195,160,.45); color: var(--teal);
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  box-shadow: 0 0 0 5px var(--bg), 0 0 22px rgba(23,195,160,.35);
  transition: border-color .4s ease, box-shadow .4s ease;
}
.steps.plotted .step-num { border-color: var(--teal); }
.step h3 { font-size: 1.18rem; margin: 14px 0 12px; }
.step p { color: var(--text-mute); font-size: .96rem; margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.about-head { position: relative; }
.about-head h2 { margin-bottom: 30px; }
.about-star { width: 76px; height: 76px; fill: none; stroke: rgba(244,247,255,.16); stroke-width: 1.5; }
.about-body p { color: var(--text-mute); font-size: 1.04rem; }
.pull {
  font-family: var(--font-display); font-size: 1.22rem; color: var(--ice);
  border-left: 2px solid var(--teal); padding-left: 22px; margin-top: 34px; line-height: 1.45;
}

/* ---------- Contact ---------- */
.contact-inner { max-width: 680px; }
.contact .lede { margin-bottom: 44px; }
.form { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.field label { font-size: .84rem; letter-spacing: .04em; color: var(--text-mute); }
.field input, .field textarea {
  width: 100%; padding: 15px 18px;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 12px;
  color: var(--text); font-family: var(--font-body); font-size: 1rem;
  transition: border-color .2s ease, background .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: rgba(23,195,160,.6); background: rgba(23,195,160,.05);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .88rem; color: var(--teal); margin: 0; min-height: 1.2em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.form.sent .field, .form.sent #submit-btn { display: none; }
.form-note.error { color: #FF8B7B; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 54px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.tagline { font-family: var(--font-display); color: var(--text-mute); margin: 0; }
.copyright { font-size: .84rem; color: var(--text-faint); margin: 0; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,.7,.3,1), transform .7s cubic-bezier(.22,.7,.3,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 46px; }
  .course-line { top: 0; bottom: 0; left: 17px; right: auto; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--teal), rgba(23,195,160,.3) 75%, transparent);
    transform: scaleY(0); transform-origin: top center; }
  .steps.plotted .course-line { transform: scaleY(1); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .spine, .bearing, .coords { display: none; }
  .label::before { display: none; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .hero { min-height: 78vh; padding: 80px 0 70px; }
  .guide-star { top: -2vh; right: -14vw; width: 52vw; opacity: .55; }
  .hero-actions .btn { flex: 1 1 100%; }
  .card { padding: 30px 24px; }
  .cred-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

/* ---------- Motion / contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars, .aurora, .scroll-hint span, .guide-star-body { animation: none; }
  .course-line { transition: none; transform: none !important; }
  .aurora-canvas { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
