:root{
  /* ---------------------------------------------------------------
     Color palette — every color on the site is one of these. Change
     a value here and it updates everywhere it's used. In particular:
     --accent is the single orange used across the whole project
     (buttons, hover states, progress bar) — change just this one to
     re-theme the entire site.
  ------------------------------------------------------------------ */
  --accent:#FA8734;      /* brand accent (orange) */
  --bg:#F5F5F5;           /* page background */
  --ink:#2E2E2E;          /* headings / primary text */
  --ink-strong:#1C1C1C;   /* solid dark fill (buttons) */
  --body-text:#444;       /* paragraph / body copy */
  --muted:#666666;        /* small caps labels, footer, meta — 5.3:1 on --bg, 4.6:1 on --thumb (was #757575, 4.2:1) */
  --faint:#B9B9B9;        /* faint placeholder text */
  --track:#ABABAB;        /* inactive progress-bar dot */
  --line:#E0E0E0;         /* hairline borders */
  --thumb:#E6E6E6;        /* image placeholder background */
  --white:#FFFFFF;
  --black:#000000;

  /* Zone colours of the scroll-scrubbed film on the frictions page — fixed by the film itself
     (the zones are drawn in these exact colours), so they are NOT derived from --accent. */
  --zone-left:#14AE5C;    /* left zone  — green  */
  --zone-mid:#FFCD29;     /* middle zone — yellow */
  --zone-right:#F24822;   /* right zone — red    */

  /* Sorting film (Background Service, frictions page): five importance fields, ascending like a
     traffic light — green, lime, yellow, orange, red (green/yellow/red reuse the zone colours) —
     and the blue-grey data cards that get sorted into them. */
  --importance-1:var(--zone-left);
  --importance-2:#A8F000;
  --importance-3:var(--zone-mid);
  --importance-4:#FFA62B;
  --importance-5:var(--zone-right);
  /* Notification timing (frictions "Your notification"): the four settings of the device, colours as
     in the concept film — red ignored, orange on demand, blue periodic, green persistent. */
  --timing-ignored:#F0302A;
  --timing-on-demand:#F28A1E;
  --timing-periodic:#2F7CF6;
  --timing-persistent:#1FAE3A;
  /* the timing picker's surfaces. The notification is smoked glass like the timing chips on the
     concept photo: a light tint, the render behind it blurred AND darkened (the filter), so it stays
     see-through yet white text keeps 4.5:1+ over the light desk; a fine light edge. Then the list's
     hover tint and chosen plate. */
  --timing-glass:rgba(30,30,30,.16);
  --timing-glass-filter:blur(5px) brightness(.6) saturate(1.4);
  --timing-glass-edge:inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(255,255,255,.16);
  --timing-glass-shadow:0 12px 32px -14px rgba(0,0,0,.45);
  --timing-hover:rgba(0,0,0,.03);
  --timing-plate-shadow:0 1px 2px rgba(0,0,0,.05), 0 10px 26px -14px rgba(0,0,0,.22);
  --flow-card-shadow:0 1px 2px rgba(0,0,0,.06);   /* a resting card in the user-flow deck */
  /* Landscape mixer (procontra "Growing landscapes"): the knitted mustard of the prototypes, a lighter
     tone for a Contra standing as an arch (it is raised, so it catches more light), the grey-white Hub. */
  --pc-fabric:#D09A1C;
  --pc-fabric-edge:#A9790F;
  --pc-fabric-raised:#E7B739;
  --pc-hub:#FBFBFB;
  --pc-hub-edge:#8F8F8F;     /* 3:1 on --thumb, so the white Hub still reads as a shape */
  --pc-shadow:rgba(60,40,0,.28);
  --pc-grid:#D9D9D9;
  /* Isometric "Growing landscapes" figure (procontra): monochrome — paper white, four grey side tones, grey lines.
     Values from the Anatomy kit's light theme; used through the LANDSCAPE ISO block. */
  --iso-paper:#FBFBFA;
  --iso-shade-0:#DCDCD9;
  --iso-shade-1:#E5E5E2;
  --iso-shade-2:#EDEDEA;
  --iso-shade-3:#F4F4F1;
  --iso-line-hi:#26262A;
  --iso-line-mid:#8A8A8F;
  --iso-line-lo:#B4B4B8;
  --iso-line-faint:#D4D4D6;
  --iso-dot:#3A3A3E;
  --iso-halo:#8A8A80;
  --iso-piece:#F0F0EE;     /* the furniture pieces: one flat, very light grey — no side tones, no shine */
  --iso-strap-0:#BDBDBA;
  --iso-strap-1:#C6C6C3;
  --iso-strap-2:#CFCFCC;
  --iso-strap-3:#D6D6D3;
  --data-card:var(--white);
  --data-card-edge:rgba(0,0,0,.06);  /* hairline that lets a white card sit on the grey plate */
  --data-card-shadow:0 .15cqw .3cqw rgba(0,0,0,.05), 0 .8cqw 1.8cqw -.6cqw rgba(0,0,0,.16);

  /* ---------------------------------------------------------------
     CORNER RADII — one small scale for every box on the site (pills and circles aside:
     buttons use 999px, round icons 50%). Nothing should use a literal radius any more.
       --radius-lg  every picture, film, placeholder plate, card and the cookie banner —
                    anything big enough to be a "surface"
       --radius-sm  small details sitting INSIDE a bigger surface (the cookie banner's highlight
                    zones, tooltips, the debug overlay) — concentric with the 20px outside:
                    inner radius < outer radius
     HOW TO CHANGE: edit the two numbers; to make the whole site square-cornered again set
     --radius-lg to 2px.
  ------------------------------------------------------------------ */
  --radius-sm:8px;
  --radius-lg:20px;

  /* One very soft shadow, only for the two films that float over the page (loop + scrub window). */
  --media-shadow:0 24px 60px -16px rgba(0,0,0,.14), 0 6px 18px -8px rgba(0,0,0,.08);

  --font: "Helvetica Neue", "HelveticaNeueLight", Arial, sans-serif;

  /* ---------------------------------------------------------------
     TYPE SCALE — named after the text styles from the original Framer
     file (cleaned up for clarity), consolidated to 13 steps (down from
     18 near-duplicate pixel values that had drifted apart with no real
     design intent). The variable names are size-coded (2xs smallest →
     7xl largest) because a few unrelated elements deliberately share a
     step — but every token below is commented with its style NAME,
     what it's for, and where it's used.

     HOW TO CHANGE A SIZE: edit the px value on the line for that
     style — every element listed in its comment resizes together.
     Framer's "Bold" variants (e.g. "Paragraph Bold") are NOT separate
     sizes — same --fs- token, just set with --fw-bold instead of the
     style's normal weight (see the weight tokens further below).
     Framer's biggest style, "Lander" (80px/84 line-height), has no
     match here — nothing on the built site currently uses it.
  ------------------------------------------------------------------ */

  /* MICRO LABEL — Framer: "Bottom text cap" + "Hover Text pics"
     • smallest text on the site, line-height ~1
     • footer legal + social links (uppercase, letter-spaced)
     • the badge that slides in when hovering a homepage project image */
  --fs-2xs: 12px;

  /* FINE PRINT — no direct Framer equivalent (sits between its 12 and 16)
     • quiet, secondary text
     • cookie-banner tooltips, diagram/image placeholder captions, legal-page notes */
  --fs-xs: 13px;

  /* CAPTION / META — no direct Framer equivalent
     • short labels and metadata, not full sentences
     • project meta-table (Teammates/Time/Role), CV dates & place, image captions, cookie-banner "manage" link */
  --fs-sm: 14px;

  /* BODY / PARAGRAPH — Framer: "Paragraph" (17px desktop) / "Paragraph" (16px mobile), rounded to one step
     • the running-text size, line-height 1.6–1.7 for readability
     • project descriptions, legal-page paragraphs, bullet lists */
  --fs-base: 15px;

  /* SMALL LINKS — Framer: "Small links" (H4, 16px) / "Heading 6" (16px mobile)
     • secondary UI text and short line
     • nav links, CV role line, contact links, project cards, about-page intro copy, cookie-banner "accept" button */
  --fs-md: 16px;

  /* HEADING 5 — Framer: "Heading 5" (18px mobile)
     • small in-page subheading
     • legal-page (Impressum/Datenschutz) H3s */
  --fs-lg: 18px;

  /* LEDE / EMPHASIS — site-specific size, sits between Framer's Paragraph and Subheadline
     • the "pull quote" line that opens a case study, plus anything that should read as a confident label
     • case-study lede paragraphs, every pill button label, the cookie-banner title */
  --fs-xl: 20px;

  /* SUBHEADING, COMPACT — close to Framer's "Heading 2 / Heading 2 Alt" (24px mobile)
     • a step down from Subheadline, for identity/label-style text
     • wordmark on mobile, footer name, CV section headings, case-study section titles on mobile */
  --fs-2xl: 22px;

  /* SUBHEADLINE — Framer: "Subheadline" (28px desktop), rounded down slightly
     • in-page section headings
     • case-study section titles (Problem/Concept/…), legal-page H2s, wordmark on desktop */
  --fs-3xl: 26px;

  /* HEADING, MOBILE DISPLAY — no direct Framer equivalent (Framer's mobile H1 is 50px; this is deliberately smaller)
     • the shared size for every big page heading once the layout collapses to mobile
     • homepage work-item titles (all screen sizes) + hero/page-title/project-title/playground-heading on mobile */
  --fs-4xl: 32px;

  /* HEADLINE, SMALL — no direct Framer equivalent
     • a case-study-specific headline size, between Subheadline and Headline
     • the project title at the top of each case study (frictions/procontra/bqual) */
  --fs-5xl: 40px;

  /* HEADLINE, COMPACT — close to Framer's "Headline" (56px), used slightly smaller here
     • playground page's hero heading */
  --fs-6xl: 52px;

  /* HEADLINE — Framer: "Headline" (56px) — exact match
     • the site's primary hero size
     • homepage hero heading, about/contact/playground page titles */
  --fs-7xl: 56px;

  /* FILM TEXT — text drawn inside an animated illustration (the sorting film on the frictions
     page). It scales with the film's width (cqw = 1% of the film), so the picture keeps its
     proportions at every size, like text baked into a video. */
  --fs-film-card: 1.45cqw;
  --fs-film-caption: max(12px, 2.1cqw);

  /* ---------------------------------------------------------------
     FONT WEIGHTS — Helvetica Neue cuts used on the site.
     HOW TO CHANGE: edit the number once here; every style using that
     weight (see comments above) updates together.
  ------------------------------------------------------------------ */
  --fw-light:    300; /* Light — the site's default body weight (Framer's non-"Bold" paragraph/link styles) */
  --fw-regular:  400; /* Regular — headings that aren't meant to shout */
  --fw-medium:   500; /* Medium — added for one-off "Bold"-style Framer variants (e.g. Subheadline Bold) that are actually Medium, not true Bold */
  --fw-semibold: 600; /* Semibold — small emphasis (e.g. CV role, table row labels) */
  --fw-bold:     700; /* Bold — Framer's "… Bold" style variants; also used inline for emphasis within a paragraph */

  /* ---------------------------------------------------------------
     Shared button tokens — every pill button (.btn, .all-work a,
     .doc-download-btn) reads these. Change a value here and it
     applies everywhere at once.
  ------------------------------------------------------------------ */
  --btn-pad-x: 16px;         /* left/right padding */
  --btn-pad-y: 8px;          /* top/bottom padding */
  --btn-font-size: var(--fs-xl);
  --btn-font-weight: var(--fw-regular);
  --btn-border-width: 2px;
  /* deterministic pill height: font-size + vertical padding (line-height is forced to 1 on buttons) */
  --btn-icon-size: calc(var(--btn-font-size) + (var(--btn-pad-y) * 2));

  /* SECTION RAIL — the site's scrollbar (see the "SECTION RAIL" block further down) */
  --rail-width: 48px;                     /* the ruler flush against the right window edge */
  --rail-ease: cubic-bezier(.16,1,.3,1);  /* same curve as the scroll reveal: fast start, long soft landing */
  --rail-gap: 4px;                        /* space between the ruler and the hover label */

  --header-height: 64px; /* must match header{height:...} below — also used to keep scroll-snap targets clear of the fixed header */
  --header-line: 1px;    /* the orange line under the header (--accent) */

  /* TEXT WIDTH on the case studies — a readable line length for running text (.measure, about
     75–85 characters of 15px body) and the narrower one for the hook statement (.measure-hook).
     --block-gap: the space between a block of text and a picture block that follows it (.block-gap). */
  --measure: 760px;
  --measure-hook: 640px;
  --block-gap: 32px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  font-weight:var(--fw-light);
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;}
/* keyboard focus: one visible ring for everything focusable. :where() keeps its specificity at 0,
   so the component-specific rings further down (cookie banner, buttons) still win where they exist. */
:where(a, button, summary, input, textarea, select, [tabindex]):focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}

/* text selection highlight — accent orange at reduced opacity instead
   of the browser's default blue. color-mix() keeps it tied to --accent
   (change the palette, this updates too) while still allowing partial
   opacity, which a plain hex value on its own can't do. */
::selection{
  background:color-mix(in srgb, var(--accent) 35%, transparent);
}

.wrap{max-width:none;margin:0 auto;padding:0 150px;}

