/* Approved launch header, shared by the main Holon page and Astra study. */
@font-face {
  font-family: 'Astra Manrope';
  src: url('assets/holon/fonts/Manrope-Variable.woff2') format('woff2'), url('assets/holon/fonts/Manrope-Variable.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Astra Plex';
  src: url('assets/holon/fonts/IBMPlexMono-Regular.woff2') format('woff2'), url('assets/holon/fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

body.holon-launch-header-page {
  /* Canonical Sophont light-first web tokens. */
  --bg: #f8f5fa;
  --bg-raised: #eaeaf3;
  --fg: #08082a;
  --fg-soft: #3a4468;
  --fg-mute: #666e8e;
  --holon-cobalt: #2233bb;
  --electric: #2233bb;
  --font-display: 'Astra Manrope', sans-serif;
  --font-body: 'Astra Manrope', sans-serif;
  --font-mono: 'Astra Plex', monospace;
  --astra-rule: rgba(8, 8, 42, .17);
  background: var(--bg);
}

.holon-launch-header-page .ambient { display: none; }
.holon-launch-header-page .holon-launch-shell { padding-inline: 40px; }
.astra-hero-study-page .holon-launch-shell { max-width: 1680px !important; }

.holon-launch-header-page .nav {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.holon-launch-header-page .nav-links {
  gap: clamp(16px, 1.8vw, 28px);
  font-size: 10px;
  letter-spacing: .06em;
}

.holon-launch-header-page .nav-cta { font-size: 10px; }
.holon-launch-header-page .status-dot { background: var(--sophont-teal); box-shadow: none; animation: none; }

.astra-launch-hero {
  position: relative;
  padding: 24px 0 0;
  isolation: isolate;
}

.astra-launch-scene {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  min-height: min(1020px, calc(100svh - 100px));
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

.astra-launch-scene .program-portal-stage {
  position: absolute;
  z-index: 0;
  inset: 0 -40px 45px;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  background: transparent;
  touch-action: pan-y;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 66%, transparent 99%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 66%, transparent 99%);
}

.astra-launch-scene .program-portal-stage > img {
  object-fit: cover;
  object-position: center;
  /* Retain the boxed viewer's tissue contrast; clear the type area locally. */
  opacity: 1;
  filter: saturate(.74) contrast(1.045) brightness(.96);
}

.astra-launch-scene .program-portal-sheen {
  z-index: 1;
  background:
    linear-gradient(0deg, var(--bg), color-mix(in oklab, var(--bg) 95%, transparent) 8%, transparent 26%),
    linear-gradient(90deg, var(--bg), transparent 12% 88%, var(--bg)),
    radial-gradient(ellipse 56% 54% at 50% 19%, var(--bg) 18%, color-mix(in oklab, var(--bg) 94%, transparent) 42%, color-mix(in oklab, var(--bg) 62%, transparent) 65%, transparent 100%);
}

.astra-launch-scene .program-portal-stage:focus-visible {
  outline: 2px solid var(--holon-cobalt);
  outline-offset: -10px;
}

.astra-launch-scene .program-portal-target {
  z-index: 2;
  box-shadow: 0 0 0 1px white, 0 16px 54px rgba(8,8,42,.16), 0 0 40px color-mix(in oklab, var(--portal-active) 16%, transparent);
}

.astra-launch-scene .program-portal-target::before,
.astra-launch-scene .program-portal-target::after {
  position: absolute;
  content: '';
  inset: -13px;
  border: 1px solid color-mix(in srgb, var(--portal-active) 32%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.astra-launch-scene .program-portal-target::before {
  inset: -30px;
  border-color: transparent;
  border-top-color: color-mix(in srgb, var(--portal-active) 65%, transparent);
  border-bottom-color: color-mix(in srgb, var(--portal-active) 28%, transparent);
  animation: astra-orbit 20s linear infinite;
}

.astra-launch-scene .program-portal-target::after {
  box-shadow: 0 0 40px color-mix(in srgb, var(--portal-active) 12%, transparent);
}

/* The lens map loads from data-portal-reveal-src after the hero slide (see
   program-viewer.js), not from the palette's background rule. */
.astra-launch-scene .program-portal-reveal[data-portal-reveal-src] { background-image: none; }

/* The orbit holds with the lens once the reader scrolls past the hero copy. */
.astra-launch-scene.is-autoplay-paused .program-portal-target::before { animation-play-state: paused; }

.astra-launch-scene:not(.is-motion-ready) .program-portal-target { opacity: 0; }
.astra-launch-scene .program-target-label { border-radius: 2px; background: color-mix(in oklab, var(--bg) 92%, transparent); box-shadow: none; }
.astra-launch-scene .program-stage-scale { display: none; }

.astra-launch-masthead {
  position: relative;
  z-index: 3;
  padding: clamp(24px, 4vh, 50px) 0 16px;
  text-align: center;
  pointer-events: none;
  animation: astra-launch-arrive .9s cubic-bezier(.16,1,.3,1) both;
}

.astra-launch-masthead h1 { margin: 0; font-weight: 400; }

.astra-launch-name {
  display: block;
  padding-right: .065em;
  color: var(--holon-ink);
  font-family: var(--font-display);
  font-size: clamp(124px, 18vw, 258px);
  font-weight: 450;
  letter-spacing: -.085em;
  line-height: 1.04;
  white-space: nowrap;
}

.astra-launch-name > span { color: inherit; }

.astra-launch-claim {
  display: block;
  margin: 21px auto 0;
  max-width: 1120px;
  color: var(--holon-ink);
  font-size: clamp(26px, 3.05vw, 46px);
  font-weight: 450;
  letter-spacing: -.045em;
  line-height: 1.18;
  text-wrap: balance;
}

.astra-launch-claim em { font-style: normal; color: inherit; }
.astra-launch-origin { margin: 9px 0 0; color: var(--fg-soft); font-size: clamp(19px, 1.7vw, 26px); letter-spacing: -.03em; }

.astra-launch-opening {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 20px;
  padding: 20px 0 24px;
  pointer-events: none;
}

.astra-launch-instruction {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--fg-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.astra-launch-instruction svg { width: 20px; height: 20px; color: var(--holon-cobalt); }
.astra-launch-instruction strong { color: var(--holon-cobalt); font-weight: 600; }

.astra-launch-scene .program-readout {
  position: relative;
  z-index: 3;
  display: block;
  border: 0;
  background: transparent;
}

.astra-launch-scene .program-readout-stack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.astra-launch-scene .program-readout-item { min-width: 0; padding: 19px 25px 21px; border: 0; }
.astra-launch-scene .program-readout-item:first-child { padding-left: 0; }
.astra-launch-scene .program-readout-item:last-child { padding-right: 0; border-right: 0; }
.astra-launch-scene .program-readout-item.is-dominant { background: none; box-shadow: none; }
.astra-launch-scene .program-readout-item.is-dominant .program-readout-title > span { color: var(--holon-ink); }
.astra-launch-scene .program-readout-title { min-height: 36px; gap: 12px; align-items: flex-end; }
.astra-launch-scene .program-readout-title > span { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--fg-soft); }
.astra-launch-scene .program-readout-title > span i { flex-shrink: 0; width: 6px; height: 6px; box-shadow: none; }
.astra-launch-scene .program-readout-title strong { min-width: 2ch; font-family: inherit; font-size: 24px; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: normal; }
.astra-launch-scene .program-readout-title strong::after { display: none; }
.astra-launch-scene .program-readout-meter { height: 4px; margin: 12px 0 0; }
.astra-launch-scene .program-readout-meter i { box-shadow: none; }
.astra-launch-scene .program-gene-list { display: none; }

.astra-launch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.7;
}

.astra-launch-footer p { margin: 0; }
.astra-launch-footer p span { margin: 0 7px; }
.astra-launch-footer a { display: inline-flex; min-height: 30px; align-items: center; gap: 14px; color: var(--holon-ink); }
.astra-launch-footer a:hover { color: var(--holon-cobalt); }
.astra-launch-footer svg { width: 16px; height: 18px; }
.holon-launch-header-page .astra-first-section { padding-top: 90px; scroll-margin-top: 100px; }
.holon-launch-header-page .astra-first-section::after,
.holon-launch-header-page .astra-first-section .journey-takeaway::before { display: none; }

.holon-launch-header-page a:focus-visible,
.holon-launch-header-page button:focus-visible { outline: 2px solid var(--holon-cobalt); outline-offset: 5px; }

@keyframes astra-launch-arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes astra-orbit { to { transform: rotate(360deg); } }

@media (min-width: 1000px) and (max-height: 820px) {
  .astra-launch-name { font-size: clamp(124px, 14vw, 195px); }
  .astra-launch-claim { margin-top: 12px; font-size: 34px; }
  .astra-launch-scene { grid-template-rows: auto minmax(145px, 1fr) auto auto; }
  .astra-launch-opening { padding-bottom: 20px; }
}

/* Narrow, short desktop windows: a smaller name and open tissue row keep the
   four readouts on the first screen, as the wider short-window rule does. */
@media (min-width: 761px) and (max-width: 999px) and (max-height: 820px) {
  .astra-launch-name { font-size: clamp(96px, 14vw, 140px); }
  .astra-launch-scene { grid-template-rows: auto minmax(145px, 1fr) auto auto; }
}

@media (max-width: 1100px) {
  .astra-launch-scene .program-readout-item { padding-inline: 17px; }
  .astra-launch-scene .program-readout-stack { gap: 18px; }
  .astra-launch-scene .program-readout-title > span { font-size: 14px; }
}

@media (max-width: 760px) {
  .holon-launch-header-page .holon-launch-shell { padding-inline: 22px; }
  .astra-launch-hero { padding-top: 8px; }
  .astra-launch-masthead { padding-top: 14px; }
  /* Phones: the hero fills the first screen below the nav, so the lens field and
     all four readouts are visible together; the open tissue row takes the rest.
     On short screens the name also scales with the viewport height. */
  .astra-launch-scene { min-height: calc(100vh - var(--launch-nav-height) - 10px); grid-template-rows: auto minmax(140px, 1fr) auto auto; }
  .astra-launch-name { font-size: clamp(64px, min(21vw, 11vh), 158px); line-height: 1.05; }
  .astra-launch-claim { max-width: 540px; margin-top: 14px; font-size: clamp(26px, 5.5vw, 38px); line-height: 1.18; }
  .astra-launch-origin { margin-top: 8px; font-size: 17px; }
  .astra-launch-scene .program-portal-stage { inset: 0 -22px 40px; }
  .astra-launch-scene .program-target-label { display: none; }
  .astra-launch-scene .program-portal-sheen {
    background:
      linear-gradient(0deg, var(--bg) 20%, transparent 40%),
      radial-gradient(ellipse 84% 48% at 50% 10%, var(--bg) 20%, color-mix(in oklab, var(--bg) 94%, transparent) 42%, color-mix(in oklab, var(--bg) 55%, transparent) 70%, transparent 100%);
  }
  .astra-launch-opening { align-items: end; padding: 12px 0 14px; }
  .astra-launch-instruction { font-size: 9px; gap: 6px; white-space: nowrap; }
  .astra-launch-instruction svg { width: 16px; height: 16px; }
  .astra-launch-scene .program-readout-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
  .astra-launch-scene .program-readout-item { padding: 12px 14px; }
  .astra-launch-scene .program-readout-item:nth-child(odd) { padding-left: 0; }
  .astra-launch-scene .program-readout-item:nth-child(even) { padding-right: 0; border-right: 0; }
  .astra-launch-scene .program-readout-title { min-height: 30px; line-height: 1.25; }
  .astra-launch-scene .program-readout-title > span { font-size: 14px; }
  .astra-launch-scene .program-readout-title strong { min-width: 2ch; font-size: 20px; }
  .astra-launch-scene .program-readout-meter { margin-top: 8px; }
  .astra-launch-footer { align-items: flex-start; padding-top: 14px; font-size: 8px; gap: 12px; }
  .astra-launch-footer p { max-width: 200px; }
  .astra-launch-footer p span { display: none; }
  .astra-launch-footer a { min-width: 110px; gap: 5px; }
  .astra-launch-footer svg { width: 13px; flex-shrink: 0; }
  .holon-launch-header-page .astra-first-section { padding-top: 65px; }
}

@supports (height: 100svh) {
  @media (max-width: 760px) {
    .astra-launch-scene { min-height: calc(100svh - var(--launch-nav-height) - 10px); }
    .astra-launch-name { font-size: clamp(64px, min(21vw, 11svh), 158px); }
  }
}

@media (max-width: 380px) {
  .holon-launch-header-page .holon-launch-shell { padding-inline: 16px; }
  /* Keep the existing full-bleed results band aligned with the narrower shell. */
  .holon-launch-header-page .metric-band { margin-inline: -16px; }
  .astra-launch-scene .program-portal-stage { inset-inline: -16px; }
  .astra-launch-claim { font-size: 25px; }
  .astra-launch-scene .program-readout-stack { gap: 14px; }
  .astra-launch-scene .program-readout-title { gap: 8px; }
  .astra-launch-scene .program-readout-title > span { gap: 6px; font-size: 14px; }
  .astra-launch-scene .program-readout-item { padding-inline: 11px; }
  .astra-launch-scene .program-readout-title strong { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .astra-launch-masthead { animation: none; }
  .astra-launch-scene *, .astra-launch-scene *::before, .astra-launch-scene *::after { animation: none !important; transition: none !important; }
}

/* Keyboard help stays available to assistive technology. */
.holon-launch-header-page .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 350px) {
  .holon-launch-header-page .nav-brand img { width: 90px !important; height: auto !important; }
  .holon-launch-header-page .nav-cta { padding-inline: 10px; font-size: 9px; }
  .holon-launch-header-page .nav-menu-toggle { width: 36px; height: 36px; padding: 8px; }
}

/* Match the main launch navigation to the Sophont homepage typography. */
.holon-hero-actions-page .nav-links { font-size: 13px; letter-spacing: .08em; }
@media (min-width: 561px) {
  .holon-hero-actions-page .nav-cta { font-size: 12px; }
}
