:root {
  --navy-900: #082B63;
  --navy-800: #102A43;
  --teal-600: #008C95;
  --teal-100: #DFF3F3;

  --surface-page: #FFFFFF;
  --surface-soft: #F7F9FC;
  --surface-research: #EAF3F7;
  --surface-dark: #082B63;

  --text-primary: #102A43;
  --text-secondary: #47596D;
  --text-inverse: #FFFFFF;
  --link: #075F91;

  --border-subtle: #DCE4EA;
  --border-strong: #A9BAC8;

  --status-verified: #17694B;
  --status-experimental: #936300;
  --status-error: #AE3039;
  --status-planned: #526477;

  --font-display: "Sora", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;

  --heading-hero: clamp(1.85rem, 3.8vw, 2.75rem);
  --heading-page: clamp(1.75rem, 3.2vw, 2.35rem);
  --heading-section: clamp(1.35rem, 2.4vw, 1.75rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 20px;
  --space-8: 28px;
  --space-12: 36px;
  --space-16: 48px;
  --space-24: 56px;

  --container-wide: 1320px;
  --container-content: 980px;
  --container-reading: 640px;
  --page-gutter: clamp(16px, 2.5vw, 32px);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --motion-fast: 160ms;
  --motion-base: 280ms;
  --motion-reveal: 560ms;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Logo: v1 2.75rem → v2 4.125rem → +50% again = 6.1875rem */
  --logo-height: 6.1875rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--text-primary);
  background: var(--surface-page);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.container {
  width: min(calc(100% - 2 * var(--page-gutter)), var(--container-wide));
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.reading-width {
  max-width: var(--container-reading);
}

.section {
  padding-block: clamp(24px, 3vw, 40px);
}

.section--hero {
  padding-block: 0;
}

.section--soft {
  background: var(--surface-soft);
}

.section--research {
  background: var(--surface-research);
}

.section--dark {
  background: var(--surface-dark);
  color: var(--text-inverse);
}

.section--dark a {
  color: #9fd4d8;
}

.section--dark h2,
.section--dark h3,
.section--dark .section-intro__title {
  color: var(--text-inverse);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--navy-900);
  text-wrap: balance;
  overflow-wrap: break-word;
}

h2,
h3 {
  max-width: 100%;
}

h1 {
  font-size: var(--heading-hero);
  max-width: 22ch;
  margin: 0 0 var(--space-3);
}

h2 {
  font-size: var(--heading-section);
  margin: 0 0 var(--space-4);
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 var(--space-3);
}

p {
  max-width: min(68ch, 100%);
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-4);
}

.kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-600);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 6px;
  min-height: calc(var(--logo-height) + 8px);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  height: var(--logo-height);
  width: auto;
  max-width: min(28rem, 72vw);
  object-fit: contain;
  object-position: left center;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop > li {
  position: relative;
}

.nav-desktop a,
.nav-desktop button {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  padding: var(--space-2) 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}

.nav-desktop a:hover,
.nav-desktop button:hover {
  color: var(--navy-900);
}

.nav-desktop a[aria-current="page"],
.nav-desktop button[aria-expanded="true"] {
  color: var(--navy-900);
  border-bottom-color: var(--teal-600);
  font-weight: 600;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.08);
  list-style: none;
}

.nav-desktop > li:hover > .nav-dropdown,
.nav-desktop > li:focus-within > .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-bottom: none;
  border-radius: 4px;
}

.nav-dropdown a:hover {
  background: var(--surface-soft);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4) !important;
  background: var(--navy-900);
  color: var(--text-inverse) !important;
  border-radius: var(--radius-sm);
  border-bottom: none !important;
  font-weight: 600;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--navy-800);
  color: var(--text-inverse) !important;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-900);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--navy-900);
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: #fff;
  padding: var(--space-4) var(--page-gutter) var(--space-6);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a,
.mobile-nav summary {
  display: block;
  padding: var(--space-3) 0;
  color: var(--navy-900);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.mobile-nav details ul {
  padding-left: var(--space-4);
}

.mobile-nav details a {
  font-weight: 400;
  color: var(--text-secondary);
}

@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav,
  .mobile-nav.is-open {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--motion-base) var(--ease-standard),
    border-color var(--motion-base) var(--ease-standard);
}

