/* ==========================================================================
   Self — homepage
   Desktop is laid out against the 1728px Figma frame ("Home — D") and scales
   fluidly: every desktop size is  N * var(--u)  where N is the Figma pixel
   value and --u is 1/1728 of the viewport width. Type is part of that: the
   desktop layout has no pixel floors and no rules that move a column on a
   narrow window, so a narrower window shows the same page, smaller, and every
   column line stays where the design has it (measured in design pixels).
   Below 800px the mobile layout takes over (matches "Home — M").
   ========================================================================== */

/* ---------- Fonts (Aguzzo TRIAL, Relative Mono CY Trial) ---------- */
@font-face { font-family: "Aguzzo"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("fonts/aguzzo-light.woff") format("woff"); }
@font-face { font-family: "Aguzzo"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/aguzzo-book.woff") format("woff"); }
@font-face { font-family: "Aguzzo"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/aguzzo-regular.woff") format("woff"); }
@font-face { font-family: "Aguzzo"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/aguzzo-book-italic.woff") format("woff"); }
@font-face { font-family: "Aguzzo Italic VF"; font-weight: 100 800; font-style: normal; font-display: swap;
  src: url("fonts/aguzzo-italic-vf.woff") format("woff"); }
/* Medium has a family of its own (a subset: Latin, punctuation and the arrows), so no weight of "Aguzzo" changes: it sets the lead and the sub-heads of the Self Awareness block */
@font-face { font-family: "Aguzzo Medium"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/aguzzo-medium.woff") format("woff"); }
@font-face { font-family: "Relative Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/relative-mono-10pitch.woff") format("woff"); }

/* ---------- Tokens ---------- */
:root {
  --u: calc(100vw / 1728);
  /* first screen + nav: designed at 1728px wide, scale with the window width; the hero itself always fills the height */
  --hu: calc(100vw / 1728);
  --slogan: 1.1;   /* the hero slogan is drawn this much larger than in the design (the embroidery in tapestry.js reads this too) */

  --serif: "Aguzzo", "Newsreader", "Times New Roman", serif;
  --serif-italic: "Aguzzo Italic VF", "Aguzzo", "Newsreader", serif;
  --serif-medium: "Aguzzo Medium", "Aguzzo", "Newsreader", "Times New Roman", serif;
  --mono: "Relative Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ink: #000;
  --grey-400: #c0c0c0;
  --panel-bg: #e6e9eb;
  --sky: #d9e0e5;          /* intro gradient, top   (0.853, 0.877, 0.895) */
  --sand: #d8d0c9;         /* intro gradient, bottom (0.847, 0.816, 0.788) */
  --lime: #d3e948;
  --rule: rgba(0, 0, 0, .3);   /* section hairlines */

  /* Technical Read (Figma "Actual/Desktop/Technical Read"): Relative Mono 10 Pitch, 14, line height Auto (17 for this face), letter spacing 6 %, upper case.
     It is THE one style of Relative Mono on a desktop screen - the notice board, the Clients descriptors, the footer, the sub-heads, the News cards, the descriptions
     under the Tech and Brand pictures, the captions, the Hi/Bye panel, the project pages. (Only the labels of the two buttons, "Learn more" and "Open", are drawn as a
     style of their own: 17, 2 %.) It scales with the layout like the rest of the page, so it keeps the proportions of the design (14 at the design's 1728, 12.25 at 1512,
     20.7 at 2560); only below about 1480px it stops at 12px, the size the phone has always had, so that a narrow window does not make it too small to read.
     Its letter-spacing is 6 % from 801px up (see the rule under this block); a phone keeps the 3 % it has always had. */
  --t14: max(12px, calc(14 * var(--u)));
  --tls: .03em;                                                      /* its letter-spacing: 3 % on a phone, 6 % on a desktop screen (below) */
  --nav: max(24px, calc(34.2 * var(--hu)));   /* navigate */

  --ease: cubic-bezier(.2, .7, .1, 1);
  --gentle: cubic-bezier(.3, 1.35, .5, 1);     /* Figma "Gentle" spring, fallback curve */
  --spring: cubic-bezier(.16, .6, .2, 1);      /* Figma "Slow": a critically damped spring (no overshoot); this is its fallback curve */
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --gentle: linear(0, 0.044, 0.151, 0.289, 0.435, 0.575, 0.699, 0.803, 0.886, 0.948, 0.992, 1.02, 1.037, 1.045, 1.046, 1.043, 1.037, 1.031, 1.024, 1.018, 1.012, 1.008, 1); }
  /* the same spring at any duration (the curve is the one of x(t) = 1 - (1 + 6.05 t) e^(-6.05 t), t in 0..1, scaled to end at 1) */
  :root { --spring: linear(0, 0.0128, 0.0461, 0.093, 0.1487, 0.2092, 0.2718, 0.3344, 0.3954, 0.4539, 0.5092, 0.5608, 0.6086, 0.6525, 0.6926, 0.7291, 0.762, 0.7916, 0.8182, 0.8419, 0.863, 0.8818, 0.8985, 0.9132, 0.9262, 0.9377, 0.9478, 0.9567, 0.9644, 0.9712, 0.9772, 0.9824, 0.987, 0.9909, 0.9944, 0.9974, 1); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p, figure, address { margin: 0; font: inherit; }
address { font-style: normal; }

.mono {
  font-family: var(--mono);
  font-size: var(--t14);
  letter-spacing: var(--tls);
  text-transform: uppercase;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
@media (min-width: 801px) { :root { --tls: .06em; } }               /* Technical Read on a desktop screen: 6 %, on every page (the Home and News frames used to ask for 9 %) */

/* ---------- Navigation ---------- */
.nav-type {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--nav);
  line-height: .76;
  letter-spacing: -.06em;
  color: #fff;
  position: relative; display: inline-block;
}

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16 * var(--hu));
  padding-block: max(12px, calc(16 * var(--hu)));
  padding-inline: max(12px, calc(16 * var(--hu)));
}
.topbar__brand { display: flex; align-items: center; gap: calc(14 * var(--hu)); gap: max(8px, calc(14 * var(--hu))); }
.topbar__hi { cursor: pointer; }
/* the fixed bars span the full width; let the page underneath receive hover and clicks */
.topbar, .dock { pointer-events: none; }
.topbar a, .topbar button, .dock a { pointer-events: auto; }

.avatar {
  width: max(36px, calc(65 * var(--hu))); height: max(36px, calc(65 * var(--hu)));
  border-radius: 50%; object-fit: cover;
  border: .722px solid #000; background: var(--panel-bg);
}

/* ---------- Marks: the wordmark of the top bar and the close button of a case-study page (logo.js; Figma "Logo", "Close") ----------
   A mark is made of two drawings that are Figma's own, traced from its render (assets/logo): the distorted look (.mark__rest) and the clean one (.mark__clean), both painted in the
   mark's colour through a mask, so the tone script can turn them white or ink like any other type; logo.js adds a canvas for the moments in between. data-s says which of the three is
   on show. Without script the two looks swap on :hover. */
.topbar { --av: max(36px, calc(65 * var(--hu))); }                       /* the avatar's size: the lockup is 65 + 14 + the wordmark, and it all scales together */
.mark { position: relative; display: block; flex: none; color: #fff; }               /* (its colour changes at once: no transition) */
.mark > i, .mark > canvas { position: absolute; display: block; pointer-events: none; }
.mark__rest, .mark__clean { background: currentColor; -webkit-mask: no-repeat 0 0 / 100% 100%; mask: no-repeat 0 0 / 100% 100%; }
.mark.is-ink { color: #111; }
.logo-word { --lk: max(calc(var(--av) / 65), .72px); width: calc(58 * var(--lk)); height: calc(29 * var(--lk)); font-size: var(--nav); }   /* the instance is 58 x 29 in the design */
.logo-word > * { left: calc(-10 * var(--lk)); top: calc(-13.5 * var(--lk)); width: calc(82 * var(--lk)); height: calc(56 * var(--lk)); }
.logo-word::before { content: ""; position: absolute; inset: calc(-9 * var(--lk)) calc(-12 * var(--lk)); }                 /* a roomier place to hover than the 58 x 29 box */
.logo-word .mark__rest { -webkit-mask-image: url("assets/logo/rest.svg"); mask-image: url("assets/logo/rest.svg"); }
.logo-word .mark__clean { -webkit-mask-image: url("assets/logo/clean.svg"); mask-image: url("assets/logo/clean.svg"); }
.logo-word:not([data-s]) .mark__clean { visibility: hidden; }
.logo-word:not([data-s]):hover .mark__rest { visibility: hidden; }
.logo-word:not([data-s]):hover .mark__clean { visibility: visible; }
.mark[data-s] > * { visibility: hidden; }
.mark[data-s="rest"] > .mark__rest, .mark[data-s="clean"] > .mark__clean, .mark[data-s="tween"] > .mark__cv { visibility: visible; }

.topbar__close { --xk: max(.8px, var(--hu)); position: absolute; top: max(6px, calc(10 * var(--hu))); right: max(6px, calc(10 * var(--hu))); width: calc(31 * var(--xk)); height: calc(31 * var(--xk)); }   /* 31 x 31, 10 from the corner (Figma frame 45) */
.topbar__close > * { left: calc(-10 * var(--xk)); top: calc(-10 * var(--xk)); width: calc(51 * var(--xk)); height: calc(51 * var(--xk)); }
.topbar__close::before { content: ""; position: absolute; inset: min(0px, calc((31 * var(--xk) - 44px) / 2)); }              /* a place to hover and tap of at least 44 */
.topbar__close .mark__rest { -webkit-mask-image: url("assets/logo/x-rest.svg"); mask-image: url("assets/logo/x-rest.svg"); }
.topbar__close .mark__clean { -webkit-mask-image: url("assets/logo/x-clean.svg"); mask-image: url("assets/logo/x-clean.svg"); }
.topbar__close:not([data-s]) .mark__rest { visibility: hidden; }
.topbar__close:not([data-s]):hover .mark__clean { visibility: hidden; }
.topbar__close:not([data-s]):hover .mark__rest { visibility: visible; }

.dock {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  height: max(72px, calc(110 * var(--hu)));
  display: flex; align-items: center; justify-content: center;
  gap: max(18px, calc(32 * var(--hu)));
}
/* soft dark fades at the screen edges (Figma: 20% black gradients). Only the dock carries the progressive blur; the top bar has none.
   The strength of a fade is --tn-fade (1; nav.js turns it to 0 on a bar that is over a light ground, where the dark band would only dirty the page - at once, with the type). */
@property --tn-fade { syntax: "<number>"; inherits: false; initial-value: 1; }
.topbar::before, .dock::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.topbar::before { background: linear-gradient(to bottom, rgba(0, 0, 0, calc(.2 * var(--tn-fade, 1))), transparent); }
.dock::before { background: linear-gradient(to top, rgba(0, 0, 0, calc(.2 * var(--tn-fade, 1))), transparent); }
/* once the hero has scrolled away the dark fades are dropped (the dock keeps its blur so it stays readable over text) */
body.is-past-hero .topbar::before,
body.is-past-hero .dock::before { background: none; }

/* The dock's blur. Figma, "Dock" (1728 x 110): Background blur, Progressive, Start 0, End 41 - clear at 68 % of the strip's height, then a blur that grows evenly to 41 (a radius of 20.5 px
   in CSS, which is half of Figma's number) at the screen's edge. CSS has no progressive blur, so it is built from eight layers (<i> in .dock__blur), one on top of the other, each a blur
   of its own over the bottom of the strip, and each shown from a little higher than the one before it. Layers add up - two blurs of 4 px are one of 5.7 - so layer k is
   R * sqrt(2k - 1) / 8, and the blur at a point is the sum of the layers that cover it: it grows in a straight line from nothing to R, as in the design. A layer fades in over the
   eighth of the ramp above its stop (--off at its top, --on where it is whole), so there is no step. R is 22 px at 1728 and not 20.5: a browser blurs only what lies inside a
   layer's box, so near the screen's edge a part of every blur is lost, and the extra 1.5 px makes it up (fitted against a test grating: the blur at the labels is the design's, within
   a pixel). The dark fade (::before) lies over the layers, as the fill does over the blur in Figma; the labels lie over both. */
:root { --dock-blur: max(14.4px, calc(22 * var(--hu))); }           /* (the dock is 110 high at 1728 and not lower than 72) */
.dock__blur { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.dock__blur i {
  position: absolute; inset: 0;
  -webkit-backdrop-filter: blur(calc(var(--dock-blur) * var(--k))); backdrop-filter: blur(calc(var(--dock-blur) * var(--k)));
  -webkit-mask-image: linear-gradient(to top, #000 var(--on), transparent var(--off));
          mask-image: linear-gradient(to top, #000 var(--on), transparent var(--off));
}
.dock__blur i:nth-child(1) { --k: .125;  --on: 59.625%; --off: 68%; }
.dock__blur i:nth-child(2) { --k: .2165; --on: 51.25%;  --off: 59.625%; }
.dock__blur i:nth-child(3) { --k: .2795; --on: 42.875%; --off: 51.25%; }
.dock__blur i:nth-child(4) { --k: .3307; --on: 34.5%;   --off: 42.875%; }
.dock__blur i:nth-child(5) { --k: .375;  --on: 26.125%; --off: 34.5%; }
.dock__blur i:nth-child(6) { --k: .4146; --on: 17.75%;  --off: 26.125%; }
.dock__blur i:nth-child(7) { --k: .4507; --on: 9.375%;  --off: 17.75%; }
.dock__blur i:nth-child(8) { --k: .4841; --on: 1%;      --off: 9.375%; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .dock__blur { display: none; } }

/* Navigation items. Figma: "Distortion" (top bar) and "DistortionMItem" (dock).
   Rest: crisp type. Hover: the Texture effect eases from radius 0.1 to 10.1 (nav.js drives an SVG filter on .nav-label).
   Dock, selected: the label glows and a light line collapses into a dot beneath it. Sizes are in em (Figma px / 38). */
.nav-type::before { content: ""; position: absolute; inset: -.4em -.25em; }   /* roomier hit area, invisible */
.nav-label { display: inline-block; }
.dock .nav-label {
  text-shadow: 0 0 .3684em rgba(255, 255, 255, 0), 0 0 .1316em rgba(255, 255, 255, 0),
               0 0 .0789em rgba(255, 251, 213, 0), 0 0 .0526em rgba(188, 229, 255, 0);
}
.dock .dot {
  position: absolute; left: 50%; margin-left: -.0526em; pointer-events: none;
  width: .1053em; height: 1.6842em; top: calc(100% + 1.6316em);      /* resting as the 4x64 line, below the screen edge */
  border-radius: 1em; background: #fff; opacity: 0;
  box-shadow: 0 0 .1053em #fff, 0 0 .0526em rgba(188, 229, 255, .25), 0 0 .3684em #fff, 0 0 .1316em #fff,
              0 0 .0789em #fffbd5, 0 0 .0526em rgba(188, 229, 255, .25), inset 0 0 .0263em rgba(37, 173, 252, .25);
}
/* selected: springs in (Figma Gentle, 0.383 s); leaving it is instant, as in the design */
.dock a.is-current .nav-label {
  text-shadow: 0 0 .3684em #fff, 0 0 .1316em #fff, 0 0 .0789em #fffbd5, 0 0 .0526em rgba(188, 229, 255, .25);
  transition: text-shadow .383s ease-out;
}
.dock a.is-current .dot {
  opacity: 1; top: calc(100% + .2368em); height: .1053em;            /* the 4x4 dot, 9px under the label */
  transition: top .383s var(--gentle), height .383s var(--gentle);
}
@media (prefers-reduced-motion: reduce) {
  .dock a.is-current .nav-label, .dock a.is-current .dot { transition: none; }
}

/* Navigation over a plain light ground (nav.js reads what is under each unit).
   White type is the design, and it stays over every picture and every colour that carries it. Over a plain light ground - the white of Info, the grey of Tech and News, the pale
   gradient of the Home's second screen - the type turns to the page's ink, and it does so as a whole: every label carries a copy of itself in the ink (its ::after), and nav.js puts
   .is-ink on a unit - the dock (all four links), the word "Self", the word "Hi" - to show those copies over the white ones, and takes it off again when the ground can carry white. Both happen at once: no wait before it turns (nav.js) and no fade (here).
   A unit is one state at a time: its labels never differ and a label is never divided. The ink is plain: no halo round it, no glow. On a dock that is ink the dot takes the ink too,
   the selected item's white glow goes, and the dark fade under the dock goes (--tn-fade); the fade under the top bar goes when both its words are ink (.topbar.is-ink). */
.tn-t { position: relative; }
.tn-t::after {
  content: attr(data-t); content: attr(data-t) / "";                                  /* (the second form tells a screen reader there is nothing to read) */
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none;
  color: #111; text-shadow: none;                                                     /* (plain: it would otherwise take the selected item's white glow from the label it sits in) */
  opacity: 0;
}
.tn-t.is-ink::after, .dock.is-ink .tn-t::after { opacity: 1; }
.dock.is-ink a .nav-label, .dock.is-ink a.is-current .nav-label { text-shadow: none; transition: none; }   /* the white glow of the selected item is for the white type: gone at once, not faded */
.dock a.is-current .dot { transition: top .383s var(--gentle), height .383s var(--gentle); }                 /* (the dot's colour is not in it: it turns ink at once, with the type) */
.dock.is-ink .dot { background: #111; box-shadow: none; }
.topbar.is-ink::before, .dock.is-ink::before { --tn-fade: 0; }
@media (prefers-reduced-motion: reduce) {
  .dock a.is-current .dot { transition: none; }
}

/* ---------- Contact panel ("Hey") ----------
   Figma "Hey" is 390 x 1117 beside the 1728 wide page, so the panel and everything in it scale with the page (N * --u), like the rest of
   the site; the floors keep it readable on small desktops.
   Desktop: it behaves like the comments panel in Figma's prototype viewer. The panel slides in from the right while the whole page (hero, top
   bar, dock) shrinks to the room that is left: one scale for all of it, anchored top left (--panel-anchor), over the panel's own flat colour.
   Clicking the little page, Esc or "Bye" brings it all back.
   How (script.js): the page layers get `scale`, a compositor-only transform, so nothing is laid out or painted again while it moves and the page
   (video, the stitched thread) keeps playing. The scrim (.veil) is page-sized with a huge box-shadow: it paints the flat colour around the
   shrunken page and hides the rest of the long document that would otherwise show above and below it.
     html.panel-on    the scroll position is frozen, the layers are ready to move
     html.panel-open  the end state: panel in, page shrunk
   Phones (up to 800px): the panel slides over the page, which is dimmed. */
:root {
  --pu: var(--u);                                            /* the panel's unit: the page unit on desktop, one real pixel on phones */
  --panel-w: max(300px, calc(390 * var(--pu)));              /* Figma: 390 beside a 1728 page */
  --panel-dur: .26s;                                         /* measured on a recording of Figma's comments panel: the page shrinks in ~0.2 s and grows back in ~0.25 s */
  --panel-ease: cubic-bezier(.35, .4, .15, 1);               /* ease fitted to the same recording: most of the move happens in the first third */
  --panel-anchor: 0;                                         /* where the shrinking page is held vertically: 0 = pinned to the top, as in Figma's viewer; .5 = centred; 1 = bottom */
}
.veil {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);       /* the page behind a sliding panel is dimmed and softened (on a desktop it is the Figma "Veil", below) */
  opacity: 0; transition: opacity .5s var(--ease);
}
.veil.is-visible { opacity: 1; }

.panel {
  position: fixed; z-index: 60; top: 0; right: 0; bottom: 0;
  width: var(--panel-w);
  padding: max(10px, calc(14 * var(--pu)));
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--panel-bg);
  color: #1a1a1a;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--panel-dur) var(--panel-ease), visibility 0s linear var(--panel-dur);   /* hidden only once it has slid out */
}
.panel.is-open { transform: none; visibility: visible; transition: transform var(--panel-dur) var(--panel-ease), visibility 0s; }
.panel__top { display: flex; align-items: center; justify-content: space-between; }
.panel__top .avatar { width: max(36px, calc(65 * var(--pu))); height: max(36px, calc(65 * var(--pu))); }
.panel .nav-type { color: #1a1a1a; font-size: max(24px, calc(38 * var(--pu))); }          /* Figma: Bye, 38 */
.panel__close { cursor: pointer; }

.panel__links { display: flex; flex-direction: column; gap: max(2px, calc(3 * var(--pu))); font-family: var(--mono); font-size: max(12px, calc(17 * var(--pu)));
  letter-spacing: .02em; text-transform: uppercase; line-height: calc(23 / 17); font-feature-settings: "lnum" 1, "tnum" 1; }
.panel__links li { display: flex; gap: max(8px, calc(11.612 * var(--pu))); }
.panel__links span { color: rgba(0, 0, 0, .5); }

.panel__form { display: flex; flex-direction: column; gap: max(16px, calc(23 * var(--pu))); }
.panel__label { font-size: max(12px, calc(17 * var(--pu))); line-height: calc(23 / 17); color: rgba(0, 0, 0, .5); letter-spacing: .02em; }
.panel__form textarea {
  width: 100%; resize: none; border: 0; border-bottom: 1px solid #000; background: none;
  font: max(12px, calc(17 * var(--pu))) / calc(23 / 17) var(--mono); letter-spacing: .02em; text-transform: uppercase;
  padding: 0 0 max(8px, calc(12 * var(--pu))); margin-top: calc(-10 * var(--pu)); outline: none; color: #000; min-height: max(28px, calc(36 * var(--pu)));
}
.panel__send {
  background: #000; color: #fff; padding: max(14px, calc(20 * var(--pu))) 0; width: 100%;
  font-family: var(--serif); font-weight: 500; font-size: max(18px, calc(26.572 * var(--pu))); line-height: calc(28.76 / 26.572); letter-spacing: -.06em;
  transition: opacity .3s;
}
.panel__send:hover { opacity: .8; }
@media (min-width: 801px) {
  /* the panel's small type is Technical Read too on a desktop screen (14 / Auto / 6 %); a phone keeps the 17 it was drawn at */
  .panel__links, .panel__label, .panel__form textarea { font-size: var(--t14); line-height: calc(17 / 14); letter-spacing: var(--tls); }
}

@media (min-width: 801px) {
  .veil {                                                    /* the scrim becomes the "mat": a hole the size of the page in a flat colour, shrinking with it */
    background: none; opacity: 1; transition: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 0 0 50vh var(--panel-bg);                  /* 50vh covers the bands above and below the page down to a scale of 0.5 */
    scale: 1; transform-origin: 0 calc(var(--panel-anchor) * 100%);
  }
  /* Figma "Veil" (Note frame): the layer between the page and the panel, black at 12 % with a background blur of 14 (CSS: blur 7px), so that the little page stays
     quiet beside the panel and does not steal the eye from it. It is the page-sized box's own ::after, so it shrinks with the page and ends exactly on its edges
     (the flat colour round the page stays clean), and it fades in with the panel. A blur is worked out in the box's own, scaled, space: dividing by the scale
     brings it out at 7 design pixels on the screen. Without backdrop blur (an old browser) the tint alone is made stronger. */
  .veil::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: rgba(0, 0, 0, .12);
    -webkit-backdrop-filter: blur(calc(7 * var(--u) / var(--ps, .77))); backdrop-filter: blur(calc(7 * var(--u) / var(--ps, .77)));
    opacity: 0; transition: opacity var(--panel-dur) var(--panel-ease);
  }
  html.panel-open .veil::after { opacity: 1; }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .veil::after { background: rgba(0, 0, 0, .28); } }
  html.panel-on { overflow: hidden; scrollbar-gutter: stable; }
  html.panel-on, html.panel-on body { background: var(--panel-bg); }
  html.panel-on .topbar, html.panel-on .dock, html.panel-on .view, html.panel-on .veil {
    scale: 1; transition: scale var(--panel-dur) var(--panel-ease);
  }
  /* each layer scales about the same screen point (left edge, --panel-anchor of the height); script.js measures the point in the layer's own coordinates */
  html.panel-on .topbar { transform-origin: 0 var(--oy-top, 50vh); }
  html.panel-on .dock { transform-origin: 0 var(--oy-dock, 50vh); }
  html.panel-on .view { transform-origin: 0 var(--oy-view, 50vh); }
  /* a transformed layer becomes the containing block of its fixed children: keep the hero on the screen section that is being shown */
  html.panel-on .view--home .hero, html.panel-on .view--home .intro-wrap::before { top: var(--hero-top, 0px); }
  html.panel-open .topbar, html.panel-open .dock, html.panel-open .view, html.panel-open .veil { scale: var(--ps, .77); }
}
@media (prefers-reduced-motion: reduce) {
  :root { --panel-dur: 0s; }
}

/* ---------- Hero ---------- */
.hero {
  position: fixed; inset: 0 0 auto 0; z-index: 0;
  height: 100vh; height: 100svh;
  background: #8a6a3a url("assets/hero-hd.jpg") center / cover no-repeat;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.hero__canvas.is-on { opacity: 1; }
.hero__title {
  position: absolute; left: calc(50% + .14 * var(--hu)); top: 45.4%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: flex-end;
  gap: calc(14.5 * var(--hu) * var(--slogan));
  color: #fffdf8; white-space: nowrap;
  font-weight: 400;
  font-size: calc(67 * var(--hu) * var(--slogan));
  line-height: calc(56 * var(--hu) * var(--slogan));
  letter-spacing: -.05em;
  /* Stitched into the tapestry: a fine linen weave shows through the letters, and they sit in the cloth with a soft shadow.
     (The padding only gives the weave and the shadow room; the slogan stays exactly where it was.) */
  padding: calc(60 * var(--hu) * var(--slogan)) calc(90 * var(--hu) * var(--slogan));
  -webkit-mask-image: url("assets/weave.png"); mask-image: url("assets/weave.png");
  -webkit-mask-size: calc(256 * var(--hu) * var(--slogan)) calc(128 * var(--hu) * var(--slogan)); mask-size: calc(256 * var(--hu) * var(--slogan)) calc(128 * var(--hu) * var(--slogan));
  -webkit-mask-position: right top; mask-position: right top;
  filter: drop-shadow(0 1px 1px rgba(46, 28, 8, .16)) drop-shadow(0 0 calc(14 * var(--hu) * var(--slogan)) rgba(40, 24, 6, .12));
}
/* The embroidered slogan (tapestry.js) takes the place of the typeset one on desktop and on a phone held upright. The typeset slogan
   stays in the page for the other shapes of window, reduced motion, slow connections, browsers that can't run the embroidery, and screen
   readers. On a phone it is on show until the film is ready, then it fades as the stitching starts. */
.hero__stitch { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
@media (min-width: 801px) and (min-aspect-ratio: 5/6), (max-width: 800px) and (max-aspect-ratio: 3/4) {
  .hero__title { transition: opacity .6s ease; }
  .has-stitch .hero__title { opacity: 0; pointer-events: none; }
}
.hero__finest {
  font-family: var(--serif-italic); font-style: normal; font-weight: 400;
  letter-spacing: -.03em;
}
/* The first word cycles: Adore, Become, Celebrate, Create. Each one crumbles into a grainy dust cloud, then the next word
   assembles from it (Figma "Appear disappear": 1s hold, 0.3s ease-out, 1.02s gentle on the first change). */
.hero__word { position: relative; display: inline-block; flex: none; height: calc(56 * var(--hu) * var(--slogan)); }
.hw { position: absolute; left: 0; top: 0; line-height: calc(56 * var(--hu) * var(--slogan)); white-space: nowrap; }
.hw--b { opacity: 0; }

/* ---------- Intro (everything below the hero) ---------- */
/* Figma: the panel is a linear fill at 90% over a 34 background blur, so the hero shows faintly through.
   It used to be drawn with a live backdrop-filter. A live blur under the whole panel flashed a lighter band across the page, at the top edge of a
   cover film, every time the film put up a new picture (the blur re-read pixels the film's picture had just replaced). So the blur is not live any more:
   the hero is blurred once into a small picture (assets/hero-soft.jpg) that sits under the panel, fixed on the screen like the hero itself and shown only
   inside the panel (the clip-path). The layers are the ones of the design, in the same order: blurred hero, fill at 90%, then the page on top.
   The wrapper holds the picture; .intro (the fill and the page) is its own group, so the difference-blended text still blends with the fill alone, as before. */
.intro-wrap {
  position: relative; z-index: 1;
  margin-top: 100vh; margin-top: 100svh;
  -webkit-clip-path: inset(0); clip-path: inset(0);
}
.intro-wrap::before {
  content: ""; position: fixed; inset: 0 0 auto 0; z-index: -1; pointer-events: none;
  height: 100vh; height: 100svh;
  background: #8a6a3a url("assets/hero-soft.jpg") center / cover no-repeat;
}
.intro {
  display: flex; flex-direction: column;
  gap: calc(200 * var(--u));
  padding-block: calc(120 * var(--u)) calc(100 * var(--u));     /* Figma: the first block starts 120 under the top of the intro, and every block is 200 from the next */
  position: relative; z-index: 0;
  overflow-x: clip;                      /* the notice-board glow reaches past the page edge, as in the design: cut it there */
  background: linear-gradient(180deg, rgba(217, 224, 228, .9) 15%, rgba(216, 208, 201, .9) 100%);
}

.block { padding-inline: calc(39 * var(--u)); }

/* Section subtitle and its hairline (Figma "Frame 1321320459": 14px mono, 16 below, then the rule; the content starts 48 under it) */
.subhead {
  display: flex; align-items: flex-start;
  padding-bottom: calc(16 * var(--u));
  line-height: calc(17 / 14);
  box-shadow: 0 1px 0 var(--rule);               /* the rule sits under the box, so the box is exactly 33px tall as in the design */
}
.subhead h2 { font: inherit; letter-spacing: inherit; }

.words { display: flex; flex-direction: column; gap: calc(48 * var(--u)); }

/* Large text that reads dark on the pale gradient, as in the design: white, blended by difference */
.statement {
  color: #fff;
  mix-blend-mode: difference;
  font-feature-settings: "ordn" 1, "ss01" 1, "ss02" 1, "ss03" 1, "dlig" 1;
}
.statement { font-size: calc(66 * var(--u)); line-height: calc(70 / 66); letter-spacing: -.03em;
  margin-block: calc(-3 * var(--u)) calc(-17 * var(--u)); }       /* design: the box is trimmed to the cap height and the last baseline - 5 lines are 330, 4 are 260 */

/* ---------- Intro block (Figma "Frame 1321320953", Home — D 4597:31501) ----------
   A dateline - today's date and the time in London (Technical Read), and a way on (17 mono, with the Texture effect of the navigation at rest) - and 34 under it
   the statement: 66 / 70, white, blended by difference, trimmed to its cap height and last baseline like every statement here (see .statement). The dateline is 23
   high (the link's line), its two small texts centred in it, 12 apart. */
.opening { display: flex; flex-direction: column; gap: calc(34 * var(--u)); }
.opening__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: calc(12 * var(--u));
  width: 100%; margin: 0;
  line-height: calc(17 / 14); white-space: nowrap;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.opening__meta > time { margin-right: calc(-1 * var(--tls)); }      /* (the design's text boxes end at the last glyph: the letter-spacing after it is not part of the 12) */
.clock__c.is-off { opacity: 0; }                                  /* the colon blinks (script.js); it keeps its place, so nothing shifts */
/* "Learn more": 17 mono over a 23 line, 2 % tracking. It wears the hand-shaken look of the navigation (nav.js): lightly at rest, heavily (the letters cut into strips) while it is pointed at */
.cta {
  position: relative; display: inline-block;
  font-size: calc(var(--t14) * 17 / 14); line-height: calc(23 / 17); letter-spacing: .02em;
}
.cta::before { content: ""; position: absolute; inset: -.35em -.3em; }          /* a roomier hit area, invisible */
.cta:focus-visible { outline: 0; }
.fx-cv { position: absolute; display: block; pointer-events: none; user-select: none; -webkit-user-select: none; }   /* the canvas that draws the label of "Learn more" and of OPEN (nav.js, "Label texture"); the text itself stays under it, unseen, for readers, search and selection */

/* ---------- Notice board (Figma "Notice board", Home — D 4597:32233) ----------
   1647 wide, 40.5 in from the page edges and 557 high. A head of 33 (the label at the left, the season and a "+" from 745.5) with the rule under it; 34 below that the list
   (from 745.5) and, 31 under the rule (3 above the list's top), the picture (at 0.5, in its own size, up to 493 high). A row is 29 high, one every 41, in three columns - the client
   at 0, the update at 300 (it is the link, when the item has one) and the date at 740 - and the selected row is lit by a white glow, 1100 x 36, that starts 94 before the row's left edge. */
.notice { margin-inline: calc(40.5 * var(--u)); }
.notice__head { display: grid; grid-template-columns: calc(745.5 * var(--u)) 1fr; }
.notice__season { display: inline-flex; align-items: flex-start; gap: calc(4 * var(--u) - var(--tls)); }      /* (4 from the last glyph, as drawn: the letter-spacing after it is part of the box here) */
.plus { flex: none; width: calc(17 * var(--u)); height: calc(17 * var(--u)); fill: none; stroke: currentColor; stroke-width: 1; }
.notice__body {
  position: relative;
  display: grid; grid-template-columns: calc(745.5 * var(--u)) minmax(0, 1fr);
  align-items: start; margin-top: calc(34 * var(--u));
  min-height: calc(490 * var(--u));      /* the board is 557 high in the design - 67 of head, 490 of body - and the picture (up to 493, from 3 above the body) and the list fill that; with fewer rows than the design's twelve the board keeps its height */
}
/* Notice-board picture: one frame that takes each picture's own size and cross-dissolves between them (Figma: smart animate, "slow", 0.625s).
   script.js writes the picture's size in design pixels to --nw / --nh, its corner radius to --nr and its average colour to --nbg (what it fades in over);
   --ar and --wide are for the phone. The frame is out of the flow, starts 3 above the body (31 under the rule, Figma y 64), and no picture is taller than 493 (the body's 490 and those 3):
   nothing below it moves as it changes. */
.niche {
  --slow: cubic-bezier(.16, .6, .2, 1);
  --nw: 394.4; --nh: 493; --nr: 0; --nbg: #f9f9f9;
  position: absolute; left: calc(.5 * var(--u)); top: calc(-3 * var(--u)); overflow: hidden;
  width: calc(var(--nw) * var(--u)); height: calc(var(--nh) * var(--u));
  border-radius: calc(var(--nr) * var(--u));
  background: var(--nbg);
  transition: width .625s var(--slow), height .625s var(--slow), border-radius .625s var(--slow), background-color .625s var(--slow);
}
.niche img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity .625s var(--slow); }
.niche img.is-on { opacity: 1; }
/* a film lies over the still of its item (the still is the film's first frame): script.js gives the film .is-ready once it has data, and .is-on while its item is selected */
.niche video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity .625s var(--slow); pointer-events: none; }
.niche video.is-on.is-ready { opacity: 1; }

.updates { grid-column: 2; display: flex; flex-direction: column; gap: max(8px, calc(12 * var(--u))); line-height: calc(17 / 14); }   /* (Auto = 17 for 14) */
.row {
  position: relative;
  display: flex; align-items: center;
  padding-block: max(4px, calc(6 * var(--u)));
  opacity: .6; transition: opacity .625s var(--slow, cubic-bezier(.16,.6,.2,1));
  cursor: default;
}
/* (no underline on the link, as in the design: the glow that lights the row is its hover) */

.row::before {                       /* soft white "selected" glow (Figma "Selected": 1100 x 36, 94 before the row's left edge and 3 above its top, blur 62 = 31 here); never thinner than its row */
  content: ""; position: absolute; z-index: -1; left: calc(-94 * var(--u)); top: 50%;
  width: calc(1100 * var(--u)); height: max(calc(36 * var(--u)), calc(100% + 6px));
  transform: translateY(-50%);
  background: #fff; filter: blur(max(14px, calc(31 * var(--u))));
  opacity: 0; transition: opacity .625s cubic-bezier(.16,.6,.2,1);
}
.row.is-selected { opacity: 1; }
.row.is-selected::before { opacity: 1; }
.row:focus-visible { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: 2px; }
.glow { display: none; }              /* phone only: one glow that slides between the items (see the mobile block) */

/* The list's mono text keeps its size when the window gets narrower (the design's 14, down to 12): the row gives way around it. The three columns start where the
   design has them (the update at 300, the date at 740, of the 901.5 the list is wide here) and are pulled left only as far as the longest client, the longest update and
   a date need (script.js counts the characters of each, --cn --un --dn; the face is monospaced, so a character is --ch wide): the update starts after the longest client and a
   gap, the date after the longest update and a gap. The gaps shrink to 14px; only then is a long text cut off with an ellipsis. A row is always one line: when there is not room
   left for the date too (script.js puts .is-tight on the list), the date is let go (it stays in the page for a screen reader) and the update has its room, cut with an ellipsis only
   where it still does not fit. */
@media (min-width: 801px) {
  .updates {
    --ch: calc(1ch + var(--tls));                                       /* one character of the mono face, with its letter-spacing */
    --g: max(14px, calc(20.5 * var(--u)));                              /* the least gap between two columns */
    --cn: 22; --un: 40; --dn: 6;                                        /* characters in the longest client, update and date (script.js puts in the real numbers) */
    --xu: max(calc(300 * var(--u)), calc(var(--cn) * var(--ch) + var(--g)));                                                                          /* where the update starts */
    --xd: min(max(calc(740 * var(--u)), calc(var(--xu) + var(--un) * var(--ch) + var(--g))), calc(100% - var(--dn) * var(--ch)));         /* and the date (never so far right that it runs out of the row: 100% is the row's own width) */
  }
  .row { display: grid; grid-template-columns: var(--xu) calc(var(--xd) - var(--xu)) minmax(0, 1fr); justify-content: start; }
  .row > span { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row__client, .row__update { padding-right: var(--g); }
  /* The whole line is the link, not only its words: the link's own box is stretched over the row (a transparent layer, laid on the row because the row is the nearest
     positioned box - the clip of the cell it sits in does not reach it), so a click anywhere on the line goes where the link goes, and the pointer is a hand all along it.
     A row with nothing to open has no such layer and stays as it was. */
  .row__update a { color: inherit; text-decoration: none; }
  .row__update a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
  .updates.is-tight .row { grid-template-columns: var(--xu) minmax(0, 1fr); }
  .updates.is-tight .row > .row__date { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---------- Projects ----------
   Figma "Projects" (Home - D): the list is 585 wide and sits at the top of the block, 157 from the 907 x 810 cover. Four rows in focus with 60 above the first and
   60 under the fourth (644 in all); a fifth peeks out of the bottom, blurred. A row is 107 high (32 above the thumbnail, 83 x 75 with square corners), one
   every 139 (32 between rows). When there are more projects than that the window steps one row at a time (script.js): the row that peeks out of the bottom
   (or, once the list has moved, out of the top) is blurred the same way. */
.projects {
  --slow: cubic-bezier(.16, .6, .2, 1);
  --step: .625s;                                             /* one step of the list (Figma "slow") */
  --pr-th: calc(75 * var(--u));                              /* thumbnail: 83 x 75, no corner radius */
  --pr-tw: calc(83 * var(--u));
  --pr-pt: calc(32 * var(--u));                              /* the room above it inside a row */
  --pr-h: calc(var(--pr-pt) + var(--pr-th));                 /* a row: 107 */
  --pr-gap: calc(32 * var(--u));                             /* between two rows */
  --pitch: calc(var(--pr-h) + var(--pr-gap));                /* 139 */
  --pr-top: calc(60 * var(--u));                             /* the list's own room above its first row (and under its fourth) */
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;   /* list at the left edge, cover at the right: what lies between is the 157 */
}
/* Air above the block: in the design the headline's frame (trimmed to its last baseline) ends 120 above the cover; the section's own gap of 48 is part of it. */
.words--clients .projects { margin-top: calc(120 * var(--u) - 48 * var(--u)); }
.pwin { position: relative; flex: none; width: calc(585 * var(--u)); height: calc(var(--pr-top) * 2 + var(--pitch) * 4 - var(--pr-gap)); }   /* 585 x 644 */
.plist {
  position: absolute; left: 0; top: var(--pr-top, 0px); width: 100%;
  display: flex; flex-direction: column; gap: var(--pr-gap);
  transform: translate3d(0, calc(var(--shift, 0) * var(--pitch) * -1), 0);
  transition: transform var(--step) var(--slow);
  will-change: transform;
}
.proj {
  --b-img: 0px; --b-name: 0px; --b-desc: 0px; --o: 1;
  flex: none; display: block; width: 100%; height: var(--pr-h); padding-top: var(--pr-pt);
  text-align: left; opacity: .6; transition: opacity .35s var(--ease), translate var(--step) var(--slow);
  -webkit-tap-highlight-color: transparent;
}
.proj:hover, .proj.is-active { opacity: 1; }
.proj__in {
  display: flex; align-items: center; gap: calc(25 * var(--u)); height: var(--pr-th);
  opacity: var(--o); transition: opacity var(--step) var(--slow);
}
.proj:focus-visible { outline: 0; }
.proj:focus-visible .proj__in { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: calc(10 * var(--u)); border-radius: 2px; }
.proj__thumb {
  width: var(--pr-tw); height: var(--pr-th); border-radius: 0; object-fit: cover; flex: none; background: var(--grey-400);
  filter: blur(var(--b-img)); transition: filter var(--step) var(--slow);
}
.proj__text { display: flex; flex-direction: column; gap: calc(9 * var(--u)); min-width: 0; }
.proj__name { font-size: calc(16 * var(--u)); letter-spacing: .03em; line-height: 1;
  font-feature-settings: "lnum" 1, "tnum" 1; filter: blur(var(--b-name)); transition: filter var(--step) var(--slow); }
.proj__desc {
  line-height: calc(17 / 14);                      /* Technical Read, as everywhere (size and spacing come from .mono) */
  text-wrap: balance;                              /* a descriptor that has to wrap (a narrow window) breaks into two even lines, not a line and a stray word */
  /* the design uses #c0c0c0 with "difference" over the sand background, which resolves to
     this dark brown; set directly because blend modes don't pass through the dimmed row */
  color: #1c150f;
  filter: blur(var(--b-desc)); transition: filter var(--step) var(--slow);
}
/* where a row stands in the window (script.js sets data-pos): in focus (nothing), peeking out (blurred, the edge nearer the window's end more so), or out of sight */
.proj[data-pos="peek-bottom"] { --b-img: max(2px, calc(4.5 * var(--u))); --b-name: max(1.2px, calc(2.5 * var(--u))); --b-desc: max(2.4px, calc(5.5 * var(--u))); }
.proj[data-pos="peek-top"]    { --b-img: max(2px, calc(4.5 * var(--u))); --b-name: max(2.4px, calc(5.5 * var(--u))); --b-desc: max(1.2px, calc(2.5 * var(--u))); }
.proj[data-pos^="off"]        { --b-img: max(3px, calc(7 * var(--u))); --b-name: max(3px, calc(7 * var(--u))); --b-desc: max(3px, calc(7 * var(--u))); --o: 0; pointer-events: none; }
.proj[data-pos^="off"] .proj__in { visibility: hidden; transition: opacity var(--step) var(--slow), visibility 0s linear var(--step); }
/* A row that leaves through the top dissolves close to where it was (it travels about .4 of a step instead of the whole way). Riding the full step up, it slid,
   blurred and fading, over the last line of the headline above the block. The same distance is taken back when it returns. */
.proj[data-pos="off-top"]     { translate: 0 calc(var(--pitch) * .6); }

/* OPEN (Figma "A Project", State=Selected): the selected project that has a page of its own gets a small word at the end of its row, level with
   the middle of its thumbnail, 52 from the text. It is the text-only "CTA in box" (19 Nov): OPEN in black, 17 mono over a 23 line, 2 % tracking, in a box 52 x 35
   (6 above and below, the word in the middle) that is not drawn. The word wears the Texture look of the component, which nav.js replays ("Label texture": a fine,
   even edge at rest; a swelling when it is pointed at and then, after two thirds of a second, the one step into long slices). It is one link that lies over the list, rides along
   with it (same move, same easing) and is set down on whichever row is selected (script.js), so it is never inside a row (a link may not sit inside a tab). A
   project's page lights it up simply by giving its row data-page. The rows that have a page keep that room free at the end of their text, selected or not, so
   nothing re-wraps when one is chosen. */
.projects {
  --o-fs: calc(17 * var(--u)); --o-pad: calc(6 * var(--u)); --o-gap: calc(52 * var(--u));
  --o-px: calc((52 / 17 - 2.48) / 2 * var(--o-fs));                  /* the word is 2.48 em wide (four letters of a 0.6 em advance and 2 % tracking) and sits in the middle of a 52 box: 4.9 either side */
  --o-w: calc(52 / 17 * var(--o-fs));                                 /* the box: 52 */
  --o-h: calc(23 / 17 * var(--o-fs) + 2 * var(--o-pad));              /* the 23 line and the padding: 35 */
}
.proj[data-page] .proj__in { padding-right: calc(var(--o-gap) + var(--o-w)); }
.proj-open {
  position: absolute; z-index: 2; right: 0; top: calc(var(--peek-t, 0px) + var(--pr-top, 0px) + var(--pr-pt) + (var(--pr-th) - var(--o-h)) / 2);
  display: block; box-sizing: border-box; padding: var(--o-pad) var(--o-px); border-radius: calc(3 * var(--u));
  background: none; color: #000; line-height: calc(23 / 17); letter-spacing: .02em; white-space: nowrap; text-decoration: none; cursor: pointer;
  transform: translate3d(0, calc((var(--act, 0) - var(--shift, 0)) * var(--pitch)), 0);
  opacity: 0; visibility: hidden; -webkit-tap-highlight-color: transparent;
  transition: opacity .18s var(--ease), visibility 0s linear .18s, transform var(--step) var(--slow);
}
.proj-open.mono { font-size: var(--o-fs); }                                                        /* (two classes: the phone's own .mono size does not take it back to 12) */
.proj-open.is-on { opacity: 1; visibility: visible; transition: opacity .3s var(--ease), visibility 0s, transform var(--step) var(--slow); }
.proj-open.is-cut, .proj-open.is-cut.is-on { transition: none; }
.proj-open::before { content: ""; position: absolute; inset: -6px; }                                  /* a little more to hit than the word itself */
.proj-open:focus-visible { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: 3px; }

/* The cover: every project's picture (or film) is stacked here and the active one is simply switched on, so a change is instant. Under each sits a
   tiny blurred copy that is there from the first paint; the real picture fades in over it once it has loaded (script.js). */
.cover {
  position: relative; flex: none; width: calc(907 * var(--u)); height: calc(810 * var(--u));
  border-radius: calc(8 * var(--u)); overflow: hidden; background: #1d1c1a; isolation: isolate;
}
.cover.is-link { cursor: pointer; }                                                                  /* (script.js: the selected project has a page, and the cover opens it) */
.cover__slide { position: absolute; inset: 0; visibility: hidden; }
.cover__slide.is-on { visibility: visible; }
.cover__lo, .cover__hi, .cover__vid { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.cover__hi, .cover__vid { opacity: 0; transition: opacity .4s ease-out; }
.cover__hi.is-ready, .cover__vid.is-ready { opacity: 1; }

/* The phone's way of showing the projects (a strip of cards, see the phone block below): a wide screen has the list and the cover above instead. */
.pstrip { display: none; }

/* ---------- Footer ---------- */
.footer { display: flex; flex-direction: column; gap: calc(66 * var(--u)); padding-top: calc(60 * var(--u)); }
/* Awards strip (Figma "Awards"): six logos, each 100.85 wide, one every 349.03; the strip starts 59 to the left of the frame */
.awards { --s: var(--u); height: calc(89.49 * var(--s)); overflow: hidden; }
.awards__track { display: flex; height: 100%; width: max-content; margin-left: calc(-59 * var(--s)); animation: marquee var(--dur, 60s) linear infinite; }
.awards__set { display: flex; flex: none; }
.award { flex: none; display: flex; align-items: center; width: calc(349.03 * var(--s)); height: 100%; }
.award img { display: block; width: calc(100.852 * var(--s)); height: auto; max-width: none; flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.flinks {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: calc(20 * var(--u)) calc(24 * var(--u));
  padding-top: calc(23 * var(--u)); padding-bottom: calc(32 * var(--u));      /* + the 1px rule = the design's 24 above the text, 107 in all */
  margin-inline: calc(26 * var(--u));
  padding-inline: 0;
  border-top: 1px solid var(--ink);
  opacity: .6; line-height: calc(17 / 14);
}
.flinks > * { white-space: nowrap; }
/* The four links (Instagram, Linkedin, the e-mail, Privacy Policy) stand in four cells of 220, the first at the rule's left end, the last 220 from its right end, the other two evenly between
   (Figma, a 1280 page: 21, 360, 700 and 1039). There is no address any more. */
@media (min-width: 801px) { .flinks > * { flex: none; min-width: calc(220 * var(--u)); } }
.footer .block.flinks { padding-inline: 0; }
/* The blue figure: Figma's frame is 1728 x 912.1, and the lettering ("Self") reaches 13px above it, so the picture (1728 x 938) is lifted by 13 */
.figure { position: relative; height: calc(912.1 * var(--u)); pointer-events: none; }
.figure img { position: absolute; left: 0; top: calc(-13 * var(--u)); width: 100%; height: auto; aspect-ratio: 1728 / 938; display: block; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .awards__track { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}

/* ==========================================================================
   Mobile (≤ 800px) — follows "Home — M" (390px)
   ========================================================================== */
@media (max-width: 800px) {
  :root { --nav: 28px; --pu: 1px; --panel-w: min(390px, 100vw); --t14: 12px; }   /* the mono size keeps the 12px a phone has always had */

  .nav-type { line-height: 1; }
  .topbar { padding: 14px; }
  .topbar__brand { gap: 8px; }
  .avatar { width: 36px; height: 36px; }
  :root { --dock-blur: 8.4px; }                                       /* Figma, the 82 px phone dock: Background blur 15.6 (7.8 in CSS), as 22 stands for 20.5 above */
  .dock { height: 76px; gap: 22px; }
  .dock .nav-type { font-size: 24px; }

  .hero { height: 100svh; min-height: 560px; background-position: 50% 0; }
  /* a phone only ever shows a narrow slice of the cloth: the same picture, cut to its middle 1700 px (same pixel density), is half the weight */
  @media (max-aspect-ratio: 3/4) { .hero { background-image: url("assets/hero-m.jpg"); } .intro-wrap::before { background-image: url("assets/hero-soft-m.jpg"); } }
  .intro-wrap::before { height: 100svh; min-height: 560px; background-position: 50% 0; }      /* the blurred hero under the panel is laid out exactly like the hero */
  .hero__title { gap: calc(10px * var(--slogan)); font-size: calc(46px * var(--slogan)); line-height: calc(46px * var(--slogan)); padding: calc(32px * var(--slogan)) calc(40px * var(--slogan)); -webkit-mask-size: calc(160px * var(--slogan)) calc(80px * var(--slogan)); mask-size: calc(160px * var(--slogan)) calc(80px * var(--slogan)); }
  .hero__word { display: none; }

  .intro { gap: 72px; padding-top: 48px; padding-bottom: 64px; }
  .block { padding-inline: 20px; }
  .notice { margin-inline: 0; padding-inline: 20px; }

  .mono { font-size: 12px; }
  .subhead { padding-bottom: 12px; }
  .words { gap: 26px; }
  .opening { gap: 20px; }
  .opening__meta { gap: 14px; }
  .statement { font-size: 26px; line-height: 1.04; margin-block: 0; }                  /* (no first-line indent: a paragraph starts at the margin, as on a desktop screen) */
  .plus { display: none; }                                  /* (the phone's board has no "+") */

  /* Notice board on a phone: the mobile Figma component "Notice board" (4 variants), as used in the mobile screen.
     A picture slot of constant height (355 of a 369 wide column) whose width follows the item: 369 / 269 / 369 / 295. Under it a row of dated
     items, each 139 wide and 80 high, 12px mono, the selected one black with a soft white glow behind it (146 x 88, Figma blur 42 = 21px here),
     the others at 60%. A tap on an item moves the glow, changes the picture and carries the item to the second place of the row, all together
     over 0.625s ("slow"); the row reaches the screen edges and is swiped like any list. */
  .notice__head { display: flex; justify-content: flex-start; gap: 12px; }
  .notice__head span { opacity: .6; }
  .notice__body { display: flex; flex-direction: column; align-items: stretch; gap: 31px; margin-top: 31px; min-height: 0; container-type: inline-size; }
  /* The slot is 355 high on a 369 wide column; a square or landscape picture fills the width (and is as high as its proportions need, up to 355),
     a portrait one keeps the height and is as wide as that makes it (the design's 269 and 295 for its two portraits). --ar and --wide come from script.js. */
  .niche {
    --H: min(calc(100cqw * 355 / 369), 520px);
    position: relative; left: auto; top: auto; margin: 0 auto;
    width: calc(100% * var(--wide, 1) + min(100%, calc(var(--H) * var(--ar, 1))) * (1 - var(--wide, 1)));
    height: min(var(--H), calc(100cqw / var(--ar, 1)));
    border-radius: calc(var(--nr, 0) * .738px);
  }

  .updates {
    --slow: cubic-bezier(.16, .6, .2, 1);
    --pad: 20px;                       /* the first item starts where the page's text does */
    --pv: 80px;                        /* room above and below for the glow's soft edge, taken back with a negative margin */
    --w: 139px;                        /* one item */
    position: relative; flex-direction: row; align-items: flex-start; gap: 0; width: auto;
    margin: calc(-1 * var(--pv)) -20px;
    padding: var(--pv) var(--pad);
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    pointer-events: none;              /* the empty room above and below must not catch taps meant for the picture or the text */
    line-height: 16.4px;
  }
  .updates::-webkit-scrollbar { display: none; }
  .row {
    flex: none; display: block; width: var(--w); height: 80px; z-index: 1;
    padding: calc(9px + 16.4px + 6px) 5px 9px 9px;       /* the date on a line of its own (9 from the top, 16.4 high), 6 under it the client and the update, running on as one text, "Client: update": 125 wide - the design's 121 box, which the browser measures at 121.4 ("KHORA IS RENAMED"), so it gets 4px of the item's padding to break the way the design does */
    opacity: .6; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
  }
  .row > .row__date { position: absolute; left: 9px; top: 9px; }
  .row > .row__client::after { content: ": "; }
  .row__update a { color: inherit; text-decoration: none; pointer-events: none; }   /* a tap on an item selects it (script.js): on a phone the update is not a link */
  .row::before { content: none; }
  .row.is-selected { opacity: 1; }
  .row:focus-visible { outline-offset: -4px; }
  .glow {
    display: block; position: absolute; z-index: 0; left: 0; top: calc(var(--pv) - 10.9px);
    width: 146px; height: 88px; background: #fff; filter: blur(21px); pointer-events: none; will-change: transform;
    transform: translateX(calc(var(--pad) + (var(--i, 1) - 1) * var(--w) - 3.5px));
    transition: transform .625s var(--slow);
  }

  /* Projects on a phone: a strip of cards (Figma "A Project" in Home — M). A card is a square picture over the name and one line about the project, 210.75 wide
     and 3 apart. The strip is swiped sideways and settles on a card: the first at the left edge of the text, the last at its right edge, any other in the middle.
     The card nearest the middle is "here" and at full strength, the others "away" at 60 %. A tap on an away card brings it to the middle (0.625 s, the "slow" curve,
     as the notice board's items move) and a tap on the card that is here goes into its project (script.js). The list with its cover is for wide screens. */
  .words--clients .projects { display: none; }
  .pstrip { --slow: cubic-bezier(.16, .6, .2, 1); display: block; margin: 9.667px -20px 0; }   /* it reaches both edges of the screen; the first card starts where the text does (26 + 9.667 = the design's 35.667 under the text) */
  .pstrip__track {
    position: relative; display: flex; align-items: flex-start; gap: 3px; scroll-padding-inline: 20px;
    padding-block: 5px; margin-block: -5px;                                                    /* (room for the keyboard's ring round a picture: a scroller clips what lies outside it) */
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .pstrip__track::-webkit-scrollbar { display: none; }
  .pstrip__track::before, .pstrip__track::after { content: ""; flex: none; width: 17px; }     /* (the margins of the text at either end, 17 and the 3 of the gap: a scroller does not always count its end padding) */
  .pcard {
    flex: none; display: block; width: 210.75px; padding: 0; text-align: left;
    scroll-snap-align: center; opacity: .6; transition: opacity .625s var(--slow);
    -webkit-tap-highlight-color: transparent;
  }
  .pcard:first-child { scroll-snap-align: start; }
  .pcard:last-child { scroll-snap-align: end; }
  .pcard.is-here { opacity: 1; }
  .pcard__img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 5.944px; object-fit: cover; background: rgba(0, 0, 0, .08); -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
  .pcard__name { display: block; margin-top: 15px; font-size: 12px; line-height: normal; letter-spacing: .03em; font-feature-settings: "lnum" 1, "tnum" 1; color: #000; white-space: nowrap; }
  .pcard__desc { display: block; margin-top: 6px; line-height: 16.4px; color: #1c150f; }        /* (the design's #c0c0c0 by difference over the sand, as it comes out) */
  .pcard:focus-visible { outline: 0; }
  .pcard:focus-visible .pcard__img { outline: 1px solid rgba(0, 0, 0, .55); outline-offset: 4px; }

  /* Projects on a phone: the cover on top, under it the same window (four rows in focus, the next one peeking out and fading, blurred), tap a
     peeking row to move the list. The rows are 56 high, 14 apart; the window clips and fades its two ends. */
  .projects {
    flex-direction: column; align-items: stretch; gap: 0;
    --pr-th: 56px; --pr-pt: 0px; --pr-gap: 14px; --pr-top: 0px;
    --peek-t: 44px; --peek-b: 38px;                         /* how much of the row above / below shows */
    --o-fs: calc(var(--t14) * 17 / 14); --o-pad: 6px; --o-gap: 14px;   /* the OPEN button (see above): the type at the size of "Learn more" here, level with the middle of the 56 thumbnail */
  }
  .words--clients .projects { margin-top: 0; }               /* the phone keeps its own spacing (the section's 26) */
  .cover { order: -1; flex: none; width: 100%; height: 260px; border-radius: 8px; }
  .pwin {
    flex: none; width: 100%; overflow: hidden;
    height: calc(var(--peek-t) + var(--pitch) * 4 + var(--peek-b));
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--peek-t), #000 calc(100% - var(--peek-b)), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 var(--peek-t), #000 calc(100% - var(--peek-b)), transparent 100%);
  }
  .plist { top: var(--peek-t); }
  .proj { opacity: 1; }
  .proj__in { gap: 14px; }
  .proj:focus-visible .proj__in { outline-offset: 6px; }
  .proj__thumb { width: 56px; height: 56px; border-radius: 0; }
  .proj[data-pos="peek-bottom"], .proj[data-pos="peek-top"] { --b-img: 2.5px; --b-name: 2px; --b-desc: 2.5px; }
  .proj__text { gap: 4px; }
  .proj__name { font-size: 18px; }
  .proj__desc { font-size: 12px; letter-spacing: .02em; line-height: 1.35; text-wrap: wrap; color: #6b6b6b; mix-blend-mode: normal; }   /* (the phone's own descriptor, as it has been) */
  .proj-open { border-radius: 3px; }
  .proj-open::before { inset: -10px; }                                                                /* 44 to tap */
  .proj-open:focus-visible { outline-offset: -3px; }                                                  /* inside the box: the window clips what lies outside */

  .footer { padding-top: 0; padding-bottom: 30px; gap: 0; margin-top: 62.6px; }
  .awards { --s: .8px; }
  .award { width: calc(240 * var(--s)); }
  /* The four links stand in one row, 26 apart, at 60 %, and the row is swiped sideways when it is longer than the screen (Figma "Soggy bottom"): it runs on to the screen's
     edge, the hairline above it stays between the margins and does not move with it. */
  .footer .block.flinks {                                                                                  /* (as specific as the desktop's padding-inline: 0, which would cancel the margins) */
    flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; gap: 26px; margin-inline: 0; padding: 17.833px 0 0 20px; border-top: 0; opacity: .6; line-height: 17px;
    margin-top: 49.04px;
    background: linear-gradient(var(--ink), var(--ink)) 20px 0 / calc(100% - 40px) 1px no-repeat;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .footer .flinks::-webkit-scrollbar { display: none; }
  .footer .flinks > * { flex: none; white-space: nowrap; }
  .footer .flinks > :last-child { margin-right: 20px; }                                                          /* (the 20 after the last link: a margin, which every scroller counts, where an end padding is not always) */
  /* The fish stands on its tail with its head up (the artwork turned a quarter, Figma "Logo/Base"): as wide as the text column, and as tall as the design's frame makes it - 1728 : 912.1
     turned, which is about 1.9 times its width. The artwork's 13 above the frame (the lettering) stays outside the box, a few pixels each side. */
  .figure { height: auto; margin: 49.04px 20px 0; aspect-ratio: 912.1 / 1728; }
  .figure img { position: absolute; left: 50%; top: 50%; width: calc(100% * 1728 / 912.1); max-width: none; height: auto; transform: translate(-50%, -50%) rotate(-90deg); }      /* (before it is turned the artwork is as wide as the box is tall) */
}

.gl { display: inline-block; }
