/* ==========================================================================
   Kristina Aab — AI content for product brands
   All colours live in the :root block below. Change them there only.
   ========================================================================== */

@font-face {   /* serif italic, only for the accent words in the home headline (self-hosted, OFL) */
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  src: url("../assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations"),
       url("../assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Colours ----------------------------------------------------- */
:root {
  /* Colour concept: one beige background, black and white. Nothing else. */
  --bg: #f9f5ed;                                           /* beige */
  --text: #111111;                                         /* black */
  --on-text: #ffffff;                                      /* white (text on black) */
  --ink: #111111;                                          /* footer, buttons, dark band */
  --muted: color-mix(in srgb, var(--text) 62%, var(--bg)); /* black, softened */
  --line: color-mix(in srgb, var(--text) 14%, var(--bg));
  --surface: color-mix(in srgb, var(--text) 5%, var(--bg));
  --accent: var(--muted);
}

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* Headings use the same family as the body. To bring back a serif, point --font-display to it. */
  --font-display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: var(--font-display);
  --font-sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --step--1: 0.8125rem;                           /* 13px labels */
  --step-0: 0.9375rem;                            /* 15px body */
  --step-1: 1.125rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.6rem + 5vw, 6rem);
  --step-5: clamp(2.75rem, 1.2rem + 6.2vw, 7.25rem);
  --size-headline: clamp(2.4rem, min(5.4vw, 9.2svh), 6rem);   /* the home headline: no heading on any page is bigger */

  --space-1: 0.5rem; --space-2: 1rem; --space-3: 1.5rem; --space-4: 2rem;
  --space-5: 3rem; --space-6: 4.5rem; --space-7: 7rem; --space-8: 10rem;

  --gutter: clamp(1rem, 0.5rem + 2.2vw, 2.5rem);
  --max: none;   /* full width: logo, navigation and content start at the left edge and end at the right edge, also on large screens */
  --header-h: 4.5rem;
  --radius: 2px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 900ms;

  --z-header: 50; --z-menu: 60; --z-sheet: 80; --z-skip: 100;
}

/* ---------- Base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) ease, color var(--dur) ease;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
::selection { background: var(--text); color: var(--bg); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 1px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: var(--z-skip);
  padding: 0.75rem 1rem; background: var(--text); color: var(--bg);
  transform: translateY(-200%); transition: transform var(--dur-fast);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Typography helpers ----------------------------------------- */
.display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 300; text-wrap: balance; }
.display { font-size: var(--size-headline); line-height: 0.95; letter-spacing: -0.045em; }
.h1 { font-size: var(--size-headline); line-height: 0.95; letter-spacing: -0.045em; } /* same size as the home headline */
.h2 { font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.03em; }
.h3 { font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.015em; font-weight: 400; }
.display em, .h1 em, .h2 em, .h3 em { font-style: normal; color: inherit; }
.label {
  font-size: 0.75rem; line-height: 1.35; font-weight: 400;
  letter-spacing: 0.01em; text-transform: uppercase;
}
.muted { color: var(--muted); }
.lead { font-size: var(--step-0); line-height: 1.55; max-width: 31em; color: var(--muted); } /* same as the home subline */
.prose.lead { font-size: var(--step-1); color: var(--text); }
.prose { max-width: 38em; }
.prose p + p { margin-top: 0; }
.index { font-variant-numeric: tabular-nums; }

/* ---------- Layout ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-6); }
.section + .section { padding-top: 0; }
.rule { border-top: 1px solid var(--line); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--space-2) var(--space-4); margin-bottom: var(--space-5);
}
.section-head .label, .label:has(> .marker) { display: inline-flex; align-items: center; gap: 0.6em; }
.marker { width: 0; height: 0; border-block: 0.38em solid transparent; border-left: 0.6em solid currentColor; }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-3) var(--gutter); }
main { display: block; min-height: 60vh; }

/* ---------- Buttons & links -------------------------------------------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 2.875rem; padding: 0.7em 2.4em;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 0.75rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
  touch-action: manipulation;
}
.btn:hover { --btn-bg: var(--ink); --btn-fg: var(--on-text); }
.btn:active { transform: scale(0.98); }
.btn--sm { min-height: 2.25rem; padding: 0.45em 1.4em; }
.btn .dot { display: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 0.75rem; font-weight: 400; letter-spacing: 0.01em; text-transform: uppercase;
  text-decoration: none; padding-block: 0.6em; cursor: pointer;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.35em) / 0 1px no-repeat;
  transition: background-size var(--dur) var(--ease-out);
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- TBD placeholders (visible on purpose) ----------------------- */
.tbd {
  display: inline; padding: 0.05em 0.4em; border: 1px dashed var(--accent); border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-family: var(--font-sans); font-style: normal; font-size: 0.78em; font-weight: 500;
  letter-spacing: 0.02em; text-transform: none; color: var(--text);
}
.tbd::before { content: "TBD · "; font-weight: 700; letter-spacing: 0.06em; }
.tbd-block {
  display: grid; place-content: center; gap: 0.5rem; text-align: center;
  padding: var(--space-4); border: 1px dashed var(--accent); color: var(--muted);
  background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--accent) 7%, transparent) 14px 15px), var(--surface);
}
.tbd-block .label { color: var(--text); }

/* ---------- Header: logo | Home Projects About | Contact Me ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.header-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 0 var(--gutter); padding-block: 0.7rem;
}
.brand-mark { justify-self: start; display: block; width: 2.9rem; color: var(--text); }
.brand-mark svg { width: 100%; height: auto; }
.nav-main { display: flex; gap: clamp(1.25rem, 3vw, 3rem); }
.nav-main a { position: relative; display: inline-block; padding-block: 0.7rem; text-decoration: none; }
.nav-main a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.4rem; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out);
}
.nav-main a:hover::after, .nav-main a[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 0.75rem; }
.text-btn {
  display: inline-block; padding: 0; border: 0; background: none; cursor: pointer; text-decoration: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; line-height: inherit; color: inherit; position: relative;
}
.text-btn::before { content: ""; position: absolute; inset: -0.6rem -0.75rem; } /* larger hit area */
.text-btn:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.menu-open { display: none; }
/* With JavaScript: the header is just [logo] ........ [Menu] [Contact Me]; the page links live in the menu. */
.has-js .nav-main { display: none; }
.has-js .header-grid { grid-template-columns: 1fr auto; }
.has-js .header-actions { grid-column: 2; gap: 1.5rem; }
.has-js .menu-open { display: inline-block; }
@media (max-width: 899px) {
  .header-grid { grid-template-columns: 1fr auto; }
  .nav-main { display: none; }
  .header-actions { grid-column: 2; }
}

