/* ===================== TOKENS ===================== */
:root {
  --bg: #F7F4F3;
  --black: #000000;
  --white: #FFFFFF;
  --purple: #6A33EB;
  --purple-light: #936BF0;
  --purple-pale: #E1D4FF;
  --mint: #06D6A0;
  --red: #F21B3F;
  --grey: #E4E4E4;
  --grey-1: #DADADA;
  --grey-2: #B8B8B8;
  --grey-3: #818181;

  --font-display: 'Golos Text', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container-width: 1690px;
  --side-pad: 150px;
  --header-side-pad: 24px;
  --footer-side-pad: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

/* ===================== BUTTONS ===================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.btn-label {
  position: relative;
  z-index: 1;
  transition: color .35s ease;
}
.btn:hover .btn-fill { transform: scaleY(1); }

.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary .btn-fill { background: var(--white); }
.btn-primary:hover .btn-label { color: var(--black); }

.btn-dark { background: var(--black); color: var(--white); }
.btn-dark .btn-fill { background: var(--white); }
.btn-dark:hover .btn-label { color: var(--black); }

.btn-white { background: var(--white); color: var(--black); }
.btn-white .btn-fill { background: var(--black); }
.btn-white:hover .btn-label { color: var(--white); }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: -0.48px;
  color: var(--purple);
}
.eyebrow-center { text-align: center; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0);
  padding: 24px 0;
  transition: transform .3s ease, background-color .22s ease;
}
.site-header.is-hidden {
  transform: translateY(-100%);
}
.site-header.menu-open { background: #000; }
.site-header.menu-open .logo-mark path { fill: #fff; }
.site-header.menu-open .nav-toggle span { background: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-left: var(--header-side-pad);
  padding-right: var(--header-side-pad);
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-mark { flex-shrink: 0; display: block; }

.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-links {
  display: flex;
  gap: 28px;
  background: var(--white);
  border-radius: 24px;
  padding: 12px 28px;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
}
.nav-links a:hover { color: var(--purple); }

.header-cta { flex-shrink: 0; }
.mobile-nav-wrap { display: none; }
.nav-mobile-cta { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--black);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  padding: 60px 0 100px;
  overflow: visible;
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 980px;
  padding: 0;
}
.hero h1 {
  font-size: 90px;
  line-height: 0.96;
  letter-spacing: -2.7px;
  font-weight: 400;
}
.hero-sub {
  margin-top: 35px;
  font-size: 16px;
  line-height: 22px;
  color: var(--black);
}

/* ----- Dot field (interactive Q&A pattern) ----- */
.dot-field-wrap {
  margin-top: 110px;
}
.dot-field {
  position: relative;
  width: 100%;
  aspect-ratio: 1690 / 252;
  display: grid;
  grid-template-columns: repeat(33, 1fr);
  grid-template-rows: repeat(5, 1fr);
}
/* On narrow screens, JS overrides grid-template-columns/rows and aspect-ratio
   inline with a column count that evenly divides the total dot count (165),
   so the pattern always reflows into complete rows — never a half-empty
   trailing row. See applyResponsiveGrid() in dot-field.js. */
.dot-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dot-cell .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--black);
  opacity: 0;
  transform: scale(0);
}
.dot-cell:not(.is-red):not(.is-mint) .dot {
  transition: background-color 1.6s ease;
}
.dot-cell.is-red .dot { background: var(--red); cursor: pointer; }
.dot-cell.is-mint .dot { background: var(--mint); cursor: pointer; }
.dot-cell.is-covered .dot { opacity: 0; }

