/* Barrix. Layout, motion and density follow values measured off the reference
   (header 64px / blur 12px, reveal 600ms cubic-bezier(.22,1,.36,1) + 12px, 80ms stagger,
   hover 400-500ms, section padding clamp(96px,11vw,160px), 1200px container).
   Colours: tokens.css only. No literals here. */

:root {
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --tap: 44px;

  --font-display: 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: 'Segoe UI Variable Text', 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 600ms;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(96px, 11vw, 160px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 168px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
time { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: var(--gold-dim); color: var(--text-1); }

/* ---------- Type (max five per screen) ---------- */
.t-hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.t-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.t-body { font-size: 16px; line-height: 1.55; color: var(--text-2); }
.t-lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.t-small { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.t-label {
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.t-num { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dash { color: var(--text-3); }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 400ms var(--ease), border-color 400ms var(--ease), color 400ms var(--ease);
}
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--gold-hover); }
.btn-secondary { border: 1px solid var(--line-strong); color: var(--text-1); }
.btn-secondary:hover { border-color: var(--text-3); }

.link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text-1);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 400ms var(--ease);
}
.link:hover { text-decoration-color: var(--text-1); }

.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 500ms var(--ease);
}
.card:hover { border-color: var(--line-strong); }

.pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.pill--stated { color: var(--gold); border-color: var(--gold-mid); }
.pill--unconfirmed { color: var(--gold-mid); }

/* ---------- Motion: opacity + 12px, once ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: 0ms;
}
.js .reveal.d1 { transition-delay: 80ms; }
.js .reveal.d2 { transition-delay: 160ms; }
.js .reveal.d3 { transition-delay: 240ms; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

/* ---------- Header + address bar (one sticky block, always visible) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 500ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  color: var(--text-1);
}
.brand-mark { flex: none; height: 28px; width: auto; }
.brand-word { font-family: var(--font-display); font-size: 18px; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.brand-word b { font-weight: 700; }

.site-nav { display: flex; gap: 12px; margin-left: auto; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 400ms var(--ease);
}
.site-nav a:hover { color: var(--text-1); }

.social { display: flex; flex: none; gap: 4px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  border-radius: var(--r-md);
  color: var(--text-1);
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}
a.social-btn:hover { background: var(--line); }
.social-btn:disabled { color: var(--text-3); }

.ca-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-1) 90%, transparent);
}
.ca-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 64px;
}
.ca-label { white-space: nowrap; }
.ca-value {
  font-size: clamp(15px, 2.1vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-1);
  overflow-wrap: anywhere;
  word-break: break-all;
  min-width: 0;
}
.ca-value--empty { color: var(--text-2); word-break: normal; font-family: var(--font-body); font-weight: 500; }
.ca-date { color: var(--text-3); white-space: nowrap; }
.ca-copy {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 400ms var(--ease), border-color 400ms var(--ease), color 400ms var(--ease);
}
.ca-copy:disabled { color: var(--text-3); border-color: var(--line); }
.ca-bar[data-ca-state="stated"] .ca-copy { border-color: var(--gold-mid); color: var(--gold); }
.ca-bar[data-ca-state="stated"] .ca-copy:hover { border-color: var(--gold); }
.ca-copy[data-copied] { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.ca-feedback {
  position: absolute;
  width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
}

@media (max-width: 720px) {
  html { scroll-padding-top: 208px; }
  .site-nav { display: none; }
  .social { margin-left: auto; }
  .header-inner { gap: 16px; }
  .ca-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .ca-label { grid-column: 1 / -1; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(600px, 88svh, 900px);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}
.hero-scene { position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.hero-img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: clamp(300px, 34vw, 520px);
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, var(--bg) 38%);
  mask-image: linear-gradient(to bottom, transparent 0%, var(--bg) 38%);
}
.hero-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 32%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(300px, 21vw, 320px);
}
.hero-eyebrow { margin-bottom: 24px; }
.hero .t-hero { max-width: 9em; }
.hero-sub { max-width: 28em; margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

@media (max-width: 720px) {
  .hero { min-height: 0; }
  .hero-eyebrow { margin-bottom: 20px; }
  .hero-sub { margin-top: 20px; }
  .hero-actions { margin-top: 32px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Sections ---------- */
