/* Studio Blair. Tokens first, then every style.
   Black and white carry the page: every ground, the huge word and all running text.
   The one red is an accent only: the travelling disc, the buttons, the active project name and one sub-heading.
   Greys are black or white at lower opacity.
   The page works as a plain document; everything under html.motion is the animated layer. */

/* ---------- fonts (self-hosted, SIL OFL, see assets/vendor/fonts/archivo/OFL.txt) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../assets/vendor/fonts/archivo/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../assets/vendor/fonts/archivo/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --red: #e10600;

  --bg: var(--black);
  --ink: var(--white);
  --soft: rgb(255 255 255 / 0.68);
  --word-ink: var(--white); /* the huge BLAIR; set to var(--red) for a red word */

  --margin: clamp(1rem, 4vw, 2.5rem);
  --gutter: clamp(1rem, 2vw, 1.5rem);
  --section: clamp(6rem, 14vw, 11rem);

  /* five type steps: small, body, lead, head and the word */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.1rem + 3.4vw, 4rem);
  --word-size: min(44vw, 27svh);
  --word-stretch: 62%;

  --screen-w: 84vw;                 /* the screen element's own width on the animated page; stage.js scales it */
  --hero-w: min(80vw, 40svh);       /* how wide the screen is drawn in the hero; the cap keeps it clear of the copy */
  --info-h: 10rem;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}
@media (min-width: 900px) {
  :root {
    --word-size: min(27.5vw, 44svh);
    --word-stretch: 100%;
    --screen-w: min(46vw, 46rem);
    --hero-w: 34vw;
  }
}
@media (min-width: 1100px) {
  :root { --margin: 4.5rem; }
}

[data-ground="black"] { --bg: var(--black); --ink: var(--white); --soft: rgb(255 255 255 / 0.68); }
[data-ground="white"] { --bg: var(--white); --ink: var(--black); --soft: rgb(10 10 10 / 0.7); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-body);
  font-stretch: 100%;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
::selection { background: var(--red); color: var(--white); }
section, .foot { background: var(--bg); color: var(--ink); }
section { scroll-margin-top: 0; }

.display {
  font-weight: 800;
  font-stretch: 62%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.9;
}
h2.display { font-size: var(--step-head); }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sample { margin-left: 0.4em; padding: 0 0.35em; background: var(--ink); color: var(--bg); font-size: var(--step-small); font-weight: 500; }
/* Shown when the script is off, blocked or failed; app.js sets is-live once the lists are in. */
.fallback { max-width: 38rem; padding: 1.25rem 1.5rem; background: var(--white); color: var(--black); }
.is-live .fallback { display: none; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: var(--margin); top: 0.75rem; z-index: 10;
  padding: 0.75rem 1rem; background: var(--white); color: var(--black); font-weight: 500;
  transform: translateY(-250%);
}
.skip:focus { transform: none; }

/* A text link: the underline is its own layer so only transform animates. */
.link { position: relative; display: inline-block; padding-block: 0.85rem; font-weight: 500; }
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.6rem; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform 320ms var(--ease-out);
}
.link:focus-visible::after { transform: none; }

.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.75rem;
  background: var(--red); color: var(--white);
  font-size: var(--step-body); font-weight: 500;
  transition: transform var(--t-press) var(--ease-out);
}
/* Hover darkens the button, so the label's contrast goes up, never down. */
.button::before {
  content: ""; position: absolute; inset: 0; background: var(--black); opacity: 0;
  transition: opacity var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .link:hover::after { transform: none; }
  .button:hover::before { opacity: 0.14; }
}

/* ---------- the stage: word, disc and screen ---------- */
.stage {
  position: absolute; top: 0; left: 0; right: 0; height: 100svh; z-index: 1;
  pointer-events: none; overflow: clip; perspective: 1600px;
}
.word {
  position: absolute; left: 50%; top: 20%;
  display: flex; white-space: nowrap; user-select: none;
  /* --word-fit and --word-y are set by app.js on short, wide screens, so the word never runs into the hero copy */
  font-weight: 800; font-stretch: var(--word-stretch); font-size: var(--word-fit, var(--word-size));
  line-height: 0.74; letter-spacing: -0.01em; text-transform: uppercase;
  color: var(--word-ink);
  transform: translate(-50%, -50%);
}
.word span { display: block; transform-origin: 50% 100%; }
/* On the still page the disc is drawn once, peeking out from the screen's lower left corner,
   the same place stage.js starts it from (heroDisc). */
