/* ============================================================
   SHABADOO — site styles
   Dark, editorial, restrained. The only moving thing on the
   page is the mascot's head, turning toward the pointer.
   ============================================================ */

/* Self-hosted IBM Plex Mono (latin subset), preloaded by every page so it is ready at first paint. */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --ink: #05070c;          /* page ground — deep blue-black, from the scene */
  --ink-raise: #0a0d16;    /* raised surface (philosophy section) */
  --paper: #f4f5f8;        /* primary text — cool near-white */
  --haze: #9aa4ba;         /* secondary text */
  --haze-dim: #5a6274;     /* decorative only (big numerals, rules) — below AA for small text */
  --haze-mid: #7d869a;     /* small labels and captions: ~5.3:1 on --ink */
  --line: rgba(255, 255, 255, 0.15);
  --error: #ff9b8a;        /* form errors: ~9:1 on --ink */
  --globe: #5aa9ff;        /* single accent — the glowing globe. used sparingly */

  --font-sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.15rem, 3.2vw, 2.6rem);
  --measure: 64ch;

  --scene-length: 900svh;  /* scroll distance of the pinned scene: t12 3.2 screens, hold, t23 3.2, hold */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

img,
video { display: block; max-width: 100%; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

@media (max-height: 620px) {
  .hero { min-height: 620px; }
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--mascot-x, 68%) 50%;   /* keep the figure in frame; JS slides --mascot-x on phones */
  z-index: 0;
  background: var(--ink);
  pointer-events: none;
}

/* Touch devices: nothing to track, so a fixed still replaces the head clip (which is never downloaded). */
.hero__still { display: none; }
.is-touch .hero__still { display: block; }
.is-touch [data-hero-video] { display: none; }

/* Phones: the scene plays cropped image frames on a canvas that is wider than the screen. The layer is moved with a
   transform (GPU only) instead of animating object-position (a repaint of a full-screen layer every frame). */
.is-phone { --seq-w: calc(89svh * 1.0127); }
.is-phone .hero__media {
  inset: auto;
  top: 11svh;
  left: 0;
  max-width: none;                 /* the site-wide img { max-width: 100% } would squeeze the still */
  width: var(--seq-w);
  height: 89svh;
  object-fit: fill;
  object-position: initial;
  transform: translate3d(var(--pan-x, clamp(calc(100vw - var(--seq-w)), calc(50vw - 0.58 * var(--seq-w)), 0px)), 0, 0);
  will-change: transform;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      101deg,
      rgba(5, 7, 12, 0.88) 0%,
      rgba(5, 7, 12, 0.64) 26%,
      rgba(5, 7, 12, 0.14) 52%,
      rgba(5, 7, 12, 0) 72%
    ),
    linear-gradient(to top, rgba(5, 7, 12, 0.55) 0%, rgba(5, 7, 12, 0) 24%),
    linear-gradient(to bottom, rgba(5, 7, 12, 0.4) 0%, rgba(5, 7, 12, 0) 20%);
}

.hero__frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  padding: var(--gutter);
  pointer-events: none;
}

