/* ScaleBase — main stylesheet
   Palette: deep blue-black slabs + pale (hazed) blue accent
   Type: IBM Plex Sans Condensed (display) / IBM Plex Sans (body) / IBM Plex Mono (data & labels)
*/

:root {
  --ink: #070a0e;
  --slab: #0c1117;
  --slab-2: #111922;
  --rule: #1c2732;
  --rule-hi: #2b3a49;
  --paper: #e4ebf1;
  --mute: #7c8d9c;
  --haze: #9cc2d8;
  --haze-dim: #5d7e96;
  --haze-wash: rgba(156, 194, 216, 0.10);
  --warn: #d8a76b;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 2px;

  --f-display: "IBM Plex Sans Condensed", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

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

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  /* ambient haze behind the top of every page */
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  background: radial-gradient(60% 60% at 50% 0%, rgba(93, 126, 150, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }

a { color: var(--haze); text-decoration: none; }
a:hover { color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--haze);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
  position: relative;
  z-index: 1;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--haze);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 100;
  font-family: var(--f-mono);
  font-size: 12px;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(38px, 6.2vw, 74px); }
h2 { font-size: clamp(27px, 3.6vw, 42px); }
h3 { font-size: clamp(19px, 1.6vw, 22px); letter-spacing: -0.005em; line-height: 1.25; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  color: #b9c7d3;
  line-height: 1.55;
  max-width: 62ch;
}

.muted { color: var(--mute); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--haze-dim);
  white-space: nowrap;
}

.mono { font-family: var(--f-mono); }

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

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 10, 14, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand:hover { color: var(--paper); }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand em {
  font-style: normal;
  color: var(--haze);
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  display: block;
  padding: 8px 12px;
  color: #b9c7d3;
  font-size: 14.5px;
  border-radius: var(--r);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--paper); background: rgba(156, 194, 216, 0.07); }
.nav a[aria-current="page"] { color: var(--haze); }

.lang {
  display: flex;
  border: 1px solid var(--rule-hi);
  border-radius: var(--r);
  overflow: hidden;
  flex: none;
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mute);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 7px 10px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang button:hover { color: var(--paper); }
.lang button[aria-pressed="true"] {
  background: var(--haze);
  color: var(--ink);
}

.burger {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule-hi);
  border-radius: var(--r);
  width: 38px;
  height: 34px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.burger span, .burger::before, .burger::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1px;
  background: var(--paper);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.burger::before { top: 12px; }
.burger span { top: 16.5px; }
.burger::after { top: 21px; }
.burger[aria-expanded="true"]::before { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span { opacity: 0; }
.burger[aria-expanded="true"]::after { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- sections ---------- */

.sec { padding-block: clamp(56px, 8vw, 104px); }
.sec + .sec { border-top: 1px solid var(--rule); }
.sec-dark { background: var(--slab); }

.sec-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
}
.sec-head .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--rule-hi), transparent);
}

.sec-title { max-width: 30ch; margin-bottom: 18px; }

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

.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 5vw, 64px); }

.hero h1 { margin-bottom: 22px; max-width: 16ch; }
.hero h1 .hl { color: var(--haze); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: end;
}

.hero-side {
  border-left: 1px solid var(--rule);
  padding-left: clamp(18px, 2.5vw, 30px);
}

.hero-side dl { margin: 0; display: grid; gap: 18px; }
.hero-side dt {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 3px;
}
.hero-side dd {
  margin: 0;
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--paper);
}

/* signature element: allocation band */

.band-block { margin-top: clamp(38px, 6vw, 66px); }

.band {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 116px;
  padding: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 14px;
  overflow: hidden;
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 7px);
  background-position: bottom;
  background-repeat: repeat-x;
  background-size: 100% 60%;
}
.band.ready { background-image: none; }

.tick {
  flex: 1 1 auto;
  min-width: 2px;
  background: #1a242e;
  border-radius: 1px 1px 0 0;
  transition: background 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.tick.parity { background: #223140; }
.tick.hot {
  background: var(--haze);
  box-shadow: 0 0 14px rgba(156, 194, 216, 0.45);
}
.tick.warm { background: var(--haze-dim); }

.band-read {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-transform: uppercase;
}
.band-read .live { color: var(--haze); }
.band-read .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--haze);
  margin-right: 7px;
  vertical-align: 1px;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: var(--r);
  border: 1px solid var(--haze);
  background: var(--haze);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { background: #b6d5e6; border-color: #b6d5e6; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--rule-hi);
}
.btn-ghost:hover { background: rgba(156, 194, 216, 0.08); border-color: var(--haze-dim); color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.arrow-link {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.arrow-link::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- grids & cards ---------- */

.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cell {
  background: var(--ink);
  padding: clamp(22px, 2.6vw, 32px);
  transition: background 0.3s var(--ease);
}
.sec-dark .cell { background: var(--slab); }
.cell:hover { background: var(--slab-2); }

.cell h3 { margin-bottom: 10px; }
.cell p { color: var(--mute); font-size: 15px; }

.cell-mark {
  display: block;
  width: 26px; height: 26px;
  margin-bottom: 18px;
  color: var(--haze);
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}
.cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
.stat { background: var(--ink); padding: clamp(20px, 2.4vw, 28px); }
.sec-dark .stat { background: var(--slab); }
.stat b {
  display: block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.03em;
  color: var(--haze);
  line-height: 1;
  margin-bottom: 10px;
}
.stat span {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  display: block;
}

/* ---------- list styles ---------- */

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li {
  position: relative;
  padding-left: 26px;
  color: #b9c7d3;
  font-size: 15.5px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 12px; height: 1px;
  background: var(--haze);
}

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.spec th, .spec td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.spec th {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--haze-dim);
  width: 34%;
}
.spec td { color: #b9c7d3; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

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

.track { list-style: none; margin: 0; padding: 0; }
.track li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.track li:last-child { border-bottom: 1px solid var(--rule); }
.track .yr {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--haze);
  padding-top: 3px;
}
.track h3 { margin-bottom: 8px; }
.track p { color: var(--mute); font-size: 15px; max-width: 68ch; }

/* ---------- diagram ---------- */

.figure {
  border: 1px solid var(--rule);
  background: var(--slab);
  padding: clamp(18px, 3vw, 32px);
}
.figure svg { width: 100%; height: auto; }
.figure figcaption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-transform: uppercase;
}
.dg-label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; fill: var(--mute); text-transform: uppercase; }
.dg-title { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; fill: var(--haze); text-transform: uppercase; }
.dg-box { fill: var(--slab-2); stroke: var(--rule-hi); }
.dg-box-a { fill: rgba(156, 194, 216, 0.10); stroke: var(--haze-dim); }
.dg-line { stroke: var(--rule-hi); fill: none; }
.dg-line-a { stroke: var(--haze-dim); fill: none; }