.disc {
  position: absolute; z-index: 1;
  left: calc(50% - var(--hero-w) * 0.38); top: calc(41% + var(--hero-w) * 0.21);
  width: calc(var(--hero-w) * 0.42); height: calc(var(--hero-w) * 0.42);
  border-radius: 50%; background: var(--red);
  transform: translate(-50%, -50%);
}
.screen {
  /* the height cap keeps the screen clear of the hero copy on tablets and short, wide viewports */
  position: absolute; left: 50%; top: 41%; z-index: 2; width: var(--hero-w);
  /* a black edge around the white frame, so the frame stays distinct where it crosses the white word */
  padding: 0.375rem; border-radius: 1rem; background: var(--black);
  transform: translate(-50%, -50%) rotateX(16deg) rotateY(-8deg);
}
.screen__body {
  padding: 0 0.5rem 0.5rem; border-radius: 0.625rem; background: var(--white);
  transition: transform var(--t-press) var(--ease-out);
}
.screen.is-press .screen__body { transform: scale(0.97); }
.screen__bar { display: flex; align-items: center; gap: 0.375rem; height: 1.625rem; padding-left: 0.25rem; }
.screen__bar i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--black); }
.screen__view {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; isolation: isolate;
  border-radius: 0.25rem; background: var(--black);
}
.screen__view img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 420ms ease;
}
.screen__view img.is-on { opacity: 1; }
/* A black layer blended by saturation shows the picture in greyscale; fading it brings the colour back. */
.screen__grey { position: absolute; inset: 0; z-index: 1; background: #000000; mix-blend-mode: saturation; }
.screen__sheet { position: absolute; inset: 0; border-radius: 1rem; background: var(--white); opacity: 0; }
/* Darkens the picture while the screen turns upright to become the video's frame. */
.screen__shade { position: absolute; inset: 0; z-index: 2; background: var(--black); opacity: 0; }

@media (min-width: 900px) {
  .word { top: var(--word-y, 34%); }
  .screen { left: 46%; top: 62%; transform: translate(-50%, -50%) rotateX(18deg) rotateY(-10deg); }
  .disc { left: calc(46% - var(--hero-w) * 0.38); top: calc(62% + var(--hero-w) * 0.21); }
}

/* animated layer: the script places everything from the top-left corner */
.motion .stage { position: fixed; height: auto; bottom: 0; }
.motion .word, .motion .screen, .motion .disc { left: 0; top: 0; will-change: transform; }
.motion .screen { width: var(--screen-w); }
.motion .stage.is-over .disc { z-index: 3; }

/* ---------- header and rail ---------- */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.5rem var(--margin);
  color: var(--white);
}
.top__mark {
  padding-block: 0.6rem; white-space: nowrap;
  font-weight: 800; font-stretch: 62%; font-size: var(--step-lead); letter-spacing: -0.01em; text-transform: uppercase;
}
.top__nav { display: flex; }
.top__nav a { min-width: 2.75rem; padding: 0.85rem 0.45rem; font-size: var(--step-small); font-weight: 500; text-align: center; }
.top__cta { display: none; font-size: var(--step-small); }
.top__end { display: flex; align-items: center; justify-content: flex-end; gap: 1.25rem; }
/* the language switch, top right: it shows the language you can switch to */
.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.5rem; margin-right: -0.5rem;
  border: 0; background: none; color: inherit; cursor: pointer;
  font: inherit; font-size: var(--step-small); font-weight: 700; letter-spacing: 0.04em;
}
.lang::before {
  content: ""; width: 0.375rem; height: 0.375rem; margin-right: 0.4rem; border-radius: 50%;
  background: var(--red); transform: scale(0.8); transition: transform var(--t-ui) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .lang:hover::before { transform: scale(1.15); }
}
/* the name, the links and the language switch on one line of a phone: About and Video are reached by
   scrolling (they sit between Work and Services) and from the footer */
