/*
  Noxim Digital — "Deep Field" landing page.
  Colours, roles and contrast rules follow the Deep Field spectral palette in the
  Website Design Principles Document: flat fills and hairlines, like a printed
  star chart. No gradients, no glows.
*/

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("./fonts/archivo-latin-wdth-normal.woff2") format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin-wght-normal.woff2") format('woff2');
}

:root {
  /* Ground */
  --ink: #15140f;
  --regolith: #2b2924;
  --plate: #8a8578;
  --latte: #fff8e7;
  /* Signal: emission lines */
  --ha: #e0502f;
  --ha-deep: #b23a1f;
  --na: #e9a93f;
  --o3: #3e8f86;
  --o3-deep: #2e6e67;
  --rigel: #b4c7d6;

  --ink-rgb: 21 20 15;
  --latte-rgb: 255 248 231;

  --fg: var(--latte);
  --fg-soft: rgb(var(--latte-rgb) / 0.76);
  --fg-mute: var(--plate);
  --line: rgb(var(--latte-rgb) / 0.13);
  --line-strong: rgb(var(--latte-rgb) / 0.3);
  --sig: var(--ha);

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 82rem;
  --nav-h: 4rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Photographic-plate grain: one flat, static texture over the whole page. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  min-width: 0;
  border: 0;
}

svg,
canvas {
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--ha);
  color: var(--ink);
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.skip {
  position: fixed;
  left: 1rem;
  top: -6rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--latte);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Type ---------- */

h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  font-weight: 760;
  font-stretch: 114%;
  line-height: 0.98;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lede {
  max-width: 34rem;
  color: var(--fg-soft);
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.5;
}

/* ---------- Layout ---------- */

/* Decorative shapes may be wider than the screen. Clipping here, rather than on
   the body, keeps the page from scrolling sideways without breaking sticky. */
main {
  overflow-x: clip;
}

.wrap {
  width: min(calc(100% - var(--pad) * 2), var(--max));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(4.5rem, 10vw, 9rem);
}

.tag {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  color: var(--fg-mute);
}

.tag::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
}

.tag b {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  font-weight: 500;
}

.tag b::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background: var(--sig);
}

.tag > * {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .tag span {
    display: none;
  }
}

.head {
  display: grid;
  gap: 1.5rem;
  margin-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 5rem);
}

.head h2 {
  max-width: 13ch;
}

@media (min-width: 900px) {
  .head--split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3rem;
    align-items: end;
  }
}

/* ---------- Buttons and chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 650;
  font-stretch: 106%;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn svg {
  width: 1em;
  height: 1em;
  transition: transform 0.3s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--down:hover svg {
  transform: translateY(3px);
}

.btn--primary {
  background: var(--ha);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--latte);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: rgb(var(--ink-rgb) / 0.6);
  color: var(--fg);
}

.btn--ghost:hover {
  border-color: var(--latte);
}

.btn--lg {
  min-height: 3.4rem;
  padding-inline: 1.6rem;
  font-size: 1rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.5rem;
  background: var(--rigel);
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
}

.textbtn {
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--fg);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}

.textbtn:hover {
  border-bottom-color: var(--fg);
}

/* ---------- Reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Plate labels: the hairline draws across, then the text settles in. */
.js .tag[data-reveal] {
  opacity: 1;
  transform: none;
}

.js .tag[data-reveal]::after {
  transform: scaleX(0);
  transition: transform 1.3s var(--ease);
}

.js .tag[data-reveal] > * {
  opacity: 0;
  transition: opacity 0.7s ease 0.35s;
}

.js .tag[data-reveal].is-in::after {
  transform: none;
}

