/* ==========================================================================
   H2DPP — h2dpp.deepcloudlabs.com
   Self-contained. No frameworks, no external requests.

   Identity: a dark instrument panel. Hydrogen is a measured, metered,
   certificated commodity, so the page reads like a readout — graticule
   ground, monospace figures, gauges — deliberately unlike passtex's warm
   canvas and unlike deepcloudlabs.com's navy/cyan corporate look.
   ========================================================================== */

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("../fonts/Gilroy-Extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #0a1417;
  --bg-2: #0d1a1e;
  --panel: #101e22;
  --panel-2: #16272c;
  --line: #1e3238;
  --line-soft: #182a2f;

  --aqua: #2fe0bc;
  --aqua-dim: #1d9c84;
  --blue: #38bdf8;
  --green: #4ade80;
  --amber: #f5a524;

  --ink: #e8f1f2;
  --ink-2: #b6c8cc;
  --muted: #8fa3a8;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shell: 1200px;
  --gap-y: clamp(80px, 8.5vw, 132px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --sans: "Gilroy", "Segoe UI", system-ui, -apple-system, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
}

/* ---------------------------------------------------------------- reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

p {
  margin: 0 0 1em;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

dd {
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--aqua);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

a:hover {
  color: var(--blue);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--aqua);
  color: var(--bg);
  font-weight: 700;
  border-radius: 0 0 var(--r) 0;
}

.skip-link:focus {
  left: 0;
  color: var(--bg);
}

/* ---------------------------------------------------------------- layout */

.shell {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
}

.shell-narrow {
  width: min(100% - 48px, 840px);
}

.section {
  padding: var(--gap-y) 0;
}

.section-panel {
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(30px, 3.7vw, 46px);
  margin-bottom: 18px;
  text-wrap: balance;
}

.section-head h2 em {
  font-style: italic;
  color: var(--aqua);
}

.section-lead {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aqua);
}