@media (max-width: 559px) {
  .top { gap: 0.25rem; }
  .top__mark { font-size: 1.0625rem; }
  .top__nav a { min-width: 2.75rem; padding-inline: 0.36rem; text-align: center; }
  .top__nav a[href$="#about"], .top__nav a[href$="#video"] { display: none; }
  .lang { margin-right: -0.4rem; }
}
/* the narrowest phones: the name, Work, Contact and the switch (Services is one scroll further, and in the footer) */
@media (max-width: 359px) {
  .top__nav a[href$="#services"] { display: none; }
}
@media (min-width: 900px) {
  .top { display: grid; grid-template-columns: 1fr auto 1fr; padding-block: 1rem; }
  .top__nav { gap: 1.5rem; }
  .top__cta { display: inline-block; }
}

.rail { display: none; }
@media (min-width: 1100px) {
  .rail {
    position: fixed; left: 1.25rem; top: 50%; z-index: 3;
    display: flex; flex-direction: column; gap: 0.25rem;
    transform: translateY(-50%);
  }
  /* Each label carries its own black backing: it disappears into the black ground and reads as a small
     tab on the white and red ones, including while a change of ground is passing behind it. */
  .rail a {
    position: relative; padding: 0.55rem 0.3rem 1rem; writing-mode: vertical-rl; transform: rotate(180deg);
    background: var(--black); color: rgb(255 255 255 / 0.68);
    font-size: var(--step-small); font-weight: 500; line-height: 1;
  }
  .rail a:focus-visible { outline-offset: -3px; }
  .rail a::before {
    content: ""; position: absolute; left: 50%; bottom: 0.4rem; width: 0.375rem; height: 0.375rem; margin-left: -0.1875rem;
    border-radius: 50%; background: var(--white); opacity: 0; transform: scale(0.4);
    transition: opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out);
  }
  .rail a.is-here { color: var(--white); }
  .rail a.is-here::before { opacity: 1; transform: none; }
}
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .rail a:hover { color: var(--white); }
}

/* ---------- hero ---------- */
.hero {
  display: grid; align-items: start;
  min-height: 100svh; padding: 61svh var(--margin) 2.5rem;
}
.hero__copy { position: relative; z-index: 2; }
.hero__title { font-size: var(--step-head); }
.hero__lead { margin-top: 1.25rem; max-width: 32rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 1.75rem; }
.hero__pause { padding-inline: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
@media (min-width: 900px) {
  .hero { align-items: end; padding-top: 0; padding-bottom: clamp(2.5rem, 9svh, 5.5rem); }
  .hero__copy { justify-self: end; width: min(29vw, 30rem); }
  .hero__title { font-size: min(var(--step-head), 3.9vw); }
}

/* ---------- work ---------- */
.work { padding: var(--section) var(--margin); }
.work__pin { position: relative; z-index: 2; }
.work__title { margin-bottom: 2rem; font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.work__list { display: grid; gap: 3.5rem; }
.work__item { display: grid; gap: 1rem; }
.work__thumb { width: 100%; height: auto; }
.work__head { justify-self: start; font: inherit; line-height: 1; }
.work__name { display: block; padding-block: 0.17em; font-size: var(--step-head); }
.work__link { display: inline-block; vertical-align: top; }
.work__desc { max-width: 34rem; }
.work__meta, .work__note { margin-top: 0.4rem; max-width: 34rem; color: var(--soft); font-size: var(--step-small); }
.work__count { display: none; margin-top: 1rem; color: var(--soft); font-size: var(--step-small); }
@media (min-width: 900px) {
  .work__item { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: calc(var(--gutter) * 2); align-items: start; }
  .work__thumb { grid-row: 1 / span 2; }
  .work__head { align-self: end; }
}

.motion .work { padding-block: 0; height: calc(100svh + var(--n, 5) * 56svh); }
.motion .work__pin { position: sticky; top: 0; display: grid; align-items: end; height: 100svh; padding-bottom: 1.25rem; }
.motion .work__list { display: block; position: relative; padding-bottom: var(--info-h); }
.motion .work__item { display: block; }
.motion .work__thumb { display: none; }
.motion .work__link {
  opacity: 0.4;
  transition: opacity var(--t-ui) ease, transform 320ms var(--ease-out);
}
.motion .work__item.is-active .work__link { opacity: 1; transform: translate3d(0.28em, 0, 0); }
.motion .work__item.is-active .work__name { color: var(--red); } /* red marks the one site that is on the screen */
.motion .work__info {
  /* faded, not hidden: every description stays available to a screen reader */
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--info-h); padding-top: 1.1rem;
  opacity: 0; transition: opacity var(--t-ui) ease;
}
.motion .work__item.is-active .work__info { opacity: 1; }
.motion .work__count { display: block; }
@media (max-width: 899px) {
  .motion .work__title { margin-bottom: 1rem; }
  .motion .work__count { margin-top: 0.5rem; }
}
@media (min-width: 900px) {
  .work__name { padding-block: 0.08em; }
  .motion .work { height: calc(100svh + var(--n, 5) * 60svh); }
  .motion .work__pin { align-items: center; padding-bottom: 0; }
  .motion .work__col { width: min(46%, 42rem); }
}

/* ---------- video ---------- */
.video { padding: var(--section) var(--margin); }
.video__pin { position: relative; z-index: 2; display: grid; gap: 2rem; }
.video__lead { margin-top: 1.25rem; max-width: 26rem; font-size: var(--step-lead); line-height: 1.35; }
.video__name { margin-top: 2.25rem; font-size: var(--step-lead); font-weight: 600; line-height: 1.25; }
.video__line { margin-top: 0.4rem; max-width: 26rem; }
.video__note { margin-top: 0.4rem; max-width: 26rem; color: var(--soft); font-size: var(--step-small); }
.video__list { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.75rem; }
.video__controls { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.5rem; }
.video__btn { padding-inline: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
.video__btn[aria-current="true"] { color: var(--red); }
/* The frame takes the clip's own shape (set from data.js); the clip is never drawn larger than its own pixels on a normal screen. */
.video__frame { justify-self: center; width: min(100%, 22rem); aspect-ratio: 9 / 16; background: var(--black); }
.video__player { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--black); }
@media (min-width: 900px) {
  .video__pin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: calc(var(--gutter) * 3); }
  .video__frame { width: auto; height: min(80svh, 48rem); }
}
.motion .video { padding-block: 0; height: 270svh; }
.motion .video__pin { position: sticky; top: 0; height: 100svh; }
.motion .video__frame { will-change: transform, opacity; }
@media (max-width: 899px) {
  /* phone: heading on top, the clip takes the height that is left */
  .motion .video__pin { grid-template-rows: minmax(0, 1fr) auto; gap: 1rem; padding-block: 1.25rem; }
  .motion .video__frame { grid-row: 1; width: auto; height: 100%; max-width: 100%; }
  .motion .video__text { grid-row: 2; }
  .motion .video__name { margin-top: 1rem; }
  .motion .video__lead { display: none; }
}