/* header */
header{
  position:fixed;
  top:0; left:0; right:0;
  height:var(--header-height);
  background:var(--bg);
  box-shadow:inset 0 calc(-1 * var(--header-line)) 0 var(--accent); /* hairline at the bottom edge, takes no layout space */
  z-index:100;
  display:flex;
  align-items:center;
}
.header-inner{
  width:100%;
  max-width:none;
  margin:0 auto;
  padding:0 150px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
body{padding-top:64px;}
/* Case-study pages (frictions/procontra/bqual): the full-bleed .project-hero is meant to
   start at the very top of the screen and sit *under* the fixed header, not below it — so
   they don't get the 64px offset above. Without this, the hero rendered 64px lower than the
   viewport top, which combined with its own height could push it (and the scroll arrow)
   below the fold. */
body.has-hero{padding-top:0;}
.mark{
  font-size:var(--fs-3xl);
  font-weight:var(--fw-light);
  letter-spacing:-0.5px;
  color:var(--ink);
}
nav{display:flex; gap:34px;}
nav a{
  position:relative;
  display:inline-grid;
  color:var(--muted);
  padding-bottom:4px;
}
nav a::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:0;
  height:2px;
  background:var(--ink);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .15s ease;
}
nav a .ghost, nav a .visible{
  grid-row:1;
  grid-column:1;
  font-size:var(--fs-md);
  letter-spacing:-0.16px;
}
nav a .ghost{
  font-weight:var(--fw-bold);
  visibility:hidden;
}
nav a .visible{
  font-weight:var(--fw-light);
  transition:color .15s ease;
}
nav a:hover .visible, nav a.active .visible{
  color:var(--ink);
  font-weight:var(--fw-bold);
}
nav a:hover::after, nav a.active::after{
  transform:scaleX(1);
}

/* ---------------------------------------------------------------
   NAV SCRAMBLE — assets/js/nav-scramble.js upgrades the nav above on every page: a small grey
   running index in front of each link ("_01 WORK"), the word in small letter-spaced capitals that
   re-types itself on hover (random letters resolving left to right), ONE 1px line that glides to
   the hovered word and back to the current page's, and on desktop the header slides away while
   scrolling down and returns on the first scroll up. Without JS the plain nav above stays.

   HOW TO CHANGE:
   - timing of the scramble / when the header returns: the CAPS constants in nav-scramble.js
   - line + header curve: --nav-ease; durations in .nav-line / header below
   - type: .nav-num / .nav-word
------------------------------------------------------------------ */
html.nav-scramble{--nav-ease:cubic-bezier(.76,0,.24,1);} /* slow start, quick middle, slow landing */
html.nav-scramble header{transition:transform .8s var(--nav-ease);}
html.nav-scramble.nav-hidden header{transform:translateY(-110%);}
html.nav-scramble nav{position:relative; gap:26px;}
html.nav-scramble nav a{display:inline-flex; align-items:baseline; gap:8px; padding-bottom:7px;}
html.nav-scramble nav a::after{display:none;}
.nav-num{font-size:var(--fs-2xs); font-weight:var(--fw-regular); font-variant-numeric:tabular-nums; color:var(--muted);}
.nav-word{
  display:inline-flex;
  white-space:pre;
  font-size:var(--fs-2xs);
  font-weight:var(--fw-medium);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  transition:color .2s ease;
}
/* every letter keeps its final width; clip-path (not overflow, which would move the baseline)
   cuts off anything that still pokes out sideways while scrambling */
.nav-word span{display:inline-block; text-align:center; clip-path:inset(-.4em 0);}
html.nav-scramble nav a:hover .nav-word,
html.nav-scramble nav a:focus-visible .nav-word,
html.nav-scramble nav a.is-lined .nav-word{color:var(--ink);}
.nav-line{
  position:absolute; left:0; top:0; /* placed by JS: translate(x, y) under the word */
  width:0; height:1px;
  background:var(--ink);
  opacity:0;
  pointer-events:none;
  transition:transform .4s var(--nav-ease), width .4s var(--nav-ease), opacity .2s linear;
}

/* ---------------------------------------------------------------
   PHONE MENU — up to 900px the header is one slim row: wordmark left, a menu button right
   (two 1px lines that turn into an X). The nav becomes a sheet that drops down under the header,
   one link per 56px row with its running number, and a light scrim dims the page behind it.
   Button + behaviour: the "PHONE MENU" block at the end of assets/js/nav-scramble.js.
   HOW TO CHANGE: row height --menu-row, scrim strength --menu-scrim, timing --menu-ease / .3s.
------------------------------------------------------------------ */
.menu-toggle, .menu-scrim{display:none;}
@media (max-width:900px){
  :root{
    --menu-row:56px;
    --menu-ease:cubic-bezier(.23,1,.32,1);   /* quick start, soft landing */
    --menu-scrim:color-mix(in srgb, var(--ink-strong) 18%, transparent);
  }
  .menu-toggle{
    display:inline-flex; align-items:center; justify-content:center;
    width:44px; height:44px; padding:0; margin:0;
    background:none; border:0; color:var(--ink); cursor:pointer;
  }
  .menu-toggle-lines, .menu-toggle-lines::before{
    display:block; width:20px; height:1px; background:currentColor;
    transition:transform .3s var(--menu-ease);
  }
  .menu-toggle-lines{position:relative; transform:translateY(-3px);}
  .menu-toggle-lines::before{content:""; position:absolute; left:0; top:6px;}
  html.menu-open .menu-toggle-lines{transform:rotate(45deg);}
  html.menu-open .menu-toggle-lines::before{transform:translateY(-6px) rotate(-90deg);}

  header nav, html.nav-scramble header nav{
    position:absolute; top:100%; left:0; right:0;
    display:flex; flex-direction:column; gap:0;
    padding:4px 22px 20px;
    background:var(--bg);
    box-shadow:inset 0 calc(-1 * var(--header-line)) 0 var(--line);
    visibility:hidden; opacity:0; transform:translateY(-8px);
    transition:opacity .2s ease, transform .3s var(--menu-ease), visibility 0s linear .3s;
  }
  html.menu-open header nav{
    visibility:visible; opacity:1; transform:none;
    transition:opacity .2s ease, transform .3s var(--menu-ease), visibility 0s;
  }
  header nav a, html.nav-scramble header nav a{
    display:flex; align-items:center; gap:12px;
    min-height:var(--menu-row); padding:0;
    border-bottom:1px solid var(--line);
  }
  header nav a:last-of-type, html.nav-scramble header nav a:last-of-type{border-bottom:0;}
  nav a .ghost, nav a .visible{font-size:var(--fs-lg);}
  html.nav-scramble .nav-word{font-size:var(--fs-sm);}
  .nav-line{display:none;}

  .menu-scrim{
    display:block; position:fixed; inset:0; z-index:99;   /* just under the header (100) */
    background:var(--menu-scrim);
    opacity:0; pointer-events:none;
    transition:opacity .3s ease;
  }
  html.menu-open .menu-scrim{opacity:1; pointer-events:auto;}
}
@media (max-width:900px) and (prefers-reduced-motion:reduce){
  header nav, html.menu-open header nav, .menu-toggle-lines, .menu-toggle-lines::before, .menu-scrim{transition:none;}
}

/* hero */
.hero{padding:96px 0 56px;}
.hero h1{
  font-size:var(--fs-7xl);
  line-height:1.07;
  font-weight:var(--fw-regular);
  letter-spacing:-0.28px;
  margin:0;
  max-width:1040px;
}

/* work list on homepage */
.work-item{display:block; margin-bottom:56px;}
.work-item .thumb{
  position:relative; /* anchors .badge */
  width:100%;
  aspect-ratio: 16/9;
  background:var(--thumb);
  overflow:hidden; /* masks the badge as it slides in from the top */
  border-radius:var(--radius-lg);
}
.work-item .thumb img, .work-item .thumb svg{width:100%;height:100%;object-fit:cover;display:block;}

/* ---------------------------------------------------------------------
   Homepage project badge (hover state)
   Edit ONLY the values below to restyle every badge at once.
   Edit the placeholder text per project directly in index.html
   (look for "project 1 badge" / "project 2 badge" / "project 3 badge").
------------------------------------------------------------------------ */
.work-item .badge{
  --badge-offset: 16px;      /* distance from top + right edge of the thumbnail */
  --badge-pad-x: 12px;       /* left/right padding between text and pill edge */
  --badge-pad-y: 4px;        /* top/bottom padding between text and pill edge */
  --badge-bg-rgb: 18, 18, 18;   /* #121212 */
  --badge-bg-opacity: 0.25;
  --badge-color: var(--bg);
  --badge-font-size:var(--fs-2xs);

  position:absolute;
  top:var(--badge-offset);
  right:var(--badge-offset);
  padding:var(--badge-pad-y) var(--badge-pad-x);
  border-radius:999px; /* pill shape, always fully rounded regardless of text length */
  background:rgba(var(--badge-bg-rgb), var(--badge-bg-opacity));
  color:var(--badge-color);
  font-family:var(--font);
  font-weight:var(--fw-light); /* Helvetica Neue Light */
  font-size:var(--badge-font-size);
  line-height:1;
  white-space:nowrap;
  pointer-events:none;

  /* slide-in-from-top animation, clipped by .thumb's overflow:hidden */
  transform:translateY(-250%);
  transition:transform .35s ease;
}
.work-item:hover .badge, .work-item:focus-visible .badge{
  transform:translateY(0);
}
.work-item .title{
  font-size:var(--fs-4xl);
  font-weight:var(--fw-light);
  margin-top:18px;
  color:var(--ink);
}
.work-item .subtitle{
  font-size:var(--fs-md);
  color:var(--muted);
  margin-top:4px;
}

/* footer */
footer{
  border-top:1px solid var(--line);
  margin-top:40px;
  padding:36px 0 44px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
}
footer .fname{font-size:var(--fs-2xl); color:var(--muted); font-weight:var(--fw-light);}
footer .legal{display:flex; flex-direction:column; gap:6px; font-size:var(--fs-2xs); letter-spacing:0.4px; color:var(--muted); text-transform:uppercase;}
footer .legal a:hover{color:var(--ink);}
footer .social{display:flex; flex-direction:column; gap:6px; text-align:right;}
footer .social .name{font-size:var(--fs-2xs); letter-spacing:0.4px; color:var(--muted); text-transform:uppercase;}
footer .social a{font-size:var(--fs-2xs); letter-spacing:0.4px; color:var(--muted); text-transform:uppercase;}
footer .social a:hover{color:var(--ink);}

/* generic page heading (about/contact/playground) */
.page-title{
  font-size:var(--fs-7xl);
  font-weight:var(--fw-light);
  margin:70px 0 40px;
}

/* about page */
.about-grid{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap:60px;
  align-items:start;
}
.about-grid .portrait{
  width:100%;
  aspect-ratio:3/4;
  background:var(--thumb);
  overflow:hidden;
  border-radius:var(--radius-lg);
}
.about-grid .portrait img, .about-grid .portrait svg{width:100%;height:100%;object-fit:cover;display:block;}
.about-grid .copy p{
  font-size:var(--fs-md);
  line-height:1.6;
  color:var(--body-text);
  max-width:620px;
  margin:0 0 22px;
}
.about-grid .copy p:first-child{color:var(--ink);}

.cv-block{margin-top:70px;}
.cv-block h2{font-size:var(--fs-4xl); font-weight:var(--fw-regular); margin:0 0 26px;}
.cv-section{
  border-left:2px solid var(--ink);
  padding-left:20px;
  margin-bottom:44px;
}
.cv-section h3{font-size:var(--fs-2xl); font-weight:var(--fw-regular); margin:0 0 18px;}
.cv-row{margin-bottom:20px;}
.cv-row .meta{font-size:var(--fs-sm); color:var(--muted); margin-bottom:2px;}
.cv-row .role{font-size:var(--fs-md); font-weight:var(--fw-semibold); margin-bottom:2px;}
.cv-row .place{font-size:var(--fs-sm); color:var(--muted);}

/* contact page */
.contact-grid{
  display:flex;
  justify-content:space-between;
  gap:40px;
  flex-wrap:wrap;
  margin-bottom:60px;
}
.contact-grid .addr p{font-size:var(--fs-md); line-height:1.5; margin:0 0 20px;}
.contact-grid .links p{font-size:var(--fs-md); line-height:1.8; margin:0;}
.btn-row{display:flex; gap:12px; margin-top:20px;}
.btn{
  display:inline-block;
  background:var(--ink-strong);
  color:var(--white);
  line-height:1;
  font-family:var(--font);
  font-size:var(--btn-font-size);
  font-weight:var(--btn-font-weight);
  padding:var(--btn-pad-y) var(--btn-pad-x);
  border-radius:999px;
  border:var(--btn-border-width) solid var(--ink-strong);
}

/* playground */
.playground-hero{
  background:var(--accent);
  color:var(--white);
  width:100vw;
  margin-left:calc(-50vw + 50%);
  padding:90px 150px 120px;
}
.playground-hero h1{
  font-size:var(--fs-6xl);
  font-weight:var(--fw-regular);
  line-height:1.2;
  max-width:820px;
  margin:0;
}

/* project page */
.project-hero{
  position:relative;
  width:100vw;
  margin-left:calc(-50vw + 50%);
  aspect-ratio: 16/9;
  max-height:100vh; /* never taller than the screen — on short/wide windows this wins over
                        the aspect-ratio, so the whole hero (incl. the scroll arrow) is always
                        visible on load, with its bottom edge landing exactly at the viewport
                        edge. The image still fills the box via object-fit:cover below. */
  background:var(--thumb);
  overflow:hidden;
}
.project-hero img, .project-hero svg{width:100%;height:100%;object-fit:cover;display:block;}
.project-title{font-size:var(--fs-5xl); font-weight:var(--fw-regular); margin:60px 0 30px;}
/* keeps an <h1> in the page outline (screen readers, SEO) without showing it */
.visually-hidden{
  position:absolute;
  width:1px; height:1px;
  margin:-1px; padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}
.project-top{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap:60px;
  margin-bottom:70px;
}
/* the first block after the key visual when there's no visible project title above it —
   same 60px top gap .project-title would have provided */
.project-top-first{margin-top:60px;}
/* .lede and .body are used throughout every case-study page, not just inside
   .project-top — unscoped so both work everywhere the class is applied. */
