/* ============================================================
   HOW WE BUILD (/how-we-build/)
   The method page. One route across the top, nine stops down the
   left rail, three cream sheets, a checklist that ticks itself,
   one table. Everything else comes from styles.css.
   ============================================================ */

.page-build main { padding-top: 0; }
.page-build section { position: relative; }
.page-build [id] { scroll-margin-top: 128px; }

.bld-eyebrow { display: inline-flex; flex-wrap: wrap; gap: 6px 0; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text); }
.bld-eyebrow span:not(:last-child)::after { content: "\00B7"; margin-inline: 10px; opacity: 0.6; }
.bld-h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); font-weight: 640; font-stretch: 112%; line-height: 1.02; letter-spacing: -0.03em; }
.bld-lede { color: var(--muted); max-width: 60ch; margin-top: 14px; font-size: 1.05rem; }
.bld-lede a, .bld-note a { color: var(--electric); }
.bld-note { color: var(--muted); font-size: 0.9rem; max-width: 66ch; }
.bld-head { margin-bottom: clamp(32px, 5vh, 56px); }
.bld-cta { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.bld-section { padding-block: clamp(72px, 11vh, 140px); }
.bld-section + .bld-section { border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ============ HERO + THE ROUTE ============ */
.bld-hero { padding-top: clamp(130px, 20vh, 200px); padding-bottom: clamp(56px, 9vh, 110px); overflow: clip; }
.bld-hero .glow-hero { left: -24vw; bottom: -30vw; }
.bld-hero .container { position: relative; z-index: 1; }
.bld-hero h1 { margin-top: 18px; font-size: clamp(2.6rem, 6.4vw, 5.8rem); font-weight: 700; font-stretch: 108%; line-height: 0.98; letter-spacing: -0.035em; max-width: 15ch; }
.bld-dek { margin-top: 22px; color: var(--muted); max-width: 58ch; font-size: clamp(1.02rem, 1.4vw, 1.2rem); }
.bld-hero .bld-cta { margin-top: clamp(22px, 3.6vh, 36px); }

.route { margin-top: clamp(56px, 9vh, 110px); }
.route-phases {
  list-style: none; display: grid; grid-template-columns: var(--spans, 2fr 3fr 2fr 2fr); gap: 0 12px;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text);
}
.route-phases li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.route-stops { list-style: none; position: relative; display: grid; grid-template-columns: repeat(9, 1fr); padding-top: 24px; }
.route-line { position: absolute; left: calc(100% / 18); right: calc(100% / 18); top: 30px; height: 2px; background: rgba(238, 240, 248, 0.1); border-radius: 2px; }
.route-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--cobalt), var(--electric)); box-shadow: 0 0 12px rgba(77, 107, 255, 0.6); transform: scaleX(0); transform-origin: left; }
html:not(.motion) .route-fill { transform: none; }
.route-stops a { display: grid; justify-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; line-height: 1.25; text-align: center; padding-inline: 4px; transition: color 0.3s var(--ease-out); }
.route-stops i {
  width: 14px; height: 14px; border-radius: 999px; position: relative; z-index: 1;
  background: var(--bg-3); border: 2px solid rgba(238, 240, 248, 0.25);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.3s var(--ease-out);
}
.route-stops a:hover { color: var(--ink); }
.route-stops a:hover i { border-color: var(--electric); transform: scale(1.15); }
.route-stops li.is-lit i, html:not(.motion) .route-stops i { background: var(--electric); border-color: var(--electric); box-shadow: 0 0 14px rgba(77, 107, 255, 0.7); }

/* ============ PAGE TABS (desktop) ============ */
.bld-tabs {
  position: sticky; top: 72px; z-index: 40; display: none;
  background: rgba(5, 6, 10, 0.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.bld-tabs ul { list-style: none; display: flex; gap: clamp(18px, 3vw, 36px); height: 46px; align-items: stretch; }
.bld-tabs a { position: relative; display: inline-flex; align-items: center; color: var(--muted); font-size: 0.86rem; transition: color 0.3s var(--ease-out); }
.bld-tabs a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--electric); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease-io); }
.bld-tabs a:hover { color: var(--ink); }
.bld-tabs a.is-current { color: var(--ink); }
.bld-tabs a.is-current::after { transform: none; }
@media (min-width: 900px) { .bld-tabs { display: block; } }

