@font-face { font-family: "fd-sans"; src: url("../assets/type/fd-sans.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "fd-accent"; src: url("../assets/type/fd-accent.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "fd-mono"; src: url("../assets/type/fd-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "fd-mono"; src: url("../assets/type/fd-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "fd-sans-alt"; src: url("../assets/type/fd-sans-alt.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "fd-serif-alt"; src: url("../assets/type/fd-serif-alt.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "fd-serif-alt"; src: url("../assets/type/fd-serif-alt-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --ink: #0D0C0B;
  --carbon: #171513;
  --graphite: #2A2622;
  --line: #3A352F;
  --smoke: #6F685F;
  --ash: #A29A8F;
  --bone: #EDE8E0;
  --paper: #F6F3EE;
  --paper-line: #D6CFC4;
  --ember: #FF4D1A;
  --ember-hot: #FF6A3D;
  --ember-deep: #B83A10;
  --signal: #6FE0B5;
  --fault: #FF8A8A;
  --font-sans: "fd-sans", "fd-sans-alt", system-ui, sans-serif;
  --font-serif: "fd-accent", "fd-serif-alt", Georgia, serif;
  --font-mono: "fd-mono", ui-monospace, monospace;
  --font-size-adjust: ex-height 0.55;
  --fs-giant: clamp(3.5rem, 10vw + 1rem, 11rem);
  --fs-h1: clamp(2.5rem, 5vw + 1rem, 6rem);
  --fs-h2: clamp(2rem, 3vw + 1rem, 4rem);
  --fs-h3: clamp(1.375rem, 1.2vw + 1rem, 2.25rem);
  --fs-standfirst: clamp(1.25rem, 0.6vw + 1rem, 1.625rem);
  --fs-body: clamp(1.0625rem, 0.2vw + 1rem, 1.125rem);
  --fs-small: 0.875rem;
  --fs-button: 1rem;
  --fs-label: 0.75rem;
  --fs-timecode: 0.8125rem;
  --fw-giant: 500;  --fw-h1: 500;  --fw-h2: 500;  --fw-h3: 500;
  --fw-standfirst: 400;  --fw-body: 400;  --fw-small: 400;
  --fw-button: 500;  --fw-label: 500;  --fw-timecode: 400;
  --lh-giant: 0.90;  --lh-h1: 0.95;  --lh-h2: 1.00;  --lh-h3: 1.10;
  --lh-standfirst: 1.35;  --lh-body: 1.55;  --lh-small: 1.50;
  --lh-button: 1.00;  --lh-label: 1.20;  --lh-timecode: 1.00;
  --ls-giant: -0.04em;  --ls-h1: -0.03em;  --ls-h2: -0.02em;  --ls-h3: -0.01em;
  --ls-standfirst: -0.005em;  --ls-body: 0;  --ls-small: 0.005em;
  --ls-button: 0;  --ls-label: 0.08em;  --ls-timecode: 0.02em;
  --stretch-giant: 125%;
  --measure-body: 64ch;
  --page-margin: clamp(16px, 3vw, 48px);
  --gutter: 16px;
  --gutter-desktop: 24px;
  --header-h: 64px;
  --header-h-phone: 56px;
  --radius-frame: 6px;
  --radius-button: 2px;
  --button-h: 48px;
  --input-h: 48px;
  --tap-min: 44px;
  --bracket-arm: 16px;
  --bracket-width: 1.5px;
  --focus-width: 2px;
  --focus-offset: 3px;
  --logo-min-w: 96px;
  --logo-small-below: 150px;
  --ease-enter: cubic-bezier(0, 0, 0, 1);
  --ease-exit: cubic-bezier(0.3, 0, 1, 1);
  --ease-move: cubic-bezier(0.2, 0, 0, 1);
  --dur-in-fast: 250ms;
  --dur-in: 400ms;
  --dur-in-large: 700ms;
  --dur-out-fast: 200ms;
  --dur-out: 300ms;
  --stagger: 50ms;
  --stagger-loose: 100ms;
  --stagger-max: 150ms;
  --sequence-max: 2000ms;
  --pause: 320ms;
  --logo-reveal: 1400ms;
  --logo-layer: 467ms;
  --plate-in: 400ms;
  --plate-hold: 320ms;
  --plate-out: 300ms;
  --page-out: 200ms;
  --page-in: 250ms;
  --fade-reduced: 200ms;
  --grain-opacity: 0.055;
  --grain-frequency: 0.8;
  --tc-fps: 25;
  --tc-px-per-second: 40;
}
body {
  font-family: var(--font-sans);
  font-size-adjust: var(--font-size-adjust);
  font-synthesis: none;
}

/* firendev.com · site.css
   Every value comes from assets/brand/tokens.css (linked before this file).
   Layout, components and motion. Dark is the base; paper is a section, not a mode. */

/* ---------------------------------------------------------------- base */

:root {
  color-scheme: dark;
  --tri-h: 480px;            /* hero frame height, set by JS from the viewport */
  --player-h: min(78vh, 820px);
  --wrap-max: 1760px;
  --grain-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='2.5 0 0 0 -0.75 2.5 0 0 0 -0.75 2.5 0 0 0 -0.75 0 0 0 0 1'/></filter><rect width='256' height='256' filter='url(%23n)'/></svg>");
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  font-size-adjust: var(--font-size-adjust);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
}

[hidden] { display: none !important; }
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
video { background: var(--carbon); }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-h2); text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--ember); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: var(--focus-width) solid var(--ember);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}
.paper :focus-visible { outline-color: var(--ember-deep); }

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

/* ---------------------------------------------------------------- type */

.t-giant {
  font-size: var(--fs-giant); font-weight: var(--fw-giant); line-height: var(--lh-giant);
  letter-spacing: var(--ls-giant); font-stretch: var(--stretch-giant);
}
.t-h1 { font-size: var(--fs-h1); font-weight: var(--fw-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
.t-h2 { font-size: var(--fs-h2); font-weight: var(--fw-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
.t-h3 { font-size: var(--fs-h3); font-weight: var(--fw-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.t-stand { font-size: var(--fs-standfirst); font-weight: var(--fw-standfirst); line-height: var(--lh-standfirst); letter-spacing: var(--ls-standfirst); }
.t-body { font-size: var(--fs-body); font-weight: var(--fw-body); line-height: var(--lh-body); letter-spacing: var(--ls-body); }
.t-small { font-size: var(--fs-small); font-weight: var(--fw-small); line-height: var(--lh-small); letter-spacing: var(--ls-small); }

.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
}
.t-giant .accent { font-stretch: normal; }

.label, .mono {
  font-family: var(--font-mono);
  font-size-adjust: none;
  font-variant-numeric: tabular-nums;
}
.label {
  font-size: var(--fs-label); font-weight: var(--fw-label); line-height: var(--lh-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ash);
}
.mono { font-size: var(--fs-timecode); font-weight: var(--fw-timecode); line-height: 1.4; letter-spacing: var(--ls-timecode); }
.mono.dim, .label.dim { color: var(--ash); }
.paper .label, .paper .mono.dim, .paper .dim { color: var(--smoke); }
.measure { max-width: var(--measure-body); }
.ash { color: var(--ash); }
.paper .ash { color: var(--smoke); }

/* ---------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
@media (min-width: 1024px) { .grid { column-gap: var(--gutter-desktop); } }

.section { padding-block: clamp(72px, 9vw, 152px); position: relative; }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(36px, 4vw, 64px); }
.section-head .t-h2 { max-width: 32ch; }
.section-head .intro-line { max-width: 52ch; color: var(--ash); }
.paper .section-head .intro-line { color: var(--smoke); }
.section-foot { margin-top: clamp(32px, 4vw, 56px); }

.stack > * + * { margin-top: var(--stack, 24px); }

/* ---------------------------------------------------------------- links, buttons, chips */

.link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color var(--dur-in-fast) var(--ease-move), background-size var(--dur-in-fast) var(--ease-move), background-image var(--dur-in-fast) linear;
}
.link:hover { color: var(--ember); background-image: linear-gradient(var(--ember), var(--ember)); background-size: 100% 2px; }
.paper .link:hover { color: var(--ember-deep); background-image: linear-gradient(var(--ember-deep), var(--ember-deep)); }
.link.plain { background-size: 0 1px; }
.link.plain:hover { background-size: 100% 2px; }
.link-arrow { font-weight: var(--fw-button); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--button-h); padding: 0 22px;
  border-radius: var(--radius-button);
  font-size: var(--fs-button); font-weight: var(--fw-button); line-height: var(--lh-button); letter-spacing: var(--ls-button);
  border: 1px solid transparent;
  transition: background-color var(--dur-in-fast) var(--ease-move), color var(--dur-in-fast) var(--ease-move), border-color var(--dur-in-fast) var(--ease-move);
  white-space: nowrap;
}
.btn-primary { background: var(--ember); color: var(--ink); border-color: var(--ember); }
.btn-primary:hover { background: var(--ember-hot); border-color: var(--ember-hot); }
.btn-primary:active { background: var(--ember-deep); border-color: var(--ember-deep); color: var(--bone); }
.btn-secondary { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-secondary:hover { color: var(--ember); border-color: var(--ember); }
.paper .btn-secondary { color: var(--ink); border-color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { color: var(--smoke); border-color: var(--smoke); background: transparent; cursor: default; }
.btn .lbl { position: relative; display: block; overflow: hidden; height: 1em; line-height: 1; }
.btn .lbl > span { display: block; transition: transform var(--dur-in) var(--ease-enter); }
.btn .lbl > span + span { position: absolute; left: 0; top: 100%; }
@media (hover: hover) {
  .btn:hover .lbl > span { transform: translateY(-100%); }
}
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-button);
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: var(--fw-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; line-height: 1;
  font-size-adjust: none; color: var(--bone);
  transition: background-color 0ms, color var(--dur-in-fast) var(--ease-move), border-color var(--dur-in-fast) var(--ease-move);
  white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.is-on, .chip:has(input:checked) { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.chip:hover:not([aria-pressed="true"]):not(.is-on) { border-color: var(--ash); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip.tap { min-height: var(--tap-min); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.pending, .chip.todo {
  border: 1px dashed var(--ember-deep); color: var(--bone); background: color-mix(in srgb, var(--ink) 70%, transparent);
}
.paper .chip.pending, .paper .chip.todo { color: var(--ember-deep); background: transparent; }
.chip.pending { position: absolute; top: 12px; right: 12px; z-index: 4; min-height: 28px; padding: 0 10px; pointer-events: none; backdrop-filter: blur(6px); }

/* segmented control (Format, Language, phone table pickers) */
.seg { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg .seg-name { color: var(--ash); }
.seg-group { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-button); overflow: hidden; }
.seg-group .chip { border: 0; border-radius: 0; min-height: var(--tap-min); }
.seg-group .chip + .chip { border-left: 1px solid var(--line); }
.paper .seg-group { border-color: var(--paper-line); }
.paper .seg-group .chip { color: var(--ink); }
.paper .seg-group .chip + .chip { border-left-color: var(--paper-line); }
.paper .seg-group .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.paper .seg .seg-name { color: var(--smoke); }
.controls { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; margin-top: 16px; }
.controls .ctl { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap-min); padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-button); font-family: var(--font-mono); font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-size-adjust: none; }
.controls .ctl[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.controls .ctl:hover:not([aria-pressed="true"]) { border-color: var(--ash); }
/* Mute and Unmute take the same width, so the bar never moves when the label changes */
.controls .ctl[data-sound] { min-width: 96px; justify-content: center; }
.controls .ctl[data-sound] svg { width: 12px; height: 12px; flex: none; }

/* ---------------------------------------------------------------- frames */

.frame {
  position: relative;
  border-radius: var(--radius-frame);
  overflow: hidden;
  background: var(--carbon);
  isolation: isolate;
  width: 100%;
}
.frame > .media, .frame > video, .frame > img, .frame > picture, .frame > picture > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.frame > picture { display: block; }
.frame > video, .frame > picture { transform: scale(1); transition: transform var(--dur-out) var(--ease-exit); }
.r9x16 { aspect-ratio: 9 / 16; }
.r4x5 { aspect-ratio: 4 / 5; }
.r16x9 { aspect-ratio: 16 / 9; }
.r1x1 { aspect-ratio: 1 / 1; }
.frame-link { position: absolute; inset: 0; z-index: 3; }
.frame-link:focus-visible { outline-offset: calc(var(--focus-offset) * -1); border-radius: var(--radius-frame); }

.brackets { position: absolute; inset: 10px; pointer-events: none; z-index: 2; }
.brackets i { position: absolute; width: var(--bracket-arm); height: var(--bracket-arm); }
.brackets i::before, .brackets i::after {
  content: ""; position: absolute; background: var(--bone);
  transition: transform var(--dur-out) var(--ease-exit);
}
.brackets i::before { left: 0; top: 0; width: 100%; height: var(--bracket-width); transform: scaleX(0); }
.brackets i::after { left: 0; top: 0; height: 100%; width: var(--bracket-width); transform: scaleY(0); }
.brackets i:nth-child(1) { left: 0; top: 0; }
.brackets i:nth-child(1)::before { transform-origin: left; }
.brackets i:nth-child(1)::after { transform-origin: top; }
.brackets i:nth-child(2) { right: 0; top: 0; }
.brackets i:nth-child(2)::before { transform-origin: right; }
.brackets i:nth-child(2)::after { left: auto; right: 0; transform-origin: top; }
.brackets i:nth-child(3) { left: 0; bottom: 0; }
.brackets i:nth-child(3)::before { top: auto; bottom: 0; transform-origin: left; }
.brackets i:nth-child(3)::after { transform-origin: bottom; }
.brackets i:nth-child(4) { right: 0; bottom: 0; }
.brackets i:nth-child(4)::before { top: auto; bottom: 0; transform-origin: right; }
.brackets i:nth-child(4)::after { left: auto; right: 0; transform-origin: bottom; }
.brackets.ember i::before, .brackets.ember i::after { background: var(--ember); transform: none; }

@media (hover: hover) {
  .hoverable:hover .brackets i::before, .hoverable:hover .brackets i::after,
  .hoverable:focus-within .brackets i::before, .hoverable:focus-within .brackets i::after {
    transform: none; transition: transform var(--dur-in-fast) var(--ease-enter);
  }
  .hoverable:hover .frame > video, .hoverable:hover .frame > picture,
  .hoverable:focus-within .frame > video, .hoverable:focus-within .frame > picture {
    transform: scale(1.03); transition: transform var(--dur-in-large) var(--ease-move);
  }
}

.frame-sound {
  position: absolute; right: 10px; bottom: 10px; z-index: 4;
  width: var(--tap-min); height: var(--tap-min);
  display: grid; place-items: center;
  color: var(--bone); border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  backdrop-filter: blur(6px);
}
.frame-sound svg { width: 18px; height: 18px; }
.frame-sound[aria-pressed="true"] { background: var(--bone); color: var(--ink); }

.frame-play {
  position: absolute; inset: 0; z-index: 4; display: none; place-items: center;
}
.frame-play span { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 65%, transparent); color: var(--bone); }
.frame-play svg { width: 20px; height: 20px; }
html.reduced .frame-play { display: grid; }
html.reduced .frame-play.is-done { display: none; }
/* the same control on a full piece of a case page, always there: the poster waits under it, a press plays the piece with
   sound, and while it plays the square steps aside and the whole frame pauses it (the pause glyph shows on keyboard focus) */
.frame-play.piece { display: grid; }
.frame-play.piece:focus-visible { outline-offset: calc(var(--focus-offset) * -1); border-radius: var(--radius-frame); }
.frame-play.piece span { border: 1px solid var(--line); transition: border-color var(--dur-in-fast) var(--ease-move), opacity var(--dur-in-fast) var(--ease-move); }
.frame-play.piece:hover span { border-color: var(--ash); }
.frame-play .i-pause { display: none; }
.is-running > .frame-play.piece span { opacity: 0; }
.is-running > .frame-play.piece:focus-visible span { opacity: 1; }
.is-running > .frame-play.piece .i-play { display: none; }
.is-running > .frame-play.piece .i-pause { display: block; }
html.reduced .frame-play.piece span { transition: none; }

.placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  background: var(--carbon); border: 1px solid var(--line); color: var(--ash);
}
.placeholder .label { position: absolute; left: 12px; top: 12px; }
.placeholder .mono { font-size: 12px; }

/* ---------------------------------------------------------------- header */

.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: calc(var(--header-h-phone) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
@media (min-width: 1024px) { .hdr { height: calc(var(--header-h) + env(safe-area-inset-top, 0px)); } }
.hdr-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo-link { display: block; height: 100%; display: flex; align-items: center; }
.logo-link { color: var(--bone); }
.logo-link svg { width: 28px; height: 28px; display: block; }
@media (min-width: 1024px) { .logo-link svg { width: 32px; height: 32px; } }
.hdr nav { display: flex; align-items: center; gap: 28px; }
.hdr nav a.nav { min-height: var(--tap-min); display: inline-flex; align-items: center; font-weight: var(--fw-button); font-size: var(--fs-button); }
.hdr nav a.nav[aria-current="page"] { color: var(--ash); }
.hdr .nav-desk { display: none; }
@media (min-width: 768px) { .hdr .nav-desk { display: contents; } .hdr .menu-btn { display: none; } }
.menu-btn { min-height: var(--tap-min); display: inline-flex; align-items: center; font-weight: var(--fw-button); }

.sound-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap-min);
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: var(--fw-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; font-size-adjust: none; color: var(--bone);
}
.meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.meter i { display: block; width: 2px; height: 2px; background: var(--ash); transition: height 60ms linear; }
.sound-btn[aria-pressed="true"] .meter i { background: var(--bone); }
html.reduced .meter { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 70; background: var(--ink);
  display: grid; grid-template-rows: auto 1fr auto; padding: 0 var(--page-margin) 32px;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-in-fast) linear, visibility 0s var(--dur-in-fast);
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity var(--dur-in-fast) linear; }
.menu-top { height: var(--header-h-phone); display: flex; align-items: center; justify-content: space-between; }
.menu-top svg { width: 40px; height: 40px; }
.menu-mark { display: block; color: var(--bone); }
.menu-links { display: grid; align-content: center; gap: 8px; }
.menu-links a { display: block; padding: 8px 0; }
.menu-foot { display: grid; gap: 20px; }

/* ---------------------------------------------------------------- page, plate, grain, timecode */

.page { position: relative; z-index: 1; padding-top: 0; }
html.js .page { opacity: 0; }
html.js.is-ready .page { opacity: 1; transition: opacity var(--page-in) var(--ease-enter); }
html.js.is-leaving .page { opacity: 0; transition: opacity var(--page-out) var(--ease-exit); }

.plate {
  position: fixed; inset: 0; z-index: 90; background: var(--ember); color: var(--ink);
  display: grid; place-items: center; padding: var(--page-margin);
  transform: translateY(100%); pointer-events: none; visibility: hidden;
}
.plate.is-up, .plate.is-hold, .plate.is-out { visibility: visible; }
.plate.is-up { transform: translateY(0); transition: transform var(--plate-in) var(--ease-enter); }
.plate.is-hold { transform: translateY(0); }
.plate.is-out { transform: translateY(-100%); transition: transform var(--plate-out) var(--ease-exit); }
.plate .t-h2 { text-align: center; max-width: 18ch; }
html.reduced .plate.is-up, html.reduced .plate.is-out { transition: opacity var(--fade-reduced) linear; }
html.reduced .plate.is-up { transform: none; opacity: 1; }
html.reduced .plate.is-out { transform: none; opacity: 0; }

.grain {
  position: fixed; inset: 0; z-index: 80;
  pointer-events: none; opacity: var(--grain-opacity); mix-blend-mode: screen;
  background-image: var(--grain-svg); background-size: 256px 256px; background-repeat: repeat;
  contain: strict;
}

.tc {
  position: fixed; left: var(--page-margin); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 55;
  display: none; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-timecode); font-weight: var(--fw-timecode);
  letter-spacing: var(--ls-timecode); font-size-adjust: none; font-variant-numeric: tabular-nums; color: var(--ash);
  padding: 6px 10px 6px 0; background: linear-gradient(90deg, var(--ink) 85%, transparent); 
}
.tc::before { content: ""; width: 8px; height: 8px; background: var(--ember); }
.tc.is-quiet { opacity: 0 !important; transition: opacity var(--dur-out) linear !important; }
@media (min-width: 1024px) { .tc { display: flex; } }

/* ---------------------------------------------------------------- motion primitives */

.lines .line { display: block; overflow: hidden; padding-bottom: 0.18em; margin-bottom: -0.18em; }
.lines .line > span { display: block; transform: translateY(125%); }
.lines.is-in .line > span { transform: none; transition: transform var(--dur-in-large) var(--ease-enter); }
.lines.is-in .line:nth-child(2) > span { transition-delay: var(--stagger-loose); }
.lines.is-in .line:nth-child(3) > span { transition-delay: calc(var(--stagger-loose) * 2); }
.lines.is-in .line:nth-child(4) > span { transition-delay: calc(var(--stagger-loose) * 3); }

.dissolve { opacity: 0; }
.dissolve.is-in { opacity: 1; transition: opacity var(--dur-in-large) linear; }
.fade { opacity: 0; }
.fade.is-in { opacity: 1; transition: opacity var(--dur-in-fast) linear; }
.rise { opacity: 0; transform: translateY(8px); }
.rise.is-in { opacity: 1; transform: none; transition: opacity var(--dur-in-fast) var(--ease-enter), transform var(--dur-in-fast) var(--ease-enter); }
.cut { opacity: 0; }
.cut.is-in { opacity: 1; }
html:not(.js) .lines .line > span, html:not(.js) .dissolve, html:not(.js) .fade, html:not(.js) .rise, html:not(.js) .cut { opacity: 1; transform: none; }

html.reduced .lines .line > span { transform: none; opacity: 0; }
html.reduced .lines.is-in .line > span { opacity: 1; transition: opacity var(--fade-reduced) linear; }
html.reduced .dissolve.is-in { transition-duration: var(--fade-reduced); }
html.reduced .rise { transform: none; }
html.reduced .rise.is-in { transition: opacity var(--fade-reduced) linear; }
html.reduced .frame > video, html.reduced .frame > picture { transform: none !important; }

/* ---------------------------------------------------------------- the intro: the workshop floor */

.intro {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; display: flex; flex-direction: column;
  padding-top: calc(var(--header-h-phone) + env(safe-area-inset-top, 0px) + 20px); padding-bottom: 40px;
  background: var(--ink);
}
@media (min-width: 1024px) { .intro { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 28px); padding-bottom: 72px; } }
.intro .floor { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
/* the seam: the floor fades into ink over the last part of the screen; the page below is ink */
.intro::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--ink) 55%, transparent) 45%, var(--ink) 100%);
}
.intro-frame { position: absolute; inset: calc(var(--header-h) + 16px) var(--page-margin) 20px; z-index: 1; pointer-events: none; opacity: 0.9; }
.intro-frame i { position: absolute; width: var(--bracket-arm); height: var(--bracket-arm); }
.intro-frame i::before, .intro-frame i::after { content: ""; position: absolute; background: var(--line); transform-origin: left; }
.intro-frame i::before { left: 0; top: 0; width: 100%; height: 1px; }
.intro-frame i::after { left: 0; top: 0; height: 100%; width: 1px; }
.intro-frame i:nth-child(1) { left: 0; top: 0; }
.intro-frame i:nth-child(2) { right: 0; top: 0; transform: scaleX(-1); }
.intro-frame i:nth-child(3) { left: 0; bottom: 0; transform: scaleY(-1); }
.intro-frame i:nth-child(4) { right: 0; bottom: 0; transform: scale(-1); }
@media (max-width: 767px) { .intro-frame { display: none; } }
.intro-grid { position: relative; z-index: 2; flex: 1; display: grid; grid-template-rows: auto 1fr auto; row-gap: 24px; }
.intro-eyebrow { align-self: start; min-height: 1px; }
.intro-mark-wrap { position: relative; align-self: center; width: min(44vw, 760px); }
@media (max-width: 767px) { .intro-mark-wrap { width: max(150px, 88vw); } }
.intro-mark svg { width: 100%; height: auto; display: block; overflow: visible; will-change: transform; }
.intro-mark svg g { transform-box: fill-box; transform-origin: center; }
/* the spark falls into place from above, so it starts hidden */
html.js .intro-mark svg #chispa-intro { opacity: 0; }
html.reduced .intro-mark svg g, html:not(.js) .intro-mark svg g { opacity: 1 !important; }
/* the guides live behind the wordmark and stop short of it: the two parts of each rule leave the mark out */
.intro-rules { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 1; pointer-events: none; }
.intro-rules .rule { position: absolute; left: 0; right: 0; height: 1px; opacity: 0; top: var(--y, 0px); --l: 0px; --r: 100%; }
.intro-rules .rule::before, .intro-rules .rule::after { content: ""; position: absolute; top: 0; height: 1px; background: var(--smoke); opacity: 0.85; }
.intro-rules .rule::before { left: 0; width: var(--l); }
.intro-rules .rule::after { left: var(--r); right: 0; }
.intro-rules .rule.is-in { opacity: 1; transition: opacity var(--dur-in-fast) linear; }
.intro-rules .rule b { position: absolute; right: var(--page-margin); top: -1.7em; font-weight: 500; white-space: nowrap; color: var(--ash); font-variant-numeric: tabular-nums; }
@media (max-width: 1023px) { .intro-rules .rule b { display: none; } }
.intro-copy { align-self: end; display: grid; gap: 20px; max-width: 760px; }
.intro-copy h1 { max-width: 26ch; }
.intro-sig { color: var(--ash); margin-top: -4px; }
.intro-stand { max-width: 52ch; color: var(--bone); font-size: clamp(1.0625rem, 0.4vw + 0.9rem, 1.375rem); }
@media (max-width: 767px) { .intro-copy .btns { display: grid; } .intro-grid { row-gap: 20px; } }
/* short desktop windows (1280 x 720): the same screen, tighter, so the buttons stay above the fold */
@media (min-width: 1024px) and (max-height: 780px) { .intro { padding-bottom: 60px; } .intro-grid { row-gap: 8px; } .intro-copy { gap: 12px; } .intro-mark-wrap { width: min(32vw, 640px); } .intro-copy h1 { font-size: clamp(2.25rem, 3.4vw, 3.5rem); } }
/* the mark at the top-left corner of the first screen: it holds its place while the page moves under it,
   then hands over to the header's logo at the same spot. Its moment: the three corners close in from
   outside, the spark drops in, the whole settles with a small overshoot. */