/* ---------- about ---------- */
.about { padding: var(--section) var(--margin); }
.about__col { position: relative; z-index: 2; }
.about__lead { margin-top: 1.75rem; max-width: 40rem; font-size: var(--step-lead); line-height: 1.35; }
.about__text { margin-top: 1.25rem; max-width: 38rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 2rem; margin-top: 2.75rem; max-width: 38rem; }
.facts dt { color: var(--soft); }
.motion .about { min-height: 160svh; }
@media (min-width: 900px) {
  .about__col { width: min(54%, 46rem); }
  .motion .about { padding-top: 24svh; }
}

/* ---------- services ---------- */
.services { padding: var(--section) var(--margin); }
.services__in { position: relative; z-index: 2; }
.services__lead { margin-top: 1.25rem; font-size: var(--step-lead); line-height: 1.35; }
.lineup { margin-top: 3.5rem; }
.lineup__row { display: grid; gap: 0.4rem; padding-block: 1.1rem; }
.lineup__name { font-size: var(--step-lead); font-weight: 600; line-height: 1.25; }
.lineup__includes { color: var(--soft); }
.lineup__head { margin-top: 5rem; color: var(--red); font-size: var(--step-lead); font-weight: 600; line-height: 1.25; }
.lineup--steps { margin-top: 1rem; }
@media (min-width: 900px) {
  .lineup { font-size: var(--step-lead); line-height: 1.3; }
  .lineup__row { grid-template-columns: 26% 32% 1fr; column-gap: calc(var(--gutter) * 2); padding-block: 1.4rem; }
  .lineup--steps .lineup__row { grid-template-columns: 26% 1fr; }
  .lineup--steps .lineup__text { max-width: 46rem; }
  .lineup__includes { color: var(--ink); }
}

