/* Hypha · JV partner · base: tokens, type, scroll scenes. The master's (workshop/architect/css/base.css), carried as
   it is, less its hand-drawn grey tokens and letters (punch list row 1). The fonts, their tokens (--f-display, --f-body,
   --f-mono) and upright emphasis come from the shared type kit, linked before this file in every head
   (shared/type.css, a byte-for-byte copy of the kit's: font-synthesis none, no slanted face, every em and i upright). */

:root {
  --grain: none;
  /* Hypha light and depth (brand/LOOK.md) */
  --void: #020605;
  --carbon: #07100e;
  --forest: #042117;
  --emerald: #1d8252;
  --signal: #35a677;
  --mint: #65dbae;
  --neon: #39f164;
  --core: #f8fdfa;
  --core-g: #bdf6c7;
  --halo: #367e62;
  --halo-2: #0e3f28;
  --tail: #031f11;
  --haze: #0a281e;
  --edge-1: #2d975e;
  --edge-2: #4ddac7;
  --white: #f9fafa;
  --silver: #c6cbc2;
  --steel: #919693;
  --slate: #6d736f;
  --rim: #a3b7c3;
  --prod-1: #04070a;
  --prod-2: #070e10;
  --gold-1: #f6edcf;
  --gold-2: #edd894;
  --gold-3: #e3be7a;
  --gold-4: #967a4c;
  --red: #ab1f24;
  --red-core: #e82a31;

  /* Hypha's own white and near-black ink */
  --paper: #f9fafa;
  /* every button carries Hypha's green as a light under it (M8) */
  --btn-glow: 0 14px 30px -12px rgb(57 241 100 / 0.62), 0 5px 16px -8px rgb(57 241 100 / 0.42);
  --paper-in: #f6f8f5; /* the paper the Invitation ended on: the doorway starts here */
  --paper-2: #eef1ee;
  --ink: #07100e;
  --ink-2: #1f2925;
  --ink-3: #4a544f;

  /* the four starting lenses, as the Invitation coloured them */
  --c-hunter: #65dbae;
  --c-architect: #4ddac7;
  --c-rainmaker: #e3be7a;
  --c-commander: #a3b7c3;

  /* the visitor's own paperwork keeps its own type */
  --f-sheet: Arial, "Helvetica Neue", Helvetica, sans-serif;
  /* no page-wide app face: shared/type.css gives --f-app a page-wide Geist, un-set here; each app root sets its real
     counterpart's face (shared/app-kit/app-kit.css) and printed paper falls back to --f-sheet */
  --f-app: initial;
  --f-code: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 16px;
  --stage-h: 100vh;
  /* one hundredth of the stage's height: what a vh is inside a pinned stage (a phone's 100svh, never its changing window) */
  --sv: calc(var(--stage-h) / 100);
  --col: min(1240px, calc(100vw - 2 * var(--gutter)));
}
@supports (height: 100svh) {
  :root { --stage-h: 100svh; }
}
@media (min-width: 900px) {
  :root { --gutter: clamp(32px, 5.5vw, 88px); }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper-in);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 4px; }