.btn--primary {
  background: var(--navy-900);
  color: var(--text-inverse);
}

.btn--primary:hover {
  background: var(--navy-800);
  color: var(--text-inverse);
}

.btn--secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--navy-900);
}

.btn--secondary:hover {
  border-color: var(--navy-900);
  color: var(--navy-900);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
}

/* Full-bleed split hero: text on the left, photo on the right. Height is a band, not the viewport. */
.hero-bleed {
  --hero-band: clamp(16rem, 32vh, 20.5rem);
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: var(--hero-band);
  background: #fff;
}

.hero-bleed__copy-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
  min-height: var(--hero-band);
  background: #fff;
  padding-block: clamp(0.85rem, 1.8vw, 1.35rem);
  padding-inline-end: clamp(1.1rem, 2.4vw, 2rem);
  padding-inline-start: max(var(--page-gutter), calc((100vw - var(--container-wide)) / 2));
}

.hero-bleed__copy {
  width: 100%;
  min-width: 0;
  max-width: 36rem;
}

.hero-bleed__copy p,
.hero-bleed__copy .lead,
.hero-bleed__copy .limitation-note,
.hero-bleed__copy .hero-bleed__caption {
  max-width: 100%;
}

.hero-bleed__copy .lead {
  margin-bottom: var(--space-2);
}

.hero-bleed__copy .btn-row {
  margin-top: var(--space-2);
}

.hero-bleed__copy .limitation-note {
  margin-top: var(--space-2);
}

.hero-bleed__copy h1 {
  width: 100%;
  max-width: 100%;
  margin-bottom: var(--space-2);
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  line-height: 1.2;
  text-wrap: wrap;
  overflow-wrap: break-word;
  white-space: normal;
}

.hero-bleed__copy .project-identity {
  margin-top: var(--space-3);
}

.hero-bleed__copy .hero-byline {
  margin-top: var(--space-2);
}

.hero-bleed__caption {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 42ch;
}

.hero-bleed__media {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  min-height: 0;
  max-height: 28rem;
  margin: 0;
  overflow: hidden;
  background: var(--surface-soft);
}

.hero-bleed__photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center 30%;
}

.hero-bleed__photo--ui {
  object-fit: contain;
  object-position: center center;
  background: #eef5f8;
}

@media (max-width: 1023px) {
  .hero-bleed {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
  }

  .hero-bleed__copy-col {
    min-height: 0;
    padding-block: 1.1rem 0.85rem;
    padding-inline: var(--page-gutter);
  }

  .hero-bleed__copy {
    max-width: 100%;
  }

  .hero-bleed__copy h1 {
    max-width: none;
    font-size: clamp(1.45rem, 6.4vw, 1.85rem);
  }

  .hero-bleed__media {
    height: clamp(11rem, 38vw, 15rem);
    min-height: clamp(11rem, 38vw, 15rem);
    max-height: clamp(11rem, 38vw, 15rem);
  }
}

/* Section intro */
.section-intro {
  margin-bottom: var(--space-4);
}

.section-intro__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--teal-600);
  letter-spacing: 0.04em;
  margin: 0 0 var(--space-2);
}

.section-intro__title {
  margin-bottom: var(--space-3);
  text-wrap: wrap;
}

.limitation-note {
  display: block;
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-soft);
  border-left: 3px solid var(--navy-900);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: min(48ch, 100%);
}

.limitation-note--quiet {
  margin-top: var(--space-3);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  max-width: 46ch;
}