.site-mark { position: fixed; left: var(--page-margin); top: calc(env(safe-area-inset-top, 0px) + (var(--header-h-phone) - 28px) / 2); width: 28px; height: 28px; z-index: 61; display: block; color: var(--bone); }
@media (min-width: 1024px) { .site-mark { top: calc(env(safe-area-inset-top, 0px) + (var(--header-h) - 32px) / 2); width: 32px; height: 32px; } }
.site-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.site-mark .mk { transform-box: fill-box; transform-origin: center; }
html.js .site-mark { opacity: 0; }
html.js .site-mark .mk-tl { transform: translate(-64px, -64px); }
html.js .site-mark .mk-bl { transform: translate(-64px, 64px); }
html.js .site-mark .mk-br { transform: translate(64px, 64px); }
html.js .site-mark .mk-sp { transform: translate(0, -90px); opacity: 0; }
html.js .site-mark.is-in { opacity: 1; }
html.js .site-mark.is-in .mk { transform: none; opacity: 1; transition: transform var(--dur-in) var(--ease-enter), opacity var(--dur-in-fast) linear; }
html.js .site-mark.is-in .mk-bl { transition-delay: var(--stagger); }
html.js .site-mark.is-in .mk-br { transition-delay: calc(var(--stagger) * 2); }
html.js .site-mark.is-in .mk-sp { transition: transform 320ms var(--ease-exit) 180ms, opacity 0s linear 180ms; }
html.js .site-mark.is-in svg { animation: mark-settle 420ms var(--ease-enter) 440ms both; }
@keyframes mark-settle { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }
.site-mark.is-off { opacity: 0 !important; transition: opacity var(--dur-in-fast) linear !important; pointer-events: none; }
html.reduced .site-mark .mk { transform: none !important; opacity: 1 !important; transition: none !important; }
html.reduced .site-mark.is-in { transition: opacity var(--fade-reduced) linear; }
html.reduced .site-mark.is-in svg { animation: none; }
html:not(.js) .site-mark { display: none; }