.js .tag[data-reveal].is-in > * {
  opacity: 1;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  color: var(--latte);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.nav.is-stuck,
.nav.is-open {
  border-bottom-color: var(--line);
  background: rgb(var(--ink-rgb) / 0.95);
}

.nav[data-theme='latte'] {
  color: var(--ink);
}

.nav[data-theme='latte'].is-stuck,
.nav[data-theme='latte'].is-open {
  border-bottom-color: rgb(var(--ink-rgb) / 0.14);
  background: rgb(var(--latte-rgb) / 0.95);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(calc(100% - var(--pad) * 2), var(--max));
  height: 100%;
  margin-inline: auto;
}

/* The mark sits on a small plate, like a specimen label: black on Cosmic Latte. */
.brand {
  display: inline-flex;
  padding: 0.55rem 0.7rem;
  border-radius: 2px;
  background: var(--latte);
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s;
}

.brand svg {
  width: auto;
  height: 1rem;
}

.nav[data-theme='latte'] .brand {
  background: var(--ink);
  color: var(--latte);
}

.nav__links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.nav__links a {
  position: relative;
  padding: 0.5rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.74;
  transition: opacity 0.2s;
}

.nav__links a:hover,
.nav__links a[aria-current] {
  opacity: 1;
}

.nav__links a[aria-current]::after {
  content: '';
  position: absolute;
  inset: auto 0.8rem 0.25rem;
  height: 1px;
  background: currentColor;
}

.nav__cta {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.nav[data-theme='latte'] .nav__cta:hover {
  background: var(--ink);
  color: var(--latte);
}

.nav__toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav__bars,
.nav__bars::before {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.nav__bars {
  transform: translateY(-4px);
}

.nav__bars::before {
  content: '';
  transform: translateY(8px);
}

.nav.is-open .nav__bars {
  transform: rotate(45deg);
}

.nav.is-open .nav__bars::before {
  transform: rotate(-90deg);
}

.nav__progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--ha);
  transform: scaleX(var(--page-p, 0));
  transform-origin: left;
}

@media (max-width: 859px) {
  .nav__inner {
    gap: 0.75rem;
  }

  .nav__cta {
    margin-left: auto;
  }

  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0.5rem var(--pad) 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--ink);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.25s, transform 0.35s var(--ease), visibility 0s 0.35s;
  }

  .nav[data-theme='latte'] .nav__links {
    border-bottom-color: rgb(var(--ink-rgb) / 0.14);
    background: var(--latte);
  }

  .nav.is-open .nav__links {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .nav__links a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    font-stretch: 112%;
    letter-spacing: -0.02em;
    opacity: 1;
  }

  .nav[data-theme='latte'] .nav__links a {
    border-bottom-color: rgb(var(--ink-rgb) / 0.14);
  }

  .nav__links a[aria-current]::after {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--nav-h);
  overflow: clip;
}

.hero__chart {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: calc(1 - var(--hero-p, 0) * 0.85);
  transform: scale(calc(1 + var(--hero-p, 0) * 0.16));
}

.hero__meta {
  position: absolute;
  /* Lines up with the page's content column, however wide the screen is. */
  inset: calc(var(--nav-h) + 1rem) max(var(--pad), calc((100% - var(--max)) / 2)) auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--fg-mute);
}

.hero__body {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  padding: clamp(3.5rem, 8vh, 6rem) var(--pad) clamp(2.5rem, 6vh, 4.5rem);
  text-align: center;
  opacity: calc(1 - var(--hero-p, 0) * 1.5);
  transform: translateY(calc(var(--hero-p, 0) * -3rem));
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg-soft);
}

.hero__eyebrow::before {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ha);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.3rem, 9.4vw, 10rem);
  font-stretch: 120%;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.hero__line {
  display: block;
}

.hero__line--heavy {
  font-weight: 900;
}

/* "Zero gravity." is set as light as the typeface goes; each letter floats. */
.hero__line--light {
  font-weight: 180;
  letter-spacing: -0.02em;
}

.hero__word {
  display: inline-block;
  white-space: nowrap;
}

.hero__letter {
  display: inline-block;
  will-change: transform;
}

.hero__lede {
  max-width: 40rem;
  color: var(--fg-soft);
  font-size: clamp(1.08rem, 1.45vw, 1.3rem);
  line-height: 1.5;
  text-wrap: balance;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.hero__index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(calc(100% - var(--pad) * 2), var(--max));
  margin-inline: auto;
  border-top: 1px solid var(--line-strong);
}

.hero__index a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 1rem 1rem 1.4rem 0;
  font-weight: 600;
  font-stretch: 108%;
  text-decoration: none;
  transition: color 0.2s;
}

.hero__index .mono {
  color: var(--fg-mute);
  transition: color 0.2s;
}

.hero__index a:hover .mono {
  color: var(--ha);
}

.js .hero__meta,
.js .hero__eyebrow,
.js .hero__line,
.js .hero__lede,
.js .hero__cta,
.js .hero__index {
  animation: rise 1s var(--ease) backwards;
}

