/* ============================================================
   Altus Outbound - Ascending Trajectory
   Palette: ink #0A1628 · panel #0E1E33 · blue #176AED · blue-2 #2563EB
            mist #E9EFF9 · slate #7E8FA8
   Type:    Space Grotesk (display) · Inter (body) · JetBrains Mono (data)
   ============================================================ */

:root {
  --ink:        #0A1628;
  --ink-2:      #081020;
  --panel:      #0E1E33;
  --panel-2:    #10233c;
  --line:       #1c3352;
  --blue:       #176AED;
  --blue-2:     #2563EB;
  --blue-soft:  rgba(23, 106, 237, 0.14);
  --mist:       #E9EFF9;
  --slate:      #7E8FA8;
  --slate-dim:  #5d6d84;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--mist);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.06; margin: 0; }
p { margin: 0; }
em { font-style: normal; color: #a9c4f6; }

::selection { background: var(--blue); color: #fff; }

/* ---------- ambient rising thread ---------- */
.thread {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(75deg, transparent 0 49.7%, rgba(23,106,237,0.09) 49.85%, rgba(23,106,237,0.09) 50.15%, transparent 50.3% 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
  opacity: 0.7;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 22px -6px rgba(23,106,237,0.7);
}
.btn-primary:hover { background: var(--blue-2); transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(23,106,237,0.85); }
.btn-ghost {
  background: transparent;
  color: var(--mist);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--blue); color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ---------- eyebrow ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--blue);
  display: inline-block;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 28px;
  /* roomy at the top of the page, tightens once you scroll */
  padding: 26px var(--gutter);
  background: rgba(10, 22, 40, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, padding 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { color: var(--blue); display: inline-flex; }
/* normal size everywhere (header when scrolled, footer) */
.brand-mark svg {
  width: 30px;
  height: 30px;
  display: block;
  transition: width 0.3s var(--ease), height 0.3s var(--ease);
}
.brand-mark.small svg { width: 26px; height: 26px; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: #fff;
  transition: font-size 0.3s var(--ease);
}
.brand-sub {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.42em;
  color: var(--slate);
  margin-top: 3px;
  transition: font-size 0.3s var(--ease);
}
/* logo starts large at the top of the page, shrinks to normal on scroll */
.site-header:not(.scrolled) .brand-mark svg { width: 46px; height: 46px; }
.site-header:not(.scrolled) .brand-name { font-size: 25px; }
.site-header:not(.scrolled) .brand-sub { font-size: 11px; }

.site-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.site-nav a {
  font-size: 15px;
  color: var(--slate);
  font-weight: 500;
  transition: color 0.18s;
  position: relative;
}
.site-nav a:hover { color: var(--mist); }
.header-cta { margin-left: 6px; }

.nav-toggle { display: none; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px var(--gutter) 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a { padding: 12px 0; color: var(--mist); border-bottom: 1px solid var(--line); }
.mobile-nav a.btn { border-bottom: none; margin-top: 12px; }
.mobile-nav.open { display: flex; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(48px, 7vw, 96px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--blue); display: inline; }
.lede {
  font-size: clamp(16px, 1.7vw, 19px);
  color: #b7c4d8;
  max-width: 30em;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 22px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--slate);
}

/* ---- signature chart ---- */
.hero-chart { margin: 0; }
.chart-frame {
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 16px;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8);
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.chart-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.chart-trend {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.06em;
}
.trajectory { width: 100%; height: clamp(200px, 26vw, 300px); display: block; }
.trajectory .grid line { stroke: var(--line); stroke-width: 1; opacity: 0.55; }
.trajectory .area { fill: var(--blue-soft); opacity: 0; transition: opacity 1.1s var(--ease) 0.5s; }
.trajectory .line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 10px rgba(23,106,237,0.55));
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}
.trajectory .arrow {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.4s ease 1.5s;
}
.trajectory .nodes circle { fill: var(--ink); stroke: var(--blue); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.chart-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--slate-dim);
  margin-top: 6px;
}

/* draw animation (triggered by .in) */
.hero-chart.in .trajectory .line { animation: draw 1.6s var(--ease) forwards; }
.hero-chart.in .trajectory .area { opacity: 1; }
.hero-chart.in .trajectory .arrow { opacity: 1; }
.hero-chart.in .trajectory .nodes circle { animation: pop 0.4s var(--ease) forwards; }
.trajectory .nodes circle:nth-child(1) { animation-delay: 0.55s; }
.trajectory .nodes circle:nth-child(2) { animation-delay: 0.75s; }
.trajectory .nodes circle:nth-child(3) { animation-delay: 0.95s; }
.trajectory .nodes circle:nth-child(4) { animation-delay: 1.15s; }
.trajectory .nodes circle:nth-child(5) { animation-delay: 1.35s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   STAT STRIP
   ============================================================ */
.stats {
  width: min(var(--maxw), 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat {
  position: relative;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* inset divider that stops short of the rounded outer border */
.stat:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  bottom: 26px;
  width: 1px;
  background: var(--line);
}
.stat-num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  color: #fff;
  letter-spacing: -0.02em;
}
.stat-desc { color: var(--slate); font-size: 15px; line-height: 1.45; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter);
}
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(30px, 4.2vw, 48px); }
.section-sub { color: var(--slate); font-size: 18px; margin-top: 18px; }

/* ---- problem ---- */
.problem-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.problem-lede { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: #cdd8e8; }
.problem-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.problem-list li {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #c3d0e2;
  font-size: 15.5px;
  line-height: 1.5;
}
.problem-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 9px; height: 9px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--blue);
  transform: rotate(45deg);
}