/* ---------- notice / callout ---------- */

.callout {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--haze);
  background: var(--slab);
  padding: 22px 26px;
  font-size: 15px;
  color: #b9c7d3;
}

/* ---------- form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haze-dim);
  margin-bottom: 8px;
}
label .req { color: var(--haze); }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  background: var(--slab);
  border: 1px solid var(--rule-hi);
  border-radius: var(--r);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235d7e96' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--haze);
  background: var(--slab-2);
}
input::placeholder, textarea::placeholder { color: #5b6b78; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--mute);
  line-height: 1.5;
}
.check input {
  appearance: none;
  flex: none;
  width: 17px; height: 17px;
  margin-top: 2px;
  border: 1px solid var(--rule-hi);
  border-radius: var(--r);
  background: var(--slab);
  cursor: pointer;
  position: relative;
}
.check input:checked { background: var(--haze); border-color: var(--haze); }
.check input:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 4px; height: 9px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.err {
  display: none;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--warn);
  margin-top: 7px;
}
.field.invalid .err { display: block; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--warn); }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.form-note {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-transform: uppercase;
}

.sending { display: none; }
.is-sending .sending { display: inline-flex; }
.is-sending .idle { display: none; }

.spinner {
  width: 12px; height: 12px;
  border: 1.5px solid rgba(7, 10, 14, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sent {
  border: 1px solid var(--haze-dim);
  background: linear-gradient(180deg, rgba(156, 194, 216, 0.08), transparent);
  padding: clamp(24px, 3vw, 36px);
}
.sent h3 { margin-bottom: 12px; }
.sent .ref {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--haze);
  border: 1px dashed var(--haze-dim);
  padding: 12px 16px;
  margin: 20px 0;
  display: inline-block;
}

.side-block { border-top: 1px solid var(--rule); padding-top: 22px; margin-bottom: 30px; }
.side-block:first-child { border-top: 0; padding-top: 0; }
.side-block h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haze-dim);
  font-weight: 500;
  margin-bottom: 12px;
}
.side-block p, .side-block li { color: var(--mute); font-size: 14.5px; }
.side-block ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }

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

.cta {
  border: 1px solid var(--rule);
  background: var(--slab);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.cta h2 { max-width: 20ch; }
.cta p { color: var(--mute); margin-top: 10px; max-width: 46ch; }

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

.foot {
  border-top: 1px solid var(--rule);
  background: var(--slab);
  padding-block: clamp(40px, 5vw, 64px) 28px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
}
.foot h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--haze-dim);
  font-weight: 500;
  margin: 0 0 14px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot ul a, .foot address a { color: var(--mute); font-size: 14.5px; }
.foot ul a:hover, .foot address a:hover { color: var(--paper); }
.foot address { font-style: normal; color: var(--mute); font-size: 14.5px; line-height: 1.7; }
.foot-brand p { color: var(--mute); font-size: 14.5px; max-width: 34ch; margin-top: 14px; }
.foot-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  justify-content: space-between;
  padding-top: 22px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #5b6b78;
  text-transform: uppercase;
}

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

.rv { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.rv.in { opacity: 1; transform: none; }

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

@media (max-width: 960px) {
  .hero-grid, .cols, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-side { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 24px; }
  .hero-side dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .burger { display: block; order: 3; }
  .lang { order: 2; }
  .nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--slab);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--pad) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav a:hover { background: transparent; }
}

@media (max-width: 620px) {
  .grid-3, .grid-2, .field-row, .cols-even { grid-template-columns: minmax(0, 1fr); }
  .hero-side dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .band { height: 88px; }
  .spec th { width: 42%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rv { opacity: 1; transform: none; }
}

/* ---------- page heads ---------- */

.hero .eyebrow,
.page-head .eyebrow { display: block; margin-bottom: 18px; }

.page-head { padding-block: clamp(44px, 6vw, 84px) clamp(28px, 4vw, 44px); }
.page-head h1 { margin-bottom: 22px; max-width: 18ch; }

.sending { align-items: center; }

.check-field .err { margin-left: 29px; }

a.cell { color: inherit; display: block; }
a.cell:hover { color: inherit; }
a.cell:hover h3 { color: var(--haze); }