/* Load sequence: each element rises 0.9rem and fades in, staggered by --i.
   transform + opacity only; whole sequence lands in ~1.5s. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 0.9rem, 0);
  animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(80ms + var(--i, 0) * 120ms);
}

@keyframes reveal {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.hero__bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero__brand {
  pointer-events: auto;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.hero__brand span {
  font-size: 0.62em;
  vertical-align: super;
  margin-left: 0.15em;
  color: var(--haze);
}

.hero__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.hero__nav a {
  pointer-events: auto;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--haze);
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.hero__nav a:hover,
.hero__nav a:focus-visible { color: var(--paper); border-color: var(--globe); }
.hero__nav a span { color: var(--globe); }

.hero__copies {
  align-self: center;
  max-width: min(92vw, 44vw);
  display: grid;
}

.hero__copy {
  grid-area: 1 / 1;
  align-self: center;
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.6rem);
}

.hero__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.1vw, 0.8rem);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #a8b0c2;
}

.hero__headline {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.85vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-transform: uppercase;
  color: var(--paper);
}
.hero__headline span { display: block; white-space: nowrap; }

.hero__sub {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(0.98rem, 1.5vw, 1.15rem);
  line-height: 1.5;
  color: var(--haze);
}

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}

.hero__meta,
.hero__scroll {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--haze);
}

.hero__scroll {
  pointer-events: auto;
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.hero__brand:active,
.hero__nav a:active,
.hero__scroll:active { opacity: 0.7; }
.hero__scroll { display: inline-grid; }
.hero__scroll-label { grid-area: 1 / 1; text-align: right; white-space: nowrap; }
.hero__scroll-label > span { color: var(--globe); margin-left: 0.4em; display: inline-block; }
.hero__scroll-label--2 { opacity: 0; visibility: hidden; }
.hero__scroll:hover,
.hero__scroll:focus-visible { color: var(--paper); border-color: var(--globe); }

/* ------------------------------------------------------------
   SCENE — pinned Stage 1 -> Stage 2 (driven by assets/js/scene.js)
   Default = static stacked sections. JS adds .is-scrubbing once the
   stand-up clip is in memory, which pins the hero and gives the
   scene its scroll length. All motion below is transform/opacity,
   fed by CSS variables the controller sets on .scene.
   ------------------------------------------------------------ */

.hero__media--standup,
.hero__media--globe { opacity: 0; }

.hero__copy--2,
.hero__copy--3,
.stage-static { display: none; }
.hero__copy[data-off] { visibility: hidden; }

.scene.is-scrubbing { height: var(--scene-length); }
.scene.is-scrubbing .scene__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}
.scene.is-scrubbing .hero { height: 100%; min-height: 0; }
.scene.is-scrubbing .hero__frame { position: absolute; inset: 0; min-height: 0; }

.scene.is-scrubbing .hero__copy--1 {
  opacity: calc(1 - var(--s1, 0));
  transform: translate3d(0, calc(var(--s1, 0) * -2.4rem), 0);
  will-change: transform, opacity;
}

.scene.is-scrubbing .hero__copy--2,
.scene.is-scrubbing .hero__copy--3 { display: grid; }

/* Stage 2 copy enters with --o and leaves (rising) with --s2out; Stage 3 copy only enters. */
.s2 {
  opacity: calc(var(--o, 0) * (1 - var(--s2out, 0)));
  transform: translate3d(0, calc((1 - var(--o, 0)) * 0.9rem - var(--s2out, 0) * 1.2rem), 0);
  will-change: transform, opacity;
}
.s3 {
  opacity: var(--o, 0);
  transform: translate3d(0, calc((1 - var(--o, 0)) * 0.9rem), 0);
  will-change: transform, opacity;
}
.s2-a { --o: var(--s2a, 0); }
.s2-b { --o: var(--s2b, 0); }
.s2-c { --o: var(--s2c, 0); }
.s2-d { --o: var(--s2d, 0); }
.s3-a { --o: var(--s3a, 0); }
.s3-b { --o: var(--s3b, 0); }
.s3-c { --o: var(--s3c, 0); }
.s3-d { --o: var(--s3d, 0); }
.s3-e { --o: var(--s3e, 0); }

/* sequential, not overlapping: label 1 out over the first half, label 2 in over the second */
.scene.is-scrubbing .hero__scroll { opacity: calc(1 - var(--foot-hide, 0)); }
.hero__scroll[data-off] { visibility: hidden; }
.scene.is-scrubbing .hero__scroll-label--1 { opacity: max(0, calc(1 - var(--foot, 0) * 2)); }
.scene.is-scrubbing .hero__scroll-label--2 { opacity: max(0, calc(var(--foot, 0) * 2 - 1)); visibility: visible; }