/* ---------- contact ---------- */
.contact { display: grid; align-items: center; min-height: 100svh; padding: var(--section) var(--margin); }
.contact__in { position: relative; z-index: 2; }
.contact__lead { margin-top: 1.5rem; max-width: 36rem; font-size: var(--step-lead); line-height: 1.35; }
.contact__lines { display: grid; justify-items: start; margin-top: 2.5rem; }
.contact__lines a {
  position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding-block: 0.22em;
  /* sized so the email address runs the width of the page; app.js measures --email-em from the real address */
  font-weight: 800; font-stretch: 62%; letter-spacing: -0.01em; line-height: 1;
  font-size: min(calc((100vw - 2 * var(--margin)) / var(--email-em, 10.95)), 9.5rem);
}
.contact__lines a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.07em;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
  transition: transform 360ms var(--ease-out);
}
.contact__lines a:focus-visible::after { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .contact__lines a:hover::after { transform: none; }
}
.contact__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 3rem; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 2; overflow: clip; padding: 3rem var(--margin) 0; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; font-size: var(--step-small); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 0 0.6rem; margin-inline: -0.45rem; }
.foot__nav .link { padding-inline: 0.45rem; }
.foot__nav .link::after { left: 0.45rem; right: 0.45rem; }
.foot__word {
  margin: 3rem 0 -0.09em; text-align: center; white-space: nowrap;
  font-weight: 800; font-stretch: var(--word-stretch); font-size: var(--word-size);
  line-height: 0.74; letter-spacing: -0.01em; text-transform: uppercase;
}

/* ---------- legal pages (privacy.html, cookies.html) ---------- */
.legal { padding: max(7.5rem, calc(var(--section) * 0.8)) var(--margin) var(--section); background: var(--bg); color: var(--ink); }
.legal > * { max-width: 44rem; }
.legal h1 { font-size: var(--step-head); }
.legal__updated { margin-top: 1rem; color: var(--soft); font-size: var(--step-small); }
.legal__intro { margin-top: 2rem; font-size: var(--step-lead); line-height: 1.35; }
.legal h2 { margin-top: 3rem; font-size: var(--step-lead); font-weight: 600; line-height: 1.25; }
.legal h3 { margin-top: 1.75rem; font-size: var(--step-body); font-weight: 600; }
.legal p, .legal ul { margin-top: 0.9rem; }
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal li + li { margin-top: 0.5rem; }
.legal a { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.legal a:not([href^="mailto:"]):not([href^="tel:"]) { overflow-wrap: anywhere; }
.legal strong { font-weight: 600; }

/* The 404 page: the legal layout, a small code line with the red dot, and two ways out. */
.notfound__code { display: flex; align-items: center; color: var(--soft); font-size: var(--step-small); font-weight: 500; }
.notfound__code::before {
  content: ""; width: 0.375rem; height: 0.375rem; margin-right: 0.5rem; border-radius: 50%; background: var(--red);
}
.notfound h1 { margin-top: 0.75rem; }
.notfound__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 2rem; }
.legal .notfound__actions a { text-decoration: none; }
.foot__nav a[aria-current="page"] { color: var(--red); }

/* ---------- motion: load-in, reveals ---------- */
/* Hidden starting states only exist while html.motion is set, and the inline script drops that class if the module never starts. */
.motion:not(.is-live) .word span,
.motion:not(.is-live) .disc,
.motion:not(.is-live) .screen,
.motion:not(.is-live) .hero__copy > * { opacity: 0; }

.motion.is-live .word span {
  animation: letter-in 900ms var(--ease-expo) backwards;
  animation-delay: calc(60ms + var(--i, 0) * 45ms);
}
.motion.is-live .screen__body { animation: screen-in 1100ms var(--ease-expo) 180ms backwards; }
.motion.is-live .hero__copy > * {
  animation: rise-in 700ms var(--ease-out) backwards;
  animation-delay: calc(420ms + var(--i, 0) * 80ms);
}
@keyframes letter-in { from { opacity: 0; transform: translate3d(0, 38%, 0); } }
@keyframes screen-in { from { opacity: 0; transform: translate3d(0, 12%, 0) scale(0.94); } }
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } }

.motion.is-live [data-reveal] > * {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.motion.is-live [data-reveal].in > * { opacity: 1; transform: none; }
/* The Work list is held back while the screen is still crossing its column (set by stage.js). */
.motion.is-live .work__col.wait > * { opacity: 0; transform: translate3d(0, 22px, 0); transition-duration: 220ms; transition-delay: 0ms; }