/* ============ TIER PICK ============ */
.tier-pick { border: 0; padding: 0; margin-bottom: clamp(28px, 4vh, 44px); }
.tier-pick legend { font-size: 0.95rem; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 12px; }
.tier-pick .pill-row { gap: 8px; }
.tier-pick .pill { padding: 8px 16px; font-size: 0.9rem; }

/* ============ THE NINE STOPS ============ */
.stops { --rail: clamp(44px, 5vw, 72px); list-style: none; position: relative; padding-left: var(--rail); }
.stops-spine { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: rgba(238, 240, 248, 0.1); border-radius: 2px; }
.stops-fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--cobalt), var(--electric)); box-shadow: 0 0 12px rgba(77, 107, 255, 0.5); transform: scaleY(0); transform-origin: top; }
html:not(.motion) .stops-fill { transform: none; }
.stop-group { list-style: none; }
.stop-group + .stop-group { margin-top: clamp(32px, 5vh, 56px); }
.stops-phase { position: relative; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text); font-weight: 600; margin-bottom: 16px; line-height: 1.6; }
.stops-phase::before {
  content: ""; position: absolute; left: calc(-1 * var(--rail) + 2px); top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 3px; background: var(--electric); transform: rotate(45deg); box-shadow: 0 0 14px rgba(77, 107, 255, 0.6);
}
.stop-list { list-style: none; display: grid; gap: clamp(16px, 2.4vh, 24px); }
.stop { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(20px, 2.6vw, 32px); }
.stop::before {
  content: ""; position: absolute; left: calc(-1 * var(--rail) + 1px); top: clamp(28px, 3vw, 40px); width: 14px; height: 14px;
  border-radius: 999px; background: var(--bg-3); border: 2px solid rgba(238, 240, 248, 0.25);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.stop.is-lit::before, html:not(.motion) .stop::before { background: var(--electric); border-color: var(--electric); box-shadow: 0 0 18px rgba(77, 107, 255, 0.7); }
.stop-head { display: flex; align-items: baseline; gap: 12px 18px; flex-wrap: wrap; }
.stop-num { font-size: 0.76rem; letter-spacing: 0.18em; color: var(--electric-text); font-variant-numeric: tabular-nums; }
.stop-name { font-size: clamp(1.3rem, 1.8vw, 1.7rem); font-weight: 660; font-stretch: 112%; letter-spacing: -0.015em; }
.stop-range { margin-left: auto; display: inline-flex; align-items: baseline; gap: 10px; font-size: 0.9rem; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.stop-range[data-long] { border-radius: 14px; }
.stop-range-tier { color: var(--electric-text); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.stop-range-val { color: var(--ink); font-weight: 560; transition: opacity 0.2s var(--ease-out); }
.stop-range-val.is-swapping, .stop-range-tier.is-swapping, .stops-sum span.is-swapping { opacity: 0; }
.stop-cols { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: clamp(18px, 2.4vw, 40px); margin-top: clamp(18px, 2.4vh, 26px); padding-top: clamp(16px, 2vh, 22px); border-top: 1px solid var(--line); }
.stop-col-label { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.stop-cols p { color: var(--muted); font-size: 0.95rem; }
.stop-cols > div:first-child p { color: var(--ink); }
.stops-total { margin-top: clamp(32px, 5vh, 56px); padding-left: var(--rail, clamp(44px, 5vw, 72px)); }
.stops-sum { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 640; font-stretch: 110%; letter-spacing: -0.01em; }
.stops-sum span { transition: opacity 0.2s var(--ease-out); }
.stops-total .bld-note { margin-top: 12px; }

/* ============ THE PAPERS ============ */
.papers { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: stretch; }
.paper-card { display: grid; grid-template-rows: 1fr auto; gap: 20px; }
.paper { margin: 0; perspective: 1200px; }
.paper-sheet {
  position: relative; height: 100%; min-height: 320px;
  background: #FAF6EF; color: #1F1C18; border-radius: 6px; padding: clamp(18px, 2vw, 26px); overflow: clip;
  font-size: 0.8rem; line-height: 1.5;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.paper-card:hover .paper-sheet { transform: translateY(-8px) rotateX(2deg); box-shadow: 0 44px 90px rgba(0, 0, 0, 0.6), 0 0 70px rgba(31, 78, 255, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.paper-sheet::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(to bottom, rgba(250, 246, 239, 0), #FAF6EF); pointer-events: none; }
.paper-brand { display: flex; justify-content: space-between; gap: 12px; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cobalt); font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid rgba(31, 28, 24, 0.18); margin-bottom: 10px; }
.paper-brand span:last-child { color: #7a736a; font-weight: 600; }
.paper-line { padding-block: 7px; border-bottom: 1px solid rgba(31, 28, 24, 0.08); color: #3f3a33; }
.paper-line.paper-title { font-weight: 660; color: #1F1C18; font-size: 0.92rem; line-height: 1.35; }
.paper-meta h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); font-weight: 660; font-stretch: 112%; letter-spacing: -0.01em; }
.paper-meta dl { margin-top: 12px; display: grid; gap: 10px; }
.paper-meta dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.paper-meta dd { font-size: 0.95rem; color: var(--muted); margin-top: 3px; }
.paper-meta dd:first-of-type { color: var(--ink); }

/* ============ EVERY SITE ============ */
.standards { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.8vw, 24px); }
.standard { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(20px, 2.2vw, 28px); }
.standard-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(77, 107, 255, 0.1); color: var(--electric); margin-bottom: 18px; }
.standard-icon svg { width: 22px; height: 22px; }
.standard h3 { font-size: 1.05rem; font-weight: 640; font-stretch: 110%; }
.standard p { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }

/* ============ THE LAUNCH CHECKLIST ============ */
.checks-wrap { display: grid; grid-template-columns: 1fr 240px; gap: clamp(32px, 5vw, 80px); align-items: start; }
.checks { list-style: none; }
.check { display: flex; gap: 16px; align-items: flex-start; padding-block: 16px; border-top: 1px solid var(--line); }
.check:last-child { border-bottom: 1px solid var(--line); }
.check-box {
  flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 6px; display: grid; place-items: center;
  border: 1.5px solid rgba(238, 240, 248, 0.3);
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.check-box svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.check-box path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.45s var(--ease-out) 0.1s; }
.check-text { color: var(--muted); transition: color 0.35s var(--ease-out); }
.check.is-done .check-box, html:not(.motion) .check-box { background: var(--cobalt); border-color: var(--electric); box-shadow: 0 0 18px rgba(31, 78, 255, 0.45); }
.check.is-done .check-box path, html:not(.motion) .check-box path { stroke-dashoffset: 0; }
.check.is-done .check-text, html:not(.motion) .check-text { color: var(--ink); }
.checks-count { position: sticky; top: 140px; line-height: 1.1; }
.checks-count strong { display: block; font-size: clamp(3.4rem, 7vw, 6rem); font-weight: 720; font-stretch: 116%; letter-spacing: -0.03em; color: var(--electric); font-variant-numeric: tabular-nums; line-height: 1; }
.checks-count span { display: block; color: var(--muted); font-size: 1rem; margin-top: 10px; max-width: 18ch; }

/* ============ THE TIERS ============ */
.tiers-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tiers-table th, .tiers-table td { text-align: left; vertical-align: top; padding: 16px 18px; border-top: 1px solid var(--line); }
.tiers-table thead th {
  position: sticky; top: 118px; z-index: 2; background: var(--bg);
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--electric-text); font-weight: 600;
  border-top: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px;
  transition: color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.tiers-table tbody th { color: var(--ink); font-weight: 600; width: 20%; }
.tiers-table td { color: var(--muted); width: 26.6%; transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out); }
.tiers-table tbody tr:last-child th, .tiers-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }
html[data-tier="foundation"] .tiers-table td[data-col="foundation"],
html[data-tier="growth"] .tiers-table td[data-col="growth"],
html[data-tier="partner"] .tiers-table td[data-col="partner"] { background: rgba(77, 107, 255, 0.08); color: var(--ink); }
html[data-tier="foundation"] .tiers-table th[data-col="foundation"],
html[data-tier="growth"] .tiers-table th[data-col="growth"],
html[data-tier="partner"] .tiers-table th[data-col="partner"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--electric); }
.tiers-note { margin-top: clamp(20px, 3vh, 28px); }

/* ============ THE TERMS ============ */
.terms { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px) clamp(32px, 5vw, 80px); }
.term h3 { font-size: 1.15rem; font-weight: 640; font-stretch: 110%; margin-bottom: 10px; }
.term p { color: var(--muted); max-width: 54ch; }

/* ============ CLOSE ============ */
.bld-close { padding-block: clamp(72px, 11vh, 140px); border-top: 1px solid var(--line); }
.bld-close .bld-cta { margin-top: clamp(22px, 3.6vh, 36px); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1199px) {
  .standards { grid-template-columns: repeat(2, 1fr); }
  .checks-wrap { grid-template-columns: 1fr; }
  .checks-count { position: static; display: flex; align-items: baseline; gap: 14px; }
  .checks-count strong { font-size: clamp(2.4rem, 5vw, 3.4rem); }
  .checks-count span { margin-top: 0; max-width: none; }
}
@media (max-width: 899px) {
  .page-build [id] { scroll-margin-top: 84px; }
  .bld-hero { padding-top: clamp(110px, 16vh, 150px); }
  .route-stops a span { display: none; }
  .route-stops a { gap: 0; }
  .route-phases { font-size: 0.62rem; letter-spacing: 0.12em; gap: 0 6px; }
  .stops { --rail: 34px; }
  .stop-cols { grid-template-columns: 1fr; gap: 16px; }
  .stop-range { margin-left: 0; }
  .papers { grid-template-columns: 1fr; }
  .paper-sheet { min-height: 0; }
  .terms { grid-template-columns: 1fr; }
  /* the table becomes one tier at a time, chosen with the pills */
  .tiers-table thead th { position: static; }
  .tiers-table tbody th { width: 34%; }
  .tiers-table td { width: auto; }
  .tiers-table th, .tiers-table td { padding: 14px 12px; }
  html[data-tier="foundation"] .tiers-table [data-col]:not([data-col="foundation"]),
  html[data-tier="growth"] .tiers-table [data-col]:not([data-col="growth"]),
  html[data-tier="partner"] .tiers-table [data-col]:not([data-col="partner"]) { display: none; }
  /* without script the rows stack and every cell names its tier */
  html:not([data-tier]) .tiers-table thead { display: none; }
  html:not([data-tier]) .tiers-table tr, html:not([data-tier]) .tiers-table th, html:not([data-tier]) .tiers-table td { display: block; width: auto; }
  html:not([data-tier]) .tiers-table td { border-top: 0; padding-top: 6px; }
  html:not([data-tier]) .tiers-table td::before { content: attr(data-label) ": "; color: var(--electric-text); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
}
@media (max-width: 599px) {
  .standards { grid-template-columns: 1fr; }
  .stop-head { gap: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .route-fill, .stops-fill { transform: none; }
  .paper-card:hover .paper-sheet { transform: none; }
}


/* ---- The short version, and the collapsible stops ---- */
.bld-short { margin-top: clamp(22px, 3.5vh, 34px); display: grid; gap: 14px; list-style: none; counter-reset: bs; max-width: 900px; }
.bld-short li {
  counter-increment: bs; position: relative; padding: 18px 22px 18px 58px;
  background-color: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-thumb);
  color: var(--muted); font-size: 0.98rem; line-height: 1.6;
}
.bld-short li::before {
  content: counter(bs, decimal-leading-zero); position: absolute; left: 20px; top: 18px;
  color: var(--electric-text); font-size: 0.8rem; letter-spacing: 0.08em; font-weight: 600;
}
.bld-short strong { color: var(--ink); font-weight: 640; }
.bld-short-foot { margin-top: 18px; color: var(--muted); font-size: 0.95rem; max-width: 76ch; }
.bld-hint { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }

/* a stop is closed until asked for: <details> keeps it keyboard-usable and JS-free */
.stop-d > .stop-head { cursor: pointer; list-style: none; display: block; position: relative; padding-right: 34px; }
.stop-d > .stop-head::-webkit-details-marker { display: none; }
.stop-chev {
  position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -6px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.stop-d[open] .stop-chev { transform: rotate(-135deg); margin-top: -2px; border-color: var(--electric); }
.stop-d > .stop-head:hover .stop-chev { border-color: var(--electric); }
.stop-d > .stop-head:focus-visible { outline: 2px solid var(--electric); outline-offset: 4px; border-radius: 6px; }
.stop-d[open] > .stop-head .stop-name { color: var(--ink); }
.stop-d > .stop-cols { padding-top: 4px; }
@media (prefers-reduced-motion: reduce) { .stop-chev { transition: none; } }