/* ---------- Menu: the pages as paper cards on dark espresso paper ---------- */
/* Change the menu colour here. Alternatives: #3a2f27 (warm cocoa), #4a4a3c (olive, like brandonyasin.com at night), #1d1815 (near black). */
:root { --menu-bg: #2b211c; --menu-card: var(--bg); --ease-spread: cubic-bezier(0.46, 0, 0.09, 0.99); }
.site-menu {
  position: fixed; inset: 0; z-index: var(--z-menu); overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--menu-bg); color: var(--on-text); visibility: hidden; opacity: 0;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.site-menu::before {                                   /* paper grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.85 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.site-menu.is-open { visibility: visible; opacity: 1; transition: opacity 0.5s ease; }
.site-menu .header-grid { position: relative; z-index: 2; width: 100%; }
.site-menu .brand-mark, .site-menu .text-btn { color: var(--on-text); }
/* The cards are the real pages in frames: each card is a full-size window onto its page, scaled to 75% and cut to its left part.
   Opening a card widens the cut to 100% and scales it to 100% (after brandonyasin.com), so nothing in the picture is ever re-laid out. */
.menu-cards { position: absolute; inset: 0; z-index: 1; overflow: hidden; touch-action: pan-y; }
.menu-card {
  position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; overflow: hidden;
  transform-origin: 50% 50%; opacity: 0; will-change: transform, clip-path;
  clip-path: polygon(0 0, var(--cut, 37.4%) 0, var(--cut, 37.4%) 100%, 0 100%);
  background: var(--menu-card); color: var(--text); text-decoration: none; cursor: pointer; -webkit-user-drag: none;
}
.menu-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: var(--bg); }
.menu-card::after { content: ""; position: absolute; left: 0; top: 0; width: var(--cut, 37.4%); height: 100%; pointer-events: none; }
.menu-card:focus-visible { outline: none; }
.menu-card:focus-visible::after { box-shadow: inset 0 0 0 4px var(--ink); }
.site-menu.is-leaving { opacity: 0; transition: opacity 0.35s ease; }
.site-menu.is-choosing { pointer-events: none; }

/* A page shown inside a menu card (html.is-card, set from the #card address): name, logo, title and one picture, nothing else.
   Opening it (is-opening): the title slides away. Then (is-reveal): the page's own text rises in. */
.card-name, .card-title { display: none; }
html.is-card { overflow-x: hidden; }   /* the scrollbar (if the page has one) stays, so the page lays out exactly as the real one */
html.is-card body { position: relative; }
html.is-card :is(.site-footer, .site-menu, .skip-link) { display: none !important; }
html.is-card :is(.header-actions, .nav-main) { visibility: hidden; }
html.is-card .card-name { display: block; position: absolute; left: calc(var(--gutter) + 4rem); top: 1.2rem; line-height: 1.25; }
html.is-card .card-title {
  display: block; position: absolute; z-index: 5; left: var(--gutter); top: calc(var(--header-h) + clamp(1rem, 4svh, 3rem)); overflow: hidden;
  padding-bottom: 0.12em; font-size: clamp(2rem, 3.9vw, 4.2rem); font-weight: 300; line-height: 1; letter-spacing: -0.045em; text-transform: lowercase;
}
html.is-card .card-title span { display: block; transition: transform 1.1s var(--ease-spread); }
html.is-card.is-opening .card-title span { transform: translateY(120%); }
html.is-card .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.is-card main *:not([data-card]):not([data-card] *) { visibility: hidden; }
html.is-card main [data-card], html.is-card main [data-card] * { visibility: visible; }
html.is-card.is-reveal :is(.header-actions, .nav-main), html.is-card.is-reveal main *:not([data-card]):not([data-card] *) { visibility: visible; }
html.is-card.is-reveal .card-name { display: none; }
html.is-card.is-reveal main :is(h1, h2, h3, p, li, .label, .btn, .link-arrow, .media):not([data-card] *):not([data-card]),
html.is-card.is-reveal .header-actions { animation: card-rise 0.9s var(--ease-out) both; }
@keyframes card-rise { from { opacity: 0; transform: translateY(18px); } }
/* arriving from the menu: the page is already in its final state, no entrance animation to wait for */
.arrive .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- Footer: slim espresso bar (legal left, social right) ------- */
.site-footer { background: var(--ink); color: var(--on-text); }
.footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem var(--gutter); min-height: 2.5rem; padding-block: 0.3rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; }
.footer-legal a { display: inline-block; padding-block: 0.4rem; text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.footer-connect { display: flex; align-items: center; gap: 0.75rem; }
.footer-social { display: flex; gap: 0.4rem; margin: 0; }
.social-btn {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--on-text); color: var(--ink); text-decoration: none;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.social-btn svg { width: 0.85rem; height: 0.85rem; }
a.social-btn:hover { background: transparent; color: var(--on-text); box-shadow: inset 0 0 0 1px var(--on-text); }
a.social-btn:active { transform: scale(0.96); }
.social-btn.is-pending { opacity: 0.55; cursor: default; }
.site-footer :focus-visible { outline-color: var(--on-text); }
@media (max-width: 599px) {
  .footer-legal { gap: 0 1rem; }
  .footer-connect .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Media ------------------------------------------------------- */
.media { position: relative; overflow: hidden; background: var(--surface); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-916 { aspect-ratio: 9 / 16; }
.ratio-34 { aspect-ratio: 3 / 4; }
.ratio-23 { aspect-ratio: 2 / 3; }
.ratio-32 { aspect-ratio: 3 / 2; }
.ratio-11 { aspect-ratio: 1 / 1; }
.caption { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; }
.caption .label:last-child { color: var(--muted); }

.video-toggle {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, #111 45%, transparent); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color var(--dur-fast) ease;
}
.video-toggle:hover { background: color-mix(in srgb, #111 70%, transparent); }
.video-toggle svg { width: 0.9rem; height: 0.9rem; }
.video-toggle .i-play { display: none; }
.video-toggle[aria-pressed="true"] .i-play { display: block; }
.video-toggle[aria-pressed="true"] .i-pause { display: none; }
.video-toggle:focus-visible { outline-color: #fff; }

/* Hover zoom for linked tiles */
.tile { display: block; text-decoration: none; }
.tile .media img, .tile .media video { transition: transform 1.1s var(--ease-out); }
@media (hover: hover) { .tile:hover .media img, .tile:hover .media video { transform: scale(1.03); } }
.tile:focus-visible { outline-offset: 6px; }

/* ---------- Home: hero -------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5.5rem); padding-bottom: var(--space-6); }
.hero .display { max-width: 16em; }
.hero .display em { display: block; color: var(--muted); }
.hero-grid { margin-top: clamp(2.5rem, 5vw, 4.5rem); align-items: end; }
.hero-copy { grid-column: 1 / span 4; align-self: start; padding-top: var(--space-1); }
.hero-copy .lead { margin-bottom: var(--space-4); font-size: var(--step-0); }
.hero-before { grid-column: 5 / span 3; align-self: end; }
.hero-after { grid-column: 8 / span 5; }
.hero-arrow { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-arrow svg { width: 1.6em; height: 1em; }
@media (max-width: 899px) {
  .hero-copy { grid-column: 1 / -1; order: -1; padding-bottom: 0; }
  .hero-before { grid-column: 1 / span 5; }
  .hero-after { grid-column: 6 / span 7; }
}

/* ---------- Home: selected work ---------------------------------------- */
.work-feature { display: grid; gap: var(--space-4) var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work-feature .tile:nth-child(2) { margin-top: var(--space-6); }
.work-feature .tile:nth-child(3) { margin-top: var(--space-3); }
.work-feature .tile-title { margin-top: 1rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
@media (max-width: 899px) {
  .work-feature { grid-template-columns: 1fr; }
  .work-feature .tile:nth-child(n) { margin-top: 0; }
}

/* Staggered studio strip (heights alternate, bottoms align) */
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); align-items: end; }
.strip figure:nth-child(odd) .media { aspect-ratio: 3 / 4; }
.strip figure:nth-child(even) .media { aspect-ratio: 1 / 1; }
@media (max-width: 899px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .strip figure:nth-child(5) { display: none; }
  .strip figure:nth-child(even) { margin-top: var(--space-5); }
  .strip figure:nth-child(n) .media { aspect-ratio: 3 / 4; }
}

/* ---------- Numbered lists (why / steps) ------------------------------- */
.numbered { display: grid; gap: var(--space-5) var(--gutter); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); counter-reset: n; }
.numbered > li { border-top: 1px solid var(--text); padding-top: var(--space-3); }
.numbered .num { display: block; margin-bottom: var(--space-4); color: var(--muted); }
.numbered .h3 { margin-bottom: 0.75rem; }
.numbered p { color: var(--muted); max-width: 26em; }
@media (max-width: 899px) { .numbered { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 599px) { .numbered { grid-template-columns: 1fr; } .numbered .num { margin-bottom: var(--space-2); } }

/* ---------- Packages ---------------------------------------------------- */

/* ---------- Dark band CTA ---------------------------------------------- */
.band { background: var(--ink); color: var(--on-text); }
.band .btn { --btn-bg: transparent; --btn-fg: var(--on-text); border-color: var(--on-text); }
.band .btn:hover { --btn-bg: var(--on-text); --btn-fg: var(--ink); }
.band .muted { color: color-mix(in srgb, var(--on-text) 70%, transparent); }
.band :focus-visible { outline-color: var(--on-text); }
.cta-block { display: grid; gap: var(--space-4); padding-block: clamp(3.5rem, 8vw, 7rem); }   /* same heading size as the closing part of the About page */
.cta-block .nb { display: block; white-space: nowrap; }
.cta-block > * { min-width: 0; }
@media (max-width: 599px) { .cta-block .nb { white-space: normal; } }   /* on a phone the longer line may wrap */

/* ---------- Page intro -------------------------------------------------- */
.page-intro { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: var(--space-5); }
.page-intro .h1 { max-width: 14em; margin-top: var(--space-3); }
.page-intro .lead { margin-top: var(--space-4); color: var(--muted); }

/* ---------- Work page --------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-5); }
.filter {
  min-height: 2.75rem; padding: 0.5em 1.1em; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 0.75rem; font-weight: 400; letter-spacing: 0.01em; text-transform: uppercase;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast);
}
.filter:hover { border-color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter .count { margin-left: 0.4em; opacity: 0.6; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--gutter); }
.project-grid > li:nth-child(even) { margin-top: var(--space-7); }
.project-grid > li[hidden] { display: none; }
.project-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1rem; }
.project-meta .h3 { font-size: var(--step-2); }
.project-meta .label { color: var(--muted); text-align: right; }
.project-note { margin-top: 0.35rem; color: var(--muted); font-size: 0.9375rem; }
.project-grid .tbd-block { aspect-ratio: 4 / 5; }
.filter-status { min-height: 1.5em; }
@media (max-width: 699px) {
  .project-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .project-grid > li:nth-child(even) { margin-top: 0; }
}

/* ---------- Case page --------------------------------------------------- */
.case-head { padding-top: clamp(2.5rem, 6vw, 5rem); }
.case-head .display { margin-top: var(--space-3); }
.case-head .subtitle { font-weight: 400; letter-spacing: normal; font-size: var(--step-0); line-height: 1.55; color: var(--muted); margin-top: var(--space-3); }
.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3) var(--gutter); margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.case-facts dt { color: var(--muted); margin-bottom: 0.35rem; }
.case-facts dd { margin: 0; }
@media (max-width: 699px) { .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.case-brief { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-3) var(--gutter); }
.case-brief > .label { grid-column: 1 / span 3; }
.case-brief > div { grid-column: 4 / span 7; }
@media (max-width: 899px) { .case-brief > .label, .case-brief > div { grid-column: 1 / -1; } }

.compare {
  --cmp: min(46vw, calc(78svh * 0.8));        /* both images fit on screen at 4:5 */
  display: grid; grid-template-columns: minmax(0, var(--cmp)) auto minmax(0, var(--cmp));
  justify-content: center; gap: var(--gutter); align-items: center;
}
.compare-arrow { display: grid; place-items: center; gap: 0.5rem; color: var(--muted); }
.compare-arrow svg { width: 2.5rem; height: 1rem; }
@media (max-width: 699px) {
  .compare { grid-template-columns: 1fr 1fr; justify-content: stretch; align-items: end; }
  .compare-arrow { display: none; }
}

.gallery { columns: 3 16rem; column-gap: var(--gutter); }
.gallery > * { break-inside: avoid; margin-bottom: var(--gutter); }
.case-note { padding: var(--space-3); border: 1px solid var(--line); color: var(--muted); max-width: 46em; }
.case-next { display: flex; justify-content: space-between; align-items: end; gap: var(--space-3); padding-block: var(--space-5); border-top: 1px solid var(--line); text-decoration: none; }
.case-next .h1 { transition: transform var(--dur) var(--ease-out); }
.case-next:hover .h1 { transform: translateX(0.15em); }

/* ---------- Services ---------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4) var(--gutter); }
.split > :first-child { grid-column: 1 / span 4; }
.split > :last-child { grid-column: 6 / span 7; }
@media (max-width: 899px) { .split > :first-child, .split > :last-child { grid-column: 1 / -1; } }

/* FAQ: heading on the left, questions folding open on the right */
.faq-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); align-items: start; }
.faq-heading { font-weight: 300; font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1.1; letter-spacing: 0.32em; text-transform: uppercase; }
.faq-note { margin-top: var(--space-3); }
.faq-note a { color: var(--text); text-decoration: underline; text-underline-offset: 0.25em; }
.faq .acc-item summary { letter-spacing: 0.16em; line-height: 1.5; padding-block: 1.3rem; }
.faq .acc-body { max-width: 36em; }
@media (max-width: 899px) { .faq-layout { grid-template-columns: 1fr; gap: var(--space-5); } }

/* ---------- About ------------------------------------------------------- */
.about-grid { align-items: stretch; }
.about-photo { grid-column: 1 / span 5; margin: 0; }
.about-text { grid-column: 7 / span 5; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6); padding-block: clamp(3rem, 9vw, 8.5rem) clamp(2rem, 6vw, 5.5rem); }
.about-body { display: grid; gap: 1rem; max-width: 27em; }
.about-body p { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; }
.about-text .h2 { margin-bottom: var(--space-4); }
.about-top { padding-top: clamp(2.5rem, 6vw, 5rem); }
.about-welcome { font-weight: 300; font-size: clamp(1.75rem, 3.2vw, 3rem); line-height: 1.1; letter-spacing: 0.32em; text-transform: uppercase; }
.about-welcome .signature { display: block; margin-top: var(--space-3); }
.about-welcome .signature img { display: block; width: clamp(11rem, 17vw, 16rem); height: auto; }   /* her own signature, traced to SVG */
.about-text p { font-size: var(--step-0); line-height: 1.6; }

/* About: how I work. Three pictures that show what the sentence says (magnifier, one photo into a campaign, formats) */
.section.about-process { padding-top: clamp(3rem, 6vw, 5rem); }
.hw { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.about-process .h2 { margin: 0; }
.hw-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); width: 100%; max-width: clamp(60rem, 60vw, 80rem); }
@media (min-width: 1340px) { .hw { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); } .hw-row { justify-self: end; } }
.hw-item h3 { margin: 1.2rem 0 0.5rem; }
.hw-item p { margin: 0; max-width: 24em; color: var(--muted); }
.hw-stage { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); -webkit-tap-highlight-color: transparent; }
.hw-stage > img, .hw-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* magnifier (reads a large file, so it stays sharp) */
.hw-loupe { cursor: none; touch-action: manipulation; }
.hw-lens { position: absolute; z-index: 2; left: 0; top: 0; width: 9.5rem; height: 9.5rem; border-radius: 50%; border: 1px solid var(--on-text); box-shadow: 0 0.8rem 2.2rem color-mix(in srgb, var(--ink) 30%, transparent); background-repeat: no-repeat; pointer-events: none; opacity: 0; transform: scale(0.6); transition: opacity 0.35s ease, transform 0.45s var(--ease-out); }
.hw-loupe.is-on .hw-lens { opacity: 1; transform: scale(1); }
.hw-loupe.is-gliding .hw-lens { transition: opacity 0.35s ease, transform 0.45s var(--ease-out), left 0.6s var(--ease-out), top 0.6s var(--ease-out), background-position 0.6s var(--ease-out); }
@media (hover: none) { .hw-loupe { cursor: pointer; } }