.js .hero__eyebrow { animation-delay: 0.1s; }
.js .hero__line--heavy { animation-delay: 0.2s; }
.js .hero__line--light { animation-delay: 0.34s; }
.js .hero__lede { animation-delay: 0.62s; }
.js .hero__cta { animation-delay: 0.76s; }
.js .hero__index,
.js .hero__meta { animation-delay: 0.95s; }

.js .hero__chart {
  animation: fade 1.8s ease backwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .hero__meta span:last-child {
    display: none;
  }

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

  .hero__index li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .hero__index a {
    padding-bottom: 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 560px) {
  .hero__title {
    font-size: clamp(3rem, 17.5vw, 5.5rem);
  }

  .hero__word {
    display: block;
  }
}

/* ---------- Plate 01: orbit explorer ---------- */

.orbit {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .orbit {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
}

.orbit__figure {
  width: min(100%, 36rem);
  margin-inline: auto;
}

.orbit__figure figcaption {
  margin-top: 1rem;
  color: var(--fg-mute);
  text-align: center;
}

html:not(.js) .orbit__figure {
  display: none;
}

.orbit__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.orbit__dial,
.orbit__axis {
  fill: none;
  stroke: var(--line);
}

.orbit__tick {
  stroke: var(--line-strong);
}

.orbit__deg {
  fill: var(--plate);
  font: 500 9px var(--font-mono);
  letter-spacing: 0.08em;
}

.orbit__path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  transition: stroke 0.4s, stroke-width 0.4s;
}

.orbit__path.is-active {
  stroke: var(--sig);
  stroke-width: 1.5;
}

.orbit__core {
  fill: var(--latte);
}

.orbit__core-ring {
  fill: var(--ink);
  stroke: var(--line-strong);
}

.orbit__planet {
  cursor: pointer;
}

.orbit__body {
  fill: var(--sig);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.45s var(--ease);
}

.orbit__halo {
  fill: none;
  stroke: var(--sig);
  opacity: 0;
  transform: scale(0.5);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.orbit__hit {
  fill: transparent;
}

.orbit__planet.is-active .orbit__body {
  transform: scale(1.55);
}

.orbit__planet.is-active .orbit__halo {
  opacity: 1;
  transform: none;
}

.orbit__label {
  fill: var(--plate);
  font: 500 10px var(--font-mono);
  letter-spacing: 0.09em;
  transition: fill 0.3s;
}

.orbit__planet.is-active .orbit__label,
.orbit__label--core {
  fill: var(--latte);
}

@media (max-width: 600px) {
  .orbit__label,
  .orbit__deg {
    font-size: 15px;
  }
}

.orbit__list {
  border-top: 1px solid var(--line);
}

.orbit__item {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.orbit__item[data-signal='ha'] { --sig: var(--ha); }
.orbit__item[data-signal='na'] { --sig: var(--na); }
.orbit__item[data-signal='rigel'] { --sig: var(--rigel); }
.orbit__item[data-signal='o3'] { --sig: var(--o3); }

.orbit__item::before {
  content: '';
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  background: var(--sig);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.orbit__item.is-active::before {
  transform: scaleX(1);
}

/* While the explorer cycles on its own, the rule doubles as a timer. */
.orbit[data-auto] .orbit__item.is-active::before {
  transition: transform 5.2s linear;
}

.orbit__btn {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  padding: 1.25rem 0;
  border: 0;
  background: none;
  color: var(--fg-soft);
  text-align: left;
  cursor: pointer;
  transition: color 0.3s;
}

.orbit__btn:hover,
.orbit__item.is-active .orbit__btn {
  color: var(--fg);
}

.orbit__no {
  color: var(--fg-mute);
}

.orbit__name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 2.05rem);
  font-weight: 720;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.022em;
}

.orbit__line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg-mute);
}

.orbit__line::after {
  content: '';
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--sig);
  opacity: 0.45;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.orbit__item.is-active .orbit__line::after {
  opacity: 1;
  transform: scale(1.3);
}

.orbit__panel {
  display: grid;
  grid-template-rows: 1fr;
}

.orbit__panel > div {
  overflow: hidden;
}

.js .orbit__panel {
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}

.js .orbit__panel > div {
  visibility: hidden;
  transition: visibility 0s 0.5s;
}

.js .orbit__item.is-active .orbit__panel {
  grid-template-rows: 1fr;
}