.reveal-box {
  /* --bs is set inline by JS to the box's own pixel size (rowH * 3), so all
     typography and spacing below scale proportionally to it — the box always
     renders the same relative layout regardless of viewport width. */
  --bs: 150px;
  position: absolute;
  padding: clamp(8px, calc(var(--bs) * 0.106), 22px);
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(.2);
  transform-origin: var(--origin-x, 50%) var(--origin-y, 50%);
  transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
  z-index: 5;
  overflow: hidden;
}
.reveal-box.is-red { background: var(--red); }
.reveal-box.is-mint { background: var(--mint); }
.reveal-box.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.rb-panel {
  position: absolute;
  left: clamp(8px, calc(var(--bs) * 0.106), 22px);
  right: clamp(8px, calc(var(--bs) * 0.106), 22px);
  top: clamp(8px, calc(var(--bs) * 0.106), 22px);
  bottom: clamp(8px, calc(var(--bs) * 0.106), 22px);
  opacity: 0;
  transition: opacity .2s ease;
}
.reveal-box.is-loading .rb-panel--question { opacity: 1; }
.rb-question {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(8px, calc(var(--bs) * 0.093), 15px);
  line-height: clamp(10px, calc(var(--bs) * 0.113), 18px);
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 clamp(4px, calc(var(--bs) * 0.08), 13px);
}
.rb-loading {
  display: flex;
  gap: clamp(2px, calc(var(--bs) * 0.027), 5px);
  align-items: center;
}
.rb-loading span {
  width: clamp(3px, calc(var(--bs) * 0.033), 6px);
  height: clamp(3px, calc(var(--bs) * 0.033), 6px);
  border-radius: 50%;
  background: var(--white);
  opacity: .4;
  animation: rb-bounce 1s infinite ease-in-out;
}
.rb-loading span:nth-child(2) { animation-delay: .15s; }
.rb-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes rb-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.rb-answer {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(9px, calc(var(--bs) * 0.098), 15px);
  line-height: clamp(11px, calc(var(--bs) * 0.115), 18px);
  color: var(--white);
  margin: 0;
  overflow-wrap: break-word;
}
.rb-answer .rb-cursor {
  display: inline-block;
  width: clamp(4px, calc(var(--bs) * 0.045), 8px);
  height: clamp(9px, calc(var(--bs) * 0.098), 15px);
  background: var(--white);
  margin-left: 1px;
  transform: translateY(1px);
  animation: rb-blink .8s steps(1) infinite;
}
@keyframes rb-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.reveal-box.is-answered .rb-panel--question { opacity: 0; }
.reveal-box.is-answered .rb-panel--answer { opacity: 1; }

/* exit sequence: text fades first, then the box morphs into a circle and
   shrinks back down to the dot's original spot — no opacity fade, so it
   reads as the box literally becoming the dot rather than a fading ghost. */
.reveal-box.is-closing .rb-panel {
  transition: opacity .15s ease;
  opacity: 0;
}
.reveal-box.is-collapsing {
  transition: transform .26s cubic-bezier(.4,0,.7,1), border-radius .26s ease;
  transform: scale(.04);
  border-radius: 50%;
  pointer-events: none;
}

/* ===================== SECTION INTRO (shared) ===================== */
.section-intro {
  display: flex;
  gap: 100px;
  align-items: flex-start;
  padding: 80px 0 60px;
}
.section-headline {
  flex: 1.4;
  font-size: 64px;
  line-height: 1.06;
  letter-spacing: -1.92px;
  font-weight: 400;
}
.section-intro-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 14px;
  max-width: 480px;
}
.section-intro-side p {
  font-size: 16px;
  line-height: 22px;
}
.section-intro--how-it-works {
  padding-bottom: 0;
}

/* ===================== HOW IT WORKS / STORY STEPS ===================== */
.story-step {
  padding: 80px 0;
  border-top: 1px solid var(--grey-1);
}
.story-step-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  display: flex;
  flex-direction: column;
  gap: 23px;
}
.story-step-head h3 {
  font-size: 64px;
  letter-spacing: -1.92px;
  line-height: 1;
  font-weight: 400;
}
.story-step-head p {
  font-size: 24px;
  letter-spacing: -0.72px;
  line-height: 1.3;
}

/* node card (Эпик / Задача / Таймлог mini-cards) */
.node-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 2px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 234px;
  flex-shrink: 0;
}
.node-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 28px; height: 28px;
  background: var(--bg);
  border-bottom-left-radius: 14px;
  box-shadow: -1px 1px 0 0 var(--grey);
}
.node-card-label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 16px;
  color: var(--black);
}
.node-card-title {
  font-family: var(--font-mono);
  font-size: 24px;
  margin-top: 6px;
  margin-bottom: 6px;
}
.node-card-meta {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 16px;
  color: var(--black);
}
.node-card-alert { border-color: var(--red); }
.node-card-alert .node-card-label,
.node-card-alert .node-card-title,
.node-card-alert .node-card-meta { color: var(--red); }

.hierarchy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hierarchy-arrow {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--grey-2);
  flex-shrink: 0;
}

/* money pill */
.money-pill {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: var(--white);
  border-radius: 45px;
  padding: 13px 30px 17px;
  width: fit-content;
  margin: 0 auto 40px;
  flex-wrap: wrap;
}
.money-pill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 97px;
  text-align: center;
}
.money-pill-label {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: -0.6px;
}
.money-pill-value {
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: -0.72px;
}
.money-positive { color: var(--mint); }
.money-negative { color: var(--red); }