/* small square tags that name (and choose) the state of a picture */
.hw-tags { position: absolute; z-index: 3; left: 0.4rem; right: 0.4rem; bottom: 0.7rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; }
.hw-tags button { min-height: 1.75rem; padding: 0.25em 0.65em; border: 1px solid var(--on-text); border-radius: 0; background: color-mix(in srgb, var(--ink) 40%, transparent); color: var(--on-text); font: inherit; font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease; }
.hw-look .hw-tags button { padding-inline: 0.5em; letter-spacing: 0.07em; }
.hw-look { container-type: inline-size; }
@container (max-width: 279px) { .hw-look .hw-tags { display: grid; grid-template-columns: 1fr 1fr; left: 0.7rem; right: 0.7rem; } }   /* narrow column: two by two */
.hw-tags button[aria-pressed="true"] { background: var(--on-text); color: var(--ink); }
.hw-tags button:focus-visible { outline: 2px solid var(--on-text); outline-offset: 2px; }
@media (hover: none) { .hw-tags button { min-height: 2.25rem; padding-inline: 0.9em; } .hw-look .hw-tags button { padding-inline: 0.65em; } }

/* one phone photo → studio → campaign → model; the original stays small in the corner */
.hw-look > .hw-layer { opacity: 0; transform: scale(1.05); transition: opacity 0.8s ease, transform 1.4s var(--ease-out); }
.hw-look > img[data-layer="studio"] { object-position: 50% 100%; }   /* cut at the top, so the lying bottle stays clear of the buttons */
.hw-look[data-state="phone"] > [data-layer="phone"], .hw-look[data-state="studio"] > [data-layer="studio"], .hw-look[data-state="campaign"] > [data-layer="campaign"], .hw-look[data-state="model"] > [data-layer="model"] { opacity: 1; transform: none; }
.hw-look > video.hw-layer { object-position: 10% 50%; transition: opacity 0.8s ease, transform 1.4s var(--ease-out), object-position 0s 0.8s; }
.hw-look[data-state="campaign"] > video.hw-layer { object-position: 50% 50%; transition: opacity 0.8s ease, transform 1.4s var(--ease-out), object-position 3.6s ease-in-out 1.4s; }   /* pans with the action, so the nutcracker stays in the picture */
.hw-look > .hw-before { inset: 0.7rem auto auto 0.7rem; z-index: 2; width: 24%; height: auto; aspect-ratio: 3 / 4; border: 2px solid var(--on-text); box-shadow: 0 0.4rem 1.2rem color-mix(in srgb, var(--ink) 25%, transparent); opacity: 0; transform: translateY(-0.5rem) rotate(-3deg); transition: opacity 0.5s ease, transform 0.8s var(--ease-out); }
.hw-look:not([data-state="phone"]) > .hw-before { opacity: 1; transform: rotate(-3deg); }

/* one picture, three formats */
.hw-format > img { clip-path: inset(0 0 0 0); transition: clip-path 0.8s var(--ease-out), translate 0.8s var(--ease-out); }
.hw-format[data-state="916"] > img { clip-path: inset(0 7% 0 22.68%); translate: -7.84% 0; }   /* the bottle sits right of centre: the picture slides, the crop stays centred */
.hw-format[data-state="11"] > img { clip-path: inset(10% 0 10% 0); }
.hw-format .hw-tags { transition: bottom 0.8s var(--ease-out); }
.hw-format[data-state="11"] .hw-tags { bottom: calc(10% + 0.7rem); }   /* stay inside the square crop */

@media (max-width: 760px) {
  .hw-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); max-width: 24rem; }
  .hw-lens { width: 8.5rem; height: 8.5rem; }
}
@media (prefers-reduced-motion: reduce) { .hw-stage, .hw-stage * { transition: none !important; } }
@media (min-width: 1600px) { .about-photo .media { max-height: calc(100svh - 7rem); } }   /* on wide screens the portrait stays within the screen height */
/* About: client voices (dark band, names fold open like an accordion) */
.testimonials { padding-block: clamp(4rem, 9vw, 8rem); }
.voices { align-items: start; }
.voices-intro { grid-column: 1 / span 5; display: grid; gap: var(--space-5); align-content: start; }
.voices-lead { max-width: 24em; line-height: 1.7; color: color-mix(in srgb, var(--on-text) 80%, transparent); }
.voices-list { grid-column: 7 / span 6; border-bottom: 1px solid color-mix(in srgb, var(--on-text) 35%, transparent); }
.voice { border-top: 1px solid color-mix(in srgb, var(--on-text) 35%, transparent); }
.voice summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 1.25rem; cursor: pointer; list-style: none; }
.voice summary::-webkit-details-marker { display: none; }
.voice-name { font-weight: 300; font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; }
.voice .icon { position: relative; flex: none; width: 0.9rem; height: 0.9rem; }
.voice .icon::before, .voice .icon::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: currentColor; transition: transform var(--dur) var(--ease-out); }
.voice .icon::after { transform: rotate(90deg); }
.voice[open] .icon::after { transform: rotate(0deg); }
.voice-body { margin: 0; padding: 0.25rem 0 2rem; max-width: 36em; }
.voice-body p { line-height: 1.7; color: color-mix(in srgb, var(--on-text) 88%, transparent); }
.voice-body .label { margin-top: var(--space-3); color: color-mix(in srgb, var(--on-text) 60%, transparent); }
@media (max-width: 899px) { .voices-intro, .voices-list { grid-column: 1 / -1; } .voices-intro { gap: var(--space-4); } }

}
@media (max-width: 899px) {
  .about-photo { grid-column: 1 / -1; position: static; }
  .about-text { grid-column: 1 / -1; }
}
.duo { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gutter); align-items: end; }
@media (max-width: 699px) { .duo { grid-template-columns: 1fr; } }