/* ---------- type ---------- */
.mark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.22em;
  line-height: 1;
}
.eyebrow, .label {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}
.display {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(46px, 7.2vw, 118px); }
.h2 { font-size: clamp(36px, 5vw, 80px); line-height: 0.94; }
.h3 { font-size: clamp(30px, 3.6vw, 58px); line-height: 0.98; }
.lede {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.5;
  text-wrap: pretty;
}
.say {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(25px, 2.6vw, 42px);
  line-height: 1.13;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.say--soft { font-weight: 500; }
/* an inner thought: said in the head, set as a quote */
.thought {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.body {
  font-size: clamp(17.5px, 1.25vw, 20px);
  line-height: 1.58;
  text-wrap: pretty;
}

/* one green phrase on paper: a solid electric-green highlight behind ink (as the Invitation set it) */
.hl {
  display: inline-block;
  background: var(--neon);
  color: var(--ink);
  line-height: 0.84;
  padding: 0.07em 0.09em 0.03em;
  margin: 0.04em -0.03em 0;
}
/* the same light behind words that wrap (body sizes) */
.hl-in {
  background: var(--neon);
  color: var(--ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.12em;
}
/* the green goes under every letter, never over the line above (ported from Amp 2). An inline background fills the
   font's whole height, taller than a headline's tight lines, and a later line paints after the line above, so its
   green would cover the foot of the letters above it. A line holding a green phrase keeps its own layers: the green at
   the bottom, every letter over it; a phrase that wraps carries its letters in .hl-t, over its own green on every
   line (the finish check counts COVERED 0). */
@supports selector(:has(a)) {
  :is(h1, h2, h3, p):has(> :is(.hl, .hl-in)) { isolation: isolate; }
  :is(h1, h2, h3, p) > :is(.hl, .hl-in) { position: relative; z-index: -1; }
}
.hl-t { position: relative; }
/* a green phrase in a display line that may wrap: the same light, cloned on every line it breaks onto */
.hl--wrap { display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; line-height: inherit; padding: 0.02em 0.1em 0; margin: 0 -0.04em; }
/* one green phrase on dark: it is light */
.sig {
  color: var(--neon);
  text-shadow: 0 0 22px rgb(57 241 100 / 0.42), 0 0 3px rgb(189 246 199 / 0.55);
}

/* ---------- scroll scenes: a sticky stage over a tall section ---------- */
.scene { position: relative; height: calc((var(--len, 4) + 1) * var(--stage-h)); }
.stage {
  position: sticky;
  top: 0;
  height: var(--stage-h);
  overflow: hidden;
  isolation: isolate;
}
.caps { position: absolute; z-index: 40; pointer-events: none; }
.cap {
  position: absolute;
  left: 0; right: 0;
  opacity: 0;
  visibility: hidden;
}
/* a layer of its own only while its scene is near (WORLD §8) */
.stage.is-near .cap { will-change: opacity, transform; }
.cap a, .cap button { pointer-events: auto; }
/* each page's first-screen title is visible from the first paint, in the exact state its timeline writes at scroll
   zero (speed row A1: the headline never waits for the scripts) */
#message .cap[data-k="title"], #announce .cap[data-k="title"], #intro .cap[data-k="title"] { opacity: 1; visibility: visible; transform: translate3d(0, 0, 0); }
@media (min-width: 900px) {
  .caps { left: var(--gutter); width: min(34vw, 540px); top: 0; bottom: 0; }
  .cap { top: 50%; translate: 0 -50%; }
}
@media (max-width: 899px) {
  .caps { left: var(--gutter); right: var(--gutter); top: var(--cap-top, 58%); bottom: 0; }
  .cap { top: 14px; }
}

/* ---------- flowing sections ---------- */
.wrap { width: var(--col); margin: 0 auto; }
.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.rv.is-in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: 0.08s; }
.rv[data-d="2"] { transition-delay: 0.16s; }
.rv[data-d="3"] { transition-delay: 0.24s; }
.rv[data-d="4"] { transition-delay: 0.32s; }

/* ---------- the small note for anything that would leave this page ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 1000;
  background: #101916;
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 16px 11px 14px;
  border-radius: 999px;
  border: 1px solid rgb(77 218 199 / 0.35);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.35), 0 0 22px rgb(57 241 100 / 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold-2); }
.toast.is-on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { transition: none; opacity: 1; transform: none; }
}

/* a stamp is written from the visitor's own clock (js/trail.js); until it is, its empty node holds its width */
[data-date]:empty, [data-month]:empty, [data-time]:empty { display: inline-block; min-width: 3.1em; }
[data-date][data-long]:empty { min-width: 7.4em; }
[data-month]:empty { min-width: 6.3em; }
[data-time]:empty { min-width: 2.6em; }