.project-identity {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.project-identity strong {
  color: var(--navy-900);
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* Pipeline */
.pipeline {
  display: grid;
  gap: var(--space-6);
}

.pipeline__stages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.pipeline__stages button {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}

.pipeline__stages button[aria-selected="true"] {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}

.pipeline__panel {
  padding: var(--space-6);
}

.pipeline__panel[hidden] {
  display: none;
}

.pipeline.no-js .pipeline__panel {
  display: block !important;
  margin-bottom: var(--space-4);
}

.pipeline.no-js .pipeline__stages {
  display: none;
}

/* Glass cards */
.pipeline__panel,
.evidence-panel,
.test-result,
.decision-record,
.flow__step,
.layer-card {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 24px rgba(8, 43, 99, 0.08);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.evidence-panel,
.test-result,
.decision-record {
  padding: var(--space-6);
  margin: 0 0 var(--space-4);
  transition:
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.pipeline__panel:hover,
.evidence-panel:hover,
.test-result:hover,
.decision-record:hover,
.layer-card:hover,
.flow__step:hover {
  border-color: rgba(0, 140, 149, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(8, 43, 99, 0.12);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pipeline__panel,
  .evidence-panel,
  .test-result,
  .decision-record,
  .flow__step,
  .layer-card {
    background: rgba(255, 255, 255, 0.92);
  }
}

.status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-bottom: var(--space-3);
}

.status--verified {
  color: var(--status-verified);
  background: #e8f5ef;
}

.status--experimental {
  color: var(--status-experimental);
  background: #fff3dd;
}

.status--planned {
  color: var(--status-planned);
  background: #eef1f4;
}

.status--error {
  color: var(--status-error);
  background: #fdeeee;
}

.build-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border-subtle);
}

.build-timeline li {
  position: relative;
  padding: 0 0 var(--space-8) var(--space-6);
}

.build-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-600);
}

.build-timeline__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--teal-600);
  margin-bottom: var(--space-1);
}

.demo-carousel {
  margin: 0;
}

.demo-carousel__chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  margin: 0 0 var(--space-6);
}

.demo-carousel__tabs {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-page);
}

.demo-carousel__tabs [role="tab"] {
  appearance: none;
  margin: 0;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.demo-carousel__tabs [role="tab"]:last-child {
  border-right: 0;
}

.demo-carousel__tabs [role="tab"][aria-selected="true"] {
  background: var(--navy-900);
  color: var(--text-inverse);
}

.demo-carousel__toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}

.demo-carousel__nav {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-page);
  color: var(--navy-900);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.demo-carousel__nav:hover {
  border-color: var(--navy-900);
}

.demo-carousel__status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.demo-step {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 880px) {
  .demo-step {
    grid-template-columns: minmax(16rem, 0.9fr) minmax(18rem, 1.1fr);
    gap: var(--space-8);
  }
}

.demo-step[hidden] {
  display: none;
}

.demo-step h3 {
  margin-bottom: var(--space-2);
}

.demo-step__copy > p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.demo-step figure {
  margin: 0;
}

.demo-step img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(26rem, 100%);
  max-height: min(26rem, 58vh);
  margin-inline: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.demo-step figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 68ch;
}

.demo-step__aside {
  margin-top: var(--space-6);
}

.demo-step__aside img {
  max-width: min(18rem, 100%);
  max-height: 10rem;
}

.demo-feature {
  margin: 0 0 var(--space-8);
}

.demo-feature img {
  display: block;
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.demo-feature figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 68ch;
}

.demo-viewer {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .demo-viewer {
    grid-template-columns: 1fr 1fr;
  }
}

.demo-viewer figure {
  margin: 0;
}

.demo-viewer img {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.demo-viewer figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.figure {
  margin: var(--space-6) 0;
}

.figure img,
.figure svg {
  display: block;
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #fff;
}

.figure figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.diagram-band {
  padding: var(--space-6);
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0 var(--space-6);
  max-width: 100%;
}

.diagram-band figcaption {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.diagram-band--dark {
  background: var(--navy-900);
}

.diagram-band--dark figcaption {
  color: #b8c7d4;
}

/* Responsive HTML flow diagrams (replace brittle wide SVGs) */
.flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
  width: 100%;
  min-width: 0;
}

.flow__step {
  position: relative;
  padding: var(--space-3) var(--space-3);
  text-align: center;
  min-height: 5.5rem;
}

.flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--space-3) - 2px);
  width: calc(var(--space-3) + 2px);
  height: 2px;
  background: var(--border-strong);
  transform: translateY(-50%);
  pointer-events: none;
}

.flow__step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--space-3) - 4px);
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-left-color: var(--border-strong);
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.flow__step--accent {
  background: rgba(223, 243, 243, 0.5);
  border-color: rgba(0, 140, 149, 0.45);
}

.flow__num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--teal-600);
  margin-bottom: 0.2rem;
}

.flow__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.25;
}

.flow__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