/* ---------- Contact ----------------------------------------------------- */
.contact-grid { align-items: start; }
.contact-main { grid-column: 1 / span 6; }
.contact-form { grid-column: 8 / span 5; }
@media (max-width: 899px) { .contact-main, .contact-form { grid-column: 1 / -1; } }
.contact-list { display: grid; gap: 0; margin-top: var(--space-5); border-top: 1px solid var(--line); }
.contact-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.75rem; font-weight: 400; letter-spacing: 0.01em; text-transform: uppercase; }
.field .req { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.75rem 0; border: 0; border-bottom: 1px solid var(--muted);
  border-radius: 0; background: transparent; color: var(--text); font: inherit; font-size: 1rem;
  transition: border-color var(--dur-fast);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-bottom: 2px solid var(--text); }
.field .error { color: #9b2c1f; font-size: 0.9375rem; }
.field [aria-invalid="true"] { border-bottom-color: #9b2c1f; }
.form-hint { color: var(--muted); font-size: 0.9375rem; }
.form-status { min-height: 1.5em; }

/* ---------- Legal ------------------------------------------------------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem; gap: 0.25rem; }
.lang-switch button { min-height: 2.5rem; padding: 0 1rem; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.01em; }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.legal-body h2 { font-weight: 300; letter-spacing: -0.02em; font-size: var(--step-2); margin: var(--space-4) 0 var(--space-2); }

/* ---------- Reveal on scroll ------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out); transition-delay: calc(var(--i, 0) * 50ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 599px) { .hero-after .caption .label:last-child { display: none; } }

/* ---------- Home: one-screen stage with an endless project carousel ---- */
/* Without JavaScript the carousel is a normal, swipeable row and the page scrolls. */
.stage-hero { padding-top: calc(clamp(2rem, 7vw, 6rem) + 1.75rem); padding-bottom: var(--space-4); }
.stage-hero .display { max-width: 16em; }
.stage-hero .display em { display: block; }
.stage-hero .lead { max-width: 31em; margin-top: var(--space-3); font-size: var(--step-0); }
.carousel {
  display: flex; gap: 0.5vw; margin: 0; padding: 0 var(--gutter) var(--space-5);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.c-item { flex: 0 0 min(70vw, 22rem); scroll-snap-align: start; }
.c-link { display: block; text-decoration: none; -webkit-user-drag: none; }
.c-meta { display: flex; justify-content: flex-start; gap: 0.75rem; height: 1.75rem; align-items: start; white-space: nowrap; }
.c-meta > span:first-child { flex: none; }
.c-meta > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-media { aspect-ratio: 4 / 5; }
.c-media img { -webkit-user-drag: none; user-select: none; }

.has-js .page-home { overflow: hidden; height: 100vh; height: 100dvh; overscroll-behavior: none; }
.has-js .page-home .site-footer { position: fixed; inset: auto 0 0 0; z-index: 5; }
.has-js .stage {
  position: fixed; inset: 0 0 var(--fh, 2.5rem) 0; overflow: hidden; touch-action: none;
  user-select: none; -webkit-user-select: none; padding-top: var(--hh, 4.5rem); cursor: grab;
}
.has-js .stage.is-dragging { cursor: grabbing; }
.has-js .stage-hero { padding-top: calc(clamp(0.75rem, 3svh, 2.25rem) + 1.75rem); padding-bottom: 0; will-change: transform, opacity; }
.has-js .stage-hero .display { font-size: var(--size-headline); }
.has-js .stage-hero .lead { margin-top: clamp(0.75rem, 2.2svh, 1.4rem); }
.has-js .carousel { position: absolute; inset: 0; display: block; padding: 0; overflow: visible; scroll-snap-type: none; pointer-events: none; }
.has-js .c-item { position: absolute; top: 0; left: 0; width: var(--tw, 22vw); will-change: transform; pointer-events: auto; }
.has-js .c-media img { scale: 1.15; translate: var(--px, 0px) 0; will-change: transform; }
.has-js .c-link:focus-visible { outline-offset: 4px; }

/* Hover (after brandonyasin.com): the tile lifts 8px, the image drifts 4px the other way,
   and the project name rolls up (text-roll). */
.c-link { cursor: pointer; transition: transform 0.55s var(--ease-out); }
.c-media img { transition: transform 0.55s var(--ease-out); }
.roll { position: relative; display: inline-block; overflow: hidden; height: 1.35em; vertical-align: top; }
.roll > span { display: block; white-space: nowrap; transition: transform 0.45s var(--ease-out); }
.roll-b { position: absolute; left: 0; top: 100%; }
@media (hover: hover) {
  .c-link:hover { transform: translateY(-8px); }
  .c-link:hover .c-media img { transform: translateY(4px); }
  .c-link:hover .roll > span { transform: translateY(-100%); }
}
.c-link:focus-visible { transform: translateY(-8px); }
.c-link:focus-visible .c-media img { transform: translateY(4px); }
.c-link:focus-visible .roll > span { transform: translateY(-100%); }

/* ---------- Portfolio: one project after another -----------------------
   Each project: a strip of pictures (drag, wheel or click to enlarge) and a few quiet details underneath. */
.project { --tile-h: clamp(14rem, 41svh, 32rem); --grow: 1.6; padding-block: clamp(3rem, 6.4vw, 6.2rem); }   /* generous white space between the projects */
.page-intro + .project { padding-top: var(--space-7); }   /* same distance below the heading as on the other pages */
.project-strip {
  display: flex; gap: clamp(0.4rem, 0.5vw, 0.5rem); padding: 0 var(--gutter); margin: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-user-select: none; user-select: none;
  align-items: center; height: var(--tile-h);   /* grows while a picture is open (script) */
}
.project-strip::-webkit-scrollbar { display: none; }
/* click a picture: it grows and pushes the others aside; click again and it shrinks */
.project-strip > li {
  flex: none; height: var(--tile-h); width: calc(var(--tile-h) * 0.8); cursor: grab;
  transition: height 0.9s var(--ease-spread), width 0.9s var(--ease-spread);
}
.project-strip > li.is-open { height: calc(var(--tile-h) * var(--grow)); width: calc(var(--tile-h) * var(--grow) * 0.8); }
.project-strip > li:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
/* endless loop (set from JavaScript): the pictures are placed by script and wrap around */
.project-strip.is-loop { display: block; position: relative; overflow: hidden; touch-action: pan-y; }
.project-strip.is-loop > li { position: absolute; left: 0; top: 0; transition: none; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .project-strip > li { transition: none; } }
.project-strip .tile { height: 100%; }
.project-strip .media { height: 100%; aspect-ratio: auto; }
.project-strip video[poster$="pf-martinmas-28-poster.webp"] { object-position: 50% 40%; }   /* campaign film: show a little more of the top, so the title keeps some air */
.project-strip img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.project-strip.is-loop { cursor: grab; }   /* open hand: the row can be dragged */
.project-strip.is-dragging, .project-strip.is-dragging * { cursor: grabbing; }
.project-strip.is-dragging a { pointer-events: none; }
.project-info {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: var(--space-5) var(--gutter); align-items: start;
  padding-inline: var(--gutter); margin-top: var(--space-5);
}
.project-facts { display: grid; gap: var(--space-3); margin: 0; }
.project-facts dd { margin: 0.3rem 0 0; }
.project-facts.is-end { text-align: right; }
.project-main .label { margin-top: 0.6rem; }
.project-text { margin-top: var(--space-3); max-width: 32em; color: var(--muted); }
@media (max-width: 899px) {
  .project { --tile-h: clamp(13rem, 42svh, 26rem); padding-block: var(--space-6); }
  .project-info { grid-template-columns: 1fr; gap: var(--space-4); margin-top: var(--space-4); }
  .project-facts.is-end { text-align: left; }
}
@media (pointer: coarse) { .project-strip { scroll-snap-type: x proximity; } .project-strip > li { scroll-snap-align: start; scroll-margin-left: var(--gutter); } }

/* black band directly above the black footer: keep a hairline between them */
main:has(> .band:last-child) + .site-footer { border-top: 1px solid color-mix(in srgb, var(--on-text) 18%, transparent); }


/* ---------- Working together: packages (one picture left; heading, intro and the three folding packages right) ---------- */
.wt-section { padding-top: 0; }
.wt-film { margin: 0; position: sticky; top: 6.5rem; }   /* the film stays in view while the packages are read and opened */
.wt-film .media { aspect-ratio: 1600 / 768; background: #0d0d0e; }
.package-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.package-info { max-width: 38rem; }
.package-heading { font-weight: 300; font-size: clamp(1.15rem, 1.7vw, 1.6rem); line-height: 1.2; letter-spacing: 0.22em; text-transform: uppercase; }
.package-intro { margin-block: var(--space-5) var(--space-5); line-height: 1.7; }
.pkg-num { margin-right: 1.25rem; color: var(--muted); }
.pkg-sub { margin-bottom: 0.75rem; color: var(--text); }
.pkg-for { margin-top: var(--space-3); color: var(--muted); }
.acc-body b { font-weight: 500; color: var(--text); }
.acc-body > .pkg-use { margin-top: 1rem; margin-bottom: 0; }
.acc { border-bottom: 1px solid color-mix(in srgb, var(--text) 22%, transparent); }
.acc-item { border-top: 1px solid color-mix(in srgb, var(--text) 22%, transparent); }
.acc-item summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 1.15rem; cursor: pointer; list-style: none; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; }
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item .icon { position: relative; flex: none; width: 0.9rem; height: 0.9rem; }
.acc-item .icon::before, .acc-item .icon::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: currentColor; transition: transform var(--dur) var(--ease-out); }
.acc-item .icon::after { transform: rotate(90deg); }
.acc-item[open] .icon::after { transform: rotate(0deg); }
.acc-body { padding: 0.25rem 0 1.6rem; color: var(--muted); max-width: 32em; }
.acc-body > p { margin-bottom: 0.75rem; }
.rung-list { display: grid; gap: 0.5rem; }
.rung-list li { display: flex; gap: 0.75rem; }
.rung-list li::before { content: ""; flex: none; width: 0.4rem; height: 1px; margin-top: 0.85em; background: currentColor; }
@media (max-width: 799px) { .package-grid { grid-template-columns: 1fr; gap: var(--space-5); } .wt-film { position: static; } }
.legal-body p, .legal-body dl, .legal-body ul { margin-bottom: 1em; }
.legal-body dt { font-weight: 500; margin-top: 1rem; }
.legal-body dd { margin: 0; color: var(--muted); }
.legal-body ul { list-style: disc; padding-left: 1.25em; }
.page-intro .lang-switch { margin-top: var(--space-4); }

/* ---------- Contact sheet: a blue paper sheet rises over the dimmed page (like brandonyasin.com's contact) ---------- */
:root { --sheet-bg: #8fa8c4; --sheet-ink: #1b2b42; }
.contact-sheet { position: fixed; inset: 0; z-index: var(--z-sheet); visibility: hidden; pointer-events: none; }
.contact-sheet.is-visible { visibility: visible; pointer-events: auto; }
html.is-card .contact-sheet { display: none; }
html.sheet-open { overflow: hidden; }
.sheet-backdrop { position: absolute; inset: 0; background: #0c0f14; opacity: 0; transition: opacity 0.55s ease; }
.contact-sheet.is-open .sheet-backdrop { opacity: 0.8; }
.sheet-panel {
  position: absolute; left: 50%; top: clamp(4rem, 12svh, 8rem); bottom: 0; width: min(72rem, calc(100% - 2 * var(--gutter)));
  background: var(--sheet-bg); color: var(--sheet-ink); outline: none; box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, 102%); transition: transform 0.7s cubic-bezier(0.55, 0, 0.35, 1);
}
.contact-sheet.is-open .sheet-panel { transform: translate(-50%, 0); transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.sheet-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(1.25rem, 2.4vw, 2rem) clamp(1.25rem, 2.4vw, 2rem) 3rem; scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }
/* paper: fine grain plus soft unevenness, laid over everything (so the print sits in the paper) */
.sheet-paper {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: multiply; opacity: 0.6;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.5 0 0 0 0 0.6 0 0 0 0.9 -0.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='m' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.006 0.012' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.42 0 0 0 0 0.55 0 0 0 0.5 -0.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 240px 240px, 100% 100%;
  background-repeat: repeat, no-repeat;
}
.sheet-panel :is(h2, p, label, input, textarea, button, a, li) { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28), 0 -0.5px 0 rgba(10, 25, 45, 0.18); }   /* letterpress */
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-close { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 0.25rem 0; }
.sheet-close:hover, .sheet-close:focus-visible { text-decoration: underline; text-underline-offset: 0.3em; }
.sheet-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--gutter); align-items: end; margin-top: clamp(2rem, 6vh, 4rem); min-height: clamp(12rem, 34svh, 20rem); }
.sheet-title { font-weight: 300; font-size: var(--size-headline); line-height: 0.98; letter-spacing: -0.045em; }
.sheet-title .ln { display: block; overflow: hidden; padding-bottom: 0.1em; }
.sheet-title .ln > span { display: block; }
.sheet-side p { max-width: 20em; line-height: 1.55; font-size: var(--step-1); }
.sheet-rule { height: 1px; background: var(--sheet-ink); opacity: 0.85; margin-top: clamp(2rem, 6vh, 4rem); transform-origin: left; }
.sheet-bottom { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--gutter); padding-top: 1.25rem; }
.sheet-blurb p { max-width: 14em; line-height: 1.5; font-size: var(--step-1); }
.sheet-links { margin: var(--space-4) 0 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; font-size: var(--step-0); }
.sheet-links a { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.sheet-form { display: grid; }
.sf-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); padding-block: 1.1rem 1.3rem; border-top: 1px solid color-mix(in srgb, var(--sheet-ink) 75%, transparent); }
.sf-row:first-child { border-top: 0; padding-top: 0; }
.sf-row label { font-size: var(--step-1); }
.sf-row .n { display: inline-block; min-width: 2.6rem; }
.sf-field input, .sf-field textarea { width: 100%; border: 0; background: transparent; color: var(--sheet-ink); font: inherit; font-size: var(--step-1); padding: 0; outline: none; resize: none; }
.sf-field textarea { min-height: 3.4em; }
.sf-field input::placeholder, .sf-field textarea::placeholder { color: color-mix(in srgb, var(--sheet-ink) 52%, transparent); opacity: 1; }
.sf-field input:focus-visible, .sf-field textarea:focus-visible { box-shadow: 0 1px 0 0 var(--sheet-ink); }
.sf-field .error { margin-top: 0.4rem; color: #6d1d1d; font-size: 0.875rem; }
.sf-field [aria-invalid="true"] { box-shadow: 0 1px 0 0 #6d1d1d; }
.sf-send { padding-top: 1.1rem; border-top: 1px solid color-mix(in srgb, var(--sheet-ink) 75%, transparent); display: grid; gap: 0.75rem; justify-items: start; padding-left: calc(41.667% + var(--gutter) * 0.42); }
.sf-submit { background: none; border: 0; border-bottom: 1px solid var(--sheet-ink); color: inherit; font: inherit; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.02em; padding: 0 0 0.1em; cursor: pointer; transition: letter-spacing 0.5s var(--ease-out); }
.sf-submit:hover, .sf-submit:focus-visible { letter-spacing: 0.04em; outline: none; }
.sheet-panel .form-status { min-height: 1.4em; }
.sf-hint { font-size: 0.8125rem; opacity: 0.75; }
/* the print rises into place one piece at a time */
.sheet-head, .sheet-side p, .sheet-blurb, .sf-row, .sf-send { opacity: 0; transform: translateY(14px); transition: opacity 0.25s ease, transform 0.25s ease; }
.sheet-title .ln > span { transform: translateY(110%); transition: transform 0.3s ease; }
.sheet-rule { transform: scaleX(0); transition: transform 0.3s ease; }
.contact-sheet.is-open :is(.sheet-head, .sheet-side p, .sheet-blurb, .sf-row, .sf-send) { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.9s var(--ease-out); }
.contact-sheet.is-open .sheet-head { transition-delay: 0.45s; }
.contact-sheet.is-open .sheet-title .ln > span { transform: none; transition: transform 1s var(--ease-out); }
.contact-sheet.is-open .sheet-title .ln:nth-child(1) > span { transition-delay: 0.5s; }
.contact-sheet.is-open .sheet-title .ln:nth-child(2) > span { transition-delay: 0.6s; }
.contact-sheet.is-open .sheet-title .ln:nth-child(3) > span { transition-delay: 0.7s; }
.contact-sheet.is-open .sheet-side p { transition-delay: 0.85s; }
.contact-sheet.is-open .sheet-rule { transform: none; transition: transform 1.2s var(--ease-out) 0.75s; }
.contact-sheet.is-open .sheet-blurb { transition-delay: 0.95s; }
.contact-sheet.is-open .sf-row:nth-child(1) { transition-delay: 0.9s; }
.contact-sheet.is-open .sf-row:nth-child(2) { transition-delay: 1s; }
.contact-sheet.is-open .sf-row:nth-child(3) { transition-delay: 1.1s; }
.contact-sheet.is-open .sf-row:nth-child(4) { transition-delay: 1.2s; }
.contact-sheet.is-open .sf-send { transition-delay: 1.3s; }
@media (max-width: 899px) {
  .sheet-panel { top: 3.5rem; width: calc(100% - 1rem); }
  .sheet-top, .sheet-bottom { grid-template-columns: 1fr; }
  .sheet-top { min-height: 0; gap: var(--space-4); }
  .sf-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .sf-send { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-backdrop, .sheet-panel, .contact-sheet *, .contact-sheet.is-open * { transition: none !important; }
  .sheet-head, .sheet-side p, .sheet-blurb, .sf-row, .sf-send { opacity: 1; transform: none; }
  .sheet-title .ln > span, .sheet-rule { transform: none; }
}

/* Working together: the process as a pinned stepper (idea from brandonyasin.com/about). The band stays in place while you scroll;
   the row of steps glides sideways, the active step is lit and its text appears beneath it. Without scripts or with reduced motion it is a plain three-column list. */
.process-band + .section { padding-top: var(--space-7); }
.section.process-band { padding-block: clamp(5rem, 9vw, 8rem); }
.process-title .nb { display: block; white-space: nowrap; }
.pt-steps { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5) var(--space-5); }
.pt-num { display: block; font-size: 0.8125rem; letter-spacing: 0.08em; color: color-mix(in srgb, var(--on-text) 55%, transparent); }
.pt-name { margin-top: 0.4rem; font-weight: 300; font-size: clamp(1.5rem, 2.3vw, 2.2rem); line-height: 1.15; letter-spacing: -0.02em; }
.pt-text { margin-top: var(--space-3); max-width: 24em; color: color-mix(in srgb, var(--on-text) 70%, transparent); line-height: 1.65; }
.pt-count { display: none; }
@media (max-width: 899px) { .pt-steps { grid-template-columns: 1fr; } }
/* pinned version (script adds .is-stepper) */
.process-band.is-stepper { padding: 0; height: calc(100svh * (1 + (var(--n) - 1) * 0.55 + 0.3)); }
.is-stepper .process-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.is-stepper .process-inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding-top: calc(var(--header-h) + clamp(1.5rem, 6svh, 4rem)); padding-bottom: clamp(1.25rem, 4svh, 2.5rem); }
.is-stepper .pt-stage { position: relative; align-self: center; height: 15rem; }
.is-stepper .pt-steps { position: absolute; left: 0; top: 0; margin: 0; display: flex; gap: clamp(3.5rem, 8vw, 8rem); width: max-content; will-change: transform; }
.is-stepper .pt-step { position: relative; flex: none; opacity: 0.3; }
.is-stepper .pt-text { position: absolute; left: 0; top: calc(100% + 0.4rem); width: min(26rem, 78vw); margin: 0; opacity: 0; }
.is-stepper .pt-count { display: block; align-self: end; color: color-mix(in srgb, var(--on-text) 55%, transparent); }
.is-stepper .pt-cur { color: var(--on-text); }
@media (max-width: 899px) { .is-stepper .pt-steps { display: flex; } .is-stepper .pt-stage { height: 17rem; } }

/* contact sheet: choice rows, consent, thank-you */
.sf-row .sf-label { font-size: var(--step-1); }
.sf-checks { display: grid; gap: 0.5rem; }
.sf-check { display: flex; align-items: center; gap: 0.9rem; cursor: pointer; font-size: var(--step-1); line-height: 1.35; }
.sf-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-check .box { position: relative; flex: none; width: 0.95rem; height: 0.95rem; border: 1px solid var(--sheet-ink); transition: background-color 0.25s ease; }
.sf-check .box::after { content: ""; position: absolute; inset: 2px; background: var(--sheet-ink); transform: scale(0); transition: transform 0.25s var(--ease-out); }
.sf-check input:checked + .box::after { transform: scale(1); }
.sf-check:hover .box { background: color-mix(in srgb, var(--sheet-ink) 12%, transparent); }
.sf-check input:focus-visible + .box { outline: 2px solid var(--sheet-ink); outline-offset: 3px; }
.sf-check a { text-decoration: underline; text-underline-offset: 0.2em; }
.sf-consent-row .sf-check { font-size: var(--step-0); align-items: flex-start; }
.sf-consent-row .sf-check .box { margin-top: 0.2em; }
.sf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sf-thanks { display: grid; gap: 0.75rem; padding: 3rem 0 4rem; }
.sf-thanks[hidden] { display: none; }
.sf-thanks-title { font-weight: 300; font-size: var(--size-headline); line-height: 1; letter-spacing: -0.045em; }
.sf-thanks-text { font-size: var(--step-1); }
.sheet-form[hidden] { display: none; }
.sheet-panel .sf-check .box { text-shadow: none; }

/* contact sheet: the e-mail button at the top copies the address */
.sheet-mail { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0.45em 1.2em; border: 1px solid var(--sheet-ink); background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; transition: background-color 0.3s ease, color 0.3s ease; }
.sheet-mail:hover, .sheet-mail:focus-visible { background: var(--sheet-ink); color: var(--sheet-bg); text-shadow: none; outline: none; }
.sheet-mail.is-copied { background: var(--sheet-ink); color: var(--sheet-bg); text-shadow: none; }

/* contact sheet: address written out next to the copy button */
.sheet-mailgroup { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.sheet-addr { user-select: all; -webkit-user-select: all; }
@media (max-width: 600px) {
  .sheet-head { align-items: flex-start; }
  .sheet-mailgroup { flex-direction: column; align-items: flex-start; gap: 0.6rem; min-width: 0; }
  .sheet-addr { overflow-wrap: anywhere; }
}

/* phones only: About photo and text stack (the tablet widths keep the layout she approved) */
@media (max-width: 600px) {
  .about-photo { grid-column: 1 / -1; position: static; }
  .about-text { grid-column: 1 / -1; }
}

/* Portfolio: enlarge button on the open picture + pop-up window */
.zoom-btn { position: absolute; top: 0.7rem; right: 0.7rem; z-index: 3; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--ink); background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--ink); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, background-color 0.25s ease, color 0.25s ease; }
.project-strip > li.is-picked .zoom-btn { opacity: 1; visibility: visible; }
.zoom-btn:hover, .zoom-btn:focus-visible { background: var(--ink); color: var(--on-text); outline: none; }
.project-strip.is-dragging .zoom-btn { pointer-events: none; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; opacity: 0; transition: opacity 0.3s ease; }
.lightbox[hidden] { display: none; }
.lightbox.is-on { opacity: 1; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, 0.94); cursor: zoom-out; }
.lb-stage { position: relative; margin: 0; max-width: 92vw; max-height: 92svh; display: grid; place-items: center; transform: scale(0.97); transition: transform 0.45s var(--ease-out); pointer-events: none; }
.lightbox.is-on .lb-stage { transform: none; }
.lb-stage img, .lb-stage video { display: block; max-width: 92vw; max-height: 92svh; width: auto; height: auto; object-fit: contain; pointer-events: auto; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid rgba(255, 255, 255, 0.7); background: transparent; color: var(--on-text); cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; }
.lb-btn:hover, .lb-btn:focus-visible { background: var(--on-text); color: var(--ink); outline: none; }
.lb-btn[hidden] { display: none; }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev { left: 1.25rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1.25rem; top: 50%; translate: 0 -50%; }
html.lb-open { overflow: hidden; }
@media (max-width: 599px) { .lb-prev { left: 0.5rem; } .lb-next { right: 0.5rem; } .lb-close { top: 0.75rem; right: 0.75rem; } }
@media (prefers-reduced-motion: reduce) { .lightbox, .lb-stage { transition: none; } }