.lede{font-size:var(--fs-xl); line-height:1.4; margin:0 0 20px; color:var(--ink);}
.body{font-size:var(--fs-base); line-height:1.6; color:var(--body-text);}
/* explicit: the page's base weight is Light (300), and the browser's default "bolder" only
   steps that up to 400 — barely visible. Inline emphasis should be real bold. */
.body strong, .lede strong{font-weight:var(--fw-bold);}

/* SUBHEADLINE BOLD — Framer: "Subheadline Bold" (28px / line-height 1.14 / Helvetica Neue Medium)
   • an emphasized, standalone question/statement within a case study — one step
     bigger and heavier than .lede
   • not part of the --fs- scale on purpose: it's an exact Framer spec, kept as
     its own literal value here rather than nudged onto the nearest step (26px)
   • HOW TO USE: add class="subheadline-bold" to any <p>/<h2>/etc.
   • HOW TO CHANGE: edit the three values below — every element using this
     class updates together */
.subheadline-bold{
  font-size:28px;
  font-weight:var(--fw-medium);
  line-height:1.14;
  color:var(--ink);
  margin:0 0 20px;
}
/* right column of .project-top: meta-table on top, any following block (e.g.
   .doc-download) pinned to the bottom — grid stretches this column to the same
   height as the (usually taller) text column on the left, so "bottom" here means
   flush with that text's own bottom edge. */
.project-side{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.meta-table div{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
  font-size:var(--fs-sm);
}
.meta-table div span:first-child{font-weight:var(--fw-semibold);}
.meta-table div span:last-child{color:var(--body-text); text-align:right;}
/* phones: label over value, both left-aligned — side by side the values wrapped into ragged
   right-aligned lines next to "My role" */
@media (max-width:900px){
  .meta-table div{flex-direction:column; gap:2px;}
  .meta-table div span:last-child{text-align:left;}
}
.section-title{font-size:var(--fs-3xl); font-weight:var(--fw-regular); margin:160px 0 24px;}
.diagram-row{display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:30px;}
.diagram-row .diagram{
  background:var(--thumb);
  aspect-ratio:16/10;
  border-radius:var(--radius-lg);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:var(--fs-xs);
  text-align:center;
  padding:20px;
  overflow:hidden;
}
.diagram-row .diagram img{width:100%;height:100%;object-fit:cover;display:block;}

/* full-bleed body image with caption */
.body-image{
  width:100vw;
  margin-left:calc(-50vw + 50%);
  aspect-ratio:16/8;
  background:var(--thumb);
  margin-bottom:14px;
  overflow:hidden;
}
.body-image svg, .body-image img{width:100%;height:100%;object-fit:cover;display:block;}
.img-caption{font-size:var(--fs-sm); color:var(--muted); margin:0 0 60px;}
.img-caption.right{text-align:right;}

/* half-width single image (user testing style) */
.half-image{
  width:50%;
  aspect-ratio:1/1;
  background:var(--thumb);
  margin-bottom:60px;
  overflow:hidden;
}
.half-image img{width:100%;height:100%;object-fit:cover;display:block;}
@media (max-width:900px){.half-image{width:100%;}}

/* content image that keeps its natural aspect ratio */
.content-image{margin:0 0 14px;}
/* max-height caps portrait-oriented photos (e.g. phone-screenshot mockups) so they
   can never render taller than the screen itself — without it, a very tall/narrow
   image at full column width could exceed the viewport, making it (and often its
   section heading) impossible to see in full no matter how you scroll. Landscape
   images are unaffected: their natural height at full width is normally well under
   this cap already. width/height:auto + max-width/max-height (instead of a plain
   width:100%) is what keeps the image's proportions correct either way. */
.content-image img{max-width:100%; max-height:75vh; width:auto; height:auto; display:block; margin:0 auto; border-radius:var(--radius-lg);}

/* "Variable seating heights" (procontra): drawn on the picture — a white height bar beside
   each piece (end ticks top and bottom) and its value centred below it, near the bottom edge.
   Each li is a layer over the whole image and sets --x (centre of bar and value) and --top /
   --bottom (bar ends), in % of the image, measured on procontra_seating_heights_v2.jpg;
   re-measure them when the picture changes. The figure shrinks to the image's rendered width,
   so the overlay always fits the picture. */
.seat-figure{position:relative; width:fit-content; max-width:100%; margin:0 auto 60px;}
.seat-marks{position:absolute; inset:0; margin:0; padding:0; list-style:none; pointer-events:none;
  --seat-ink:var(--white); --seat-line:1.5px; --seat-tick:10px; --seat-value-y:82.8%;
  font-size:var(--fs-base); color:var(--seat-ink);}
.seat-marks li{position:absolute; inset:0;}
.seat-bar{position:absolute; left:var(--x); top:var(--top); bottom:calc(100% - var(--bottom)); width:var(--seat-tick); transform:translateX(-50%);
  border-top:var(--seat-line) solid var(--seat-ink); border-bottom:var(--seat-line) solid var(--seat-ink);
  background:linear-gradient(var(--seat-ink),var(--seat-ink)) center / var(--seat-line) 100% no-repeat;}
.seat-value{position:absolute; left:var(--x); top:var(--seat-value-y); transform:translate(-50%,-50%); white-space:nowrap;}
.seat-marks li:nth-child(1){--x:32.4%; --top:51.5%; --bottom:62.5%;}
.seat-marks li:nth-child(2){--x:61.6%; --top:46.2%; --bottom:67.3%;}
.seat-marks li:nth-child(3){--x:91.5%; --top:36.0%; --bottom:67.3%;}
@media (max-width:600px){
  .seat-marks{font-size:var(--fs-xs); --seat-tick:6px; --seat-line:1px;}
  /* the last value sits at 91.5%: centred it ran past the picture's right edge, so it hangs left of its bar */
  .seat-marks li:nth-child(3) .seat-value{transform:translate(-88%,-50%);}
}

/* media grid: one wide picture over two columns, all edges flush, one gap
   (--media-gap, same as the space below .content-image). Pictures are 4:3 by default;
   .is-natural keeps its own proportions at the column width (the portrait size guide runs
   longer instead of shrinking); .is-cover-left keeps a photo's content, which sits left of centre. */
.media-grid{--media-gap:14px; display:grid; grid-template-columns:1fr 1fr; align-items:start; gap:var(--media-gap); margin-bottom:var(--media-gap);}
.media-grid img{display:block; width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:var(--radius-lg);}
.media-grid .is-wide{grid-column:1 / -1;}
.media-grid .is-wide, .media-grid .is-natural{aspect-ratio:auto; height:auto;}
.media-grid .is-cover-left{object-position:35% 50%;}
@media (max-width:900px){.media-grid{grid-template-columns:1fr;}}

/* two-up image row */
.image-row{display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:14px;}
/* same max-height safety cap as .content-image img — see comment there */
.image-row img{max-width:100%; max-height:75vh; width:auto; height:auto; display:block; margin:0 auto; border-radius:var(--radius-lg); justify-self:center;}
@media (max-width:900px){.image-row{grid-template-columns:1fr;}}

/* video / embed */
.video-embed{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:var(--black);
  border-radius:var(--radius-lg);
  overflow:hidden;
  margin-bottom:14px;
}
.video-embed iframe, .video-embed video{
  position:absolute; inset:0; width:100%; height:100%; border:0; display:block;
}

/* keychallenges card grid */
.card-grid{display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:60px;}
.card-grid .card{
  background:var(--thumb);
  border-radius:var(--radius-lg);
  padding:26px;
  font-size:var(--fs-md);
  line-height:1.4;
  min-height:110px;
  display:flex;
  align-items:center;
}
@media (max-width:900px){
  .card-grid{grid-template-columns:1fr; gap:10px;}
  .card-grid .card{min-height:0; padding:18px 20px;}   /* one short line each: no tall empty plates on phones */
}

/* End of a case study: "All work" (secondary) + "Next project →" (primary).
   Same pill, same height (both keep the 2px border), so only the fill tells them
   apart: primary is the solid ink pill, secondary the outline of it. Forward sits
   on the right. Hover never swaps the two looks — primary lightens a touch and its
   arrow nudges, secondary takes a faint ink tint. Order frictions → procontra →
   bqual → frictions; the link target lives in each page's markup. */
.all-work{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin:60px 0 50px;
}
.all-work a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:transparent;
  color:var(--ink-strong);
  line-height:1;
  font-family:var(--font);
  font-size:var(--btn-font-size);
  font-weight:var(--btn-font-weight);
  padding:var(--btn-pad-y) var(--btn-pad-x);
  border-radius:999px;
  border:var(--btn-border-width) solid var(--ink-strong);
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.all-work a:hover{
  background:color-mix(in srgb, var(--ink-strong) 8%, transparent);
}
.all-work a.next-project{
  background:var(--ink-strong);
  color:var(--white);
}
.all-work a.next-project:hover{
  background:color-mix(in srgb, var(--ink-strong) 85%, var(--white));
  border-color:color-mix(in srgb, var(--ink-strong) 85%, var(--white));
}
.all-work .next-arrow{
  width:1em;
  height:1em;
  flex:none;
  transition:transform .2s ease;
}
.all-work a.next-project:hover .next-arrow{transform:translateX(3px);}
@media (prefers-reduced-motion:reduce){.all-work a.next-project:hover .next-arrow{transform:none;}}
/* phones: the two pills side by side wrap unevenly on narrow screens, so they become two equal,
   full-width 48px pills, "Next project" (the primary) on top, "All work" under it */
@media (max-width:900px){
  .all-work{display:grid; grid-template-columns:1fr; gap:10px; margin:48px 0 40px;}
  .all-work a{justify-content:center; min-height:48px;}
  .all-work a.next-project{order:-1;}
}

/* ---------------------------------------------------------------------
   Documentation download button (used on case-study pages, e.g. frictions)
   Same shape/font/border-width as the other pill buttons (shared tokens
   above), accent-colored. Default: outline only. Hover: fills in, a
   download icon drops in from the top (masked by the button's own
   overflow:hidden) and the button grows to the LEFT only — the wrapping
   .doc-download has text-align:right, so the right edge stays put while
   the left edge moves.

   The icon is a perfect circle sized to exactly fill the button's own
   padding-box height (--btn-icon-size = font-size + 2×vertical padding)
   and pinned to left:0/top:0 of the (position:relative) button — which
   makes it mathematically concentric with the button's left end-cap, at
   any font-size/padding you set above. No manual centering needed.
------------------------------------------------------------------------ */
.doc-download{
  text-align:right;      /* anchors the button's right edge so it only grows left on hover */
  margin-top:24px;       /* minimum gap above the button if .project-side ever isn't much taller than its content */
}
.doc-download-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  line-height:1;
  padding:var(--btn-pad-y) var(--btn-pad-x);
  border-radius:999px;
  border:var(--btn-border-width) solid var(--accent);
  background:transparent;
  color:var(--accent);
  font-family:var(--font);
  font-weight:var(--btn-font-weight);
  font-size:var(--btn-font-size);
  white-space:nowrap;
  overflow:hidden;        /* masks the icon as it slides down from above */
  transition:background .2s ease, color .2s ease, padding-left .3s ease;
}
.doc-download-icon{
  position:absolute;
  left:0;
  top:0;
  width:var(--btn-icon-size);
  height:var(--btn-icon-size);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transform:translateY(-150%) scale(.6);
  transition:opacity .2s ease, transform .3s ease;
  pointer-events:none;
}
.doc-download-icon svg{
  /* fills the icon wrapper completely — the wrapper itself is already inset by
     exactly --btn-border-width from the button's outer edge (see the concentric-
     circle comment above .doc-download-icon), so this keeps the circle's edge
     that same --btn-border-width away from the button's edge, like the outline
     buttons' border. */
  width:100%;
  height:100%;
  display:block;
}
.doc-download-icon-bg{ fill:var(--white); }
.doc-download-icon-arrow{ fill:none; stroke:var(--accent); stroke-width:1.5px; }
.doc-download-btn:hover,
.doc-download-btn:focus-visible{
  background:var(--accent);
  color:var(--white);
  /* reserve space for the icon (--btn-icon-size) plus one gap (--btn-pad-x) before the label */
  padding-left:calc(var(--btn-icon-size) + var(--btn-pad-x));
}
.doc-download-btn:hover .doc-download-icon,
.doc-download-btn:focus-visible .doc-download-icon{
  opacity:1;
  transform:translateY(0) scale(1);
}

.body + ul, .project-top ul, .section-title + ul{
  font-size:var(--fs-base); line-height:1.7; color:var(--body-text); max-width:760px; margin:0 0 20px; padding-left:20px;
}
.body + ul li, .project-top ul li{margin-bottom:6px;}