/* transaction list */
.transactions-list {
  max-width: 480px;
  margin: 0 auto 50px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.transaction-row {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 4px;
  padding: 18px 24px;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 15px;
  text-align: center;
}
.transaction-highlight { border-color: var(--purple-light); }

.overrun-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.overrun-arrow {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--grey-2);
}

/* tree caption */
.tree-caption {
  text-align: center;
  font-size: 24px;
  letter-spacing: -0.72px;
  line-height: 1.3;
  max-width: 500px;
  margin: 0 auto 50px;
}

/* ===================== METRICS TREE (exact Figma coordinates) ===================== */
/* Coordinate space: 1690 x 861, mirrors absolute positions from the Figma frame
   (x minus 115px left margin, y minus 4087px scene top). Every --x/--y/--w/--h
   below is taken directly from the design, not redrawn. */
.tree-scene-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.tree-scene {
  position: relative;
  width: 1690px;
  height: 861px;
}
.tree-scene-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tree-scene-lines line {
  stroke: var(--purple-light);
  stroke-width: 2;
}

.scene-card {
  position: absolute;
  left: calc(var(--x) * 1px);
  top: calc(var(--y) * 1px);
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
  background: var(--white);
  border: 1px solid var(--purple-light);
  border-radius: 2px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.scene-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 20px;
  background: var(--bg);
  border-bottom-left-radius: 10px;
  box-shadow: -1px 1px 0 0 var(--purple-light);
}
.scene-card-root { border-color: var(--purple); }
.scene-card-root::after { box-shadow: -1px 1px 0 0 var(--purple); }
.scene-card .tree-node-label {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 10px;
  color: var(--purple);
}
.scene-card .tree-node-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--purple);
  border-bottom: 1px solid var(--purple-light);
  padding-bottom: 8px;
  margin-bottom: 2px;
}
.scene-card .tree-node-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.scene-card .tree-node-stats div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  color: var(--purple);
}
.scene-card .tree-node-stats span { font-size: 8px; }
.scene-card .tree-node-stats strong { font-size: 12px; font-weight: 400; }
.scene-card .tree-node-toggle {
  margin-top: 8px;
  display: block;
  border: 1px solid var(--purple-light);
  border-radius: 4px;
  padding: 6px 10px 5px;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 10px;
  color: var(--purple);
  text-align: left;
}
.scene-card-expanded .tree-node-detail {
  border: 1px solid var(--purple-light);
  border-radius: 4px;
  padding: 8px 10px 6px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scene-card-expanded .tree-node-detail .tree-node-toggle { border: none; padding: 0; margin: 0; }
.scene-card-expanded .tree-node-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--purple-light);
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--purple);
  line-height: 1.6;
}
.scene-card-expanded .tree-node-detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.scene-card-expanded .tree-node-detail-row strong { font-size: 12px; font-weight: 400; }
.scene-card-expanded .tree-node-detail-tag { font-weight: 700; font-size: 8px; }

/* ===================== STRUCTURE SCROLL (Структура -> Учёт -> Деньги, scroll-jacked build) ===================== */
.structure-scroll {
  position: relative;
  height: 600vh;
}
.structure-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* centered coordinate layer for the tree (cards + trunk/branches): shifted up 100px — the fixed point the text rises to */
.origin-layer {
  position: absolute;
  top: calc(50% - 100px);
  left: 50%;
  width: 0;
  height: 0;
  z-index: 3; /* the camera-pan transform creates a stacking context — must sit above .tree-svg explicitly */
}
/* text layer sits at the plain viewport center; its own rise is animated via JS transform */
.origin-layer--text {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 5;
}

.tree-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.tree-svg line {
  stroke: var(--purple);
  stroke-width: 1;
  fill: none;
}
.tree-svg line.branch {
  stroke: var(--grey-2);
  transition: stroke 0.4s ease;
}
.tree-svg line.branch.is-connected {
  stroke: var(--purple);
}
.trunk-line { stroke-width: 1; }
.tree-svg line.alert-line { stroke: var(--red); }

.scatter-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  max-width: none;
  height: auto;
  display: block;
  z-index: 3;
  will-change: transform;
  overflow: visible;
}
.scatter-card .card-border {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.4s ease;
}
.scatter-card.is-connected .card-border {
  stroke: var(--purple) !important;
}

.structure-center {
  position: absolute;
  top: 0; left: 0;
  z-index: 5;
  text-align: center;
  width: 700px;
  will-change: transform;
}
.structure-center .text-scene {
  display: flex;
  flex-direction: column;
  gap: 23px;
  padding: 0 20px;
  will-change: opacity, transform;
}
.structure-center .text-scene h2,
.structure-center .text-scene h3 {
  font-size: 64px;
  letter-spacing: -1.92px;
  line-height: 1;
  font-weight: 400;
}
.structure-center .text-scene p {
  font-size: 24px;
  letter-spacing: -0.72px;
  line-height: 1.3;
}
#scene2 {
  position: absolute;
  inset: 0;
}