/* Film with sound: plays muted like the others; an open picture and the pop-up show a speaker button for the sound */
.project-strip > li[data-ratio="1.3333"] { width: calc(var(--tile-h) * 1.3333); }
.sound-btn { position: absolute; right: 0.7rem; bottom: 0.7rem; z-index: 3; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--ink); background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--ink); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, background-color 0.25s ease, color 0.25s ease; }
.project-strip > li.is-picked .sound-btn, .lb-stage .sound-btn { opacity: 1; visibility: visible; }
.lb-stage .sound-btn { pointer-events: auto; }
.sound-btn:hover, .sound-btn:focus-visible { background: var(--ink); color: var(--on-text); outline: none; }
.sound-btn .i-on { display: none; }
.sound-btn[aria-pressed="true"] .i-on { display: block; }
.sound-btn[aria-pressed="true"] .i-off { display: none; }
.project-strip.is-dragging .sound-btn { pointer-events: none; }

/* Cookie banner: a small black card bottom left, thin outlined square buttons */
.footer-link { padding: 0.4rem 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.footer-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.cookie { position: fixed; left: var(--gutter, 1.5rem); bottom: 1.25rem; z-index: 250; width: min(26rem, calc(100vw - 2 * var(--gutter, 1.5rem))); max-height: calc(100svh - 2.5rem); overflow: auto; padding: 1.6rem 1.6rem 1.5rem; background: var(--ink); color: var(--on-text); box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-text) 22%, transparent), 0 0.6rem 2rem color-mix(in srgb, var(--ink) 18%, transparent); font-size: 0.8125rem; line-height: 1.6; opacity: 0; transform: translateY(0.75rem); transition: opacity 0.45s ease, transform 0.6s var(--ease-out); }
.cookie.is-on { opacity: 1; transform: none; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 1.25rem; color: color-mix(in srgb, var(--on-text) 82%, transparent); }
.cookie a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.cookie-title { margin: 0 0 0.7rem; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-btn { min-height: 2.5rem; padding: 0.55em 1.3em; border: 1px solid var(--on-text); border-radius: 0; background: transparent; color: var(--on-text); font: inherit; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease; }
.cookie-btn.is-solid { background: var(--on-text); color: var(--ink); }
.cookie-btn:hover, .cookie-btn:focus-visible { background: var(--on-text); color: var(--ink); outline: none; }
.cookie-btn.is-solid:hover, .cookie-btn.is-solid:focus-visible { background: transparent; color: var(--on-text); }
.cookie-btn:focus-visible { outline: 2px solid var(--on-text); outline-offset: 3px; }
.cookie-list { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.cookie-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.2rem; padding: 0.9rem 0; border-top: 1px solid color-mix(in srgb, var(--on-text) 28%, transparent); }
.cookie-row:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-text) 28%, transparent); }
.cookie-row strong { display: block; font-weight: 400; margin-bottom: 0.15rem; }
.cookie-row span { display: block; color: color-mix(in srgb, var(--on-text) 70%, transparent); }
.cookie-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 2.5rem; height: 1.3rem; margin: 0.15rem 0 0; border: 1px solid var(--on-text); border-radius: 0; background: transparent; cursor: pointer; }
.cookie-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.3rem - 6px); height: calc(1.3rem - 6px); background: var(--on-text); transition: transform 0.25s var(--ease-out); }
.cookie-switch:checked { background: color-mix(in srgb, var(--on-text) 22%, transparent); }
.cookie-switch:checked::after { transform: translateX(1.2rem); }
.cookie-switch:disabled { opacity: 0.55; cursor: default; }
.cookie-switch:focus-visible { outline: 2px solid var(--on-text); outline-offset: 3px; }
@media (max-width: 600px) { .cookie { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; width: auto; padding: 1.3rem; } }
@media (prefers-reduced-motion: reduce) { .cookie { transition: none; transform: none; } }
@media print { .cookie { display: none; } }