.section { padding-top: var(--section); padding-bottom: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.section-tight { padding-top: 0; padding-bottom: calc(var(--section) * 0.85); border-top: 0 !important; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .t-h2, .desk-copy .t-h2, .security .t-h2 { margin-top: 16px; }
.section-intro { margin-top: 20px; max-width: 30em; }
.footnote { color: var(--text-2); max-width: 34em; }
.svg-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }

/* ---------- Panes ---------- */
.panes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pane { display: flex; flex-direction: column; overflow: hidden; }
.payoff { border-bottom: 1px solid var(--line); padding: 20px 20px 12px; background: var(--surface-1); }
.payoff svg { width: 100%; height: auto; aspect-ratio: 320 / 180; }
.zone { fill: var(--line); }
.rule { stroke-width: 1; }
.rule--top { stroke: var(--gold); stroke-dasharray: 3 4; stroke-opacity: 0.9; }
.rule--mid { stroke: var(--line); }
.rule--base { stroke: var(--text-2); }
.stem { stroke: var(--text-3); stroke-width: 1; stroke-opacity: 0.5; }
.tick--stated { fill: var(--gold); }
.tick--absent { fill: none; stroke: var(--text-2); stroke-width: 1.5; }
.tick--unconfirmed { fill: none; stroke: var(--gold-mid); stroke-width: 1.5; }
.is-dim { opacity: 0.28; }
.lbl--stated { fill: var(--gold); }
.lbl--absent { fill: var(--text-2); }
.pane-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.pane-num {
  font-size: clamp(36px, 3.4vw, 48px);
  line-height: 1;
  color: var(--text-1);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pane-num .mono { font-weight: 500; }
.pane-unit { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.pane-unit .mono { font-size: 14px; }
.panes + .footnote { margin-top: 24px; }

@media (max-width: 960px) { .panes { grid-template-columns: 1fr; max-width: 560px; } }

/* ---------- Lists ---------- */
.legs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.leg { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.leg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.leg-name { letter-spacing: 0.04em; font-size: 24px; }
.leg-for { color: var(--text-1); margin-top: -6px; }
.leg-copy { max-width: 24em; }
.leg-facts {
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.leg-facts div { padding: 16px 12px 0 0; min-width: 0; }
.leg-facts dt {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 500;
}
.leg-facts dd { margin: 8px 0 0; font-size: 14px; color: var(--text-1); overflow-wrap: anywhere; }
.leg-facts time { color: var(--text-3); font-size: 12px; }

@media (max-width: 800px) {
  .legs { grid-template-columns: 1fr; }
  .leg { padding: 28px 24px; }
  .leg-facts dd { font-size: 13px; }
}
@media (max-width: 600px) { .leg-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Market ---------- */
.desk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.desk-copy .link { margin-top: 20px; }
.stats { margin: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.stat-value {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 500;
  line-height: 1;
  color: var(--text-1);
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: flex-end;
}
.stat-unit { font-size: 14px; color: var(--text-3); }
.desk-foot { grid-column: 2; margin-top: -8px; }

@media (max-width: 880px) {
  .desk { grid-template-columns: 1fr; }
  .desk-foot { grid-column: 1; margin-top: 0; }
}

/* ---------- Chain cards ---------- */
.cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mini { padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 14px; }
.mini .t-h3 { font-size: 20px; margin-top: 8px; overflow-wrap: anywhere; }
.mini .t-h3--host { font-size: 15px; line-height: 1.35; }
.mini .pill { margin-top: auto; }
.card-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: var(--tap);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
}

@media (max-width: 1080px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards-4 { grid-template-columns: 1fr; } }

/* ---------- Checks ---------- */
.security { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.sec-list { border-top: 1px solid var(--line); }
.sec-list li {
  display: grid;
  grid-template-columns: 32px 176px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.sec-idx { font-size: 12px; color: var(--text-2); }
.sec-name { font-weight: 600; color: var(--text-1); }

@media (max-width: 880px) { .security { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .sec-list li { grid-template-columns: 32px minmax(0, 1fr); }
  .sec-list li .t-body { grid-column: 2; }
}

/* ---------- Channels ---------- */
.section-tight#channels { padding-top: calc(var(--section) * 0.55); }
.programme-head { margin-bottom: clamp(32px, 4vw, 48px); }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 880px) { .cards-3 { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-1); }
.footer-brand .brand-mark { height: 24px; }
.footer-brand .brand-word { font-size: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-self: end; font-size: 14px; font-weight: 500; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 8px;
  color: var(--text-2);
  transition: color 400ms var(--ease);
}
.footer-links a:hover { color: var(--text-1); }
.footer-rule { grid-column: 1 / -1; width: 100%; height: 1px; margin: 16px 0 0; border: 0; background: var(--line); }
.footer-risk { grid-column: 1 / -1; max-width: 42em; }
.footer-copy { grid-column: 1 / -1; color: var(--text-2); }

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; align-items: start; }
  .footer-links { justify-self: start; }
}

.hide-sm { display: inline; }
@media (max-width: 720px) { .hide-sm { display: none; } }

/* ---------- Reduced motion (keep last) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