/* scene 3 elements: red overrun card + money copy, positioned in the same world-space coordinate system */
.alert-card-wrap {
  position: absolute;
  top: 0; left: 0;
  transform: translate(calc(var(--ax) - 50%), calc(var(--ay) - 50%));
  z-index: 3;
  will-change: opacity;
}
.alert-card-svg {
  width: 180px;
  max-width: none;
  height: auto;
  display: block;
}
.alert-border {
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.money-text-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 620px;
  transform: translate(calc(var(--mx) - 50%), var(--my));
  text-align: center;
  z-index: 4;
  will-change: opacity, transform;
}
.money-text-wrap p {
  font-size: 32px;
  letter-spacing: -0.96px;
  line-height: 1.3;
}
.money-pill-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 520px;
  transform: translate(calc(var(--px) - 50%), var(--py));
  text-align: center;
  z-index: 4;
  will-change: opacity;
}
.money-pill-wrap .money-pill { margin: 0 auto; }

@media (max-width: 900px) {
  /* the interactive build-up needs real screen estate; below this width we show a simplified static fallback instead */
  .structure-scroll .origin-layer,
  .structure-scroll .tree-svg,
  .structure-scroll .alert-card-wrap,
  .structure-scroll .money-text-wrap,
  .structure-scroll .money-pill-wrap { display: none; }
  .structure-scroll { height: auto; }
  .structure-sticky { position: relative; height: auto; overflow: visible; padding: 43px 24px 64px; }
  .origin-layer--text { position: static; width: auto; height: auto; }
  .structure-center { position: static; transform: none !important; opacity: 1 !important; width: 100%; }
  .structure-center .text-scene { position: static !important; opacity: 1 !important; transform: none !important; padding: 0; }

  /* mobile static layout, pixel-exact to Figma node 2102:1586, scaled via JS (see structure-scroll.js) */
  .mobile-precise-viewport {
    position: relative;
    width: 100%;
    overflow: visible;
    margin-top: 21px;
  }
  .mobile-precise-group {
    position: relative;
    transform-origin: top left;
  }
  .mobile-precise-card { position: absolute; top: 0; left: 0; }
  .mobile-precise-line { position: absolute; }
  .mobile-precise-heading {
    position: absolute;
    text-align: center;
  }
  .mobile-precise-heading h2,
  .mobile-precise-heading h3 {
    font-size: 36px;
    letter-spacing: -1.08px;
    line-height: 1;
    font-weight: 400;
    margin: 0 0 23px;
  }
  .mobile-precise-heading p {
    font-size: 16px;
    line-height: 22px;
    margin: 0;
  }
  .mobile-precise-money-text {
    position: absolute;
    text-align: center;
    font-size: 16px;
    line-height: 22px;
  }
  .mobile-precise-money-text p { margin: 0; }
  .mobile-precise-pill {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.75px;
    background: #fff;
    border-radius: 17px;
    font-family: var(--font-mono);
    box-sizing: border-box;
  }
  .mobile-precise-pill .mp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.875px;
    width: 36.375px;
  }
  .mobile-precise-pill .mp-label { font-size: 7.5px; letter-spacing: -0.225px; color: #000; line-height: 10.5px; }
  .mobile-precise-pill .mp-value { font-size: 9px; letter-spacing: -0.27px; color: #000; line-height: 10.5px; }
  .mobile-precise-pill .mp-green { color: var(--mint); }
  .mobile-precise-pill .mp-red { color: var(--red); }

  .graph-desktop { display: none; }
  .graph-mobile {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 32px auto 0;
  }
}
.graph-mobile { display: none; }

/* ===================== FEATURES ===================== */
.features { padding-bottom: 80px; }
.features-panel {
  background: var(--grey-1);
  padding: 95px 280px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 350px);
  gap: 40px;
  justify-content: center;
}
.feature-card {
  background: var(--white);
  width: 350px;
  height: 280px;
  padding: 50px 27px 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  box-sizing: border-box;
}
.feature-card h4 {
  font-size: 30px;
  letter-spacing: -0.9px;
  font-weight: 400;
}
.feature-card p {
  font-size: 14px;
  line-height: 22.4px;
  color: var(--grey-3);
}