/* About: no stripes. "In their words" and the closing question form one dark end; while scrolling, the page glides from beige into black (script).
   Without script or with reduced motion they are simply black. */
.closing-dark { position: relative; margin-top: -2px; background: var(--ink); color: var(--on-text); }
.closing-dark .btn { --btn-fg: var(--on-text); border-color: var(--on-text); }
.closing-dark .btn:hover { --btn-bg: var(--on-text); --btn-fg: var(--ink); }
.closing-dark :focus-visible { outline-color: var(--on-text); }
.closing-dark .cta-block { justify-items: center; text-align: center; }
main:has(> .closing-dark:last-child) + .site-footer { border-top: 1px solid color-mix(in srgb, var(--on-text) 18%, transparent); }
html.about-flow body { background-color: color-mix(in srgb, var(--ink) calc(var(--flow, 0) * 100%), var(--bg)); transition: none; }
html.about-flow .testimonials, html.about-flow .closing-dark { background: transparent; }
html.about-flow .about-process > .wrap { opacity: clamp(0, calc(1 - var(--flow, 0) / 0.7), 1); }
html.about-flow .testimonials > .wrap, html.about-flow .closing-dark > .wrap { opacity: clamp(0, calc((var(--flow, 0) - 0.45) / 0.55), 1); }
.site-header.is-dark { background: color-mix(in srgb, var(--ink) 88%, transparent); color: var(--on-text); }
.site-header.is-dark :is(.brand-mark, .text-btn, .nav-main a) { color: var(--on-text); }
.site-header.is-dark .btn { --btn-fg: var(--on-text); border-color: var(--on-text); }
.site-header.is-dark .btn:hover { --btn-bg: var(--on-text); --btn-fg: var(--ink); }
.site-header { transition: background-color 0.45s ease, color 0.45s ease; }