/* Static Stage 2 and 3 panels (reduced motion / clip failed / no JS) */
.scene:not(.is-scrubbing) ~ .stage-static {
  display: block;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.stage-static__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.stage-static__img--globe { object-position: 70% 50%; }
.stage-static__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(101deg, rgba(5, 7, 12, 0.88) 0%, rgba(5, 7, 12, 0.55) 28%, rgba(5, 7, 12, 0) 62%);
}
.stage-static__copy {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: grid;
  align-content: center;
  gap: clamp(1rem, 2.4vw, 1.6rem);
  max-width: min(92vw, 44vw);
  padding: var(--gutter);
}

/* ------------------------------------------------------------
   CREED — the studio's mentality
   ------------------------------------------------------------ */

.creed {
  background: var(--ink-raise);
  border-top: 1px solid var(--line);
}

.creed__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 9rem) var(--gutter);
}

.creed__eyebrow {
  margin: 0 0 clamp(1.75rem, 5vw, 3rem);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--haze-dim);
}

.creed__lead {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--paper);
  max-width: 18ch;
}

.creed__desc {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  color: var(--haze);
}

.creed__list {
  list-style: none;
  margin: clamp(3.5rem, 9vw, 6rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.principle {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.6rem, 4vw, 2.4rem) 0;
  border-top: 1px solid var(--line);
}
.principle:last-child { border-bottom: 1px solid var(--line); }

.principle__no {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
}

.principle__note {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.5;
  color: var(--haze);
}

@media (min-width: 720px) {
  .principle {
    grid-template-columns: 15rem 1fr;
    gap: 2rem;
    align-items: baseline;
  }
}

.creed__outro {
  margin: clamp(4rem, 10vw, 7rem) 0 0;
  display: grid;
  gap: 1.4rem;
}

.creed__outro-line {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--paper);
}

.creed__cta {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}
.creed__cta span {
  display: inline-block;
  margin-left: 0.6em;
  color: var(--globe);
  transition: transform 0.25s ease;
}
.creed__cta:hover,
.creed__cta:focus-visible { border-color: var(--globe); }
.creed__cta:hover span,
.creed__cta:focus-visible span { transform: translateX(0.3em); }

/* ------------------------------------------------------------
   SITE CHROME — shared header (secondary pages) + footer (every route).
   Rendered by assets/js/site.js from site-config.js.
   ------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap { padding-inline: var(--gutter); }

.label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--haze-mid);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: var(--gutter);
}
.site-header__brand,
.site-footer__brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.site-header__brand span,
.site-footer__brand span {
  display: inline-block;
  font-size: 0.62em;
  vertical-align: super;
  margin-left: 0.15em;
  color: var(--haze);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.site-header__brand:hover span,
.site-header__brand:focus-visible span,
.site-footer__brand:hover span,
.site-footer__brand:focus-visible span { transform: rotate(360deg); }
.site-header__nav { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.site-header__nav a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--haze);
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.site-header__nav a span { color: var(--globe); }
.site-header__nav a:hover,
.site-header__nav a:focus-visible,
.site-header__nav a[aria-current="page"] { color: var(--paper); border-color: var(--globe); }
.site-header__nav a:active { opacity: 0.7; }

/* Shared text link, same mono/underline language as the rest of the site */
.cta {
  pointer-events: auto;
  justify-self: start;
  align-self: start;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  padding: 0.15rem 0 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}
.cta span { display: inline-block; margin-left: 0.5em; color: var(--globe); transition: transform 0.25s ease; }
.cta:hover,
.cta:focus-visible { border-color: var(--globe); }
.cta:hover span,
.cta:focus-visible span { transform: translate(0.25em, -0.25em); }
.cta:active { opacity: 0.7; }
.cta--lg { font-size: clamp(0.9rem, 1.4vw, 1.1rem); padding-bottom: 0.6rem; }