@media (max-width: 899px) {
  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .flow__step:nth-child(3)::after,
  .flow__step:nth-child(3)::before,
  .flow__step:nth-child(6)::after,
  .flow__step:nth-child(6)::before {
    display: none;
  }
}

@media (max-width: 559px) {
  .flow {
    grid-template-columns: 1fr;
  }
  .flow__step::after,
  .flow__step::before {
    display: none !important;
  }
  .flow__step:not(:last-child) {
    margin-bottom: 0;
  }
  .flow__step:not(:last-child)::after {
    display: block !important;
    top: auto;
    bottom: calc(-1 * var(--space-3) - 2px);
    right: auto;
    left: 50%;
    width: 2px;
    height: calc(var(--space-3) + 2px);
    transform: translateX(-50%);
  }
  .flow__step:not(:last-child)::before {
    display: block !important;
    top: auto;
    bottom: calc(-1 * var(--space-3) - 5px);
    right: auto;
    left: 50%;
    border: 4px solid transparent;
    border-top-color: var(--border-strong);
    border-left-color: transparent;
    transform: translateX(-50%);
  }
}

.layer-grid {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .layer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }
}

.layer-card {
  padding: var(--space-4);
  min-height: 7.5rem;
}

.layer-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.layer-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
  max-width: none;
}

/* Framer-like reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--motion-reveal) var(--ease-out),
    transform var(--motion-reveal) var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 60ms; }
.reveal-delay-2 { transition-delay: 120ms; }
.reveal-delay-3 { transition-delay: 180ms; }
.reveal-delay-4 { transition-delay: 240ms; }

.research-hero__media img,
.demo-viewer img {
  transition: transform 480ms var(--ease-out), box-shadow 480ms var(--ease-out);
}

.research-hero__media:hover img,
.demo-viewer figure:hover img {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(8, 43, 99, 0.1);
}

.pipeline__stages button {
  transition:
    background var(--motion-base) var(--ease-standard),
    color var(--motion-base) var(--ease-standard),
    border-color var(--motion-base) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.pipeline__stages button:hover {
  transform: translateY(-1px);
}

.pipeline__panel {
  animation: panelIn 320ms var(--ease-out);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .research-hero__media img,
  .demo-viewer img,
  .pipeline__stages button {
    transition: none;
  }
  .research-hero__media:hover img,
  .demo-viewer figure:hover img,
  .pipeline__stages button:hover {
    transform: none;
    box-shadow: none;
  }
  .pipeline__panel {
    animation: none;
  }
}

.breadcrumb {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: var(--space-6) 0 var(--space-4);
}

.breadcrumb a {
  color: var(--link);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.next-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.next-section a {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy-900);
  border-bottom: 1px solid var(--teal-600);
}

.labels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.labels li {
  position: relative;
  padding-left: 0.9rem;
}

.labels li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--teal-600);
  border-radius: 50%;
}

.grid-2 {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.stage-stack {
  margin-top: var(--space-6);
}

.stage-stack .pipeline__panel {
  margin: 0;
}

.stage-stack .pipeline__panel p {
  margin-bottom: 0;
}

.section--soft + .section--soft .next-band {
  border-top: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-4) 0 var(--space-6);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th,
td {
  border: 1px solid var(--border-subtle);
  padding: var(--space-3);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  color: var(--navy-900);
  font-weight: 600;
}

.ref-group {
  margin-bottom: var(--space-12);
}

.ref-group h2 {
  font-size: 1.15rem;
}

.ref-group ol {
  padding-left: 1.25rem;
}

.ref-group li {
  margin-bottom: var(--space-3);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-6) 0 var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.site-footer p {
  margin-bottom: var(--space-2);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--navy-900);
  text-decoration: underline;
}

.page-main h1 {
  max-width: 28ch;
}

.home .section {
  padding-block: clamp(56px, 7vw, 88px);
  scroll-margin-top: calc(var(--logo-height) + 16px);
}

.page-head {
  padding-block: clamp(32px, 5vw, 56px) var(--space-8);
}

.page-head h1 {
  max-width: 22ch;
}

.page-head .lead {
  margin-bottom: var(--space-3);
}

.page-head .project-identity {
  margin-top: var(--space-6);
}

.page-head .limitation-note {
  margin-top: var(--space-4);
}

.hero-byline {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.hero-byline a {
  font-weight: 600;
  color: var(--navy-900);
}

.jump-row {
  border-bottom: 1px solid var(--border-subtle);
  background: #fff;
}

.jump-row ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  padding: var(--space-3) 0;
  list-style: none;
}

.jump-row a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy-900);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.jump-row a:hover,
.jump-row a:focus-visible {
  border-bottom-color: var(--teal-600);
}

.why-split {
  display: grid;
  gap: var(--space-6) var(--space-12);
}

@media (min-width: 800px) {
  .why-split {
    grid-template-columns: minmax(12rem, 18rem) minmax(0, 38rem);
    align-items: start;
  }

  .why-split .section-intro__title {
    margin-bottom: 0;
  }
}

.why-split__copy p:last-child {
  margin-bottom: 0;
}

.story-beats {
  display: grid;
  gap: var(--space-8);
  margin: 0 0 var(--space-8);
}

@media (min-width: 900px) {
  .story-beats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }
}

.story-beat {
  margin: 0;
  padding: 0 0 0 var(--space-4);
  border: 0;
  border-left: 2px solid var(--teal-600);
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

.story-beat__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--navy-900);
  margin: 0 0 var(--space-3);
}

.story-beat h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.15rem;
}

.story-beat p {
  margin: 0;
  color: var(--text-secondary);
}

.story-footnote {
  max-width: 68ch;
  margin: 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.refusal-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .refusal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.refusal-card {
  padding: 0 0 var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: none;
  box-shadow: none;
}

.refusal-card .status {
  margin-bottom: var(--space-2);
}

.refusal-card h3 {
  margin-bottom: var(--space-2);
  font-size: 1.15rem;
}

.refusal-card p {
  margin: 0;
  color: var(--text-secondary);
}

.proof-grid {
  margin-top: var(--space-8);
}

.close-strip {
  padding-block: clamp(40px, 5vw, 64px);
  background: var(--surface-soft);
  border-top: 1px solid var(--border-subtle);
}

.close-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.close-strip h2 {
  margin: 0;
}

.close-strip .btn-row {
  margin-top: 0;
}

.built-list {
  margin: 0 0 var(--space-6);
  padding-left: 1.2rem;
}

.built-list li {
  margin-bottom: var(--space-3);
  max-width: 62ch;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.hero-secondary a {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy-900);
  border-bottom: 1px solid var(--teal-600);
}

.next-band {
  padding-block: var(--space-4);
}

.next-band h2 {
  margin: 0 0 var(--space-6);
  font-size: var(--heading-section);
  max-width: none;
}

.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.next-links a {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  padding: var(--space-2) 0;
  text-decoration: none;
  color: var(--navy-900);
  border-bottom: 2px solid var(--teal-600);
}

.next-links a:hover {
  color: var(--teal-600);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Click-to-zoom images */
