:root {
  color-scheme: dark;
  --ink: #070b10;
  --ink-2: #0b111a;
  --panel: rgba(14, 24, 36, 0.78);
  --panel-strong: #101a27;
  --line: rgba(142, 246, 255, 0.22);
  --line-warm: rgba(245, 193, 111, 0.32);
  --text: #f8fbff;
  --muted: #b7c8d8;
  --dim: #7f93a8;
  --cyan: #8ef6ff;
  --cyan-2: #38bdf8;
  --copper: #f5c16f;
  --copper-2: #c76d3a;
  --red: #ff6b6b;
  --green: #8fe6b5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1280px;
  --font-body: "Aptos", "SF Pro Text", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Aptos Display", "SF Pro Display", "Segoe UI Variable Display", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 4%, rgba(56, 189, 248, 0.2), transparent 27rem),
    radial-gradient(circle at 90% 14%, rgba(245, 193, 111, 0.18), transparent 25rem),
    linear-gradient(125deg, #05070a 0%, #0b111a 48%, #08131d 100%);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(142, 246, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 246, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 10px;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: 0.7rem 1rem;
  overflow: visible;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  clip: auto;
  clip-path: none;
  background: var(--ink);
  color: var(--text);
  white-space: normal;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(calc(100% - 32px), var(--max));
  margin: 12px auto 0;
  padding: 0.7rem;
  border: 1px solid rgba(142, 246, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 11, 16, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.header-main-row {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-warm);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(245, 193, 111, 0.18), rgba(56, 189, 248, 0.08));
  overflow: hidden;
  flex: 0 0 auto;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-mark:hover {
  transform: scale(1.05);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(142, 246, 255, 0.25);
}

.brand-fallback {
  color: var(--copper);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.08em;
  text-transform: lowercase;
}

.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  line-height: 1.1;
  text-decoration: none;
  color: inherit;
}

.brand-copy span {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-copy small {
  margin-top: 0.2rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.nav-links {
  gap: 0.35rem;
}

.nav-links a {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover {
  background: rgba(142, 246, 255, 0.09);
  color: var(--text);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  align-items: center;
  min-height: calc(100svh - 104px);
  padding: clamp(1.6rem, 4.2vw, 4rem) 0 clamp(1.8rem, 4vw, 3rem);
}

.eyebrow,
.proof-kicker,
.workload-label {
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.055em;
  line-height: 0.96;
}

h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  font-size: clamp(2.65rem, 4.5vw, 4.25rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.85rem, 4vw, 3.4rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.3rem, 2.4vw, 1.78rem);
}

.hero-lede,
.section-lede,
.copy-block p {
  color: #c9d5e3;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-lede strong,
.copy-block strong {
  color: var(--text);
}

.hero-proofrail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.95rem 0 0.9rem;
}

.hero-proofrail a,
.hero-proofrail span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.42rem 0.66rem;
  border: 1px solid rgba(142, 246, 255, 0.2);
  border-radius: 999px;
  background: rgba(142, 246, 255, 0.06);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.hero-proofrail a:hover {
  border-color: rgba(142, 246, 255, 0.5);
  background: rgba(142, 246, 255, 0.12);
  color: var(--text);
}

.hero-proofrail strong {
  color: var(--green);
}

.trust-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 1.6rem 0 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.trust-route a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px dotted rgba(142, 246, 255, 0.3) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.trust-route a:hover {
  color: var(--text);
  border-bottom: 1px solid var(--text) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.trust-route span[aria-hidden="true"] {
  color: rgba(142, 246, 255, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0 0 1rem;
}

.mobile-boundary-map {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.88rem 1.15rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #041019;
  box-shadow: 0 12px 38px rgba(56, 189, 248, 0.24);
}

.button.secondary {
  border: 1px solid rgba(245, 193, 111, 0.42);
  color: var(--text);
  background: rgba(245, 193, 111, 0.08);
}

.hero-panel {
  position: relative;
  padding: 0.7rem;
  border: 1px solid rgba(142, 246, 255, 0.2);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow);
}

.hero-panel::after {
  position: absolute;
  inset: auto -10px -10px auto;
  width: 112px;
  height: 112px;
  content: "";
  border: 1px solid rgba(245, 193, 111, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 193, 111, 0.08), transparent 64%);
  z-index: -1;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem 0.75rem;
}

.panel-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
}

.panel-toolbar span:nth-child(1) { background: var(--red); }
.panel-toolbar span:nth-child(2) { background: var(--copper); }
.panel-toolbar span:nth-child(3) { background: var(--green); }

.panel-toolbar code {
  margin-left: auto;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.hero-panel img {
  border-radius: 26px;
  background: var(--ink-2);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: clamp(0.75rem, 2vw, 1.5rem) 0 clamp(4rem, 8vw, 6.5rem);
}

.proof-strip > div,
.risk-grid article,
.layer-card,
.validation-card,
.workload-grid article,
.doc-grid a {
  border: 1px solid rgba(142, 246, 255, 0.16);
  background: rgba(10, 18, 27, 0.72);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.2);
}

.proof-strip > div {
  min-height: 160px;
  padding: 1.3rem;
  border-radius: var(--radius-lg);
}

.proof-strip > div:first-child {
  border-color: rgba(143, 230, 181, 0.36);
  background:
    radial-gradient(circle at 18% 14%, rgba(143, 230, 181, 0.16), transparent 32%),
    rgba(10, 18, 27, 0.78);
}

.proof-strip > div:nth-child(2) {
  border-color: rgba(245, 193, 111, 0.26);
}

.proof-strip strong {
  display: block;
  margin: 0.72rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.proof-strip p,
.risk-grid p,
.layer-card p,
.validation-card li,
.workload-grid p,
.site-footer p {
  color: var(--muted);
}

code {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.narrative,
.validated {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.compact {
  min-height: auto;
}

.copy-block {
  max-width: 620px;
}

.risk-section,
.layers,
.workloads,
.docs {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-heading {
  max-width: 940px;
  margin-bottom: clamp(1.8rem, 5vw, 3rem);
}

.section-heading.narrow {
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
}

.risk-grid,
.workload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.risk-grid article,
.workload-grid article {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
}

.risk-grid article:nth-child(even) {
  border-color: rgba(245, 193, 111, 0.22);
  background: rgba(16, 26, 39, 0.74);
}

.risk-code {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line-warm);
  border-radius: 50%;
  color: var(--copper);
  font-family: var(--font-mono);
}

.layer-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 5.5rem; /* Prevents translateY(4rem) overlap/clipping on desktop */
}

.layer-card {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  padding: 1.2rem;
  border-radius: var(--radius-xl);
}

.layer-card::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.18;
  background: radial-gradient(circle at 20% 10%, var(--accent), transparent 38%);
  pointer-events: none;
}

.layer-card.control { --accent: var(--cyan); }
.layer-card.substrate { --accent: var(--copper); transform: translateY(2rem); }
.layer-card.gateway { --accent: #a78bfa; transform: translateY(4rem); }
.layer-card.governance { --accent: var(--green); transform: translateY(-1.2rem); }

.layer-number {
  display: block;
  margin-bottom: 4.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.layer-card ul {
  position: relative;
  display: grid;
  gap: 0.5rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.layer-card li {
  padding: 0.46rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.validation-card {
  padding: clamp(1.3rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(245, 193, 111, 0.09)),
    rgba(10, 18, 27, 0.76);
}

.scoreline {
  display: grid;
  grid-template-columns: min-content 1fr min-content 1fr;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 1.4rem;
  font-family: var(--font-mono);
}

.scoreline span {
  color: var(--dim);
}

.scoreline strong {
  color: var(--green);
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 9vw, 6rem);
  line-height: 0.84;
}

.scoreline strong:last-child {
  color: var(--red);
}

.validation-list {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.validation-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--muted);
  line-height: 1.4;
}

.val-emoji {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.workload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workload-grid article {
  min-height: 210px;
  padding: 1.6rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(142, 246, 255, 0.08), rgba(245, 193, 111, 0.06)),
    rgba(10, 18, 27, 0.72);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.doc-grid a {
  display: flex;
  align-items: flex-end;
  min-height: 96px;
  padding: 1rem;
  border-radius: 18px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.doc-grid a:hover {
  transform: translateY(-3px);
  border-color: rgba(142, 246, 255, 0.46);
  background: rgba(142, 246, 255, 0.08);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid rgba(142, 246, 255, 0.16);
}

.site-footer p {
  max-width: 820px;
  margin: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(142, 246, 255, 0.18);
  border-radius: 999px;
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Research Citations Styling */
.research {
  padding: clamp(4rem, 10vw, 8rem) 0 0;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.research-card {
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(142, 246, 255, 0.16);
  background: rgba(10, 18, 27, 0.72);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.research-logo {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--copper);
  border: 1px solid var(--line-warm);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 193, 111, 0.05);
  margin-bottom: 1.15rem;
}

.research-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
}

.research-card blockquote {
  border-left: 2px solid var(--cyan);
  padding-left: 0.8rem;
  margin: 0 0 1.2rem;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--dim);
}

.research-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.citation-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dotted rgba(142, 246, 255, 0.4);
  align-self: flex-start;
  transition: color 0.2s, border-color 0.2s;
}

.citation-link:hover {
  color: var(--text);
  border-bottom-style: solid;
}

/* ========================================== */
/* DIAGRAM LIGHTBOX MODAL & ZOOM TRIGGER */
/* ========================================== */

.diagram-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.diagram-trigger img {
  display: block;
  width: 100%;
  transition: transform 0.3s ease;
}

.diagram-trigger:hover img {
  transform: scale(1.02);
}

.zoom-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(7, 11, 16, 0.85);
  border: 1px solid rgba(142, 246, 255, 0.22);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.diagram-trigger:hover .zoom-indicator {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox Modal CSS */
.diagram-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 10, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.diagram-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: rgba(142, 246, 255, 0.08);
  border: 1px solid rgba(142, 246, 255, 0.2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(142, 246, 255, 0.15);
  color: var(--cyan);
}

.modal-content {
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.diagram-modal.active .modal-content {
  transform: scale(1);
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

@media (max-width: 980px) {
  .section-grid,
  .proof-strip,
  .risk-grid,
  .research-grid,
  .layer-stack,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 2.6rem 0 1.75rem;
  }

  .hero-panel {
    max-width: 720px;
    margin-inline: auto;
  }

  .proof-strip > div {
    min-height: 0;
  }

  .risk-grid,
  .research-grid,
  .layer-stack,
  .doc-grid {
    max-width: 720px;
    margin-inline: auto;
  }

  .layer-stack {
    margin-bottom: 0; /* Reset desktop translated gap */
  }

  .layer-card,
  .layer-card.substrate,
  .layer-card.gateway,
  .layer-card.governance {
    min-height: auto;
    transform: none;
    animation: none !important;
    opacity: 1;
  }

  .layer-number {
    margin-bottom: 1.75rem;
  }

  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) and (max-height: 860px) {
  .hero {
    min-height: auto;
    padding: 1.2rem 0 1.6rem;
  }

  h1 {
    max-width: 700px;
    font-size: clamp(2.65rem, 4.65vw, 4.65rem);
  }

  .hero-lede {
    max-width: 640px;
  }

  .hero-proofrail {
    margin-top: 0.75rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: sticky;
    top: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.55rem 1.1rem;
    border: 1px solid rgba(142, 246, 255, 0.18);
    border-radius: 999px;
    background: rgba(7, 11, 16, 0.74);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .header-main-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .brand-copy small {
    white-space: normal;
    font-size: 0.7rem;
  }

  .brand-copy span {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  /* Hamburger Toggle Button */
  .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    color: var(--cyan);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    outline: none;
  }

  .menu-toggle:hover {
    background: rgba(142, 246, 255, 0.08);
    color: var(--text);
  }

  .menu-toggle svg {
    display: block;
  }

  .menu-toggle .icon-close {
    display: none;
  }

  .site-header.menu-open .menu-toggle .icon-menu {
    display: none;
  }

  .site-header.menu-open .menu-toggle .icon-close {
    display: block;
  }

  /* Dropdown Nav Links on Mobile */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
  }

  .site-header.menu-open {
    border-radius: 18px;
    background: rgba(7, 11, 16, 0.92);
  }

  .site-header.menu-open .nav-links {
    display: flex;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(142, 246, 255, 0.1);
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes slideDown {
    from {
      max-height: 0;
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      max-height: 250px;
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links a {
    width: 100%;
    min-height: auto;
    padding: 0.55rem 0.8rem;
    text-align: left;
    border-radius: 8px;
    background: transparent;
    font-size: 0.9rem;
    border-bottom: none !important;
  }

  .nav-links a:hover {
    background: rgba(142, 246, 255, 0.08);
    color: var(--cyan);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10.5vw, 3.4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-proofrail {
    display: flex;
    margin: 0.8rem 0 0.75rem;
  }

  .hero-proofrail span {
    min-height: 34px;
    padding: 0.36rem 0.54rem;
    font-size: 0.72rem;
  }

  .hero-actions,
  .site-footer,
  .scoreline {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .mobile-boundary-map {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin: 0.7rem 0 0;
    padding: 0.58rem;
    border: 1px solid rgba(142, 246, 255, 0.18);
    border-radius: 20px;
    background: rgba(10, 18, 27, 0.58);
  }

  .mobile-boundary-map span {
    min-height: 34px;
    padding: 0.46rem 0.52rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
  }

  .mobile-boundary-map span:last-child {
    color: var(--copper);
    border-color: rgba(245, 193, 111, 0.32);
  }

  .trust-route {
    display: none;
  }

  .hero-panel {
    padding: 0.45rem;
    border-radius: 22px;
  }

  .hero-panel img {
    border-radius: 18px;
  }

  .hero-panel::after {
    display: none;
  }

  .narrative,
  .validated,
  .risk-section,
  .layers,
  .workloads,
  .docs {
    padding: 3.1rem 0;
  }

  .proof-strip {
    gap: 0.75rem;
    margin-bottom: 3rem;
  }

  .layer-card,
  .workload-grid article {
    border-radius: 22px;
  }

  .workload-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

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

  .scoreline strong {
    font-size: 4.4rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-panel,
  .proof-strip > div,
  .risk-grid article,
  .layer-card,
  .validation-card,
  .workload-grid article,
  .doc-grid a {
    animation: rise 620ms ease both;
  }

  .hero-panel { animation-delay: 100ms; }
  .proof-strip > div:nth-child(2) { animation-delay: 80ms; }
  .proof-strip > div:nth-child(3) { animation-delay: 160ms; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .layer-card.substrate { animation-name: rise-substrate; }
  .layer-card.gateway { animation-name: rise-gateway; }
  .layer-card.governance { animation-name: rise-governance; }

  @keyframes rise-substrate {
    from { opacity: 0; transform: translateY(42px); }
    to { opacity: 1; transform: translateY(2rem); }
  }

  @keyframes rise-gateway {
    from { opacity: 0; transform: translateY(60px); }
    to { opacity: 1; transform: translateY(4rem); }
  }

  @keyframes rise-governance {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(-1.2rem); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