/* ---------------------------------------------------------------------
   Interactive fake cookie-banner exhibit (frictions page, under "Problem").
   Reproduces a typical dark-pattern cookie banner; hovering (or
   keyboard-focusing) each part reveals a tooltip calling out the pattern.
   Colors deliberately reuse the site palette (--thumb for the banner body,
   --accent for the "accept" button, --faint for the deprioritized "manage"
   link, --ink-strong/--white for the tooltip) rather than one-off values —
   change those tokens and this exhibit re-themes with everything else.
------------------------------------------------------------------------ */
.cookie-demo{ margin:44px 0 60px; }
.cookie-demo-note{ font-size:var(--fs-sm); color:var(--muted); margin:24px 0 20px; text-align:center; }
/* the note says "hover" with a mouse and "tap" on touch screens */
.cookie-demo-note .say-tap{ display:none; }
@media (hover:none){
  .cookie-demo-note .say-hover{ display:none; }
  .cookie-demo-note .say-tap{ display:inline; }
}
.cookie-demo-banner{
  position:relative;
  max-width:440px;
  margin-left:auto;
  margin-right:auto;
  background:var(--thumb);
  border-radius:var(--radius-lg);
  padding:28px 28px 22px;
  box-shadow:0 12px 32px -4px rgba(0,0,0,.3216); /* Figma: X0 Y12 Blur32 Spread-4 #000 32.16% */
}
.cookie-demo-zone{
  position:relative; /* anchors this zone's own .cookie-demo-tooltip */
  border-radius:var(--radius-sm);
}
.cookie-demo-zone:focus-visible,
.cookie-demo-accept:focus-visible,
.cookie-demo-manage:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}
.cookie-demo-title{
  font-size:var(--fs-xl);
  font-weight:var(--fw-bold);
  color:var(--ink);
  margin:0 0 12px;
  text-align:center;
}
.cookie-demo-text{
  font-size:var(--fs-base);
  line-height:1.5;
  color:var(--muted);
  margin:0 0 22px;
  text-align:center;
}
.cookie-demo-accept{
  position:relative; /* anchors this zone's own .cookie-demo-tooltip */
  display:block;
  width:100%;
  background:var(--accent);
  color:var(--white);
  font-family:var(--font);
  font-weight:var(--fw-bold);
  font-size:var(--fs-md);
  line-height:1;
  border:none;
  border-radius:999px;
  padding:17px 0;
  margin-bottom:16px;
  /* no explicit cursor: it's a <button>, so the sitewide recolored
     hand cursor (see "DEFAULT CURSORS" in the custom-cursor section) applies */
}
.cookie-demo-manage{
  position:relative; /* anchors this zone's own .cookie-demo-tooltip */
  display:block;
  width:100%;
  background:none;
  border:none;
  color:var(--faint);
  font-family:var(--font);
  font-size:var(--fs-sm);
  padding:2px 0;
}
/* phones: the faint link stays small on purpose (it is the nudge), but gets a 44px touch area;
   the negative margin keeps the banner's look unchanged */
@media (max-width:900px){.cookie-demo-manage{padding:12px 0; margin:-10px 0;}}

/* tooltip: one per zone (text block / accept button / manage link), appears
   to the right of the banner, pointing back at whichever zone is active */
.cookie-demo-tooltip{
  position:absolute;
  left:calc(100% + 22px);
  top:50%;
  transform:translateY(-50%) translateX(-6px);
  width:220px;
  background:var(--ink-strong);
  color:var(--white);
  font-size:var(--fs-xs);
  font-weight:var(--fw-light); /* thin baseline regardless of the parent button/zone's own weight */
  line-height:1.5;
  text-align:left;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  z-index:5;
}
.cookie-demo-tooltip strong{ font-weight:var(--fw-bold); } /* explicit — "bolder" from a 300 base only resolves to 400 in most browsers */
.cookie-demo-tooltip::before{ /* speech-bubble pointer back at the banner */
  content:'';
  position:absolute;
  right:100%;
  top:50%;
  transform:translateY(-50%);
  border:8px solid transparent;
  border-right-color:var(--ink-strong);
}
.cookie-demo-zone:hover .cookie-demo-tooltip,
.cookie-demo-zone:focus-within .cookie-demo-tooltip,
.cookie-demo-accept:hover .cookie-demo-tooltip,
.cookie-demo-accept:focus-visible .cookie-demo-tooltip,
.cookie-demo-manage:hover .cookie-demo-tooltip,
.cookie-demo-manage:focus-visible .cookie-demo-tooltip{
  opacity:1;
  pointer-events:auto;
  transform:translateY(-50%) translateX(0);
}

@media (max-width:900px){
  .cookie-demo-banner{ max-width:none; }
  .cookie-demo-tooltip{
    left:0;
    right:0;
    top:calc(100% + 14px);
    width:auto;
    transform:translateY(-6px);
  }
  .cookie-demo-tooltip::before{
    right:auto;
    left:28px;
    top:0;
    transform:translateY(-100%);
    border-right-color:transparent;
    border-bottom-color:var(--ink-strong);
  }
  .cookie-demo-zone:hover .cookie-demo-tooltip,
  .cookie-demo-zone:focus-within .cookie-demo-tooltip,
  .cookie-demo-accept:hover .cookie-demo-tooltip,
  .cookie-demo-accept:focus-visible .cookie-demo-tooltip,
  .cookie-demo-manage:hover .cookie-demo-tooltip,
  .cookie-demo-manage:focus-visible .cookie-demo-tooltip{
    transform:translateY(0);
  }
}

/* ---------------------------------------------------------------------
   Scroll-reveal (frictions; see assets/js/scroll-reveal.js): a quiet one-time entrance.
   Text rises a little while it fades in; a photo fades in and settles from a slight zoom inside
   its own frame. Parts of a grid come one by one (--reveal-delay, set by the script).
   Reduced motion: .reveal-fade = a short fade, no movement.
   HOW TO TUNE: the --reveal-* tokens below.
------------------------------------------------------------------------ */
.reveal{
  --reveal-distance: 12px;    /* how far text rises: a fade, not a slide */
  --reveal-duration: .6s;     /* text */
  --reveal-media-duration: .9s;  /* photos: a touch longer, they settle */
  --reveal-media-zoom: 1.04;  /* how far a photo is zoomed before it settles */
  --reveal-ease: cubic-bezier(.16,1,.3,1);
  opacity:0;
  transform:translateY(var(--reveal-distance));
  transition:opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms),
             transform var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms);
  will-change:opacity, transform;
}
.reveal.is-visible{opacity:1; transform:none;}
.reveal.is-settled{will-change:auto;}
/* photos: no rise, a fade plus the picture settling inside its rounded frame */
.reveal.reveal-media{transform:none; overflow:hidden; border-radius:var(--radius-lg);
  transition:opacity var(--reveal-media-duration) var(--reveal-ease) var(--reveal-delay, 0ms);}
.reveal.reveal-media img{transform:scale(var(--reveal-media-zoom));
  transition:transform calc(var(--reveal-media-duration) * 1.4) var(--reveal-ease) var(--reveal-delay, 0ms);}
.reveal.reveal-media.is-visible img{transform:none;}
/* reduced motion: opacity only, quicker */
.reveal.reveal-fade, .reveal.reveal-fade img{transform:none !important;
  transition:opacity .3s ease-out var(--reveal-delay, 0ms) !important;}

/* Soft scroll-snap now lives entirely in assets/js/soft-snap.js, gated by
   <html class="has-scroll-snap"> — currently only frictions.html.
   (Native CSS scroll-snap-type:proximity was tried first, but a browser's
   "proximity" catchment radius isn't something CSS lets you control, and
   in practice it pulled from much further away than felt subtle. The JS
   version nudges only within an exact, tunable pixel radius — see the
   SNAP_RADIUS constant at the top of that file.) */

/* prose (legal pages) */
.prose{max-width:760px; margin:0 0 80px;}
.prose h2{font-size:var(--fs-3xl); font-weight:var(--fw-regular); margin:40px 0 14px;}
.prose h3{font-size:var(--fs-lg); font-weight:var(--fw-semibold); margin:26px 0 10px;}
.prose p, .prose li{font-size:var(--fs-base); line-height:1.7; color:var(--body-text);}
.prose a{text-decoration:underline;}
.prose .note{font-size:var(--fs-xs); color:var(--muted); border-left:2px solid var(--line); padding-left:14px; margin:24px 0;}

/* hero scroll arrow on project pages */
.hero-arrow{
  position:absolute;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  /* same circle size as the download-button icon (--btn-icon-size) and the
     same arrow (.doc-download-icon-arrow, in --accent) — one arrow, reused */
  width:var(--btn-icon-size); height:var(--btn-icon-size);
  display:flex; align-items:center; justify-content:center;
  background:var(--bg);
  border-radius:50%;
}
.hero-arrow svg{
  width:100%;
  height:100%;
  display:block;
}

@media (max-width:900px){
  /* PHONE TOKENS: a slimmer header (one row: wordmark + menu, see "PHONE MENU") and 16px running
     text (Framer's mobile "Paragraph"), so light 300 body copy still reads outdoors */
  :root{--header-height:56px; --fs-base:16px;}
  .wrap{padding:0 22px;}
  body{padding-top:var(--header-height);}
  body.has-hero{padding-top:0;}
  .header-inner{padding:0 10px 0 22px;}   /* the menu button carries its own 44px touch area */
  .mark{font-size:var(--fs-xl); display:inline-flex; align-items:center; min-height:44px;}
  .hero{padding:56px 0 40px;}
  /* all four big headings share the same mobile size */
  .hero h1, .page-title, .project-title, .playground-hero h1{font-size:var(--fs-4xl);}
  /* the hero's hand-set line breaks are for wide screens; on phones the text wraps on its own, balanced */
  .hero h1 .br-wide{display:none;}
  .hero h1{text-wrap:balance;}
  .page-title{margin:40px 0 30px;}
  .about-grid, .project-top, .diagram-row{grid-template-columns:1fr;}
  .about-grid .portrait{max-width:320px;}
  footer{flex-direction:column; align-items:flex-start; gap:12px;}
  footer .social{text-align:left;}
  /* footer + contact links: the text stays small, the touch area is a full 44px row */
  footer .legal, footer .social{gap:0;}
  footer .legal a, footer .social a, .contact-grid .links a{display:inline-flex; align-items:center; min-height:44px;}
  footer .social .name{padding:14px 0 6px;}
  .contact-grid .links p{margin:0;}
  .playground-hero{padding:60px 22px 80px;}
  .section-title{font-size:var(--fs-2xl);}

  /* KEY VISUAL on the case studies: the whole first screen, like a cover, in portrait. The fixed
     header sits over its top edge (as on desktop), the arrow stays at the bottom. Per page the crop
     follows the image's object-position (default centre; .is-cover-left etc. where set). */
  .project-hero{aspect-ratio:auto; height:100vh; height:100svh; max-height:none;}
  .hero-arrow{width:44px; height:44px; bottom:28px;}

  /* HOME: the project pictures in portrait (4:5), so the objects carry the page as on a cover */
  .work-item .thumb{aspect-ratio:4 / 5;}
}

/* ---------------------------------------------------------------
   DEFAULT CURSORS — the system arrow (recolored: orange fill, white
   outline), plus the "point" (hover) and "hold" (drag) states, both
   simplified to the same plain ring — orange band with a white stroke
   tracing both its outer and inner edge. Applies everywhere (cursor is
   inherited from html) except where the physics cursor's
   html.has-custom-cursor{cursor:none} (further down) wins instead.

   HOW TO CHANGE: each shape/color is baked into its own data-URI SVG
   below, so editing --accent won't update them automatically —
   regenerate the data URI (same path, swap the fill/stroke hex) if the
   palette changes. The two numbers right after each url() are the
   hotspot (which pixel of the 24x24 image is the actual click point).
------------------------------------------------------------------ */
html{
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M2 2 L2 17 L6.5 13.2 L9.5 20.5 L11.7 19.6 L8.5 12.7 L14 12.7 Z' fill='%23FA8734' stroke='%23FFFFFF' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E")
    2 2,
    auto;
}
a, button, .rail-track{
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M1.5,12 A10.5,10.5 0 1,0 22.5,12 A10.5,10.5 0 1,0 1.5,12 Z M5.1,12 A6.9,6.9 0 1,0 18.9,12 A6.9,6.9 0 1,0 5.1,12 Z' fill='%23FA8734' stroke='%23FFFFFF' stroke-width='1.4'/%3E%3C/svg%3E")
    12 12,
    pointer;
}

/* ---------------------------------------------------------------
   CUSTOM CURSOR — opt-in "physics cursor": one --accent ring with a
   white edge (the same language as the recolored arrow above) that
   trails the pointer on a spring, wraps links/buttons like it's pulled
   in by a magnet, turns into a caret over text and sends out a ring on
   click. Off by default (the recolored arrow/hand above shows instead)
   — turned on via the button on playground.html, which calls
   window.fancyCursor.enable()/.disable() (see assets/js/custom-
   cursor.js) and remembers the choice in localStorage, so it stays on
   across pages until toggled off again. It is a single full-viewport
   <canvas> (.custom-cursor below), redrawn only while something moves.
   Bails out entirely on touch devices and prefers-reduced-motion (no
   real cursor to replace, and this feature IS motion) — so this CSS
   only ever matters on desktop, guarded again here via (hover:hover)
   and (pointer:fine).

   HOW TO CHANGE:
   - sizes, spring feel, stretch, magnet padding/lean, click ring: the
     CAPS_CASE constants at the top of custom-cursor.js
   - colour: --accent / --white (in the palette above)
   - what counts as "interactive" / "text": SELECTOR / TEXT_SELECTOR
     in custom-cursor.js
   - the toggle button's look: .cursor-toggle-btn, further below
------------------------------------------------------------------ */
@media (hover:hover) and (pointer:fine){
  html.has-custom-cursor,
  html.has-custom-cursor *{
    cursor:none !important;
  }
}

.custom-cursor{
  position:fixed;
  top:0;
  left:0;
  pointer-events:none;
  z-index:200;
}

/* Playground's "physics cursor" toggle. Outline pill by default (same
   look as .doc-download-btn); .is-active (JS-toggled, cursor is on)
   flips it to a solid fill so the button's own state is obvious.
   Hidden on devices where the physics cursor can't run anyway (touch,
   or prefers-reduced-motion) since the button would do nothing there. */