/* Footer: the last scene — an end-credit composition, not a column grid */
.site-footer {
  position: relative;
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: clamp(4.5rem, 14vh, 9rem) var(--gutter) 0;
}
.site-footer__inner { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.site-footer__statement { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.site-footer__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(3.2rem, 13vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--paper);
}
.site-footer__title > span:last-child > span { color: var(--haze); }
.site-footer__aside { display: grid; gap: 2.5rem; align-items: end; }
.site-footer__cta { display: grid; gap: 1.5rem; justify-items: start; align-content: end; }
.site-footer__note { margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; color: var(--haze); }

.site-footer__nav { width: 100%; max-width: 26rem; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.site-footer__nav li { border-bottom: 1px solid var(--line); }
.site-footer__nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;               /* >= 44px tap target with the line-height */
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--haze);
}
.site-footer__nav a { transition: color 0.25s ease, transform 0.25s ease; }
.site-footer__nav a i {
  font-style: normal;
  color: var(--globe);
  opacity: 0;
  transform: translateX(-0.6rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.site-footer__nav a:hover,
.site-footer__nav a:focus-visible,
.site-footer__nav a[aria-current="page"] { color: var(--paper); }
.site-footer__nav a:hover,
.site-footer__nav a:focus-visible { transform: translateX(0.3rem); }
.site-footer__nav a:hover i,
.site-footer__nav a:focus-visible i,
.site-footer__nav a[aria-current="page"] i { opacity: 1; transform: none; }
.site-footer__nav a:active { opacity: 0.7; }

.site-footer__bar {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  padding: 1.6rem 0 2rem;
  border-top: 1px solid var(--line);
}
.site-footer__sig,
.site-footer__copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--haze-mid);
}

@media (min-width: 900px) {
  .site-footer__aside { grid-template-columns: 1fr minmax(18rem, 26rem); column-gap: clamp(2rem, 6vw, 6rem); }
  .site-footer__nav { justify-self: end; }
  .site-footer__bar { grid-template-columns: 1fr auto 1fr; align-items: baseline; }
  .site-footer__sig { text-align: center; }
  .site-footer__copy { text-align: right; }
}

/* Reveals (enabled by site.js only when it can run them; without JS everything is simply visible) */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 1.1rem, 0);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal-lines] > span { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
[data-reveal-lines] > span > span { display: block; }
.js-reveal [data-reveal-lines] > span > span {
  transform: translate3d(0, 105%, 0);
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-reveal [data-reveal-lines].is-in > span > span { transform: none; }
.js-reveal [data-reveal-lines].is-in > span:nth-child(2) > span { transition-delay: 0.1s; }
.js-reveal [data-reveal-lines].is-in > span:nth-child(3) > span { transition-delay: 0.2s; }
.js-reveal [data-reveal-lines].is-in > span:nth-child(4) > span { transition-delay: 0.3s; }

/* ------------------------------------------------------------
   PAGES — Experiments placeholder + About
   ------------------------------------------------------------ */

.page__body {
  max-width: 30rem;
  min-height: 62svh;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  padding: var(--gutter);
  margin-inline: 0;
}
.page__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-transform: uppercase;
}
.page__lead { margin: 0; font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.55; color: var(--haze); }
.page__back {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.25s ease;
}
.page__back span { color: var(--globe); margin-right: 0.5em; display: inline-block; transition: transform 0.25s ease; }
.page__back:hover,
.page__back:focus-visible { border-color: var(--globe); }
.page__back:hover span,
.page__back:focus-visible span { transform: translateX(-0.3em); }

.display {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.7rem, 8.4vw, 8.2rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--paper);
}
.display--sm { font-size: clamp(2.3rem, 6.2vw, 5.8rem); }
.lede {
  margin: 0;
  font-size: clamp(1.5rem, 3.1vw, 2.7rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: 26ch;
}
.body { margin: 0; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6; color: var(--haze); max-width: 40ch; }

.about section { position: relative; padding-block: clamp(4.5rem, 13vh, 9.5rem); }
.about section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--line);
}
.about .about-intro { padding-top: clamp(2.5rem, 8vh, 5rem); }
.about section > .label { margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }

.about-intro__body { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
.about-intro__copy { display: grid; gap: 1.5rem; align-content: start; }
.portrait { margin: 0; display: grid; gap: 0.9rem; max-width: 24rem; }
.portrait__frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-raise); border: 1px solid var(--line); }
.portrait__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
/* Mouse over: the head turns side-on. The profile sits on top and fades in over the front view. */
.portrait__img--side { opacity: 0; transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
  .portrait__frame:hover .portrait__img--side { opacity: 1; }
}
.portrait figcaption { color: var(--haze-mid); white-space: nowrap; }

.principles { list-style: none; margin: clamp(3rem, 7vw, 5.5rem) 0 0; padding: 0; }
.principle-row {
  display: grid;
  grid-template-columns: clamp(3.4rem, 9vw, 7.5rem) 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.8rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
}
.principle-row:last-child { border-bottom: 1px solid var(--line); }
.principle-row__no {
  font-size: clamp(2.6rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--haze-dim);
  transition: color 0.4s ease;
}
.principle-row:hover .principle-row__no { color: var(--globe); }
.principle-row__title {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
}
.principle-row__text {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--paper);
  max-width: 28ch;
}

.about-make__copy { margin-top: clamp(2rem, 5vw, 3.5rem); }
.about-make__next > span { color: var(--haze-mid); }

.about-close { display: grid; gap: clamp(2rem, 5vw, 3.5rem); justify-items: start; }
@media (max-width: 640px) { .about-close .display { font-size: 8.4vw; } }

@media (min-width: 900px) {
  .about-intro__body { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .portrait { justify-self: end; width: clamp(16rem, 26vw, 24rem); }
  .about-make__title > span:nth-child(2) { padding-left: 6vw; }
  .about-make__title > span:nth-child(3) { padding-left: 12vw; }
  .about-make__title > span:nth-child(4) { padding-left: 6vw; }
  .about-make__copy { margin-left: clamp(0rem, 52vw, 52rem); }
}

/* ------------------------------------------------------------
   CONTACT
   ------------------------------------------------------------ */

.inline-link {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--haze-mid);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.inline-link:hover,
.inline-link:focus-visible { border-color: var(--globe); }
.inline-link:active { opacity: 0.7; }

.display--xs { font-size: clamp(2rem, 4.2vw, 3.4rem); }

.contact { display: grid; gap: clamp(3rem, 7vw, 5rem); padding-top: clamp(1.5rem, 5vh, 3rem); padding-bottom: clamp(5rem, 14vh, 9rem); }
.contact__intro { display: grid; gap: clamp(1.25rem, 3vw, 2rem); align-content: start; }
.contact .display { font-size: clamp(2.3rem, 5.1vw, 5.4rem); }   /* "Got something / on your mind?" stays on two lines */
.contact__panel { display: grid; gap: 1.75rem; width: 100%; max-width: 34rem; align-content: start; }
.contact__drop { color: var(--haze-mid); }
.contact__alt { margin: 0.5rem 0 0; font-size: 1rem; line-height: 1.5; color: var(--haze); }

.cf { display: grid; gap: 0.7rem; }
.field { display: grid; gap: 0.1rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--haze-mid);
  transition: color 0.25s ease;
}
.field:focus-within label { color: var(--paper); }
.field input,
.field textarea {
  width: 100%;
  min-height: 3.25rem;                   /* touch-friendly */
  padding: 0.8rem 0;
  font: inherit;
  font-size: 1.15rem;                    /* >= 16px: no iOS zoom on focus */
  line-height: 1.5;
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--haze-mid); opacity: 0.8; }
.field input:hover,
.field textarea:hover { border-bottom-color: rgba(255, 255, 255, 0.4); }
.field input:focus-visible,
.field textarea:focus-visible { border-bottom-color: var(--globe); box-shadow: 0 1px 0 0 var(--globe); }   /* a clear, thicker focus line */
.field.is-invalid input,
.field.is-invalid textarea { border-bottom-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.field__error {
  margin: 0;
  min-height: 1.5rem;                    /* reserved: validation never moves the layout */
  padding-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--error);
}
.field input:-webkit-autofill,
.field textarea:-webkit-autofill { -webkit-text-fill-color: var(--paper); transition: background-color 9999s ease; }