.js .orbit__item.is-active .orbit__panel > div {
  visibility: visible;
  transition-delay: 0s;
}

.orbit__panel p {
  max-width: 33rem;
  padding: 0 0 1rem 3.1rem;
  color: var(--fg-soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0 1.6rem 3.1rem;
}

.tags li {
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--line-strong);
  color: var(--fg-soft);
}

@media (max-width: 520px) {
  .orbit__line {
    font-size: 0;
  }

  .orbit__panel p,
  .tags {
    padding-left: 0;
  }
}

/* ---------- Plate 02: data flow ---------- */

.flow {
  display: grid;
}

.flow__stage {
  position: sticky;
  top: var(--nav-h);
  z-index: 2;
  margin-inline: calc(var(--pad) * -1);
  padding: 0.75rem var(--pad);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.flow__figure {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(44svh, 23rem);
  border: 1px solid var(--line);
}

.flow__bar,
.flow__figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  color: var(--fg-mute);
}

.flow__bar {
  border-bottom: 1px solid var(--line);
  color: var(--fg);
}

.flow__figure figcaption {
  border-top: 1px solid var(--line);
}

.flow__canvas {
  position: relative;
}

.flow__canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flow__edge {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  transition: stroke 0.5s;
}

.flow__edges.is-on .flow__edge {
  stroke: rgb(var(--latte-rgb) / 0.44);
}

.flow__packet {
  fill: var(--sig);
  opacity: 0;
  transition: opacity 0.4s;
}

.flow__edges.is-on .flow__packet {
  opacity: 1;
}

.flow__node {
  fill: var(--ink);
  stroke: var(--plate);
  stroke-width: 1.25;
  transition: fill 0.45s, stroke 0.45s;
}

.flow__group.is-lit .flow__node {
  fill: var(--sig);
  stroke: var(--sig);
}

.flow__ring {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  transition: stroke 0.45s;
}

.flow__ring--dash {
  stroke-dasharray: 3 6;
  transform-box: fill-box;
  transform-origin: center;
}

.flow__group.is-lit .flow__ring {
  stroke: var(--sig);
}

.flow__group.is-lit .flow__ring--dash {
  animation: spin 24s linear infinite;
}

.flow__glyph {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.4s;
}

.flow__glyph--fill {
  fill: var(--plate);
  stroke: none;
  opacity: 1;
  transition: fill 0.45s;
}

.flow__group.is-lit .flow__glyph {
  opacity: 1;
}

.flow__group.is-lit .flow__glyph--fill {
  fill: var(--ink);
}

.flow__pulse {
  fill: none;
  stroke: var(--sig);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.flow__group.is-current .flow__pulse {
  animation: ping 2.4s var(--ease) infinite;
}

.flow__label,
.flow__title {
  fill: var(--plate);
  font: 500 10px var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: fill 0.4s;
}

.flow__group.is-lit .flow__label {
  fill: rgb(var(--latte-rgb) / 0.85);
}

.flow__group.is-current .flow__title {
  fill: var(--latte);
}

.flow__chip {
  opacity: 0;
  transition: opacity 0.4s;
}

.flow__chip rect {
  fill: var(--sig);
}

.flow__chip text {
  fill: var(--ink);
  font: 600 9.5px var(--font-mono);
  letter-spacing: 0.08em;
}

.flow__group.is-lit .flow__chip {
  opacity: 1;
}

.flow--compact .flow__title {
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

.flow__step {
  display: grid;
  align-content: center;
  gap: 0.8rem;
  min-height: 42svh;
  padding-block: 1.5rem;
  transition: opacity 0.5s;
}

.js .flow__step {
  opacity: 0.32;
}

.js .flow__step.is-active {
  opacity: 1;
}

.flow__step[data-signal='latte'] { --sig: var(--latte); }
.flow__step[data-signal='ha'] { --sig: var(--ha); }
.flow__step[data-signal='na'] { --sig: var(--na); }
.flow__step[data-signal='o3'] { --sig: var(--o3); }
.flow__step[data-signal='rigel'] { --sig: var(--rigel); }

.flow__step .mono {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg-mute);
}

.flow__step .mono::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  background: var(--sig);
}