.cursor-toggle-btn{
  display:inline-block;
  background:transparent;
  color:var(--accent);
  font-family:var(--font);
  font-size:var(--btn-font-size);
  font-weight:var(--btn-font-weight);
  line-height:1;
  padding:var(--btn-pad-y) var(--btn-pad-x);
  border-radius:999px;
  border:var(--btn-border-width) solid var(--accent);
  /* no explicit cursor: it's a <button>, so the sitewide recolored
     hand cursor (see "DEFAULT CURSORS" above) already applies */
  transition:background .2s ease, color .2s ease;
}
.cursor-toggle-btn:hover,
.cursor-toggle-btn:focus-visible{
  background:var(--accent);
  color:var(--white);
}
.cursor-toggle-btn.is-active{
  background:var(--accent);
  color:var(--white);
}
@media not all and (hover:hover), not all and (pointer:fine){
  .cursor-toggle-btn{display:none;}
}
@media (prefers-reduced-motion: reduce){
  .cursor-toggle-btn{display:none;}
}

/* ==================================================================================
   FRICTIONS — Two concepts / The system / Data Privacy Device / Zones
   ================================================================================== */

/* subheadline inside a section (h3, e.g. "Minimal viable product" under "The system"):
   one tier below .section-title — 18px regular in the muted grey with a small orange dot in front.
   Generous gap above, none when it directly follows the section title. The tiers on this page:
   section title 26px regular ink → sub-title 18px regular muted (+ dot) → part/zone title 16px medium ink → body 15px light. */
.sub-title{
  display:flex; align-items:center; gap:10px;
  font-size:var(--fs-lg); font-weight:var(--fw-regular); line-height:1.2;
  color:var(--muted); margin:88px 0 20px;
}
.sub-title::before{content:""; flex:none; width:7px; height:7px; border-radius:50%; background:var(--accent);}
.section-title + .sub-title{margin-top:0;}

/* ---- Two concepts: wireframes side by side ---- */
.wireframe-row{display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:32px 0 0;}
.wireframe{margin:0;}
.wireframe-slot{aspect-ratio:16/10; background:var(--thumb); border-radius:var(--radius-lg);}
.wireframe-slot--wide{aspect-ratio:16/9;} /* a single wireframe at full width (digital application, background service) */
.wireframe img{width:100%; height:auto; display:block; border-radius:var(--radius-lg);}
.wireframe figcaption{font-size:var(--fs-sm); color:var(--muted); margin-top:12px;}
/* scroll-reveal.js rounds + clips a revealed figure (.reveal-media); with a caption below the picture that
   clipping cut the first letters off at the rounded bottom-left corner. The picture (.wireframe-slot) already has
   its own radius, so the figure itself must not clip. */
.reveal.reveal-media.wireframe{overflow:visible; border-radius:0;}
@media (max-width:900px){.wireframe-row{grid-template-columns:1fr;}}

/* ---- Data Privacy Device steps: h4.step-title opens each of the four steps ----
   Same tier as .part-title (16px medium ink); only the spacing is added so a step reads as its own block. */
.part-title.step-title{margin:72px 0 20px;} /* two classes: .part-title further down would otherwise win the margin */
.sub-title + .part-title.step-title{margin-top:0;}
.step-split{display:grid; grid-template-columns:62% 30%; justify-content:space-between; align-items:center;}
.step-split .wireframe-slot{aspect-ratio:16/9;}
.step-split .body{margin:0; max-width:40ch;}
.wireframe-row--3{grid-template-columns:repeat(3, 1fr);}
.app-pair{margin-top:0;}   /* Digital Application: two equal plates under the sub-title */
/* PHOTO GRID (Shaping function: Foam variants, Turning & casting). Left column 62% (as .step-split):
   a lead photo and one under it, both cropped to 4:3. Right column: the text level with the lead
   photo, and a side photo beside the lower one at exactly its height. */
.photo-grid{display:grid; grid-template-columns:62% 1fr; column-gap:20px; row-gap:20px;}
.pg-lead{grid-column:1; grid-row:1;}
.pg-under{grid-column:1; grid-row:2;}
.pg-text{grid-column:2; grid-row:1; align-self:start; margin:0; max-width:40ch; padding-left:6%;}
.pg-side{grid-column:2; grid-row:2; position:relative;}
.pg-side img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover;}   /* exactly as tall as the photo beside it */
.pg-lead img, .pg-under img{aspect-ratio:4 / 3; object-fit:cover;}
.step-split--top{align-items:start;}
.photo-row{margin-top:20px;}
.photo-row img{aspect-ratio:4 / 3; object-fit:cover;}   /* a row of three: one landscape frame for all */
.photo-row--portrait img{aspect-ratio:3 / 4;}   /* portrait photos keep a portrait frame */
/* text width + block spacing (tokens in :root). B.qual uses these instead of inline max-width. */
.measure{max-width:var(--measure);}
.measure-hook{max-width:var(--measure-hook);}
.block-gap{margin-top:var(--block-gap);}
.lede.statement{margin:var(--block-gap) 0 0;}   /* a question standing on its own after the running text */
/* .pg-text as a <div> with several paragraphs (and a list): flush with the photo's top edge */
.pg-text > :first-child{margin-top:0;}
.pg-text > :last-child{margin-bottom:0;}
.pg-text ul{max-width:none;}
/* a portrait picture in the right column, as tall as the lead + under photos together (B.qual Result) */
.pg-tall{grid-column:2; grid-row:1 / span 2; position:relative;}
.pg-tall img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover;}
@media (max-width:900px){
  .photo-grid{grid-template-columns:1fr;}
  .pg-lead, .pg-under, .pg-text, .pg-side, .pg-tall{grid-column:1; grid-row:auto; padding-left:0;}
  .pg-side img, .pg-tall img{position:static; height:auto;}
}
.scrub-text .lede{margin:0; max-width:22ch;}
@media (max-width:900px){
  .step-split{grid-template-columns:1fr; row-gap:20px;}
  .wireframe-row--3{grid-template-columns:1fr;}
}

/* ---- Concept figures (Two concepts): inline isometric line drawings ----
   Lines in the page ink, solids in white on the --thumb plate, the single accent only for what the
   figure is about (here: the light). Stroke widths stay constant at any size (vector-effect), so one
   set of weights fits phone and desktop. Concept A moves via assets/js/concept-lamp.js (draws the dome
   and the light per frame; pauses off screen, one still under prefers-reduced-motion). */
.concept-slot{--cl-line:2px; --cl-hair:1.25px; overflow:hidden;}
.cl-figure{display:block; width:100%; height:100%;}
.cl-figure *{vector-effect:non-scaling-stroke;}
.cl-solid{fill:var(--white); stroke:var(--ink); stroke-width:var(--cl-line); stroke-linejoin:round;}
.cl-hair{fill:none; stroke:var(--ink); stroke-opacity:.45; stroke-width:var(--cl-hair); stroke-linecap:round;}
.cl-hairline{fill:none; stroke:var(--ink); stroke-opacity:.45; stroke-width:var(--cl-hair);}
.cl-dot{fill:var(--ink); fill-opacity:.55;}
.cl-guides circle{fill:none; stroke:var(--ink); stroke-opacity:.22; stroke-width:var(--cl-hair); stroke-dasharray:3 4;}
.cl-beam{fill:var(--accent); fill-opacity:.12;}
.cl-edge{stroke:var(--accent); stroke-opacity:.6; stroke-width:var(--cl-hair);}
.cl-halo, .cl-core{fill:var(--accent);}
.cl-ring{fill:none; stroke:var(--accent); stroke-width:var(--cl-line);}
.cl-face{fill:var(--accent); stroke:var(--ink); stroke-width:var(--cl-hair);}   /* the lamp's lit opening */
.cl-mark{fill:none; stroke:var(--ink); stroke-width:var(--cl-line); stroke-linecap:round;} /* the marked meridian that shows the turning */
.cl-rim{fill:none; stroke:var(--ink); stroke-width:var(--cl-line); stroke-linecap:round;}
.cl-guide{fill:none; stroke:var(--ink); stroke-opacity:.3; stroke-width:var(--cl-hair); stroke-dasharray:3 4;}        /* footprints on the desk */
.cl-guide-line{stroke:var(--ink); stroke-opacity:.3; stroke-width:var(--cl-hair); stroke-dasharray:3 4;}
.cl-pdot{fill:var(--ink); fill-opacity:.28;}      /* a dot on the touch strip, unlit */
.cl-glow{fill:var(--accent);}                     /* the same dot lit (animated) */

/* ------------------------------------------------------------------------
   CONCEPT DECISION — "Two concepts" on frictions: a short scroll scene that shows we went on with the puck.
   assets/js/concept-decide.js sets html.cd-scene (desktop, motion allowed), sizes .cd-stage/.cd-pin and
   writes per frame: --cd-lift (px the lamp has moved up = page speed), --cd-fade, --cd-g (puck card grows
   from half to two thirds, 0..1), --cd-n (the note fades in, 0..1), --cd-note-top. The row pins, the lamp
   scrolls away, the puck card grows into the freed space, the note appears on the left, then it all scrolls on.
   Without the scene (phone, reduced motion) the note simply sits under the two figures.
   Timings: SCENE in the JS. Copy: .cd-note in frictions.html.
------------------------------------------------------------------------ */
.cd-note .part-title{margin:0 0 12px;}
.cd-note{grid-column:1 / -1; margin-top:12px; max-width:var(--measure);}
html.cd-scene .cd-pin{position:sticky;}
html.cd-scene .cd-stage .wireframe-row{position:relative; display:block; margin-top:0;}
html.cd-scene .cd-stage .wireframe-row > .wireframe{position:absolute; top:0;}
html.cd-scene .cd-stage .wireframe:first-child{left:0; width:calc((100% - 20px) / 2); transform:translateY(calc(var(--cd-lift, 0) * -1px));}
html.cd-scene .cd-stage .wireframe:first-child > *{opacity:var(--cd-fade, 1);} /* on the children: the figure's own opacity belongs to scroll-reveal */
html.cd-scene .cd-stage .wireframe:nth-child(2){right:0; z-index:1; width:calc((100% - 20px) * (0.5 + var(--cd-g, 0) / 6));}
html.cd-scene .cd-note{position:absolute; left:0; margin:0; width:calc((100% - 20px) / 3 - 12px); top:var(--cd-note-top, 0);
  opacity:var(--cd-n, 0); transform:translateY(calc((1 - var(--cd-n, 0)) * 12px)); transition:none;} /* scroll drives it, not scroll-reveal */
html.cd-scene .cd-stage{margin-top:32px;} /* the row's own top margin, now outside the pinned part */
.cl-touch{fill:none; stroke:var(--ink); stroke-width:var(--cl-line);}  /* where the finger is */

/* ---- The system: interface leads, app + background service support ----
   Each part is one plate (tone step --thumb on the page ground, no borders or shadows) holding its
   pictogram and copy, so a part reads as one object. The lead plate is tall (icon big on top, copy
   at the foot); the other two are short (icon left, copy right). Pictograms are a single outline
   weight in --ink, sized by their container. */
.system-parts{
  display:grid;
  grid-template-columns:1.25fr 1fr;
  gap:20px;
}
.system-part{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:28px;
  align-items:center;
  background:var(--thumb);
  border-radius:var(--radius-lg);
  padding:32px;
}
.system-part-lead{
  grid-row:1 / span 2;
  grid-template-columns:1fr;
  grid-template-rows:1fr auto;
  align-items:stretch;
  gap:48px;
  padding:40px;
}
.system-picto{color:var(--ink); display:flex;}
.system-picto svg{width:100%; height:auto; display:block;}
.system-part-lead .system-picto{align-items:center; justify-content:center;}
.system-part-lead .system-picto svg{width:clamp(120px, 38%, 200px);}
.part-title{font-size:var(--fs-md); font-weight:var(--fw-medium); line-height:1.2; color:var(--ink); margin:0 0 8px;}
.system-part .body{margin:0; max-width:46ch;}
@media (max-width:900px){
  .system-parts{grid-template-columns:1fr;}
  .system-part-lead{grid-row:auto; gap:28px; padding:32px;}
  .system-part-lead .system-picto svg{width:112px;}
}
@media (max-width:480px){
  .system-part{grid-template-columns:1fr; gap:20px; padding:28px;}
  .system-part .system-picto svg{width:80px;}
}

/* ---- Loop: muted film, plays only while visible, with a pause button ---- */
.loop-media{
  position:relative;
  margin:0;
  aspect-ratio:16/9;
  background:var(--thumb);
  border-radius:var(--radius-lg);
  box-shadow:var(--media-shadow);
  overflow:hidden;
  isolation:isolate;
}
/* Safari/WebKit lets a playing <video> escape border-radius + overflow:hidden when an ancestor is
   composited (.reveal animates a transform) — the film then shows square corners. A clip-path on
   the video element itself clips its own composited layer reliably (it must be on the video, not
   the box: a clip-path on the box would also cut off the box's shadow). */
.loop-media video{display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; clip-path:inset(0 round var(--radius-lg));}
.loop-media-toggle{
  position:absolute; right:16px; bottom:16px;
  width:44px; height:44px; padding:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--white);
  color:var(--ink);
  border:0; border-radius:50%;
  transition:background .2s ease, color .2s ease, transform .2s cubic-bezier(.23,1,.32,1);
}
.loop-media-toggle:hover, .loop-media-toggle:focus-visible{background:var(--accent); color:var(--white);}
.loop-media-toggle:active{transform:scale(.95);}
.loop-media-toggle svg{width:18px; height:18px; fill:currentColor;}
.loop-media-toggle .icon-play{display:none;}
.loop-media.is-paused .icon-pause{display:none;}
.loop-media.is-paused .icon-play{display:block;}

/* ---- Sorting film (Background Service): data cards get sorted into five importance fields ----
   Drawn in HTML instead of a video. Sits in a .loop-media box (same plate, shadow and pause button)
   and is played by assets/js/sort-film.js. The stage is a size container, so every position and
   size inside is in cqw (1% of the film's width) and the whole picture scales as one image.
   Card and field positions are set by the script; the CSS only draws them. */