/* everything on the first screen enters in sequence (js: heroSequence); without js it is all there */
html.js [data-hero]:not(.lines):not(.fade):not(.rise) { opacity: 0; }
html.js [data-hero].is-in:not(.lines):not(.fade):not(.rise) { opacity: 1; transition: opacity var(--dur-in) var(--ease-enter); }
html.js .tc[data-hero].is-in { transition-duration: var(--dur-in-fast); }


/* the header: on the home it waits under the intro and slides in once the intro is scrolled past */
html.has-intro .hdr { transform: translateY(-100%); visibility: hidden; }
html.has-intro .hdr.is-shown { transform: none; visibility: visible; transition: transform var(--dur-in-fast) var(--ease-enter), visibility 0s; }
html.has-intro .hdr .logo-link, html.has-intro .hdr .nav-desk > a, html.has-intro .hdr .sound-btn, html.has-intro .hdr .menu-btn { opacity: 0; transform: translateY(-6px); }
html.has-intro .hdr.is-shown .logo-link, html.has-intro .hdr.is-shown .nav-desk > a, html.has-intro .hdr.is-shown .sound-btn, html.has-intro .hdr.is-shown .menu-btn { opacity: 1; transform: none; transition: opacity var(--dur-in-fast) var(--ease-enter), transform var(--dur-in-fast) var(--ease-enter); transition-delay: calc(var(--dur-in-fast) + var(--stagger) * var(--i, 0)); }
html.has-intro.reduced .hdr, html.has-intro.reduced .hdr .logo-link, html.has-intro.reduced .hdr .nav-desk > a, html.has-intro.reduced .hdr .sound-btn, html.has-intro.reduced .hdr .menu-btn { transition: opacity var(--fade-reduced) linear; transform: none; }
html:not(.js) .hdr { transform: none !important; visibility: visible !important; }