.col-tag {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.h-sm {
  font-size: 20px;
  margin-bottom: 18px;
}

.note {
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 18px 0;
  transition: padding 0.28s var(--ease), background-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.site-header.is-stuck {
  padding: 10px 0;
  background: rgba(10, 20, 23, 0.82);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 34px rgba(0, 0, 0, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--aqua);
}

.brand:hover {
  color: var(--aqua);
}

.brand-mark {
  width: 30px;
  height: 32px;
}

.brand-word {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-word sub {
  font-size: 0.62em;
  vertical-align: baseline;
}

.brand-word span {
  color: var(--aqua);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav ul a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--aqua);
  transform: scaleX(0);
  transition: transform 0.22s var(--ease);
}

.site-nav ul a:hover,
.site-nav ul a.is-current {
  color: var(--ink);
}

.site-nav ul a:hover::after,
.site-nav ul a.is-current::after {
  transform: scaleX(1);
}

.nav-cta::after {
  display: none;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--aqua);
  transition: transform 0.24s var(--ease);
}

.nav-toggle-bars {
  position: relative;
  margin: 0 auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14.5px;
}

.btn-primary {
  background: var(--aqua);
  border-color: var(--aqua);
  color: #052a24;
  box-shadow: 0 8px 28px rgba(47, 224, 188, 0.24);
}

.btn-primary:hover {
  background: #4defcb;
  border-color: #4defcb;
  color: #052a24;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(140px, 15vw, 192px) 0 var(--gap-y);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/grid.svg") repeat;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 90%;
  background: radial-gradient(
    circle,
    rgba(47, 224, 188, 0.13) 0%,
    rgba(10, 20, 23, 0) 68%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.lead {
  max-width: 36rem;
  margin-bottom: 34px;
  font-size: 18.5px;
  line-height: 1.62;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.hero-badges li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-badges li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(47, 224, 188, 0.15);
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- lists */

.mark-list li {
  position: relative;
  padding: 9px 0 9px 32px;
  font-size: 16px;
  color: var(--ink-2);
}

.mark-list li + li {
  border-top: 1px solid var(--line-soft);
}

.mark-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.14)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%234ADE80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 18px 18px no-repeat;
}

.mark-list-x li::before {
  background: rgba(245, 165, 36, 0.14)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6 6l6 6M12 6l-6 6' fill='none' stroke='%23F5A524' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 18px 18px no-repeat;
}

.mark-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.mark-list-inline li {
  border: 0 !important;
  padding-top: 4px;
  padding-bottom: 4px;
}

.mark-list-inline li::before {
  top: 9px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.split-col {
  padding: 32px 32px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.split-col-warn {
  background: transparent;
  border-style: dashed;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list li {
  padding: 9px 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

/* ---------------------------------------------------------------- LDHU */

.attr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.attr-grid li {
  padding: 26px 24px;
  background: var(--bg-2);
  transition: background-color 0.2s var(--ease);
}

.attr-grid li:hover {
  background: var(--panel);
}

.attr-no {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--aqua);
}

.attr-grid h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.attr-grid p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- ladder */

.ladder {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

/* Vertical rail: a scale you climb, not a row of tabs. */
.ladder-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.rung {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.rung:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.rung-code {
  flex: none;
  width: 34px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--aqua);
}

.rung-name {
  font-size: 15px;
  font-weight: 500;
}

.rung.is-active {
  background: var(--panel-2);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--aqua);
}

.ladder-panels {
  min-height: 340px;
  padding: 34px 34px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.level-panel h3 {
  font-size: clamp(21px, 2.3vw, 28px);
  margin-bottom: 22px;
}

.level-meta {
  display: grid;
  gap: 1px;
  margin-bottom: 26px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}

.level-meta > div {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-2);
}

.level-meta dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.level-meta dd {
  font-size: 15.5px;
  color: var(--ink);
}

/* Assurance / cost read out as gauges — the instrument-panel motif. */
.gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.gauge {
  display: grid;
  gap: 8px;
}

.gauge span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.gauge i {
  display: block;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.gauge i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 0%);
  border-radius: var(--r-pill);
  background: var(--aqua);
  transition: width 0.5s var(--ease);
}

.gauge i.cost::after {
  background: var(--amber);
}

.gauge b {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.level-note {
  margin: 24px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--aqua);
  background: rgba(47, 224, 188, 0.06);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 15px;
  color: var(--ink-2);
}

.level-note-warn {
  border-left-color: var(--amber);
  background: rgba(245, 165, 36, 0.08);
}

.transitions {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------- ledgers */

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.ledger-card {
  position: relative;
  padding: 30px 26px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}

.ledger-card:hover {
  transform: translateY(-4px);
  border-color: var(--aqua-dim);
}

.ledger-ix {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--aqua);
}

.ledger-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.ledger-card p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.invariants {
  margin-top: 40px;
  padding: 28px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* ---------------------------------------------------------------- timeline */

.timeline {
  display: grid;
  border-left: 2px solid var(--line);
  margin-left: 9px;
}

.timeline li {
  position: relative;
  padding: 0 0 34px 34px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
}

.timeline li.is-done::before {
  background: rgba(47, 224, 188, 0.16)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.4l2.7 2.7L14.4 7.4' fill='none' stroke='%232FE0BC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 20px 20px no-repeat;
  border-color: var(--aqua-dim);
}

.timeline li.is-next::before {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 0 5px rgba(245, 165, 36, 0.16);
}

.tl-date {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aqua);
}

.timeline h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.timeline li > p:last-child {
  margin: 0;
  max-width: 62ch;
  font-size: 15.5px;
  color: var(--muted);
}

.tl-note {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------- strip */

.strip {
  padding: 46px 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip-title {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.strip-list li {
  padding: 9px 17px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

/* ---------------------------------------------------------------- paper */

.paper {
  padding: 38px 38px 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--aqua);
  border-radius: var(--r-lg);
}

.paper-venue {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--aqua);
}

.paper h3 {
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.25;
  margin-bottom: 14px;
}

.paper-authors {
  margin: 0 0 20px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.paper-abstract {
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--muted);
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------- faq */

.faq details {
  border-bottom: 1px solid var(--line-soft);
}

.faq details:first-child {
  border-top: 1px solid var(--line-soft);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(47, 224, 188, 0.12)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 6v10M6 11h10' fill='none' stroke='%232FE0BC' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 22px 22px no-repeat;
  transition: transform 0.24s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(135deg);
}

.faq details p {
  margin: 0;
  padding: 0 0 26px;
  max-width: 64ch;
  font-size: 16.5px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- cta */

.cta {
  position: relative;
  padding: var(--gap-y) 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/grid.svg") repeat;
  pointer-events: none;
}

.cta-inner {
  position: relative;
  max-width: 46rem;
}

.cta h2 {
  margin-bottom: 18px;
  font-size: clamp(29px, 3.6vw, 44px);
  text-wrap: balance;
}

.cta p {
  margin-bottom: 32px;
  font-size: 18px;
  color: var(--muted);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 72px 0 30px;
  background: #071013;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-footer {
  margin-bottom: 18px;
}

.footer-note {
  max-width: 32ch;
  margin: 0;
}

.site-footer h3 {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: var(--ink-2);
}

.site-footer a:hover {
  color: var(--aqua);
}

.footer-address {
  max-width: 24ch;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  font-size: 13.5px;
}

.footer-bottom p {
  margin: 0;
}

/* ---------------------------------------------------------------- reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
    max-width: 480px;
  }

  .ladder {
    grid-template-columns: 1fr;
  }

  /* The rail becomes a horizontal scroller above the panel. */
  .ladder-rail {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ladder-rail::-webkit-scrollbar {
    display: none;
  }

  .rung {
    flex: none;
    width: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .rung.is-active {
    box-shadow: inset 0 -3px 0 var(--aqua);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* The nav row needs ~1000px before it clips. */
@media (max-width: 1030px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(100% + 10px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li + li {
    border-top: 1px solid var(--line-soft);
  }

  .site-nav ul a {
    display: block;
    padding: 13px 10px;
    font-size: 16px;
  }

  .site-nav ul a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 10px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .shell,
  .shell-narrow {
    width: min(100% - 32px, var(--shell));
  }

  .site-nav {
    left: 16px;
    right: 16px;
  }

  .split-col,
  .ladder-panels,
  .paper,
  .invariants {
    padding: 24px 22px;
  }

  .level-meta > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero-actions .btn,
  .cta-actions .btn {
    flex: 1 1 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