.sort-film__stage{position:absolute; inset:0; z-index:0; container-type:inline-size; overflow:hidden; font-family:var(--font);}
.sort-film__line{position:absolute; inset:0; width:100%; height:100%; color:var(--track); overflow:visible;}
.sort-film__tree{position:absolute; inset:0; width:100%; height:100%; overflow:visible;}
.sort-film__tree path{fill:none; stroke:var(--track); stroke-width:.15; /* film units: 1.5px on a 1000px film */ stroke-linejoin:miter; stroke-linecap:butt;} /* dash set per path by the script */
/* the background-service chip between the row and the fields; the plate colour behind it hides the tree where it runs through */
.sort-film__hub{position:absolute; aspect-ratio:1; color:var(--ink); background:var(--thumb); opacity:0;}
.sort-film__hub svg{display:block; width:100%; height:100%;}
.sort-field{
  position:absolute; aspect-ratio:1; /* left/top/width come from LAYOUT in sort-film.js */
  border-radius:var(--radius-sm);
  overflow:hidden;
  opacity:0;
}
.sort-field__glow{position:absolute; inset:0; background:var(--white); opacity:0;} /* brief flash as a card lands */
.sort-field:nth-of-type(1){background:var(--importance-1);}
.sort-field:nth-of-type(2){background:var(--importance-2);}
.sort-field:nth-of-type(3){background:var(--importance-3);}
.sort-field:nth-of-type(4){background:var(--importance-4);}
.sort-field:nth-of-type(5){background:var(--importance-5);}
.sort-card{
  position:absolute; left:0; top:0;
  width:12cqw; aspect-ratio:1;
  padding:1.15cqw 1.2cqw 1.1cqw;
  box-sizing:border-box;
  display:flex; flex-direction:column-reverse; justify-content:space-between; /* label on top, icon at the foot: when two cards share a field, the lower one still leaves the first one's label free */
  background:var(--data-card);
  border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--data-card-edge), var(--data-card-shadow);
  color:var(--ink);
  font-size:var(--fs-film-card);
  font-weight:var(--fw-medium);
  line-height:1.2;
  letter-spacing:-.01em;
  transform-origin:0 0;
  will-change:transform;
}
/* one drawn line icon per data type, same stroke language as the background-service chip */
.sort-card__icon{
  width:2.5cqw; height:2.5cqw;
  fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round;
  color:var(--muted);
}
.sort-card__label{display:block; text-wrap:balance;}
.sort-film__caption{
  position:absolute; left:5.5cqw; bottom:4.5cqw; margin:0; max-width:62cqw;
  font-size:var(--fs-film-caption);
  line-height:1.35;
  font-weight:var(--fw-regular);
  color:var(--muted);
  opacity:0;
}
.sort-film__caption strong{color:var(--ink); font-weight:var(--fw-medium);}
.sort-film__white{position:absolute; inset:0; z-index:50; background:var(--white); opacity:0;} /* the whiteout between loops (the stage's z-index:0 keeps it under the pause button) */
/* Narrow screens: the caption keeps a 12px floor while the picture shrinks, so it would run into the
   fields. The plate gets taller instead; the picture keeps its 16:9 layout at the top. */
@media (max-width:600px){.sort-film{aspect-ratio:16/12;}}

/* ---- TIMING PICKER: "Your notification" on the frictions page ----
   Photo + text (.step-split), then the four settings as a list left of the render, the render with a
   live notification in its corner, the setting's text under it. Built by assets/js/timing-picker.js.
   State colours: --timing-* tokens. The render is a Blender sequence swapped frame by frame. */
.timing-lead{margin-bottom:56px;}
.timing [data-s="ignored"]{--c:var(--timing-ignored);}
.timing [data-s="on-demand"]{--c:var(--timing-on-demand);}
.timing [data-s="periodic"]{--c:var(--timing-periodic);}
.timing [data-s="persistent"]{--c:var(--timing-persistent);}

.timing-stage{position:relative; aspect-ratio:16/9; background:var(--thumb); border-radius:var(--radius-lg); overflow:hidden; margin:0;}
.timing-stage img{display:block; width:100%; height:100%; object-fit:cover;}

/* the device-display icon: coloured disc + rings slid out to its left */
.timing-icon{flex:none; width:40px; height:24px; color:var(--c); overflow:visible;}
.timing-icon .disc{fill:currentColor; opacity:.85;}
.timing-icon .ring{fill:none; stroke:currentColor; stroke-width:1.8;}
.timing-icon .dot{fill:currentColor;}

/* the four timing settings, stacked left of the render: a quiet list on the page ground, hairlines
   between the rows. Unchosen rows are grey, icon included; only the chosen one takes its colour and
   comes forward as a white plate — colour means "this is set".
   Spacing: the list is exactly as tall as the render (top and bottom edges line up, so list and
   picture read as one piece) and each setting gets a quarter of it — four equal steps of the one
   slide (frames 0 / 8 / 16 / 24). The 2px joints keep the four rows one control. */
.timing-view{display:grid; grid-template-columns:minmax(220px, 260px) 1fr; grid-template-areas:"choices stage" ". copy"; column-gap:28px; align-items:stretch;}
.timing-stage{grid-area:stage;}
.timing-copy{grid-area:copy;}
.timing-choices{grid-area:choices; display:flex; flex-direction:column; gap:2px;}
.timing-choices > .timing-choice{flex:1 1 0;}   /* a quarter of the render's height each */
.timing-choice{font:inherit; display:grid; grid-template-columns:40px 1fr; align-items:center; column-gap:14px; width:100%; min-height:44px;
  padding:14px 14px; text-align:left; cursor:pointer; color:var(--muted); background:transparent; border:0; border-radius:var(--radius-lg);
  position:relative; transition:background .25s ease, box-shadow .25s ease, color .25s ease;}
.timing-choice::after{content:""; position:absolute; left:20px; right:20px; bottom:-1px; height:1px; background:var(--line);}   /* hairline between rows */
.timing-choice:last-child::after, .timing-choice.is-active::after{display:none;}
.timing-choice:hover{color:var(--ink); background:var(--timing-hover);}
.timing-choice:focus-visible{outline:2px solid var(--ink); outline-offset:2px;}   /* ink, not the setting colour: 3:1+ on the page */
.timing-choice.is-active{color:var(--ink); background:var(--white); box-shadow:var(--timing-plate-shadow);}   /* .is-active = shown (hovered, else clicked); --radius-lg like the render beside it: a plate, not a detail */
.timing-choice .timing-icon{width:40px; height:24px; color:var(--track); transition:color .25s ease;}
.timing-choice.is-active .timing-icon{color:var(--c);}
.timing-choice-name{display:block; font-size:var(--fs-base); font-weight:var(--fw-medium); line-height:1.2;}
.timing-choice-note{grid-column:2; display:block; margin-top:3px; font-size:var(--fs-xs); font-weight:var(--fw-light); color:var(--muted); line-height:1.3;}

/* live notification, top right corner of the render (smoked glass, like the chips on the concept
   photo): just the icon (three fine rings, the disc
   slides out of them with the dome, frame by frame) and the setting's name, centred as one group in a
   fixed-width card so nothing jumps when the name changes. Colour = the nearest setting; on a change
   the name rises in once. */
.timing-note{position:absolute; right:20px; top:20px; display:flex; align-items:center; justify-content:center; gap:12px;
  width:min(200px, 46%); padding:10px 16px; color:var(--white);   /* fixed width: no jump when the name changes */
  background:var(--timing-glass); -webkit-backdrop-filter:var(--timing-glass-filter); backdrop-filter:var(--timing-glass-filter);
  border-radius:var(--radius-sm);
  box-shadow:var(--timing-glass-edge), var(--timing-glass-shadow);}
/* icon as on the photo's chips: a see-through colour disc, the rings drawn crisp on top of it */
.timing-note-icon{flex:none; width:56px; height:32px; overflow:visible;}
.timing-note-icon .disc{fill:var(--c); opacity:.78; transition:fill .3s ease;}
.timing-note-icon .ring{fill:none; stroke:var(--c); stroke-width:1.8; transition:stroke .3s ease;}
.timing-note-title{margin:0; min-width:7.2em; font-size:var(--fs-md); font-weight:var(--fw-regular); line-height:1.2; white-space:nowrap;}

/* copy under the render */
.timing-copy{margin-top:24px;}   /* under the render, in the render's column */
.timing-text{margin:0; max-width:52ch;}

@media (max-width:900px){
  .timing-stage{aspect-ratio:4/3;}
  .timing-view{grid-template-columns:1fr; grid-template-areas:"stage" "choices" "copy"; row-gap:16px;}
  .timing-choices > .timing-choice{flex:none;}
  .timing-note{right:10px; top:10px; width:min(200px, calc(100% - 20px));}
}

/* ---- FLOW DECK: "User flows" on the frictions page ----
   The flows as a list on the left (same quiet list as the timing picker), one big phone screen
   beside it, the flow's other screens as a deck of small cards under both. Hover lifts a card; the
   chosen card's slot stays as a faint outline while it is up big. Built by assets/js/flow-deck.js. */
.flows-intro{max-width:62ch; margin:0 0 40px;}
.flows{--screen-ratio:393 / 880;}   /* phone screen proportions (Figma frames 393 x 880) */
.flows-top{display:grid; grid-template-columns:minmax(220px, 260px) 1fr; column-gap:28px; align-items:center;}
.flow-list{display:flex; flex-direction:column; gap:2px;}
.flow-tab{font:inherit; position:relative; display:block; width:100%; min-height:44px; padding:14px 20px; text-align:left; cursor:pointer;
  color:var(--muted); background:transparent; border:0; border-radius:var(--radius-lg); transition:background .25s ease, box-shadow .25s ease, color .25s ease;}
.flow-tab::after{content:""; position:absolute; left:20px; right:20px; bottom:-1px; height:1px; background:var(--line);}
.flow-tab:last-child::after, .flow-tab.is-active::after{display:none;}
.flow-tab:hover{color:var(--ink); background:var(--timing-hover);}
.flow-tab:focus-visible{outline:2px solid var(--ink); outline-offset:2px;}
.flow-tab.is-active{color:var(--ink); background:var(--white); box-shadow:var(--timing-plate-shadow);}
.flow-tab-name{display:block; font-size:var(--fs-base); font-weight:var(--fw-medium); line-height:1.2;}
.flow-tab-text{display:block; margin-top:3px; font-size:var(--fs-xs); font-weight:var(--fw-light); color:var(--muted); line-height:1.35;}
.flow-big{margin:0; display:flex; flex-direction:column; align-items:center; gap:12px;}
.flow-big-screen{height:min(560px, 70vh); aspect-ratio:var(--screen-ratio); border-radius:var(--radius-lg); overflow:hidden; background:var(--thumb); box-shadow:var(--timing-plate-shadow);}
.flow-big-screen img, .flow-card img{display:block; width:100%; height:100%; object-fit:cover; object-position:top;}   /* a longer, scrolling screen shows its top */
.flow-count{font-size:var(--fs-xs); color:var(--muted); font-variant-numeric:tabular-nums;}
/* ← → beside the big screen: round, solid ink like the primary pill ("Next project →", same arrow).
   Never disabled: past a flow's end they step into the next flow, so they always stay black. */
.flows{--flow-step-size:44px;}   /* also the touch target */
.flow-stage{display:flex; align-items:center; gap:24px;}
.flow-step{flex:none; display:inline-flex; align-items:center; justify-content:center; width:var(--flow-step-size); height:var(--flow-step-size); padding:0; cursor:pointer;
  color:var(--white); background:var(--ink-strong); border:0; border-radius:999px; transition:background .15s ease, transform .1s ease;}
.flow-step svg{width:18px; height:18px; transition:transform .2s ease;}
.flow-step[data-d="-1"] svg{transform:scaleX(-1);}
.flow-step:hover{background:color-mix(in srgb, var(--ink-strong) 85%, var(--white));}
.flow-step:hover svg{transform:translateX(2px);}
.flow-step[data-d="-1"]:hover svg{transform:scaleX(-1) translateX(2px);}
.flow-step:active{transform:scale(0.94);}
.flow-step:focus-visible{outline:2px solid var(--ink); outline-offset:3px;}
@media (prefers-reduced-motion:reduce){.flow-step:hover svg{transform:none;} .flow-step[data-d="-1"]:hover svg{transform:scaleX(-1);} .flow-step:active{transform:none;}}
/* the deck: all screens of the flow in one row of small cards */
.flow-deck{display:grid; grid-template-columns:repeat(var(--cards, 11), minmax(0, 64px)); justify-content:center; gap:10px; margin-top:20px; padding-top:12px; outline:none;}   /* small cards close under the big screen: one filmstrip; a short flow is a short row, centred */
.flow-deck:focus-visible{outline:2px solid var(--ink); outline-offset:6px; border-radius:var(--radius-sm);}
.flow-card{font:inherit; padding:0; border:0; cursor:pointer; aspect-ratio:var(--screen-ratio); border-radius:var(--radius-sm); overflow:hidden; background:var(--thumb);
  box-shadow:var(--flow-card-shadow); transition:transform .3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .3s ease, opacity .2s ease;}
.flow-card:hover, .flow-card:focus-visible{transform:translateY(-10px); box-shadow:var(--timing-plate-shadow);}
.flow-card:focus-visible{outline:2px solid var(--ink); outline-offset:3px;}
/* the card whose screen is up big: an ink frame (clear on the page, 3:1+) with the screen faintly left in it */
.flow-card.is-out{transform:none; box-shadow:none; outline:2px solid var(--ink); outline-offset:3px;}
.flow-card.is-out img{opacity:.28;}
/* a screen whose file is not there yet: a grey plate with its number */
.is-missing{position:relative;}
.is-missing img{visibility:hidden;}
.is-missing::after{content:attr(data-n); position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:var(--fs-sm); color:var(--muted);}
/* the big screen holds one pane per screen (two while one replaces the other), or in the "strip"
   carousel a track with all of them side by side */