/* ---------------------------------------------------------------- cards (work) */

.cards { display: flex; gap: var(--gutter); align-items: flex-start; }
@media (min-width: 1024px) { .cards { gap: var(--gutter-desktop); } }
.card { display: grid; gap: 14px; position: relative; }
.card .frame { width: 100%; }
.card-body { display: grid; gap: 8px; }
.card-body .t-h3 { max-width: 24ch; font-size: var(--fs-standfirst); line-height: 1.2; }
.card-body p { color: var(--ash); max-width: 46ch; }
.card .chips { margin-top: 4px; position: relative; z-index: 4; }
.card .chips .chip { min-height: 32px; padding: 0 10px; }
.card-meas { margin-top: 2px; }
.case-veil { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 22px; background: rgba(0, 0, 0, 0.6); color: var(--bone); font-family: var(--font-mono); font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-size-adjust: none; opacity: 0; transition: opacity var(--dur-out) var(--ease-exit); pointer-events: none; }
.case-veil svg { width: 20px; height: 20px; }
.card.is-still { cursor: pointer; }
.card.is-still.is-playing .case-veil, .card.is-still:focus-within .case-veil { opacity: 1; transition: opacity var(--dur-in-fast) var(--ease-enter); }
@media (hover: hover) { .card.is-still:hover .case-veil { opacity: 1; transition: opacity var(--dur-in-fast) var(--ease-enter); } }
.card .frame > .alt { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.card .frame > .alt.is-on { opacity: 1; }
.card .frame > .alt video, .card .frame > .alt img { width: 100%; height: 100%; object-fit: contain; background: var(--carbon); }
.card .frame.is-alt > video, .card .frame.is-alt > picture { opacity: 0; }

@media (max-width: 767px) {
  .cards { flex-direction: column; gap: 40px; }
  .card { width: 100%; }
  .card.is-9x16 .frame { width: min(100%, calc(70svh * 9 / 16)); margin-inline: auto; }
  .card.is-4x5 .frame { width: min(100%, calc(70svh * 4 / 5)); margin-inline: auto; }
}
@media (min-width: 768px) {
  .cards.row { height: var(--row-h, 520px); }
  .cards.row .card { height: 100%; display: grid; grid-template-rows: 1fr auto; }
  .cards.row .card .frame { height: 100%; aspect-ratio: auto; width: auto; }
  .cards.row .card.is-9x16 .frame { width: calc(var(--row-h, 520px) * 9 / 16); }
  .cards.row .card.is-16x9 .frame { width: calc(var(--row-h, 520px) * 16 / 9); }
  .cards.row .card.is-4x5 .frame { width: calc(var(--row-h, 520px) * 4 / 5); }
  .cards.row .card .card-body { padding-top: 14px; }
}

/* work page justified grid */
.workgrid { position: relative; }
html:not(.js) .workgrid { display: grid; gap: 40px; }
html:not(.js) .workgrid .card { position: static; }
.workgrid .card { position: absolute; top: 0; left: 0; }
/* the home's trio: no justify pass; the three frames share a height and the row fits the first view */
.workgrid.trio { display: grid; gap: var(--gutter); }
.workgrid.trio .card { position: static; width: auto; }
.workgrid.trio .card-line { margin-top: 2px; color: var(--ash); }
.workgrid.trio .card.is-9x16 .frame, .workgrid.trio .card.is-16x9 .frame { width: 100%; margin-inline: 0; }
@media (min-width: 1024px) {
  .workgrid.trio { grid-template-columns: 9fr 28.444fr 9fr; gap: var(--gutter-desktop); align-items: start; width: 100%; }
  #work .section-head { margin-bottom: 40px; }
}
/* more than three cards wrap into rows of the same three tracks, at the same sizes: a 16:9 always takes the middle track,
   a 9:16 a side one, the first free cell is filled; rows 56 px apart, as on the work page */
@media (min-width: 1024px) { .workgrid.trio { grid-auto-flow: row dense; row-gap: 56px; } .workgrid.trio > .card.is-16x9 { grid-column: 2; } }
@media (max-width: 1023px) { .workgrid.trio { gap: 40px; } .workgrid.trio .card.is-9x16 .frame { width: min(100%, calc(70svh * 9 / 16)); margin-inline: auto; } }
.workgrid .card.is-out { display: none; }
.workgrid .card.is-moving { transition: transform var(--dur-in) var(--ease-move); }
@media (max-width: 767px) {
  .workgrid { display: grid; gap: 40px; }
  .workgrid .card { position: static; }
}
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 4px; margin-inline: calc(var(--page-margin) * -1); padding-inline: var(--page-margin); }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex: 0 0 auto; min-height: var(--tap-min); }