/* ===================== FOR WHOM ===================== */
.for-whom { padding: 80px 0; }
.for-whom-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 840px;
  margin: 0 auto 70px;
}
.for-whom-head .section-headline { font-size: 64px; }
.for-whom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px 50px;
}
.for-whom-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.for-whom-icon { width: 60px; height: 60px; }
.for-whom-card h4 {
  font-size: 32px;
  letter-spacing: -1.08px;
  font-weight: 400;
  line-height: 1.1;
}
.for-whom-card p {
  font-size: 16px;
  line-height: 22px;
  color: var(--grey-3);
}

/* ===================== CTA + FOOTER ===================== */
.cta-section {
  background: var(--purple);
  padding-top: 100px;
}
.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 23px;
  padding-bottom: 100px;
}
.cta-title {
  color: var(--white);
  font-size: 64px;
  letter-spacing: -1.92px;
  font-weight: 400;
}
.cta-sub {
  color: var(--purple-pale);
  font-size: 24px;
  letter-spacing: -0.72px;
  max-width: 600px;
}
.cta-buttons {
  display: flex;
  gap: 20px;
  margin-top: 37px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer {
  background: var(--grey);
  padding: 40px 0 30px;
  width: auto;
  max-width: none;
  margin: 0 var(--side-pad);
  box-sizing: border-box;
}
.site-footer .container {
  padding-left: var(--footer-side-pad);
  padding-right: var(--footer-side-pad);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 80px;
}
.footer-columns {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 150px;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.6px;
  color: var(--grey-3);
  margin-bottom: 12px;
}
.footer-col a {
  font-size: 16px;
}
.footer-col a:hover { color: var(--purple); }
.footer-copyright {
  font-size: 15px;
  color: var(--grey-3);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
  .section-intro { flex-direction: column; gap: 28px; padding: 60px 0 40px; }
  .section-headline { font-size: 48px; text-align: center; }
  .section-intro-side { align-items: center; text-align: center; max-width: 100%; }
  .hero h1 { font-size: 64px; letter-spacing: -1.9px; }
  .for-whom-grid { grid-template-columns: repeat(2, 1fr); }
  .features-panel { padding: 70px 60px 40px; }
  .feature-grid { grid-template-columns: repeat(2, 350px); }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }

  .mobile-nav-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
  }
  .mobile-nav-wrap.is-open { grid-template-rows: 1fr; }
  .mobile-nav-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 var(--header-side-pad);
  }
  .mobile-nav-wrap.is-open .mobile-nav-inner {
    padding-top: 48px;
    padding-bottom: 24px;
  }
  .mobile-nav-inner .nav-links {
    flex-direction: column;
    background: none;
    padding: 0;
    gap: 16px;
  }
  .mobile-nav-inner .nav-links a { font-size: 16px; color: #fff; }
  .mobile-nav-inner .nav-links a:hover { color: var(--purple); }
  .mobile-nav-inner .nav-mobile-cta { display: inline-flex; align-self: flex-start; }

  .hero { padding: 30px 0 60px; }
  .hero h1 { font-size: 44px; letter-spacing: -1.3px; }
  .hero-sub { font-size: 15px; }
  .hero-sub br { display: none; }
  .dot-field-wrap { margin-top: 56px; }

  .section-headline { font-size: 36px; letter-spacing: -1px; }
  .story-step-head h3 { font-size: 40px; }
  .story-step-head p { font-size: 18px; }
  .story-step { padding: 56px 0; }

  .for-whom-grid { grid-template-columns: 1fr; gap: 40px; }
  .for-whom-head .section-headline { font-size: 36px; }

  .features-panel { padding: 50px 20px 32px; gap: 32px; }
  .feature-grid { grid-template-columns: 1fr; gap: 20px; width: 100%; }
  .feature-card { width: 100%; height: auto; min-height: 220px; padding: 32px 24px 24px; }

  .cta-title { font-size: 40px; }
  .cta-sub { font-size: 18px; }

  .footer-inner { flex-direction: column; }
  .footer-columns { gap: 40px; }
}

@media (max-width: 540px) {
  :root { --side-pad: 16px; }
  .hero h1 { font-size: 34px; }
  .node-card, .tree-node { width: 100%; max-width: 260px; }
  .hierarchy-row { flex-direction: column; }
  .hierarchy-arrow { transform: rotate(90deg); }
  .overrun-compare { flex-direction: column; }
  .overrun-arrow { transform: rotate(90deg); }
  .money-pill { padding: 16px 18px; gap: 16px 10px; }
  .cta-buttons { flex-direction: column; width: 100%; }
  .cta-buttons .btn { width: 100%; }
}