.flow__step h3 {
  font-size: clamp(1.6rem, 2.7vw, 2.35rem);
  font-weight: 740;
  font-stretch: 112%;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.flow__step p:last-child {
  max-width: 25rem;
  color: var(--fg-soft);
}

@media (min-width: 900px) {
  .flow {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 5rem);
  }

  .flow__steps {
    grid-column: 1;
    grid-row: 1;
  }

  .flow__stage {
    grid-column: 2;
    grid-row: 1;
    top: calc(var(--nav-h) + 1rem);
    display: grid;
    align-content: center;
    height: calc(100svh - var(--nav-h) - 2rem);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  .flow__figure {
    height: min(70svh, 36rem);
  }

  .flow__step {
    min-height: 62svh;
  }
}

/* ---------- Plate 03: migration plan ---------- */

.plan {
  --p: 0;
  position: relative;
  display: grid;
  gap: 2.75rem;
}

.plan::before,
.plan::after {
  content: '';
  position: absolute;
  inset: 0.4rem auto 0 5px;
  width: 1px;
  background: var(--line-strong);
}

.plan::after {
  left: 4.5px;
  width: 2px;
  background: var(--sig);
  transform: scaleY(var(--p));
  transform-origin: top;
}

.plan__step {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding-left: 2.25rem;
}

.plan__node {
  position: absolute;
  left: 0;
  top: 0.15rem;
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 1px solid var(--plate);
  background: var(--ink);
  transform: rotate(45deg);
  transition: background-color 0.4s, border-color 0.4s;
}

.plan__step.is-done .plan__node {
  border-color: var(--sig);
  background: var(--sig);
}

.plan__step .mono {
  color: var(--fg-mute);
  transition: color 0.4s;
}

.plan__step.is-done .mono {
  color: var(--sig);
}

.plan__step h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
}

.plan__step p:last-child {
  max-width: 22rem;
  color: var(--fg-soft);
}

@media (min-width: 900px) {
  .plan {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .plan::before,
  .plan::after {
    inset: 5px 0 auto;
    width: auto;
    height: 1px;
  }

  .plan::after {
    top: 4.5px;
    height: 2px;
    transform: scaleX(var(--p));
    transform-origin: left;
  }

  .plan__step {
    padding: 2.6rem 2rem 0 0;
  }

  .plan__node {
    top: 0;
  }
}

/* ---------- Plate 04: about ---------- */

.about {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }
}

.about__text {
  display: grid;
  gap: 1.4rem;
}

.about__text h2 {
  max-width: 9ch;
  margin-bottom: 0.6rem;
}

.about__text > p {
  max-width: 32rem;
  color: var(--fg-soft);
}

.vision {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.vision .mono {
  color: var(--fg-mute);
}

.vision__text {
  max-width: 25ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 640;
  font-stretch: 108%;
  line-height: 1.18;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  color: var(--fg-soft);
}

.values li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.values li::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--o3);
}

.sky {
  border: 1px solid var(--line);
}

.sky__canvas {
  position: relative;
  aspect-ratio: 1;
  cursor: crosshair;
  touch-action: manipulation;
}

html:not(.js) .sky {
  display: none;
}

.sky__canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sky figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--fg-mute);
}

.sky figcaption span {
  flex: 1;
}

.sky .textbtn {
  flex: none;
  white-space: nowrap;
}

.sky__grid {
  fill: none;
  stroke: var(--line);
}

.sky__link {
  stroke: rgb(var(--latte-rgb) / 0.4);
  stroke-width: 1;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 0.9s var(--ease) var(--d, 0s);
}

.sky__star {
  fill: var(--latte);
  opacity: 0;
  transform: scale(0.2);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.5s var(--d, 0s), transform 0.7s var(--ease) var(--d, 0s);
}

.sky.is-drawn .sky__link {
  stroke-dashoffset: 0;
}

.sky.is-drawn .sky__star {
  opacity: 1;
  transform: none;
}

.sky__link--user {
  stroke: var(--ha);
  stroke-dashoffset: 0;
  animation: sky-draw 0.8s var(--ease) backwards;
}

.sky__star--user {
  fill: var(--ha);
  opacity: 1;
  transform: none;
  animation: sky-pop 0.6s var(--ease) backwards;
}

.sky__label {
  fill: var(--plate);
  font: 500 10px var(--font-mono);
  letter-spacing: 0.09em;
}

.sky__label--core,
.sky__label--user {
  fill: var(--latte);
}

@keyframes sky-draw {
  from {
    stroke-dashoffset: var(--len);
  }
}