/* Home: a headline, a full-width film below it; scrolling glides the film over the whole screen and the picture cards rise into it.
   Everything moves by transform from a smoothed scroll value (script). Without script, with reduced motion or on very low screens it stands in a column. */
.hx-intro { padding-block: clamp(1rem, 3svh, 2rem) clamp(0.9rem, 2.2svh, 1.4rem); }
.hx-title { font-size: clamp(1.75rem, min(2.85vw, 5.4svh), 4rem); line-height: 1.1; letter-spacing: -0.03em; max-width: none; text-wrap: balance; }
.hx-film { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.hx-film video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hx-veil { display: none; }
.hx-band { overflow: hidden; }
.hx-track { --th: clamp(12rem, 32svh, 23rem); display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0; padding: 0.8rem var(--gutter) 1rem; list-style: none; }
.hx-track li { flex: none; }
.hx-track a { display: block; padding: 0.4rem 0.4rem 0; background: var(--bg); text-decoration: none; -webkit-user-drag: none; }
.hx-track .label { display: block; padding: 0.5rem 0.1rem 0.45rem; max-width: calc(var(--th) * 0.8); overflow: hidden; white-space: nowrap; }
.hx-track .media { width: calc(var(--th) * 0.8); height: var(--th); aspect-ratio: auto; }
.hx-track img { -webkit-user-drag: none; user-select: none; pointer-events: none; transition: transform 1.1s var(--ease-out); }
@media (hover: hover) {
  .hx-track a:hover img { transform: scale(1.04); }
  .hx-track a:hover .roll > span { transform: translateY(-100%); }   /* the same rolling label as on the first home page */
}
.hx-track a:focus-visible .roll > span { transform: translateY(-100%); }
/* the band as an endless, draggable loop (set from the script) */
.hx-track.is-loop { flex-wrap: nowrap; width: max-content; padding-inline: 0; will-change: transform; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.hx-track.is-loop a { cursor: inherit; }
.hx-track.is-loop.is-dragging, .hx-track.is-loop.is-dragging a { cursor: grabbing; }

html.hx-on .page-hx .site-header { position: fixed; left: 0; right: 0; top: 0; }
html.hx-on .page-hx .site-header.is-over { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.hx-on .hx-hero { height: 175svh; }
html.hx-on .hx-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
html.hx-on .hx-intro { position: absolute; left: 0; right: 0; top: var(--hx-head, 4.5rem); min-height: clamp(5.5rem, 15svh, 9rem); display: flex; align-items: flex-end; will-change: transform, opacity; }
html.hx-on .hx-stage { position: absolute; inset: 0; will-change: transform; }
html.hx-on .hx-film { position: absolute; inset: 0; aspect-ratio: auto; }
html.hx-on .hx-veil { display: block; position: absolute; inset: 0 0 auto; height: 8rem; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, transparent), transparent); opacity: 0; pointer-events: none; }   /* keeps the navigation readable on the film */
html.hx-on .hx-band { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform-origin: 50% 100%; will-change: transform, opacity; }
html.hx-on .hx-band.is-away { pointer-events: none; }
html.hx-on .page-hx .site-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; translate: 0 100%; }   /* rises together with the cards (script), no extra scrolling */
html.is-card.hx-on .page-hx .site-footer.is-synced { display: block !important; }   /* the card of the scrolled page keeps its footer while switching */
.hx-title em { display: inline; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; line-height: 0.9; }   /* the three fields in an editorial serif */
@media (max-width: 699px) {
  .hx-film video { object-position: 44% 50%; }
  .hx-track { --th: clamp(11rem, 28svh, 16rem); }
  html.hx-on .hx-veil { height: 9.5rem; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 92%, transparent) 0, color-mix(in srgb, var(--bg) 60%, transparent) 55%, transparent); }   /* the close-up reaches the top on a phone */
}

/* Page switch: out to the menu cards and into the next page. The overlay keeps its own header away and takes no clicks while travelling. */
.site-menu.is-travel { pointer-events: none; }
.site-menu.is-travel.is-open { transition: opacity 0.28s ease; }
.site-menu.is-travel > .header-grid { opacity: 0; }
.site-menu.is-travel.is-live { background: transparent; }
.site-menu.is-travel.is-live.is-open { transition: none; }
.site-menu.is-travel.is-live::before { opacity: 0; }
html.is-switching { background: var(--menu-bg); }
html.is-switching body { background: transparent !important; }
.switch-back { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
/* Between two pages the old picture stays until the new one is drawn (no white flash), also on the back button. */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
.film-hold { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; pointer-events: none; transition: opacity 0.24s ease; }
.film-hold.is-off { opacity: 0; }
@media (max-width: 699px) { .hx-film .film-hold { object-position: 44% 50%; } }

/* ---------- Portfolio: overview with floating pictures, then one project at a time ------------------------------
   Markup is built by tools/portfolio-layout.mjs. Overview: list of areas left, five pictures floating around one line.
   Opening a project: the list and pictures lift off, the project rises in with its notes between the pictures. */
.po-stage { display: grid; grid-template-columns: minmax(11rem, 17%) 1fr; height: calc(100svh - 4.6rem); min-height: 34rem; overflow: hidden; }
.po-index { align-self: center; display: grid; gap: 0.35rem; margin: 0; padding: 0 0 0 var(--gutter); list-style: none; position: relative; z-index: 2; transition: transform 0.8s cubic-bezier(0.55, 0, 0.2, 1), opacity 0.5s ease; }
.po-index button { position: relative; padding: 0.35rem 0 0.35rem 0.9rem; border: 0; background: none; font: inherit; font-size: var(--step-1); color: var(--ink); opacity: 0.42; cursor: pointer; text-align: left; transition: opacity 0.3s ease; }
.po-index button::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 1.2em; translate: 0 -50%; background: var(--ink); scale: 1 0; transition: scale 0.45s var(--ease-out); }
.po-index button:hover { opacity: 0.75; }
.po-index button[aria-pressed="true"] { opacity: 1; }
.po-index button[aria-pressed="true"]::before { scale: 1 1; }
.po-stage.is-away .po-index { transform: translate3d(0, -60svh, 0); opacity: 0; }
.po-field { position: relative; }
.po-set { position: absolute; inset: 0; visibility: hidden; pointer-events: none; transition: visibility 0s linear 1.2s; }
.po-set.is-active { visibility: visible; transition: none; }
.po-set.is-out { visibility: visible; }
.po-item { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; width: min(var(--w), calc(var(--h) * var(--r)));
  opacity: 0; transform: translate3d(0, 70svh, 0); translate: calc(var(--mx, 0) * var(--z) * 1px) calc(var(--my, 0) * var(--z) * 1px);
  transition: transform 1.15s cubic-bezier(0.16, 0.84, 0.24, 1) calc(var(--d) * 80ms), opacity 0.6s ease calc(var(--d) * 80ms), translate 0.9s var(--ease-out); }