/* ---------------------------------------------------------------- spec sheet (what we make) */

.sheet { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 768px) { .sheet { grid-template-columns: 1fr 1fr; } }
.sheet-item { background: var(--ink); padding: 28px 0; display: grid; gap: 16px; align-content: start; }
@media (min-width: 768px) { .sheet-item { padding: 32px 32px 36px 0; } .sheet-item:nth-child(2n) { padding-left: 32px; } }
.sheet-item .t-h3 { max-width: 24ch; }
.sheet-item dl { display: grid; gap: 14px; margin: 0; }
.sheet-item dt { margin: 0; }
.sheet-item dd { margin: 4px 0 0; }
.sheet-item .measure-line { color: var(--ash); }
.sheet-item .link { justify-self: start; }
.sheet.compact .sheet-item { gap: 12px; padding-block: 22px 26px; }
.sheet.compact .sheet-item .t-h3 { font-size: var(--fs-standfirst); line-height: 1.2; }
.sheet.compact .sheet-item dd.t-body { font-size: var(--fs-small); line-height: var(--lh-small); }

/* ---------------------------------------------------------------- system strip */

.strip { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); }
.strip-item { padding: 24px 24px 8px 0; position: relative; display: grid; gap: 14px; align-content: start; }
.strip-item::before { content: ""; position: absolute; left: 0; top: -1px; width: 1px; height: 14px; background: var(--bone); }
.strip-item .num { color: var(--ash); }
.strip-item .t-h3 { font-size: clamp(1.125rem, 0.6vw + 0.9rem, 1.5rem); }
.strip-item p { color: var(--ash); font-size: var(--fs-small); line-height: var(--lh-small); }
@media (max-width: 1023px) and (min-width: 768px) { .strip { grid-template-columns: repeat(3, 1fr); row-gap: 32px; } }
@media (max-width: 767px) {
  .strip { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); }
  .strip-item { padding: 0 0 28px 20px; }
  .strip-item::before { left: -1px; top: 4px; width: 14px; height: 1px; }
}

/* ---------------------------------------------------------------- paper */

.paper { background: var(--paper); color: var(--ink); position: relative; }
.paper::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: var(--grain-svg); background-size: 256px 256px; opacity: 0.035; mix-blend-mode: multiply;
}
.paper > * { position: relative; z-index: 1; }
.paper .link { color: var(--ink); }
.paper .btn-primary { color: var(--ink); }
.paper .label { color: var(--smoke); }