.img-zoomable {
  cursor: zoom-in;
}

body.img-zoom-open {
  overflow: hidden;
}

.img-zoom {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: rgba(8, 43, 99, 0.88);
  backdrop-filter: blur(4px);
}

.img-zoom[hidden] {
  display: none !important;
}

.img-zoom__img {
  max-width: min(96vw, 1400px);
  max-height: min(82vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  background: #fff;
  cursor: zoom-out;
}

.img-zoom__caption {
  margin: 0;
  max-width: 52ch;
  text-align: center;
  color: #e8eef5;
  font-size: var(--text-sm);
}

.img-zoom__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
}

.img-zoom__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.page-main {
  padding-bottom: var(--space-8);
  padding-top: 0;
}

.page-main > .container > .breadcrumb,
.page-main .section--hero .breadcrumb {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.page-main > .container > h1 {
  margin-top: 0;
}

.page-main > .container > .lead {
  margin-bottom: var(--space-4);
}

@media (max-width: 767px) {
  body {
    font-size: 1rem;
  }
  .section {
    padding-block: 28px;
  }
  .section--hero {
    padding-block: 12px;
  }
  h1 {
    max-width: none;
    text-wrap: wrap;
  }
  h2,
  h3 {
    text-wrap: wrap;
  }
  .brand img {
    height: clamp(3.75rem, 14vw, 5rem);
  }
}