.flow-big-screen{position:relative;}
.flow-big-screen > .flow-pane{position:absolute; inset:0; background:var(--thumb);}
.flow-pane.is-cover{box-shadow:var(--timing-plate-shadow);}   /* "stack": the screen sliding over the other */
.flow-dim{position:absolute; inset:0; background:var(--ink-strong); opacity:0; pointer-events:none;}   /* "parallax": darkens the screen underneath */
/* spring modes: the big screen can be dragged sideways; a vertical move still scrolls the page */
.flows.is-engine .flow-big-screen{touch-action:pan-y; cursor:grab; user-select:none; -webkit-user-select:none;}
.flows.is-engine .flow-big-screen img{-webkit-user-drag:none;}
.flows.is-dragging .flow-big-screen{cursor:grabbing;}
.flow-track{display:flex; height:100%; will-change:transform;}
.flow-track > .flow-pane{position:relative; flex:0 0 100%; height:100%;}
/* carousel modes: the current card keeps its picture; a thin ink frame glides along the row to it */
.flow-deck{position:relative;}
.flow-frame{position:absolute; left:0; top:0; pointer-events:none; box-sizing:content-box; padding:3px; margin:-5px 0 0 -5px;   /* 3px gap + 2px line around the card, like the old .is-out outline */
  border:2px solid var(--ink); border-radius:calc(var(--radius-sm) + 5px);}
.flows.is-carousel .flow-card.is-current{transform:none; box-shadow:var(--flow-card-shadow);}
/* the copy that flies between the big spot and a deck slot */
.flow-flyer{position:fixed; z-index:60; margin:0; transform-origin:0 0; pointer-events:none;}
/* a desktop flow (landscape screens): the big screen takes the width, the cards get wider */
.flows.is-landscape .flow-big-screen{height:auto; width:auto; flex:1 1 0; min-width:0; max-height:none;}
.flows.is-landscape .flow-big{align-items:stretch;}
.flows.is-landscape .flow-big .flow-count{align-self:center;}
.flows.is-landscape .flow-deck{grid-template-columns:repeat(var(--cards, 4), minmax(0, 120px));}
@media (max-width:900px){
  .flows-top{grid-template-columns:1fr; row-gap:20px;}
  /* the tabs scroll sideways; a soft fade at the right edge shows there is more (the fade is a mask, so no colour) */
  .flow-list{flex-direction:row; overflow-x:auto; gap:6px; scrollbar-width:none;
    -webkit-mask-image:linear-gradient(to right, var(--black) calc(100% - 40px), transparent);
            mask-image:linear-gradient(to right, var(--black) calc(100% - 40px), transparent);}
  .flow-list::-webkit-scrollbar{display:none;}
  .flow-tab{flex:0 0 auto; width:auto;}
  .flow-tab::after{display:none;}
  .flow-tab-text{display:none;}
  .flow-big-screen{height:min(480px, 62vh);}
  /* the arrows sit side by side UNDER the screen (in thumb reach, nothing covers the screen) */
  .flow-stage{display:grid; grid-template-columns:auto auto; justify-content:center; gap:16px 24px;}
  .flow-big-screen{grid-column:1 / -1; grid-row:1;}
  .flow-step{grid-row:2; justify-self:end;}
  .flow-step[data-d="1"]{justify-self:start;}
  .flow-deck{grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:52px; justify-content:start; overflow-x:auto; padding:12px 6px 8px;}   /* room for the current-card frame */
}

/* ---- Zones: scroll-scrubbed film ----
   BASE (no JS, or prefers-reduced-motion): a plain list — still image beside its text,
   one row per stop. scrub-zones.js adds .is-scrub, which turns the section tall and pins a
   window (video left, one text block right) while the scroll drives video.currentTime. */
.scrub{margin:0;} /* its own h4.step-title (inside) provides the gap above */
.scrub-window{display:none;}
.scrub-stops{list-style:none; margin:0; padding:0;}
.scrub-stop{
  display:grid;
  grid-template-columns:62% 30%;
  justify-content:space-between;
  align-items:center;
  margin-bottom:72px;
}
.scrub-still{margin:0;}
.scrub-still img{width:100%; height:auto; display:block; border-radius:var(--radius-lg);}
.scrub-title{
  display:flex; align-items:center; gap:12px;
  font-size:var(--fs-md); font-weight:var(--fw-medium); line-height:1.2;
  color:var(--ink); margin:0 0 8px;
}
.scrub-title::before{
  content:""; flex:none;
  width:10px; height:10px; border-radius:50%;
  background:var(--zone-color, var(--accent));
}
.scrub-text .body{margin:0; max-width:40ch;}
.scrub-stop[data-zone="left"]{--zone-color:var(--zone-left);}
.scrub-stop[data-zone="mid"]{--zone-color:var(--zone-mid);}
.scrub-stop[data-zone="right"]{--zone-color:var(--zone-right);}
@media (max-width:900px){
  .scrub-stop{grid-template-columns:1fr; row-gap:20px; margin-bottom:48px;}
}

/* SCRUB MODE */
.scrub.is-scrub{margin-top:72px;} /* height is set from data-scroll-length by the script */
.scrub.is-scrub .scrub-sticky{
  position:sticky;
  top:var(--header-height);
  height:calc(100vh - var(--header-height));
  height:calc(100svh - var(--header-height)); /* svh: stable while phone browser bars show/hide */
  display:grid;
  grid-template-columns:62% 30%;
  grid-template-rows:auto auto; /* title row + film/text row, centred together as one group */
  justify-content:space-between;
  align-content:center;
  align-items:center;
}
.scrub.is-scrub .step-title{grid-column:1 / -1; margin:0 0 24px;}
.scrub.is-scrub .scrub-window{
  display:block;
  position:relative;
  aspect-ratio:16/9;
  background:var(--thumb);
  border-radius:var(--radius-lg);
  box-shadow:var(--media-shadow);
  overflow:hidden;
  isolation:isolate;
}
.scrub-video{display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; clip-path:inset(0 round var(--radius-lg));} /* see .loop-media video */
.scrub-loading{
  position:absolute; left:16px; bottom:14px; margin:0;
  font-size:var(--fs-sm); color:var(--muted);
  opacity:1; transition:opacity .3s ease;
}
.scrub-window.is-ready .scrub-loading{opacity:0;}
.scrub.is-scrub .scrub-side{display:flex; flex-direction:column; gap:28px;}
.scrub.is-scrub .scrub-stops{display:grid;}
.scrub.is-scrub .scrub-stop{
  display:block;
  grid-area:1 / 1;
  margin:0;
  opacity:0;
  pointer-events:none;
  will-change:transform, opacity; /* positioned from the scroll position every frame by scrub-zones.js */
}
.scrub.is-scrub .scrub-still{display:none;}

/* progress dots: one per stop, the active one stretches into a pill (same language as the
   page's scroll-progress bar) */
/* pinned to the bottom of the window, out of the way of the texts travelling through the column */
.scrub-dots{position:absolute; bottom:24px; left:70%; z-index:1; display:flex; align-items:center;}
/* Each stop is one dot: grey = ahead, light accent tint = passed. The current stop is a 36px pill
   (the dots slide apart as it grows) whose accent fill runs from 0 to 1 (--p, set by the script)
   while the film travels to it, and is full once it rests there. Buttons are 28x44 touch targets. */
.scrub-dot{
  position:relative; width:28px; height:44px; padding:0; border:0; background:none;
  display:flex; align-items:center; justify-content:center;
  transition:width .3s cubic-bezier(.23,1,.32,1);
}
.scrub-dot[aria-current="true"]{width:44px;}
.scrub-dot::before{
  content:""; display:block;
  width:8px; height:8px; border-radius:4px;
  background:var(--track);
  transition:width .3s cubic-bezier(.23,1,.32,1), background-color .3s ease;
}
.scrub-dot.is-done::before{background:color-mix(in srgb, var(--accent) 50%, transparent);}
.scrub-dot:not([aria-current="true"]):hover::before, .scrub-dot:focus-visible::before{background:var(--ink);}
.scrub-dot[aria-current="true"]::before{width:36px;}
.scrub-dot::after{
  content:""; position:absolute; left:50%; top:50%;
  width:calc(8px + 28px * var(--p, 0)); height:8px; margin:-4px 0 0 -18px; border-radius:4px; /* grows from a round 8px dot to the full 36px, so both ends stay round (a scaleX would squash the corners) */
  background:var(--accent);
  opacity:0;
}
.scrub-dot[aria-current="true"]::after{opacity:1;}

/* debug overlay (?debug=1) */
.scrub-debug{
  position:fixed; left:16px; bottom:16px; z-index:150;
  background:var(--ink-strong); color:var(--white);
  font:12px/1.5 var(--font); padding:10px 14px; border-radius:var(--radius-sm);
  white-space:pre; pointer-events:none;
}

/* PHONE: video pinned on top, text below it; the film must stay fully visible
   (the zones sit at its left/right edges), so it keeps its 16:9 and is only capped in height.
   It pins under the header like on desktop (top/height come from --header-height, 56px here). */
@media (max-width:900px){
  .scrub.is-scrub .scrub-sticky{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto;
    align-content:center; /* film + text sit as one centred group instead of leaving the lower half of the screen empty */
    align-items:start;
    row-gap:28px;
  }
  .scrub.is-scrub .scrub-window{max-height:56vh;}
  .scrub-dots{left:0; bottom:16px;}
  .scrub-dot{width:44px;}                     /* full 44x44 touch targets on phones */
  .scrub-dot[aria-current="true"]{width:52px;}
}
/* PHONE ON ITS SIDE: too short for film-over-text (the text ran over the film), so back to the
   desktop arrangement — film left, text right, dots under the text column */
@media (max-width:900px) and (orientation:landscape){
  .scrub.is-scrub .scrub-sticky{grid-template-columns:58% 36%; grid-template-rows:auto auto; row-gap:0;}
  .scrub.is-scrub .step-title{margin-bottom:12px;}
  .scrub-dots{left:64%; bottom:12px;}
}
@media (prefers-reduced-motion: reduce){
  .loop-media-toggle{transition:none;}
}

/* =====================================================================
   SECTION RAIL — the site's scrollbar (every page, gated by
   <html class="has-section-rail">; behaviour in assets/js/section-rail.js)
   Replaces the native scrollbar with a ruler flush against the right
   window edge. Hidden until the script has built it (html.is-rail-ready),
   so without JS — and on touch / narrow screens — the normal scrollbar stays.
   HOW TO TUNE: width / curve / gap are the --rail-* tokens in :root;
   colours are the palette tokens used below.
--------------------------------------------------------------------- */
.section-rail{display:none;}
@media (hover:hover) and (pointer:fine) and (min-width:901px){
  html.is-rail-ready{scrollbar-width:none;}
  html.is-rail-ready::-webkit-scrollbar{display:none;}
  html.is-rail-ready .section-rail{display:block;}
}

/* -- the ruler -- */
/* starts below the fixed header (never over the nav); on the case studies it stays hidden over
   the key visual — section-rail.js adds .is-visible once that has half scrolled away (or right
   away on pages without one, never on pages that don't scroll) */
