/* Hypha · Invitation candidate — base: fonts, tokens, type, scroll scenes */

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Hypha anchors (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;

  /* light side */
  --paper: #f6f8f5;
  --paper-2: #edf1ec;
  --ink: #07100e;
  --ink-2: #1f2925;
  --ink-3: #4d5752;

  --f-display: "Space Grotesk", "Geist", system-ui, sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* the visitor's own tools keep their own type */
  --f-sheet: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --f-app: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-code: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 16px;
  --stage-h: 100vh;
}
@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%;
  scroll-behavior: auto;
  background: var(--paper);
}

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; }

.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;
  text-decoration: none;
  line-height: 1;
}

.eyebrow {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  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.9;
  margin: 0;
}

.h1 { font-size: clamp(46px, 7.4vw, 124px); }
.h2 { font-size: clamp(36px, 5.2vw, 84px); line-height: 0.94; }

/* electric-green highlight block on light surfaces (one phrase) */
.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;
}

/* one green phrase on dark surfaces: it glows, it is light. No underline: an underlined green phrase reads as a link */
.sig {
  color: var(--neon);
  text-shadow: 0 0 22px rgb(57 241 100 / 0.42), 0 0 3px rgb(189 246 199 / 0.55);
}

.lede {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(18px, 1.55vw, 25px);
  line-height: 1.45;
  margin: 0;
  text-wrap: pretty;
}

.say {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.quote {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(25px, 2.75vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

/* ---------- scroll scenes ---------- */

.scene {
  position: relative;
  height: calc((var(--len, 4) + 1) * var(--stage-h));
}
/* a scene that starts while the one before is still pinned: for half a screen both hold still
   and the new one fades in over the old, so no seam ever scrolls past */
.scene--xfade { margin-top: calc(-1.5 * var(--stage-h)); }
.scene--xfade > .stage { opacity: 0; }

.stage {
  position: sticky;
  top: 0;
  height: var(--stage-h);
  overflow: hidden;
  isolation: isolate;
}

.caps {
  position: absolute;
  z-index: 20;
  pointer-events: none;
}
.cap {
  position: absolute;
  left: 0; right: 0;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}
.cap a, .cap button { pointer-events: auto; }

@media (min-width: 900px) {
  .caps {
    left: var(--gutter);
    width: min(36vw, 560px);
    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, 60%);
    bottom: 0;
  }
  .cap { top: 18px; }
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 1000;
  background: #121a17;
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  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(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.toast.is-on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .cap { transition: none; }
}