/* proof sheet */
.proof th, .proof td { text-align: left; vertical-align: top; padding: 14px 20px 14px 0; border-bottom: 1px solid var(--line); }
.proof th { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; font-size-adjust: none; color: var(--ash); }
.paper .proof th { color: var(--smoke); }
.paper .proof th, .paper .proof td { border-color: var(--paper-line); }
.proof thead th { border-bottom: 1px solid var(--bone); }
.paper .proof thead th { border-bottom-color: var(--ink); }
.proof td.v, .proof td.s { font-family: var(--font-mono); font-size: var(--fs-timecode); font-size-adjust: none; font-variant-numeric: tabular-nums; letter-spacing: var(--ls-timecode); }
.proof td.n { font-weight: var(--fw-h3); }
.proof td:last-child, .proof th:last-child { padding-right: 0; }
.st { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.st svg { width: 12px; height: 12px; flex: none; }
.st.fail { color: var(--fault); }
.paper .st.fail { color: var(--ember-deep); }
.proof-notes { display: grid; gap: 14px; margin-top: 28px; max-width: 64ch; }
#numbers .t-h2 { margin-bottom: 16px; }
#numbers .intro-line { color: var(--smoke); max-width: 52ch; margin-bottom: clamp(28px, 3vw, 44px); }
.proof-notes .fail-word { color: var(--ember-deep); }

@media (max-width: 767px) {
  .proof thead { display: none; }
  .proof, .proof tbody, .proof tr, .proof td { display: block; }
  .proof tr { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .paper .proof tr { border-color: var(--paper-line); }
  .proof td { border: 0; padding: 0; }
  .proof td.n { grid-column: 1 / -1; }
  .proof td[data-l]::before { content: attr(data-l); display: block; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ash); margin-bottom: 2px; font-weight: var(--fw-label); }
  .paper .proof td[data-l]::before { color: var(--smoke); }
  .proof.cols tr { grid-template-columns: 1fr; }
  .proof.cols td.v[data-col] { display: none; }
  .proof.cols td.v[data-col].is-col { display: block; }
}
.proof-picker { display: none; margin-bottom: 20px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.proof-picker::-webkit-scrollbar { display: none; }
.proof-picker .seg-group { flex: none; }
@media (max-width: 767px) { .proof-picker { display: inline-flex; } }

/* ---------------------------------------------------------------- contact section, sparks */

.contact-sec { position: relative; overflow: hidden; }
.contact-sec .sparks { position: absolute; inset: 0; z-index: 0; }
.contact-sec .sparks canvas { width: 100%; height: 100%; }
.contact-sec .wrap { position: relative; z-index: 1; }
.contact-sec .t-h2 { max-width: 20ch; }
.contact-sec .email { display: inline-block; margin-block: 8px 4px; }
.contact-sec .stack { max-width: 64ch; }
.email { font-family: var(--font-sans); word-break: break-all; }

/* ---------------------------------------------------------------- footer */

.ftr { border-top: 1px solid var(--line); padding-block: 48px 40px; }
.ftr-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .ftr-grid { grid-template-columns: 1fr 1fr 1fr; align-items: start; } }
.ftr-brand { display: grid; gap: 14px; }
.ftr-brand svg { width: 160px; height: auto; }
.ftr-brand .sig { color: var(--ash); }
.ftr-links { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ftr-links .sep { color: var(--line); }
.ftr-col { display: grid; gap: 12px; align-content: start; }
.ftr .copy { color: var(--ash); }

/* ---------------------------------------------------------------- page headers (work, contact, case) */

.page-head { padding-top: calc(var(--header-h-phone) + env(safe-area-inset-top, 0px) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(32px, 4vw, 56px); display: grid; gap: 24px; }
@media (min-width: 1024px) { .page-head { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(48px, 8vw, 120px)); } }
.page-head .t-stand { max-width: 52ch; color: var(--ash); }
.page-head .t-h1 { max-width: 16ch; }

/* ---------------------------------------------------------------- case */

.case-head { display: grid; gap: 24px; }
.case-fact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.chip.notes { border-color: var(--ash); color: var(--bone); min-height: 28px; padding: 0 10px; }
.process.notes { gap: clamp(32px, 4vw, 56px) 48px; }
@media (min-width: 768px) { .process.notes { grid-template-columns: 1fr 1fr; } }
.process.notes .step { grid-template-columns: 1fr; gap: 0; }
.process.notes .step-text .t-h3 { max-width: 24ch; }
.process.notes .step-text p { max-width: 58ch; }
.case-head .t-h1 { max-width: 16ch; }
.honesty { border-left: 2px solid var(--line); padding-left: 20px; max-width: 64ch; margin-top: 8px; }
.player-wrap { display: grid; justify-items: center; gap: 12px; margin-top: clamp(40px, 5vw, 72px); }
.player { position: relative; display: grid; justify-items: center; width: 100%; }
.player-frame {
  position: relative; height: var(--player-h); width: calc(var(--player-h) * var(--ratio, 0.5625));
  max-width: 100%; border-radius: var(--radius-frame); overflow: hidden; background: var(--carbon);
  transition: width var(--dur-in-large) var(--ease-move);
}
.player-frame.r16 { --ratio: 1.7778; width: min(100%, calc(var(--player-h) * 1.7778)); height: auto; aspect-ratio: 16 / 9; }
.player-frame.r4x5 { --ratio: 0.8; }
.player-frame.r9x16 { --ratio: 0.5625; }
.player-frame .copy { position: absolute; inset: 0; }
.player-frame .copy > video, .player-frame .copy > picture, .player-frame .copy > picture > img, .player-frame .copy > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-frame .copy.is-hidden { opacity: 0; transition: opacity 0ms; pointer-events: none; }
.player-frame .copy.dissolving { transition: opacity var(--dur-in-fast) linear; }
.letterbox::before, .letterbox::after { content: ""; position: absolute; left: 0; right: 0; height: var(--bar, 12.81%); background: var(--ink); z-index: 3; transition: height var(--dur-in-large) var(--ease-move); }
.letterbox::before { top: 0; }
.letterbox::after { bottom: 0; }
.letterbox.is-open::before, .letterbox.is-open::after { height: 0; }
html.reduced .letterbox::before, html.reduced .letterbox::after { height: 0; transition: none; }
html.reduced .player-frame { transition: none; }
@media (max-width: 767px) {
  .player-frame { --player-h: min(70svh, calc((100vw - 2 * var(--page-margin)) * 16 / 9)); }
  .player-frame.r4x5, [data-reframe] .player-frame { --player-h: min(70svh, calc((100vw - 2 * var(--page-margin)) * 5 / 4)); }
  .player-frame.r16 { --player-h: calc((100vw - 2 * var(--page-margin)) * 9 / 16); }
  /* Counterbell's format cut: the 16:9 copy fills the column, and the frame grows to 9:16 in height as well as width */
  [data-formats] .player-frame { transition: width var(--dur-in-large) var(--ease-move), height var(--dur-in-large) var(--ease-move); }
  [data-formats] .player-frame.r16 { --player-h: calc((100vw - 2 * var(--page-margin)) * 9 / 16); height: var(--player-h); }
}

.safezone { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.safezone[hidden] { display: none; }
.safezone .zone { position: absolute; box-shadow: 0 0 0 4000px color-mix(in srgb, var(--ink) 35%, transparent); }
.safezone .zone .brackets { inset: 0; }
.safezone .zone-label { position: absolute; left: 8px; right: 8px; bottom: 8px; color: var(--bone); background: color-mix(in srgb, var(--ink) 70%, transparent); padding: 6px 8px; font-size: 11px; line-height: 1.3; white-space: normal; }
.player-caption { text-align: center; max-width: 60ch; }

.case-block { padding-block: clamp(56px, 7vw, 112px); border-top: 1px solid var(--line); }
.case-block .t-h2 { max-width: 20ch; margin-bottom: clamp(24px, 3vw, 40px); }
.case-block .intro-line { color: var(--ash); max-width: 52ch; margin-top: -8px; margin-bottom: 32px; }
blockquote.brief { margin: 0; padding: clamp(24px, 3vw, 40px); background: var(--carbon); border-radius: var(--radius-frame); max-width: 72ch; font-size: var(--fs-standfirst); line-height: var(--lh-standfirst); letter-spacing: var(--ls-standfirst); }

.hooks { display: grid; gap: 32px; }
@media (min-width: 768px) { .hooks { grid-template-columns: minmax(0, 1fr) clamp(240px, 24vw, 380px); align-items: start; } }
.hook-list { display: grid; gap: 12px; }
.hook-btn { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-frame); width: 100%; }
.hook-btn .frame { width: 56px; }
.hook-btn[aria-pressed="true"] { border-color: var(--bone); background: var(--carbon); }
.hook-btn:hover:not([aria-pressed="true"]) { border-color: var(--ash); }
.hook-btn .hook-name { display: grid; gap: 6px; }
.hook-btn .hook-name .t-h3 { font-size: clamp(1.125rem, 0.6vw + 0.9rem, 1.375rem); }
.hook-btn .hyp { color: var(--ash); font-size: var(--fs-small); line-height: var(--lh-small); }
.hook-player { display: grid; gap: 10px; justify-items: center; }
.hook-player .frame { width: 100%; }
@media (max-width: 767px) { .hook-player .frame { width: min(100%, calc(70svh * 9 / 16)); } }

.process { display: grid; gap: clamp(48px, 6vw, 96px); }
.step { display: grid; gap: 28px; }
@media (min-width: 1024px) { .step { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; } }
.step-text { display: grid; gap: 16px; align-content: start; }
.step-text .num { color: var(--ash); }
.step-text .t-h3 { max-width: 20ch; }
.step-text p { max-width: 58ch; }
.step-art, .step > *, .kstep > *, .code, .demo, .timeline, .tl-grid > *, .hooks > * { min-width: 0; }
.code pre { min-width: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair figure { margin: 0; display: grid; gap: 8px; }
.typed { background: var(--carbon); border-radius: var(--radius-frame); padding: clamp(20px, 3vw, 36px); display: grid; gap: 24px; }
.typed .rows { display: grid; gap: 0; }
.typed .row { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.typed .row:first-child { border-top: 0; }
.typed .rows p { font-size: var(--fs-small); line-height: var(--lh-small); }
.typed .sentence { font-size: var(--fs-standfirst); line-height: var(--lh-standfirst); letter-spacing: var(--ls-standfirst); max-width: 52ch; }
.typed h4 { margin-bottom: 10px; }
.board { border-radius: var(--radius-frame); border: 1px solid var(--line); overflow: auto; max-height: 80vh; background: var(--carbon); -webkit-overflow-scrolling: touch; }
.board img { width: 1080px; max-width: none; height: auto; display: block; }
@media (max-width: 767px) { .board img { width: 1080px; } }
.board-wrap { display: grid; gap: 10px; }

.deliverables th, .deliverables td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--fs-timecode); font-size-adjust: none; letter-spacing: var(--ls-timecode); font-variant-numeric: tabular-nums; }
.deliverables th { font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ash); border-bottom-color: var(--bone); }
.deliverables td.what { font-family: var(--font-sans); font-size: var(--fs-small); letter-spacing: 0; }
.deliverables th:last-child, .deliverables td:last-child { padding-right: 0; }
@media (max-width: 767px) {
  .deliverables thead { display: none; }
  .deliverables, .deliverables tbody, .deliverables tr, .deliverables td { display: block; }
  .deliverables tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .deliverables td { border: 0; padding: 0; }
  .deliverables td.file, .deliverables td.what { grid-column: 1 / -1; }
  .deliverables td[data-l]::before { content: attr(data-l); display: block; font-size: var(--fs-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ash); font-weight: var(--fw-label); margin-bottom: 2px; }
}
.family { display: flex; gap: 16px; overflow-x: auto; padding-block: 8px 12px; scrollbar-width: thin; margin-inline: calc(var(--page-margin) * -1); padding-inline: var(--page-margin); }
.family .fam { flex: 0 0 auto; display: grid; gap: 8px; }
.family .fam .frame { height: 300px; width: auto; }
.family .fam .frame.r9x16 { width: calc(300px * 9 / 16); }
.family .fam .frame.r4x5 { width: calc(300px * 4 / 5); }
.family .fam .chip.pending { top: 8px; right: 8px; min-height: 24px; font-size: 10px; padding: 0 6px; }

.next-case { border-top: 1px solid var(--line); padding-block: clamp(40px, 5vw, 72px); }

/* ---------------------------------------------------------------- word strip, timeline, motion demo, catalog, code */

.strip-svg { width: 100%; height: auto; display: block; }
.strip-svg text { font-family: var(--font-mono); font-size: 12px; fill: var(--ash); }
.strip-svg .w rect { fill: var(--graphite); transition: fill 0ms; }
.strip-svg .w:hover rect, .strip-svg .w.is-hot rect { fill: var(--bone); }
.strip-svg .w text { fill: var(--bone); font-family: var(--font-sans); font-size: 15px; pointer-events: none; }
.strip-svg .w:hover text, .strip-svg .w.is-hot text { fill: var(--ink); }
.strip-svg .axis line { stroke: var(--line); }
.strip-svg .ph { stroke: var(--ember); stroke-width: 2; }
.strip-info { min-height: 1.4em; margin-top: 10px; }
.strip-wrap { display: grid; gap: 8px; }
.strip-ctl { display: flex; align-items: center; gap: 16px; margin-top: 12px; }

.timeline { display: grid; gap: 12px; user-select: none; touch-action: pan-y; }
.tl-ruler { position: relative; height: 1.2em; }
.tl-ruler span { position: absolute; top: 0; transform: translateX(-50%); }
.tl-ruler span:first-child { transform: none; }
.tl-ruler span:last-child { transform: translateX(-100%); }
.tl-blocks { display: flex; height: 64px; gap: 2px; }
.tl-block { position: relative; background: var(--carbon); border-radius: 2px; min-width: 2px; overflow: hidden; }
.tl-block.is-on { background: var(--graphite); }
.tl-block::after { content: ""; position: absolute; inset: 0; background: var(--bone); opacity: 0; }
.tl-block.is-on::after { opacity: 0; }
.tl-block span { position: absolute; left: 6px; top: 6px; white-space: nowrap; }
.tl-block.narrow span { display: none; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ember); pointer-events: none; }
.tl-track { position: relative; }
.tl-info { display: grid; gap: 6px; min-height: 4.5em; }
.tl-info .line { color: var(--bone); }
.tl-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .tl-grid { grid-template-columns: minmax(0, 1fr) clamp(200px, 18vw, 300px); align-items: start; } }
.tl-player .frame { width: 100%; }
@media (max-width: 767px) { .tl-player .frame { width: min(100%, calc(60svh * 9 / 16)); margin-inline: auto; } }