/* ---- process ---- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 130%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px 34px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.step::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.step:hover { transform: translateY(-6px); border-color: #2b476f; }
.step:hover::after { transform: scaleX(1); }
.step-num {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.1em;
}
.step h3 { font-size: 21px; margin: 16px 0 12px; }
.step p { color: var(--slate); font-size: 15.5px; line-height: 1.55; }

/* ---- fit ---- */
.fit-inner {
  background: linear-gradient(160deg, var(--panel) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.fit .section-head { margin-bottom: 0; }
.fit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fit-list li {
  position: relative;
  padding: 16px 18px 16px 48px;
  background: rgba(23,106,237,0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  color: #d3ddec;
}
.fit-list li::before {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: translateY(-65%) rotate(-45deg);
}

/* ---- about ---- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.about .section-head { margin-bottom: 0; }
.about-body { display: flex; flex-direction: column; gap: 20px; }
.about-body p { font-size: clamp(16px, 1.8vw, 19px); color: #c3d0e2; line-height: 1.62; }

/* ---- final CTA ---- */
.cta { text-align: center; }
.cta-card {
  background: linear-gradient(165deg, var(--panel-2) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(44px, 7vw, 88px) clamp(28px, 6vw, 80px);
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  top: -40%; left: 50%;
  width: 420px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(23,106,237,0.22), transparent 62%);
  pointer-events: none;
}
.cta-mark { color: var(--blue); display: inline-flex; margin-bottom: 22px; position: relative; }
.cta-mark svg { width: 46px; height: 46px; }
.cta-card h2 { font-size: clamp(28px, 4vw, 46px); position: relative; }
.cta-card > p {
  color: var(--slate);
  font-size: 18px;
  max-width: 32em;
  margin: 20px auto 34px;
  position: relative;
}
.cta-note { margin-top: 22px; font-size: 14px; color: var(--slate); position: relative; }
.cta-note a { color: var(--blue); }
.cta-note a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 24px; margin-left: auto; }
.footer-links a { color: var(--slate); font-size: 14px; }
.footer-links a:hover { color: var(--mist); }
.footer-legal { width: 100%; color: var(--slate-dim); font-size: 13px; font-family: var(--f-mono); letter-spacing: 0.03em; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 42px; height: 42px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--mist); margin: 0 auto; transition: transform 0.25s, opacity 0.25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

  .hero { grid-template-columns: 1fr; }
  .hero-chart { order: 2; max-width: 520px; }
  .problem-grid, .about-grid, .fit-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  /* stacked: divider becomes an inset horizontal rule */
  .stat:not(:first-child)::before {
    top: 0;
    bottom: auto;
    left: 28px;
    right: 28px;
    width: auto;
    height: 1px;
  }
  .thread { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .footer-links { margin-left: 0; width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .trajectory .line { stroke-dashoffset: 0; }
  .trajectory .area, .trajectory .arrow, .trajectory .nodes circle { opacity: 1; }
}