.section-rail{
  position:fixed; top:var(--header-height); right:0; bottom:0;
  width:var(--rail-width);
  z-index:99;
  opacity:0; pointer-events:none;
  transition:opacity .35s ease;
}
.section-rail.is-visible{opacity:1; pointer-events:auto;}
/* frosted strip that fades out towards the page — no hard left edge */
.rail-glass{
  position:absolute; inset:0;
  background:color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  -webkit-mask-image:linear-gradient(to left, #000 45%, transparent);
  mask-image:linear-gradient(to left, #000 45%, transparent);
}
.rail-track{position:absolute; top:24px; bottom:24px; left:0; right:0; touch-action:none;}
.rail-track:focus-visible{outline:2px solid var(--accent); outline-offset:-2px;}
.rail-ticks{position:absolute; inset:0; pointer-events:none;}
/* an evenly spaced scale: fine grey hairlines every 2 %, a longer dark tick every 10 %.
   Lengths are capped by the rail width, so they still fit when the rail is narrowed. */
.rail-tick{position:absolute; right:0; height:1px; width:min(5px, 30%); background:var(--track); opacity:.55;}
.rail-tick.is-major{width:min(14px, 75%); background:var(--ink); opacity:1;}

/* playhead: orange line across the ruler + the position in percent (rolling digits) */
.rail-head{position:absolute; left:0; right:0; height:0; pointer-events:none;}
.rail-head::before{
  content:""; position:absolute; left:0; right:0; top:-1px; height:2px;
  background:var(--accent);
}
/* below the line, right-aligned, always three places + "%" ("042%") — in the line's colour,
   darkened a little so the small figures stay readable; a soft halo in the page colour keeps
   them clear of the ticks they pass over */
.rail-digits{
  position:absolute; right:3px; top:5px;
  display:inline-flex; height:1em; overflow:hidden;
  font-size:var(--fs-2xs); line-height:1; font-weight:var(--fw-regular);
  letter-spacing:.04em;
  color:color-mix(in srgb, var(--accent) 72%, var(--ink));
  font-variant-numeric:tabular-nums;
  text-shadow:0 0 3px var(--bg), 0 0 6px var(--bg);
}
/* near the bottom of the window there is no room under the line: the percent glides above it */
.rail-digits{transition:transform .45s var(--rail-ease);}
.rail-head.is-flipped .rail-digits{transform:translateY(calc(-100% - 10px));}
.rail-digit-col{display:flex; flex-direction:column; transition:transform .5s var(--rail-ease);}
.rail-digit-col > span{display:block; height:1em;}
.rail-digit-pct{margin-left:1px;}

/* hover: the section under the pointer is shaded on the ruler, its name slides in beside it */
.rail-band{
  position:absolute; left:0; right:0; pointer-events:none;
  background:color-mix(in srgb, var(--ink) 6%, transparent);
  opacity:0;
  transition:opacity .25s ease, top .45s var(--rail-ease), height .45s var(--rail-ease);
}
.rail-hover{position:absolute; left:0; right:0; height:0; pointer-events:none; opacity:0; transition:opacity .2s ease;}
.rail-hover::before{content:""; position:absolute; left:0; right:0; top:0; height:1px; background:var(--ink);}
.rail-hover-label{
  position:absolute; right:calc(100% + var(--rail-gap)); top:0;
  transform:translate(8px,-50%);
  transition:transform .45s var(--rail-ease);
  white-space:nowrap;
  font-size:var(--fs-sm); font-weight:var(--fw-regular); line-height:1;
  color:var(--ink);
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:8px 12px;
}
.section-rail.is-hovering .rail-band,
.section-rail.is-hovering .rail-hover{opacity:1;}
.section-rail.is-hovering .rail-hover-label{transform:translate(0,-50%);}
.section-rail.is-dragging .rail-band{transition:opacity .25s ease;}

@media (prefers-reduced-motion: reduce){
  .section-rail, .rail-digits, .rail-digit-col, .rail-band, .rail-hover, .rail-hover-label{transition:none;}
}

/* ---- LANDSCAPE MIXER: "Growing landscapes" on the procontra page ----
   The landscapes as a list left of a floor plan (one set seen from above), the caption under the plan.
   Same build as the timing picker on frictions: quiet rows, the chosen one a white plate, the plan
   on --thumb with --radius-lg. Built by assets/js/landscape-mixer.js; colours: --pc-* tokens.
   Without JS the figure stays hidden (the photo below still tells the story). */
.landscape-mixer{margin:32px 0 56px;}
.landscape-mixer:not(.is-ready){display:none;}
.landscape-view{display:grid; grid-template-columns:minmax(200px, 240px) 1fr; grid-template-areas:"choices stage" ". caption"; column-gap:28px; align-items:stretch;}
.landscape-choices{grid-area:choices; display:flex; flex-direction:column; gap:2px;}
.landscape-choices > .landscape-choice{flex:1 1 0;}
.landscape-choice{font:inherit; display:flex; flex-direction:column; justify-content:center; gap:4px; width:100%; min-height:44px;
  padding:12px 18px; text-align:left; cursor:pointer; color:var(--muted); background:transparent; border:0; border-radius:var(--radius-lg);
  position:relative; transition:background .25s ease, box-shadow .25s ease, color .25s ease;}
.landscape-choice::after{content:""; position:absolute; left:18px; right:18px; bottom:-1px; height:1px; background:var(--line);}
.landscape-choice:last-child::after, .landscape-choice.is-active::after{display:none;}
.landscape-choice:hover{color:var(--ink); background:var(--timing-hover);}
.landscape-choice:focus-visible{outline:2px solid var(--ink); outline-offset:2px;}
.landscape-choice.is-active{color:var(--ink); background:var(--white); box-shadow:var(--timing-plate-shadow);}
.landscape-name{font-size:var(--fs-md); font-weight:var(--fw-regular);}
.landscape-note{font-size:var(--fs-sm); color:var(--muted);}

.landscape-stage{grid-area:stage; position:relative; aspect-ratio:16/9; background:var(--thumb); border-radius:var(--radius-lg); overflow:hidden;}
.landscape-stage svg{display:block; width:100%; height:100%; transition:opacity .16s ease;}
.landscape-stage svg.is-swapping{opacity:0;}
.landscape-grid-line{fill:none; stroke:var(--pc-grid); stroke-width:4;}
.landscape-shadow{flood-color:var(--pc-shadow);}

/* a piece: the outer <g> is placed (translate + rotate, in mm = SVG units), the inner one lifts */
.landscape-piece{transform-box:view-box; transform-origin:0 0;}
.landscape-body{transform-box:fill-box; transform-origin:center;}
.is-pro .landscape-body rect, .is-contra .landscape-body .lie{fill:var(--pc-fabric); stroke:var(--pc-fabric-edge); stroke-width:10;}
.is-contra .landscape-body .arch{fill:var(--pc-fabric-raised); stroke:var(--pc-fabric-edge); stroke-width:10; filter:url(#landscape-raised);}
.is-hub .landscape-body circle{fill:var(--pc-hub); stroke:var(--pc-hub-edge); stroke-width:10; filter:url(#landscape-raised);}
/* the shadow under a carried piece: blurred copy of its outline, faded in and out by the script */
.landscape-shade{opacity:0; filter:url(#landscape-blur);}
.landscape-shade > *{fill:var(--pc-shadow);}
/* lying "n" <-> standing arch: a quick cross-fade a third into the carry */
.landscape-piece.is-contra .lie, .landscape-piece.is-contra .arch{transition:opacity .18s ease var(--swap-delay, 0ms);}
.landscape-piece.is-contra .arch{opacity:0;}
.landscape-piece.is-contra.is-arch .arch{opacity:1;}
.landscape-piece.is-contra.is-arch .lie{opacity:0;}

/* under the plan: caption left, scale bar right — the bar is 1 m of the plan's 4.8 m width
   (.landscape-foot is exactly as wide as the plan, so 100cqw = the plan's width) */
.landscape-foot{grid-area:caption; display:flex; justify-content:space-between; align-items:flex-start; gap:24px; margin-top:14px; container-type:inline-size;}
.landscape-caption{font-size:var(--fs-sm); color:var(--muted); line-height:1.5; margin:0; max-width:62ch;}
.landscape-scale{flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:6px; padding-top:6px; font-size:var(--fs-xs); color:var(--muted);}
.landscape-scale span{display:block; width:calc(100cqw * 1000 / 4800); height:2px; background:var(--muted);}

@media (max-width:900px){
  .landscape-view{grid-template-columns:1fr; grid-template-areas:"choices" "stage" "caption"; row-gap:14px;}
  .landscape-choices{display:grid; grid-template-columns:1fr 1fr; gap:6px;}
  .landscape-choice::after{display:none;}
  .landscape-choice{padding:10px 14px;}
}
@media (prefers-reduced-motion: reduce){
  .landscape-piece, .landscape-piece.is-contra .lie, .landscape-piece.is-contra .arch{transition:none !important;}
}

/* ---- LANDSCAPE ISO: "Growing landscapes" as an isometric figure (procontra) ----
   Same shell as the mixer above (list left, stage, caption under it); the stage holds one SVG drawn with the Anatomy
   kit (assets/js/vendor/anatomy/) by assets/js/landscape-iso.js: pallet and carton, the set unpacking, the landscapes.
   The kit's own classes (iso-*, tb-*) are styled here from the --iso-* tokens, so the drawing is monochrome:
   white tops, grey sides, grey lines. The scale is the 1 m ruler drawn on the floor, so the mixer's bar is hidden. */
.landscape-iso{
  --anatomy-paper:var(--iso-paper); --anatomy-face:var(--white); --anatomy-top:var(--white);
  --anatomy-shade-0:var(--iso-shade-0); --anatomy-shade-1:var(--iso-shade-1); --anatomy-shade-2:var(--iso-shade-2); --anatomy-shade-3:var(--iso-shade-3);
  --anatomy-hi:var(--iso-line-hi); --anatomy-mid:var(--iso-line-mid); --anatomy-lo:var(--iso-line-lo); --anatomy-faint:var(--iso-line-faint);
  --anatomy-dot:var(--iso-dot); --anatomy-halo:var(--iso-halo);
}
.landscape-iso .landscape-stage{background:var(--iso-paper);}
.landscape-iso .landscape-scale{display:none;}
.landscape-iso svg{overflow:hidden;}
.landscape-iso svg path, .landscape-iso svg circle{vector-effect:non-scaling-stroke;}
.landscape-iso .iso-fill{fill:var(--anatomy-paper); stroke:none;}
.landscape-iso .iso-shade, .landscape-iso .iso-top{stroke:none;}
.landscape-iso .iso-shade[data-shade="0"]{fill:var(--anatomy-shade-0);}
.landscape-iso .iso-shade[data-shade="1"]{fill:var(--anatomy-shade-1);}
.landscape-iso .iso-shade[data-shade="2"]{fill:var(--anatomy-shade-2);}
.landscape-iso .iso-shade[data-shade="3"]{fill:var(--anatomy-shade-3);}
.landscape-iso .iso-top{fill:var(--anatomy-top);}
.landscape-iso .iso-solid[data-seamless] > .iso-shade, .landscape-iso .iso-solid[data-seamless] > .iso-top{stroke-width:.4; stroke-linejoin:round;}
.landscape-iso .iso-solid[data-seamless] > .iso-shade[data-shade="0"]{stroke:var(--anatomy-shade-0);}
.landscape-iso .iso-solid[data-seamless] > .iso-shade[data-shade="1"]{stroke:var(--anatomy-shade-1);}
.landscape-iso .iso-solid[data-seamless] > .iso-shade[data-shade="2"]{stroke:var(--anatomy-shade-2);}
.landscape-iso .iso-solid[data-seamless] > .iso-shade[data-shade="3"]{stroke:var(--anatomy-shade-3);}
.landscape-iso .iso-solid[data-seamless] > .iso-top{stroke:var(--anatomy-top);}
.landscape-iso .iso-halo{fill:var(--anatomy-halo); stroke:none; filter:blur(9px); opacity:.32; transform:translateY(3px);}
.landscape-iso .iso-line{fill:none; stroke:var(--anatomy-lo); stroke-width:.6px; stroke-linecap:round; stroke-linejoin:round;}
.landscape-iso .iso-line[data-tone="hi"]{stroke:var(--anatomy-hi);}
.landscape-iso .iso-line[data-tone="mid"]{stroke:var(--anatomy-mid);}
.landscape-iso .iso-line[data-tone="lo"]{stroke:var(--anatomy-lo);}
.landscape-iso .iso-line[data-tone="faint"]{stroke:var(--anatomy-faint);}
.landscape-iso .iso-dots circle{fill:var(--anatomy-dot); stroke:none; opacity:.45;}
.landscape-iso .tb-body{fill:var(--anatomy-shade-2); stroke:none;}
.landscape-iso .tb-shine{fill:var(--anatomy-top); stroke:none;}
.landscape-iso .tb-shade{fill:var(--anatomy-shade-0); stroke:none;}
/* the pieces (Pro, Contra, Hub): flat — every side tone, top, shine and shade band is the same light grey */
.landscape-iso .iso-piece{--anatomy-paper:var(--iso-piece); --anatomy-top:var(--iso-piece); --anatomy-shade-0:var(--iso-piece); --anatomy-shade-1:var(--iso-piece); --anatomy-shade-2:var(--iso-piece); --anatomy-shade-3:var(--iso-piece);}
/* the carton's straps: one step darker so they read as bands on the white carton */
.landscape-iso .iso-strap{--anatomy-top:var(--iso-strap-3); --anatomy-paper:var(--iso-strap-3); --anatomy-shade-0:var(--iso-strap-0); --anatomy-shade-1:var(--iso-strap-1); --anatomy-shade-2:var(--iso-strap-2); --anatomy-shade-3:var(--iso-strap-3);}

/* ==================================================================================
   SECONDARY PAGES — PHONE (about, contact, playground, impressum, datenschutz, 404)
   Up to 900px only, so desktop is untouched. Refinements on top of the shared phone rules
   ("PHONE TOKENS" block): tighter rhythm, 44px touch targets, long German words and URLs
   that wrap instead of widening the page, and a landscape-phone layout for about/playground.
   The playground's own base styles live in a <style> in playground.html, hence article.pg-item
   (one step more specific) here.
   ================================================================================== */
@media (max-width:900px){
  /* long single words ("Datenschutzerklärung" at 320px) hyphenate instead of overflowing */
  .page-title{overflow-wrap:break-word; hyphens:auto;}

  /* ABOUT: portrait and text closer together; the CV line a bit nearer to its text */
  .about-grid{gap:32px;}
  .cv-block{margin-top:56px;}
  .cv-section{padding-left:16px; margin-bottom:36px;}
  .cv-row .meta, .cv-row .role{text-wrap:pretty;}

  /* CONTACT: the two pills get a full 44px height; the address links may wrap on tiny screens */
  .contact-grid .btn{display:inline-flex; align-items:center; min-height:44px;}
  .contact-grid .links a{overflow-wrap:anywhere;}

  /* PLAYGROUND: titles one step smaller, a little less air between the three items */
  article.pg-item{margin-bottom:56px;}
  article.pg-item h2{font-size:var(--fs-2xl); margin:16px 0 6px;}

  /* LEGAL (impressum, datenschutz): section titles sized for the width, URLs and compound
     words wrap, the bullet list indented less, the back link a full touch row */
  .prose{overflow-wrap:break-word; hyphens:auto; hyphenate-limit-chars:10 4 4;}   /* only long words break */
  .prose a{overflow-wrap:anywhere;}
  .prose h2{font-size:var(--fs-2xl); margin:36px 0 10px;}
  .prose ul{padding-left:20px;}
  .prose > p:last-child > a[href="index.html"]{display:inline-flex; align-items:center; min-height:44px;}

  /* 404: more air under the sentence so the footer doesn't sit in the middle of the screen;
     the "work" link's hit area grows to 44px without moving the text */
  .hero-404{padding:88px 0 120px;}
  .hero-404 h1 a{padding:4px 0;}
}
/* landscape phones / small tablets: portrait beside the text instead of a full screen above it,
   playground pictures never taller than the visible screen */
@media (min-width:600px) and (max-width:900px){
  .about-grid{grid-template-columns:minmax(200px, 36%) 1fr;}
  .about-grid .portrait{max-width:none;}
}
@media (max-width:900px) and (orientation:landscape){
  article.pg-item .thumb{max-height:calc(100svh - var(--header-height) - 48px);}
}