.demo { display: grid; gap: 24px; background: var(--carbon); border-radius: var(--radius-frame); padding: clamp(20px, 3vw, 36px); }
.demo-stage { height: 120px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-frame); }
.demo-chip { display: inline-block; padding: 10px 16px; background: var(--bone); color: var(--ink); border-radius: 2px; font-weight: var(--fw-button); opacity: 0; transform: translateY(8px); }
.demo-chip.in { opacity: 1; transform: none; transition: opacity var(--dur-in) var(--ease-enter), transform var(--dur-in) var(--ease-enter); }
.demo-chip.out { opacity: 0; transform: translateY(-8px); transition: opacity var(--dur-out) var(--ease-exit), transform var(--dur-out) var(--ease-exit); }
html.reduced .demo-chip { transform: none !important; transition: none !important; }
.demo-curves { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo-curves figure { margin: 0; display: grid; gap: 8px; }
.demo-curves svg { width: 100%; height: auto; }
.demo-curves path.c { fill: none; stroke: var(--bone); stroke-width: 1.5; }
.demo-curves line { stroke: var(--line); }
.demo-ctl { display: flex; gap: 12px; align-items: center; }

.catalog { background: var(--carbon); border-radius: var(--radius-frame); padding: clamp(16px, 2vw, 28px); overflow-x: auto; }
.catalog table { min-width: 560px; }
.catalog th, .catalog td { text-align: left; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--fs-timecode); font-size-adjust: none; letter-spacing: var(--ls-timecode); vertical-align: top; }
.catalog th { font-size: var(--fs-label); text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--ash); font-weight: var(--fw-label); }
.catalog tr:last-child td { border-bottom: 0; }
.code { background: var(--carbon); border-radius: var(--radius-frame); padding: clamp(16px, 2vw, 28px); display: grid; gap: 20px; }
.code pre { margin: 0; font-family: var(--font-mono); font-size: var(--fs-timecode); font-size-adjust: none; line-height: 1.6; letter-spacing: var(--ls-timecode); white-space: pre; overflow-x: auto; color: var(--bone); }
.code .trace { display: grid; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-timecode); font-size-adjust: none; letter-spacing: var(--ls-timecode); }
.code .trace .arrow { color: var(--ash); padding-left: 12px; }