@keyframes sky-pop {
  from {
    opacity: 0;
    transform: scale(0.1);
  }
}

/* ---------- Plate 05: contact, on Cosmic Latte ---------- */

.latte {
  --fg: var(--ink);
  --fg-soft: rgb(var(--ink-rgb) / 0.8);
  --fg-mute: rgb(var(--ink-rgb) / 0.64);
  --line: rgb(var(--ink-rgb) / 0.16);
  --line-strong: rgb(var(--ink-rgb) / 0.42);
  --sig: var(--ha-deep);
  background: var(--latte);
  color: var(--ink);
  color-scheme: light;
}

.latte :focus-visible {
  outline-color: var(--ink);
}

.latte ::selection {
  background: var(--ink);
  color: var(--latte);
}

.contact {
  --rise: 1;
  position: relative;
  margin-top: clamp(6rem, 14vw, 12rem);
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(4rem, 9vw, 8rem);
}

/* The page lands on a planet: a flat Cosmic Latte horizon rises to meet you. */
.contact::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% - 1px);
  width: max(150vw, 70rem);
  height: clamp(3.5rem, 10vw, 10rem);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--latte);
  transform: translateX(-50%) scaleY(calc(0.25 + var(--rise) * 0.75));
  transform-origin: bottom;
}

.contact__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }
}

.contact__intro {
  display: grid;
  gap: 1.5rem;
}

.contact__intro h2 {
  max-width: 10ch;
}

.course {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.course svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.course figcaption {
  margin-top: 0.6rem;
  color: var(--fg-mute);
}

.course.is-ready figcaption {
  color: var(--o3-deep);
}

.course__track {
  fill: none;
  stroke: var(--line-strong);
  stroke-dasharray: 2 6;
}

.course__done {
  fill: none;
  stroke: var(--ha-deep);
  stroke-width: 2;
  transition: stroke-dashoffset 0.8s var(--ease);
}

.course__way {
  fill: var(--latte);
  stroke: rgb(var(--ink-rgb) / 0.55);
  transition: fill 0.3s, stroke 0.3s;
}

.course__way.is-set {
  fill: var(--ink);
  stroke: var(--ink);
}

.course__body {
  fill: var(--ink);
}

.course__label {
  fill: rgb(var(--ink-rgb) / 0.64);
  font: 500 9.5px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course__name {
  fill: var(--ink);
  font: 600 10.5px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .course__label {
    font-size: 12px;
  }

  .course__name {
    font-size: 13px;
  }
}

.form {
  display: grid;
  gap: 1.75rem;
}

.form__row {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 600px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label,
.choice legend {
  color: var(--fg-mute);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem 0 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 1.125rem;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-bottom-color: var(--ink);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

.field [aria-invalid='true'] {
  border-bottom-color: var(--ha-deep);
  box-shadow: 0 1px 0 var(--ha-deep);
}

.field__error {
  color: var(--ha-deep);
  font-size: 0.875rem;
}

.field__error:empty {
  display: none;
}

.choice {
  display: grid;
  gap: 0.75rem;
}

.choice__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice label {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.choice label:hover span {
  border-color: var(--ink);
}

.choice input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--latte);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.latte .btn--primary:hover {
  background: var(--ink);
  color: var(--latte);
}

.form__status {
  flex: 1 1 16rem;
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.form__status:empty {
  display: none;
}

.form__status[data-state='error'] {
  color: var(--ha-deep);
}

.form__status[data-state='sent'] {
  color: var(--o3-deep);
}

/* ---------- Footer ---------- */

.footer {
  /* Overlap the contact section by a pixel so no seam shows between the two. */
  margin-top: -1px;
  padding: 1px 0 2rem;
}

.footer__mark {
  width: 100%;
  height: auto;
  color: var(--ink);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-strong);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.footer a {
  font-weight: 550;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.footer .mono {
  color: var(--fg-mute);
}

/* ---------- Terms page ---------- */

.doc {
  display: grid;
  align-content: center;
  gap: 1.5rem;
  min-height: 100svh;
  padding-block: calc(var(--nav-h) + 3rem) 4rem;
}

.doc h1 {
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 800;
  font-stretch: 116%;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.doc p {
  max-width: 36rem;
  color: var(--fg-soft);
}

.doc .tag {
  margin-bottom: 1rem;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .flow__packet {
    display: none;
  }
}