.cf__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf__actions { display: grid; gap: 0.9rem; margin-top: 0.75rem; justify-items: start; }
.cf__error { margin: 0; min-height: 3.5rem; font-size: 0.95rem; line-height: 1.5; color: var(--error); max-width: 34rem; }   /* reserved */
.cf__error .inline-link { color: var(--error); border-bottom-color: currentColor; }
.cf__hint { display: block; margin-top: 0.4rem; color: var(--haze); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; line-height: 1.5; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 3.25rem;
  padding: 0 1.7rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}
.btn__arrow { color: var(--globe); display: inline-block; transition: transform 0.25s ease; }
.btn:hover:not(:disabled),
.btn:focus-visible { border-color: var(--globe); background-color: rgba(90, 169, 255, 0.08); }
.btn:hover:not(:disabled) .btn__arrow,
.btn:focus-visible .btn__arrow { transform: translate(0.25em, -0.25em); }
.btn:active:not(:disabled) { opacity: 0.7; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn:disabled .btn__arrow { display: none; }

.cf-done { display: grid; gap: 1.5rem; justify-items: start; outline: none; }
.cf-done[hidden],
.cf[hidden] { display: none; }

@media (min-width: 1200px) {
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 34rem); column-gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
  .contact__panel { justify-self: end; padding-top: 0.6rem; }
}

/* Page transitions: a short cross-fade between routes where the browser supports it. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.28s; animation-timing-function: ease; }

/* ------------------------------------------------------------
   NARROW VIEWPORTS
   On phones the framing tightens around the figure, so the copy
   is anchored to the darker lower third and the scrim leans
   harder from the floor up — keeps every line readable across
   the whole scrub range.
   ------------------------------------------------------------ */

@media (max-width: 640px) {
  .hero__media { top: 11svh; height: 89svh; }   /* leaves the head clear of the 3-line nav when he stands */
  .hero::before {                                /* soft top edge where the picture starts (cheaper than masking video) */
    content: "";
    position: absolute;
    z-index: 1;
    top: 11svh;
    left: 0;
    right: 0;
    height: 8svh;
    background: linear-gradient(to bottom, var(--ink), rgba(5, 7, 12, 0));
    pointer-events: none;
  }
  .scene { --mascot-x: 76%; --scene-length: 650svh; }   /* JS slides --mascot-x to follow the figure */
  .hero__headline { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  .hero__headline span { white-space: normal; }

  /* Darkness only where the copy sits (the lower ~45%), so the picture above it keeps its full brightness. The old
     version reached up past the middle of the screen and added a diagonal from the left: it removed ~40% of the
     picture's light on phones (desktop keeps ~96%). */
  .hero__scrim {
    background: linear-gradient(
      to top,
      rgba(5, 7, 12, 0.9) 0%,
      rgba(5, 7, 12, 0.8) 20%,
      rgba(5, 7, 12, 0.62) 34%,
      rgba(5, 7, 12, 0.22) 46%,
      rgba(5, 7, 12, 0) 56%
    );
  }
  .hero__copy { text-shadow: 0 1px 16px rgba(5, 7, 12, 0.8), 0 0 3px rgba(5, 7, 12, 0.6); }
  .hero__copy .hero__eyebrow { color: var(--paper); opacity: 0.92; }   /* the small labels sit over the brightest part of the picture */

  /* Flow layout so tall copy grows the hero rather than clipping,
     and sits in the darker lower third away from the globe glow. */
  .hero__frame {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .hero__copies {
    align-self: stretch;
    max-width: none;
    margin-top: auto;
    margin-bottom: clamp(1.4rem, 6vw, 2.4rem);
  }
  .hero__copy { align-self: end; }
  .scene:not(.is-scrubbing) ~ .stage-static .stage-static__copy { max-width: none; align-content: end; padding-bottom: clamp(2rem, 8vw, 3rem); }
}

/* ------------------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { animation: none; opacity: 1; transform: none; }
}