.po-set.is-active .po-item { opacity: 1; transform: none; pointer-events: auto; }
.po-set.is-out .po-item { opacity: 0; transform: translate3d(0, -75svh, 0);
  transition: transform 0.85s cubic-bezier(0.55, 0, 0.75, 0.25) calc(var(--d) * 45ms), opacity 0.55s ease calc(0.2s + var(--d) * 45ms); }
.po-set.is-still :is(.po-item, .po-center) { transition: none; }
.po-float { display: block; aspect-ratio: var(--r); box-shadow: 0 2.4rem 2.8rem -1.9rem rgb(40 28 18 / 0.45); animation: po-float var(--t, 7s) ease-in-out var(--p, 0s) infinite alternate; }
.po-float img, .po-float video { display: block; width: 100%; height: 100%; object-fit: cover; }
@keyframes po-float { from { transform: translateY(-0.8svh); } to { transform: translateY(1svh); } }
.po-s1 { left: 2%; top: 15%; --w: 21%; --h: 40svh; --z: 14; --t: 7.4s; --p: -1s; }
.po-s2 { left: 30%; top: 3%; --w: 14%; --h: 24svh; --z: 8; --t: 6.2s; --p: -3s; }
.po-s3 { right: 4%; top: 8%; --w: 25%; --h: 48svh; --z: 18; --t: 8.6s; --p: -2s; }
.po-s4 { left: 56%; bottom: 3%; --w: 20%; --h: 27svh; --z: 11; --t: 6.8s; --p: -4s; }
.po-s5 { left: 15%; bottom: 3%; --w: 15%; --h: 24svh; --z: 9; --t: 7.9s; --p: -5s; }
.po-center { position: absolute; left: 50%; top: 49%; translate: -50% -50%; width: min(38%, 30rem); display: grid; justify-items: center; text-align: center; opacity: 0; transform: translateY(1.6rem); transition: opacity 0.35s ease, transform 0.35s ease; }
.po-set.is-active .po-center { opacity: 1; transform: none; pointer-events: auto; transition: opacity 0.7s ease 0.4s, transform 0.9s var(--ease-out) 0.4s; }
.po-set.is-out .po-center { transform: translateY(-1.6rem); }
.po-line { margin: 0 0 1.8rem; max-width: 12em; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: clamp(1.75rem, min(2.85vw, 5.2svh), 3.4rem); line-height: 1.08; text-wrap: balance; }

/* one project: opening picture, the idea, then each kind of picture with its note */
html.has-js .po-view:not(.is-open) { display: none; }
html.has-js main.is-project > .po-stage { display: none; }
.po-view { padding: clamp(1.5rem, 5svh, 3.5rem) var(--gutter) 0; outline: none; transition: opacity 0.35s ease; }
.po-view.is-closing { opacity: 0; }
.po-view ul { display: flex; justify-content: center; align-items: flex-start; gap: clamp(0.6rem, 1.6vw, 1.6rem); margin: 0; padding: 0; list-style: none; }
.po-view ul + ul { margin-top: clamp(0.6rem, 1.6vw, 1.6rem); }
.po-view li { position: relative; flex: var(--r) 1 0; min-width: 0; max-width: calc(var(--r) * var(--rh)); aspect-ratio: var(--r); overflow: hidden; }   /* one row, equal height */
.po-view li > img, .po-view li > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.po-view ul[data-row="1"] { --rh: 82svh; }
.po-view ul[data-row="2"] { --rh: 74svh; }
.po-view ul[data-row="3"] { --rh: 64svh; }
.po-view ul[data-row="4"] { --rh: 58svh; }
.po-intro { max-width: 38rem; margin: 0 auto; padding-block: clamp(3.5rem, 13svh, 8rem); text-align: center; }
.po-intro h2 { margin: 0; }
.po-view.no-hero .po-intro { padding-top: clamp(2rem, 9svh, 6rem); }   /* no opening picture: the title comes first */
.po-idea { margin: 1.4rem 0 0; font-size: var(--step-1); line-height: 1.6; }
.po-chapter { padding-bottom: clamp(3.5rem, 13svh, 8rem); }
.po-note { max-width: 30rem; margin: 0 auto clamp(1.8rem, 5svh, 3rem); text-align: center; }
.po-note h3 { margin: 0 0 0.6rem; }
.po-note p { margin: 0; color: var(--muted, #6f6a63); }
.po-zoom { position: absolute; inset: 0; border: 0; background: none; cursor: zoom-in; }
.po-zoom:focus-visible { outline: 2px solid var(--ink); outline-offset: -6px; }
.po-view .sound-btn { opacity: 1; visibility: visible; }
html.has-js .po-rv { opacity: 0; translate: 0 1rem; transition: opacity 0.45s ease, translate 0.6s cubic-bezier(0.16, 0.84, 0.24, 1); }   /* starts before the picture reaches the screen (script), so it is already there when you arrive */
html.has-js .po-rv.is-in { opacity: 1; translate: 0 0; }
/* the opening picture rises into place, the title follows */
.po-view .po-lead, .po-view .po-intro { transition: opacity 0.9s ease 0.05s, translate 1.3s cubic-bezier(0.16, 0.84, 0.24, 1) 0.05s; }
.po-view .po-intro { transition-delay: 0.25s; }
.po-view.is-enter .po-lead { opacity: 0; translate: 0 34svh; transition: none; }
.po-view.is-enter .po-intro { opacity: 0; translate: 0 5rem; transition: none; }
.po-end { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; padding-bottom: clamp(3rem, 10svh, 6rem); }
html:not(.has-js) .po-stage { display: none; }

@media (max-width: 799px) {
  .po-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 33rem; }
  .po-index { display: flex; gap: 1.4rem; align-self: start; padding: 0.4rem var(--gutter) 0.6rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .po-index button { padding: 0.5rem 0; font-size: var(--step-0); }
  .po-index button::before { left: 0; right: 0; top: auto; bottom: 0.15rem; width: auto; height: 1px; translate: none; scale: 0 1; }
  .po-index button[aria-pressed="true"]::before { scale: 1 1; }
  .po-s2, .po-s5 { display: none; }
  .po-s1 { left: 5%; top: 3%; --w: 45%; --h: 31svh; }
  .po-s3 { right: 5%; top: 9%; --w: 42%; --h: 36svh; }
  .po-s4 { left: 20%; top: 37%; bottom: auto; --w: 38%; --h: 24svh; z-index: 2; }
  .po-center { top: auto; bottom: 1.2rem; translate: -50% 0; width: 90%; }
  .po-line { margin-bottom: 1rem; }
  .po-view { padding-inline: var(--gutter); }
  .po-view ul[data-row="3"] { flex-direction: column; align-items: center; }   /* phone: three become a column, two stay a pair, four become two and two */
  .po-view ul[data-row="3"] li { flex: none; width: 100%; max-width: 100%; }
  .po-view ul[data-row="4"] { flex-wrap: wrap; }
  .po-view ul[data-row="4"] li { flex: 0 0 calc(50% - 0.35rem); max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .po-float { animation: none; }
  .po-item, .po-center, .po-index, .po-set.is-out .po-item, .po-view .po-lead, .po-view .po-intro { transition: none !important; }
  html.has-js .po-rv { opacity: 1; translate: 0 0; transition: none; }
}
html.is-card .po-set :is(.po-item, .po-center) { transition: none; }
@media (max-width: 799px) {   /* on a phone the card title sits where the list is: the list appears once the card opens */
  html.is-card main .po-stage .po-index, html.is-card main .po-stage .po-index * { visibility: hidden; }
  html.is-card.is-reveal main .po-stage .po-index, html.is-card.is-reveal main .po-stage .po-index * { visibility: visible; }
}

/* ---------- Phones and touch (2026-12-03) ------------------------------- */
/* home: the pinned screen follows the browser bar, so the footer stays docked to the film and the cards */
@supports (height: 100dvh) { html.hx-on .hx-pin { height: 100dvh; } }
/* menu cards are pictures: a finger moves the row of cards, never the page inside a card */
@media (hover: none) {
  html.is-card, html.is-card body { overflow: hidden !important; overscroll-behavior: none; touch-action: none; }
  .menu-card::after { pointer-events: auto; z-index: 1; width: 100%; }
}
/* phone cards: Working together shows only title and film; the About portrait starts below the title */
@media (max-width: 799px) { html.is-card:not(.is-reveal) main .package-heading[data-card] { visibility: hidden; } }
@media (max-width: 899px) {
  html.is-card .about-photo .media { translate: 0 3.5rem; transition: translate 0.9s var(--ease-out); }
  html.is-card.is-reveal .about-photo .media { translate: 0 0; }
}
/* contact sheet after sending: only the thank-you, in the middle */
.sheet-panel.is-sent :is(.sheet-top, .sheet-rule, .sheet-blurb) { display: none; }
.sheet-panel.is-sent .sheet-bottom { grid-template-columns: minmax(0, 1fr); min-height: 60svh; align-content: center; }
.sheet-panel.is-sent .sf-thanks { justify-items: center; text-align: center; padding: 0; }