/* ---------------------------------------------------------------- system page */

.sys-hero { position: relative; overflow: hidden; min-height: min(100svh, 900px); display: flex; align-items: flex-end; padding-top: calc(var(--header-h) + 24px); padding-bottom: clamp(48px, 7vw, 96px); isolation: isolate; }
.sys-hero .bg { position: absolute; inset: 0; z-index: -3; }
.sys-hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.sys-hero .scrim { position: absolute; inset: 0; z-index: -2; background: color-mix(in srgb, var(--ink) 40%, transparent); }
.sys-hero .scrim::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink) 0%, transparent 55%); }
.sys-hero .leak { position: absolute; z-index: -1; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; left: 10%; top: 10%; border-radius: 50%; background: radial-gradient(closest-side, var(--ember), transparent 70%); filter: blur(60px); mix-blend-mode: screen; opacity: 0.55; animation: leak 20s ease-in-out infinite alternate; }
@keyframes leak { from { transform: translate(-10%, -5%); } to { transform: translate(35%, 15%); } }
html.reduced .sys-hero .leak { animation: none; }
.sys-hero .wrap { display: grid; gap: 32px; }
.sys-hero .t-giant { max-width: 12ch; }
.sys-hero .sys-title { font-size: clamp(3rem, 7vw + 0.5rem, 8.5rem); }
.sys-hero .t-stand { max-width: 52ch; }

.pillars { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 768px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar { background: var(--ink); padding: 28px 24px 32px 0; display: grid; gap: 12px; align-content: start; }
@media (min-width: 1024px) { .pillar + .pillar { padding-left: 24px; } }
.pillar p { color: var(--ash); }

.ksteps { display: grid; gap: clamp(64px, 8vw, 128px); }
.kstep { display: grid; gap: 28px; }
@media (min-width: 1024px) { .kstep { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; } .kstep .kstep-art { position: sticky; top: calc(var(--header-h) + 24px); } }
.kstep-text { display: grid; gap: 20px; }
.kstep-text .t-giant { color: var(--bone); line-height: 0.9; }
.kstep-text .t-h2 { max-width: 16ch; }
.kstep-text p { max-width: 56ch; }
.kstep-text .measure-line { color: var(--ash); font-family: var(--font-mono); font-size: var(--fs-timecode); font-size-adjust: none; letter-spacing: var(--ls-timecode); line-height: 1.5; max-width: 60ch; }
.kstep-text .measure-line b { color: var(--bone); font-weight: var(--fw-label); }

.faq { background: var(--carbon); }
.faq-list { border-top: 1px solid var(--line); max-width: 72ch; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-h { margin: 0; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; text-align: left; font-size: var(--fs-h3); font-weight: var(--fw-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-h3); }
.faq-q .plus { width: 14px; height: 14px; position: relative; flex: none; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--bone); left: 0; top: 6px; width: 14px; height: 1.5px; }
.faq-q .plus::after { transform: rotate(90deg); transition: transform var(--dur-in-fast) var(--ease-move); }
.faq-q[aria-expanded="true"] .plus::after { transform: rotate(0); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-in-fast) var(--ease-enter); }
.faq-a > div { overflow: hidden; }
.faq-a > div p { padding-bottom: 24px; max-width: 64ch; color: var(--ash); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
html.reduced .faq-a { transition: none; }

.who { display: grid; gap: 20px; max-width: 64ch; }

/* ---------------------------------------------------------------- contact page */

.contact-grid { display: grid; gap: 56px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 7fr 1fr 4fr; } .contact-grid > aside { grid-column: 3; } }
.form { display: grid; gap: 28px; }
.field { display: grid; gap: 10px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%; padding: 0; }
legend.field-head { float: left; }
legend.field-head + * { clear: both; }
.field label, .field .legend { font-weight: var(--fw-button); }
.field .req { color: var(--ash); }
.input {
  width: 100%; min-height: var(--input-h); padding: 12px 14px; border: 1px solid var(--smoke); border-radius: var(--radius-button);
  background: var(--carbon); color: var(--bone); font: inherit; font-size: var(--fs-body); line-height: 1.4;
}
.input::placeholder { color: var(--smoke); }
textarea.input { min-height: 140px; resize: vertical; }
.field.is-error .input { border-color: var(--fault); }
.field-error { display: none; align-items: center; gap: 8px; color: var(--fault); font-size: var(--fs-small); }
.field-error svg { width: 12px; height: 12px; flex: none; }
.field.is-error .field-error { display: inline-flex; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset .chips { margin-top: 2px; }
.form-msg { display: grid; gap: 12px; padding: 28px; background: var(--carbon); border-radius: var(--radius-frame); }
.form-msg.ok { color: var(--signal); }
.form-msg.fail { color: var(--fault); }
.form-msg .with-icon { display: inline-flex; align-items: center; gap: 10px; }
.form-msg svg { width: 14px; height: 14px; }
.next-list { display: grid; gap: 16px; counter-reset: n; }
.next-list li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.next-list li::before { counter-increment: n; content: "0" counter(n); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--ls-label); color: var(--ash); padding-top: 6px; font-size-adjust: none; }
.small-print { display: grid; gap: 10px; color: var(--ash); margin-top: 32px; }

/* ---------------------------------------------------------------- 404 */

.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; padding-top: var(--header-h); }
.nf .sparks { position: absolute; inset: 0; z-index: 0; }
.nf .sparks canvas { width: 100%; height: 100%; }
.nf .wrap { position: relative; z-index: 1; display: grid; gap: 32px; justify-items: center; }
.nf .mono-logo { width: 72px; height: 72px; }
.nf .t-giant { max-width: 10ch; }

/* ---------------------------------------------------------------- utilities */

.hide-phone { }
@media (max-width: 767px) { .hide-phone { display: none !important; } }
.only-phone { display: none !important; }
@media (max-width: 767px) { .only-phone { display: block !important; } }
.icon-inline { display: inline-block; width: 1em; height: 1em; vertical-align: -0.1em; }
