/* Vesna Planko — shared styles (homepage + case studies).
   Brand: colourful and organic. One V letterform with many hands (see vmark.py), bold flat colors used like a cover
   series, highlighted words, and one thread that runs through every page and ties the content together.
   The bold colors keep the same values in both themes; only the ground, ink and lines change. */

:root {
  /* Bold palette */
  --cobalt: #3A45F5;
  --tomato: #FF5A36;
  --sun: #FFC629;
  --mint: #19C7A0;
  --pink: #FFB1D0;
  --lime: #D3F23A;
  --violet: #23185A;
  --cream: #FBF6EC;
  --on-cobalt: #FFFFFF;
  --on-violet: #FBF6EC;
  --on-color: #1C1433;        /* ink on tomato, sun, mint, pink and lime */
  --tomato-ink: #CF3714;      /* tomato for text on the page */
  --violet-line: #23185A;

  /* Roles */
  --accent: #3A45F5;          /* links, primary buttons, small accents */
  --accent-strong: #2A33D6;
  --accent-wash: rgba(58, 69, 245, 0.09);
  --on-accent: #FFFFFF;
  --accent-on-dark: #A3AAFF;
  --accent-soft: #DFE1FF;

  /* Ground and ink */
  --page: #FBF6EC;
  --panel: #F3EBDC;
  --card: #FFFFFF;
  --ink: #1C1433;
  --ink-2: #5D5676;
  --rule: #E5DACA;
  --dark: #23185A;
  --on-dark: #FBF6EC;
  --on-dark-2: #C0B7E0;
  --ok: #0B7F64;
  --warn: #A9480F;

  /* Legacy aliases used by case-study components */
  --paper: var(--page); --paper-2: var(--panel); --pen: var(--accent); --pen-strong: var(--accent-strong);
  --pen-wash: var(--accent-wash); --on-pen: var(--on-accent); --vault: var(--ok); --hold: var(--warn);

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display);
  --measure: 62ch;
  /* Spacing, taken from Stripe's rhythm at 1440px: 96px between sections, 62px from a heading to its content, 16px between cards,
     24px inside a card, 16px between paragraphs. Tight inside, generous outside. */
  --sp-section: clamp(64px, 6.67vw, 96px);
  --sp-band: clamp(72px, 8.9vw, 128px);
  --sp-head: clamp(40px, 4.3vw, 62px);
  --sp-col: clamp(20px, 4vw, 56px);
  --sp-gap: 16px;
  --sp-card: 24px;
  /* Type scale. rem, so text follows the reader's browser setting. Display tiers are fluid, text tiers are fixed.
     hero 42-92 | statement 36-74 | section 28-52 | card title 26-32 | h3 22 | lede 18 | body 16 | button 15 | small 14 | tiny 12 */
  --fs-hero: clamp(2.625rem, 6.5vw, 5.75rem);
  --fs-statement: clamp(2.25rem, 5.15vw, 4.625rem);
  --fs-section: clamp(1.75rem, 3.6vw, 3.25rem);
  --fs-card: clamp(1.625rem, 1.2rem + 1.3vw, 2rem);
  --fs-h3: 1.375rem;
  --fs-lede: 1.125rem;
  --fs-body: 1rem;
  --fs-btn: 0.9375rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.75rem;
  --sp-stack: 16px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-lg: 28px;
  --radius: 18px;
  --radius-card: 28px;      /* every card: What I bring, How I work, the work slabs, the lead cards */
  --radius-plate: 20px;     /* the plate inside a card */
  --line: color-mix(in srgb, var(--violet) 16%, var(--page));
  --blend: multiply;          /* how overlapping shapes mix */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --violet: #2E2275; --tomato-ink: #FF7A5C; --violet-line: #A9B0FF;
    --accent: #929BFF; --accent-strong: #B7BCFF; --accent-wash: rgba(146, 155, 255, 0.13); --on-accent: #130E24; --accent-on-dark: #A9B0FF; --accent-soft: #2A2560;
    --page: #130E24; --panel: #1B1533; --card: #221A40; --ink: #F7F1E6; --ink-2: #B9B0D1; --rule: #33295A;
    --dark: #261C5E; --on-dark: #F7F1E6; --on-dark-2: #C4BBE6; --ok: #4FD8B3; --warn: #FFA06B;
    --line: color-mix(in srgb, var(--cream) 16%, var(--page));
    --blend: normal;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --violet: #2E2275; --tomato-ink: #FF7A5C; --violet-line: #A9B0FF;
  --accent: #929BFF; --accent-strong: #B7BCFF; --accent-wash: rgba(146, 155, 255, 0.13); --on-accent: #130E24; --accent-on-dark: #A9B0FF; --accent-soft: #2A2560;
  --page: #130E24; --panel: #1B1533; --card: #221A40; --ink: #F7F1E6; --ink-2: #B9B0D1; --rule: #33295A;
  --dark: #261C5E; --on-dark: #F7F1E6; --on-dark-2: #C4BBE6; --ok: #4FD8B3; --warn: #FFA06B;
  --line: color-mix(in srgb, var(--cream) 16%, var(--page));
  --blend: normal;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--text); font-size: var(--fs-body); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 600; letter-spacing: -0.035em; font-optical-sizing: auto; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sun); color: var(--on-color); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
main { position: relative; }
main .wrap, main .lift { position: relative; z-index: 2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--page); padding: 8px 14px; font-size: var(--fs-body); z-index: 50; border-radius: 999px; }
.skip:focus { top: 12px; }
section { scroll-margin-top: 88px; }

/* ---------- The V ---------- */
.vmark { display: block; width: 100%; height: auto; overflow: visible; isolation: isolate; }
.vmark .v-blade { mix-blend-mode: var(--blend); }

/* ---------- Highlighted words: an organic swash of color drawn behind the word ----------
   The swash is a rounded rectangle built from gradients (three bars and four quarter discs), so its corners are true
   arcs whatever the font or the line wrap; a border-radius on the inline box would only shave the corners of a shorter
   image. It sits --y below the top of the text's box and is --h tall; --r is the corner radius. The "off" lists
   collapse every piece to zero width at the left edge, and the move to the "on" lists is what draws it on. */
.sf { --hl: var(--sun); --r: 0.24em; --y: 0.11em; --h: 1em; color: inherit; padding: 0 0.14em; margin: 0 -0.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
      --bs-on: 100% calc(var(--h) - 2 * var(--r) + 1px), calc(100% - 2 * var(--r) + 1px) calc(var(--r) + 0.5px), calc(100% - 2 * var(--r) + 1px) calc(var(--r) + 0.5px), var(--r) var(--r), var(--r) var(--r), var(--r) var(--r), var(--r) var(--r);
      --bs-off: 0% calc(var(--h) - 2 * var(--r) + 1px), 0% calc(var(--r) + 0.5px), 0% calc(var(--r) + 0.5px), 0 var(--r), 0 var(--r), 0 var(--r), 0 var(--r);
      --bp-on: 0 calc(var(--y) + var(--r) - 0.5px), calc(var(--r) - 0.5px) var(--y), calc(var(--r) - 0.5px) calc(var(--y) + var(--h) - var(--r) - 0.5px), 0 var(--y), 100% var(--y), 0 calc(var(--y) + var(--h) - var(--r)), 100% calc(var(--y) + var(--h) - var(--r));
      --bp-off: 0 calc(var(--y) + var(--r) - 0.5px), calc(var(--r) - 0.5px) var(--y), calc(var(--r) - 0.5px) calc(var(--y) + var(--h) - var(--r) - 0.5px), 0 var(--y), 0 var(--y), 0 calc(var(--y) + var(--h) - var(--r)), 0 calc(var(--y) + var(--h) - var(--r));
      background-image:
        linear-gradient(var(--hl), var(--hl)), linear-gradient(var(--hl), var(--hl)), linear-gradient(var(--hl), var(--hl)),
        radial-gradient(circle at 100% 100%, var(--hl) calc(var(--r) - 0.5px), transparent var(--r)),
        radial-gradient(circle at 0 100%, var(--hl) calc(var(--r) - 0.5px), transparent var(--r)),
        radial-gradient(circle at 100% 0, var(--hl) calc(var(--r) - 0.5px), transparent var(--r)),
        radial-gradient(circle at 0 0, var(--hl) calc(var(--r) - 0.5px), transparent var(--r));
      background-repeat: no-repeat; background-size: var(--bs-on); background-position: var(--bp-on); }
.sf { color: var(--on-color); }
.sf.c { --hl: var(--cobalt); color: var(--on-cobalt); }
.sf.t { --hl: var(--tomato); }
.sf.m { --hl: var(--mint); }
.sf.p { --hl: var(--pink); }
.sf.l { --hl: var(--lime); }
.sf.base { background: none; padding: 0; margin: 0; color: inherit; }
.js .sf:not(.base) { background-size: var(--bs-off); background-position: var(--bp-off); color: inherit; transition: background-size .9s cubic-bezier(.65,.05,.25,1), background-position .9s cubic-bezier(.65,.05,.25,1), color .25s ease .5s; }
.js .sf.in:not(.base) { background-size: var(--bs-on); background-position: var(--bp-on); color: var(--on-color); }
.js .sf.c.in { color: var(--on-cobalt); }
@media (prefers-reduced-motion: reduce) { .js .sf:not(.base) { background-size: var(--bs-on); background-position: var(--bp-on); color: var(--on-color); transition: none; } .js .sf.c { color: var(--on-cobalt); } }

/* ---------- Buttons ---------- */
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-family: var(--text); font-weight: 600; font-size: var(--fs-btn); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .2s cubic-bezier(.2,.7,.2,1), background .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn-dark { background: var(--ink); color: var(--page); }
.btn-dark:hover { background: var(--tomato); color: var(--on-color); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--sun); color: var(--on-color); }
.btn-ghost { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--page); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-body); color: var(--ink); text-decoration: none; }
.more::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.more:hover { color: var(--accent); }
.more:hover::after { transform: translateX(3px) rotate(45deg); }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.head-inner { max-width: 1240px; margin: 0 auto; padding: 12px var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.3125rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; white-space: nowrap; }
/* The logo: a chunky V from two round-capped arms (tomato and accent blue that mix where they cross) with the 12-point sun star from the footer wordmark in the notch */
.logo-v { --mk-blue: var(--accent); --mk-blend: var(--blend); flex: none; display: block; width: 38px; height: 38px; overflow: visible; isolation: isolate; }
.logo-v path { fill: none; stroke-width: 50; stroke-linecap: round; }
.logo-v .lv-l { stroke: var(--tomato); }
.logo-v .lv-r { stroke: var(--mk-blue); mix-blend-mode: var(--mk-blend); }
.logo-v .lv-star { fill: var(--sun); }
.brand:hover { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .logo-v .lv-star { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .55s cubic-bezier(.3,1.5,.5,1); }
  .brand:hover .lv-star, .brand:focus-visible .lv-star { transform: rotate(60deg) scale(1.14); }
}
.pill-nav { display: flex; align-items: center; gap: 2px; background: var(--panel); border-radius: 999px; padding: 4px; position: relative; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font: 600 var(--fs-btn)/1 var(--text); color: var(--ink); text-decoration: none; background: transparent; border: 0; cursor: pointer; }
.nav-btn:hover, .nav-btn[aria-expanded="true"] { background: var(--card); color: var(--ink); }
.nav-btn svg { width: 10px; height: 10px; transition: transform .2s ease; }
.nav-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.head-end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.head-end .btn { min-height: 38px; padding: 0 16px; }
.menu-btn { display: none; }
.mega { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(780px, 92vw); background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 14px 200px 14px 14px; box-shadow: 0 24px 60px -24px rgba(19, 14, 36, 0.6); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; overflow: hidden; }
.mega[hidden] { display: none; }
.mega a { position: relative; z-index: 1; display: grid; grid-template-columns: 12px 1fr; column-gap: 10px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--on-dark); }
.mega a::before { content: ""; grid-row: 1 / span 2; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--dot, var(--sun)); }
.mega a:hover { background: color-mix(in srgb, var(--on-dark) 9%, transparent); }
.mega strong { display: block; font-weight: 600; font-size: var(--fs-body); }
.mega span { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--on-dark-2); }
.mega .all { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--on-dark) 14%, transparent); border-radius: 0 0 10px 10px; padding-top: 12px; margin-top: 4px; }
.mega .all strong { color: var(--sun); }
.mega-mark { position: absolute; right: 18px; bottom: -36px; width: 160px; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .mega:not([hidden]) { animation: drop .26s cubic-bezier(.2,.7,.2,1); } @keyframes drop { from { opacity: 0; transform: translate(-50%, -8px) rotate(-1deg); } to { opacity: 1; transform: translate(-50%, 0); } } }
.mobile-menu { border-top: 1px solid var(--rule); background: var(--page); padding: 8px var(--gutter) 18px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-size: var(--fs-body); font-weight: 600; border-bottom: 1px solid var(--rule); }
.mobile-menu a span { display: block; font-size: var(--fs-small); font-weight: 400; color: var(--ink-2); }

/* ---------- Shared pieces ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); font-weight: 600; color: var(--on-color); background: var(--mint); padding: 6px 14px 6px 12px; border-radius: 999px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-color); }
@media (prefers-reduced-motion: no-preference) { .status::before { animation: blink 2.4s ease-in-out infinite; } @keyframes blink { 50% { opacity: .25; } } }
.who { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: var(--fs-small); color: var(--ink-2); }
.who span + span { border-left: 1px solid var(--rule); margin-left: 12px; padding-left: 12px; }
.who strong { color: var(--ink); font-weight: 600; }
.checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-body); position: relative; }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--mint); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 4px; border-left: 2px solid var(--on-color); border-bottom: 2px solid var(--on-color); transform: rotate(-45deg); }

.ledger { margin-top: var(--sp-head); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.ledger dl { margin: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.ledger .item { padding: 40px 24px 40px 0; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.ledger .item + .item { padding-left: 24px; border-left: 1px solid var(--rule); }
.ledger dt { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.4; }
.ledger dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.2vw, 2.875rem); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.05; color: var(--case-ink, var(--accent)); }

.shot { margin: 0; }
.shot a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--rule); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.shot a:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 24px 50px -34px rgba(19, 14, 36, 0.6); }
.shot img { width: 100%; }
.shot figcaption { margin-top: var(--sp-stack); font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.shot.narrow { max-width: 820px; }

/* ---------- Label with a rule; color fills for SVG ---------- */
.label-rule { display: flex; align-items: center; gap: 18px; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); margin: 0 0 clamp(22px, 3.2vw, 40px); }
.label-rule > * { flex: 0 1 auto; min-width: 0; }
.label-rule::after { content: ""; flex: 1 1 auto; min-width: 40px; border-top: 1.5px solid currentColor; opacity: 0.4; }
.label-rule.accent { color: var(--ink); }
.label-rule .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--tomato)); }
.c-accent { fill: var(--accent); } .c-ink { fill: var(--ink); } .c-slate { fill: var(--ink-2); } .c-soft { fill: var(--accent-soft); }

/* ---------- The thread: one braided line drawn down the page as you scroll (built by site.js) ---------- */
.thread { position: absolute; left: 0; top: 0; width: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.thread.bold .spark { stroke-width: 3.5px; }
.thread .strand { fill: none; stroke-width: var(--tw, 5px); stroke-linecap: round; stroke-linejoin: round; }
.thread .spark { fill: none; stroke: #FFF8EA; stroke-width: 2.5px; stroke-linecap: round; stroke-dasharray: 0.5 90; opacity: .9; }
@media (prefers-reduced-motion: no-preference) { .thread .spark { animation: spark 2.6s linear infinite; } @keyframes spark { to { stroke-dashoffset: -90.5; } } }
.thread .bead { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .5s cubic-bezier(.3,1.7,.5,1); stroke: var(--page); stroke-width: 4px; }
.thread .bead.on { transform: scale(1); }
.thread .pen { fill: var(--ink); stroke: var(--page); stroke-width: 3px; }
@media (prefers-reduced-motion: reduce) { .thread .bead { transform: scale(1); transition: none; } .thread .pen { display: none; } }
.tp { display: block; height: 0; overflow: hidden; pointer-events: none; }

/* ---------- Footer: a violet inset panel. A field of the six case-study glyphs dissolves in from the top-right corner (the way the case heroes do), a line of
   slowly spinning case shapes links to the work, and the wordmark's letters fly in from a scattered heap as the footer scrolls into view. ---------- */
.site-foot { padding: var(--sp-section) 12px 12px; position: relative; z-index: 2; }
.foot-panel { --e: 1; --fp: clamp(28px, 4vw, 48px); --band: clamp(124px, 11vw, 165px); position: relative; isolation: isolate; overflow: hidden; background: var(--dark); color: var(--on-dark); border-radius: var(--radius-lg); padding: var(--fp) var(--fp) clamp(18px, 2.2vw, 26px); display: flex; flex-direction: column; }
/* The pattern has a band of its own in the top-right corner: it ends above the shapes divider and keeps clear of every line of text */
.field-foot { top: 0; right: 0; width: min(74%, calc(var(--band) * 6.6)); height: var(--band); --po: 0.22; transform: translate3d(0, calc((var(--e) - 1) * 36px), 0); }

.foot-main { position: relative; }
/* From 1440px the pattern carries on down the right edge beside the Now column (which stops well short of it), fading out above the wordmark.
   The divider's right-hand line ends before it, so nothing crosses the pattern. */
.field-foot-r { display: none; }
@media (min-width: 1440px) {
  .field-foot-r { display: block; top: calc(var(--fp) * -1); right: calc(var(--fp) * -1); width: calc(var(--band) * 0.8125); height: calc(100% + var(--fp)); --po: 0.2; transform: translate3d(0, calc((var(--e) - 1) * 36px), 0); }
  .foot-main > .foot-sep { margin-right: calc(var(--band) * 0.8125 - var(--fp) + 16px); }
}
.foot-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: calc(var(--band) - var(--fp) + 26px); }
.foot-panel .brand { color: var(--on-dark); font-size: 1.875rem; }
.foot-panel .brand .logo-v { width: 48px; height: 48px; --mk-blue: var(--accent-on-dark); --mk-blend: normal; }
.foot-up { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--on-dark) 55%, transparent); color: var(--on-dark); transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.foot-up svg { width: 18px; height: 18px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.foot-up:hover, .foot-up:focus-visible { background: var(--on-dark); border-color: var(--on-dark); color: var(--dark); }
.foot-up:hover svg, .foot-up:focus-visible svg { transform: translateY(-3px); }

/* The divider: a hairline with one small shape per case study, each turning slowly and linking to its case */
.foot-sep { position: relative; z-index: 1; display: flex; align-items: center; gap: clamp(12px, 1.4vw, 20px); margin: 0 0 clamp(36px, 4vw, 60px); }
.foot-fil { flex: 1 1 0; height: 1px; background: color-mix(in srgb, var(--on-dark) 20%, transparent); }
.foot-shape { position: relative; flex: none; display: block; width: clamp(37px, 3.17vw, 49px); color: inherit; }
.foot-shape svg { display: block; width: 100%; height: auto; transition: scale .3s cubic-bezier(.3, 1.6, .5, 1); }
.foot-shape:hover svg { scale: 1.3; animation-play-state: paused; }
.foot-shape::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 14px); translate: -50% 6px; opacity: 0; pointer-events: none; white-space: nowrap; background: var(--cream); color: var(--on-color); font: 600 0.75rem/1 var(--text); padding: 7px 11px; border-radius: 999px; transition: opacity .2s ease, translate .25s cubic-bezier(.2, .7, .2, 1); }
.foot-shape:hover::after { opacity: 1; translate: -50% 0; }
@media (prefers-reduced-motion: no-preference) {
  .foot-shape svg { animation: foot-spin 20s linear infinite; }
  .foot-shape:nth-of-type(even) svg { animation-direction: reverse; animation-duration: 26s; }
  .foot-shape.s3 svg { animation-duration: 32s; }
  .foot-shape.s5 svg { animation-duration: 38s; }
  .foot-sep.is-loin .foot-shape svg { animation-play-state: paused; }
  @keyframes foot-spin { to { transform: rotate(360deg); } }
}

.foot-cols { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 40px; }
.foot-cols h2 { font-family: var(--text); font-size: var(--fs-tiny); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sun); }
.foot-cols ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; justify-items: start; }
.foot-cols a { color: var(--on-dark-2); text-decoration: none; font-size: var(--fs-body); padding-bottom: 1px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .25s ease, background-size .35s cubic-bezier(.2, .7, .2, 1); }
.foot-cols a:hover, .foot-cols a:focus-visible { color: var(--on-dark); background-size: 100% 1px; }
.foot-note, .foot-clock { font-size: var(--fs-small); color: var(--on-dark-2); }
.foot-cols .status { font-size: var(--fs-small); padding: 5px 12px 5px 10px; }
.foot-clock .c-time { margin-left: 8px; color: var(--on-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
.c-time .c { animation: foot-blink 2s steps(1) infinite; }
@keyframes foot-blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .c-time .c { animation: none; } }
.foot-copy { font: 600 var(--fs-btn)/1 var(--text); letter-spacing: 0.02em; color: var(--on-dark); background: transparent; border: 1px solid color-mix(in srgb, var(--on-dark) 38%, transparent); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.foot-copy:hover, .foot-copy:focus-visible { background: var(--on-dark); border-color: var(--on-dark); color: var(--dark); }
.foot-copy.is-done { background: var(--mint); border-color: var(--mint); color: var(--on-color); }
/* The columns rise in one after another (shown at once without script or with reduced motion) */
.js .foot-rev { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--rd, 0s), transform .9s cubic-bezier(.2, .7, .2, 1) var(--rd, 0s); }
.js .foot-rev.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .foot-rev { opacity: 1; transform: none; transition: none; } }

/* The wordmark: --e runs from 0 to 1 as it scrolls into view and pulls each letter from its scattered start (--dx, --dy, --dr) into place */
.foot-word { position: relative; z-index: 1; margin-top: clamp(40px, 4.6vw, 72px); container-type: inline-size; --wfs: 17cqw; }
.foot-word-in { display: flex; justify-content: space-between; align-items: flex-end; font: 700 var(--wfs)/0.8 var(--display); letter-spacing: -0.055em; color: var(--on-dark); white-space: nowrap; user-select: none; }
.foot-word .ws { flex: 0 0 0.2em; }
.foot-word .wl { display: inline-block; transform-origin: 50% 60%; transform: translate(calc((1 - var(--e)) * var(--dx, 0px)), calc((1 - var(--e)) * var(--dy, 0px))) rotate(calc((1 - var(--e)) * var(--dr, 0deg))); opacity: calc(0.14 + var(--e) * 0.86); will-change: transform; transition: translate .35s cubic-bezier(.3, 1.6, .5, 1), color .25s ease; }
.foot-word .wl:hover { translate: 0 -6%; }
.foot-word .wl:nth-child(4n+1):hover { color: var(--sun); }
.foot-word .wl:nth-child(4n+2):hover { color: var(--mint); }
.foot-word .wl:nth-child(4n+3):hover { color: var(--pink); }
.foot-word .wl:nth-child(4n):hover { color: var(--tomato); }
.foot-word .wd { width: 0.27em; height: 0.27em; margin: 0 0.02em 0.06em 0.05em; color: var(--sun); opacity: 1; transform: scale(calc(1 + (1 - var(--e)) * 3.6)) rotate(calc((1 - var(--e)) * -200deg)); }
.foot-word .wd svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.foot-word .wd:hover svg { animation: foot-spin 1.2s cubic-bezier(.45, .05, .55, .95); }
@media (prefers-reduced-motion: reduce) { .foot-word .wd:hover svg, .foot-word .wl { animation: none; transition: none; } .foot-word .wl:hover { translate: none; } }
@keyframes foot-spin { to { transform: rotate(360deg); } }

.foot-bottom { position: relative; z-index: 1; align-items: center; margin-top: clamp(20px, 2vw, 28px); padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--on-dark) 16%, transparent); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; font-size: var(--fs-small); color: var(--on-dark-2); }

/* ---------- Case studies ---------- */
.case-top { --case-bg: var(--cobalt); --case-fg: var(--on-cobalt); position: relative; overflow: hidden; margin: 6px 12px 0; border-radius: var(--radius-lg); background: var(--case-bg); color: var(--case-fg); padding-bottom: var(--sp-head); }
.case-glyph { position: absolute; z-index: 1; top: clamp(70px, 7vw, 100px); right: clamp(24px, 6vw, 96px); width: clamp(200px, 20vw, 290px); pointer-events: none; }
.case-hero { position: relative; z-index: 2; padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(32px, 4vw, 48px); }
.case-hero > *:not(.case-facts) { max-width: min(100%, calc(100% - clamp(0px, 26vw, 380px))); }
.case-hero .label-rule { margin-bottom: 0; color: inherit; font-size: var(--fs-small); }
.case-hero .label-rule strong { font-weight: 700; }
.case-top .wrap:last-child { position: relative; z-index: 2; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); font-weight: 600; text-decoration: none; color: inherit; background: color-mix(in srgb, currentColor 13%, transparent); padding: 8px 16px; border-radius: 999px; margin-bottom: 32px; }
.back:hover { color: inherit; background: color-mix(in srgb, currentColor 22%, transparent); }
.case-hero h1 { margin-top: 16px; font-size: clamp(2.375rem, 5vw, 4.375rem); line-height: 1.0; letter-spacing: -0.045em; max-width: 14em; text-wrap: balance; }
.case-hero .sf { --hl: var(--case-hl, var(--sun)); }
.lede { margin-top: 24px; max-width: var(--measure); font-size: var(--fs-lede); color: var(--ink-2); }
.case-hero .lede { color: inherit; opacity: 0.88; }
.case-facts { margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: color-mix(in srgb, currentColor 9%, transparent); border-radius: var(--radius); padding: 20px 0; }
.case-facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-facts > div { padding: 0 20px; }
.case-facts > div + div { border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.case-facts dt { font-size: var(--fs-small); opacity: 0.8; }
.case-facts dd { margin: 4px 0 0; font-weight: 600; line-height: 1.35; font-size: var(--fs-body); }
.case-shot-hero { margin-bottom: 0; }
.case-top .shot a { border-color: transparent; }
.case-top .shot figcaption { color: inherit; opacity: 0.85; }
.case-sec { padding-top: var(--sp-section); }
.sec-grid { display: grid; grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr); gap: var(--sp-col); align-items: start; }
.sec-grid > h2 { font-size: clamp(1.75rem, 2.9vw, 2.5rem); line-height: 1.06; position: sticky; top: 96px; }
.prose p { font-size: var(--fs-lede); max-width: var(--measure); }
.prose p + p { margin-top: var(--sp-stack); }
.prose .pull { font-family: var(--display); font-weight: 600; font-size: clamp(1.4375rem, 2.3vw, 1.875rem); line-height: 1.22; letter-spacing: -0.025em; color: var(--ink); max-width: 24em; }
.quote { margin: 32px 0 0; padding: var(--sp-card); background: var(--case-bg-c, var(--cobalt)); color: var(--case-fg-c, var(--on-cobalt)); border-radius: var(--radius-card); max-width: var(--measure); rotate: -0.6deg; transition: rotate .5s cubic-bezier(.2,.8,.2,1), scale .5s cubic-bezier(.2,.8,.2,1); }
.quote p { font-style: italic; }
.quote cite { display: block; margin-top: 10px; font-style: normal; font-size: var(--fs-small); font-weight: 600; color: inherit; opacity: 0.85; }
.sec-figure { margin-top: var(--sp-head); }
.flow { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; font-size: var(--fs-small); font-weight: 600; }
.flow li { display: flex; align-items: center; gap: 10px; }
.flow li span { border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; background: var(--card); }
.flow li + li::before { content: ""; width: 16px; border-top: 2px solid var(--ink); }
.flow li.end span { background: var(--case-bg-c, var(--cobalt)); border-color: transparent; color: var(--case-fg-c, var(--on-cobalt)); }
.flow-note { margin-top: var(--sp-stack); font-size: var(--fs-body); color: var(--ink-2); max-width: 62ch; }
.features { list-style: none; margin: 0; padding: 0; }
.features > li { padding: 0 0 clamp(36px, 5vw, 56px); }
.features > li + li { border-top: 1px solid var(--rule); padding-top: 28px; }
.features h3 { font-size: var(--fs-h3); line-height: 1.15; }
.features p { margin-top: 8px; max-width: var(--measure); color: var(--ink-2); }
.features .concept { display: block; margin-bottom: 6px; font-family: var(--text); font-size: var(--fs-tiny); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.tradeoffs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-gap); counter-reset: tr; }
.tradeoffs li { --k: var(--tomato); --rot: -0.8deg; counter-increment: tr; background: var(--k); color: var(--on-color); border-radius: var(--radius-card); padding: var(--sp-card); rotate: var(--rot); transition: rotate .5s cubic-bezier(.2,.8,.2,1), scale .5s cubic-bezier(.2,.8,.2,1); }
.tradeoffs li:nth-child(3n+2) { --k: var(--sun); --rot: 0.6deg; } .tradeoffs li:nth-child(3n+3) { --k: var(--mint); --rot: -0.5deg; }
.tradeoffs h3 { font-size: var(--fs-h3); line-height: 1.15; color: inherit; }
.tradeoffs li::before { content: counter(tr); display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 14px; border-radius: 50%; background: var(--on-color); color: var(--k); font-family: var(--text); font-size: var(--fs-tiny); font-weight: 700; line-height: 1; }
.tradeoffs li:hover, .results li:hover, .quote:hover { rotate: 0deg; scale: 1.012; }
.tradeoffs p { margin-top: 8px; font-size: var(--fs-body); color: inherit; }
.results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-gap); counter-reset: rs; }
.results li { --k: var(--mint); --rot: -0.6deg; counter-increment: rs; background: var(--k); color: var(--on-color); border-radius: var(--radius-card); padding: var(--sp-card); rotate: var(--rot); transition: rotate .5s cubic-bezier(.2,.8,.2,1), scale .5s cubic-bezier(.2,.8,.2,1); }
.results h3 { display: flex; align-items: center; gap: 9px; font-family: var(--text); font-size: var(--fs-tiny); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: inherit; }
.results .big { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.03em; color: inherit; }
.results li:nth-child(2) { --k: var(--sun); --rot: 0.5deg; } .results li:nth-child(3) { --k: var(--pink); --rot: -0.5deg; } .results li:nth-child(4) { --k: var(--tomato); --rot: 0.6deg; }
.results h3::before { content: counter(rs); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--on-color); color: var(--k); letter-spacing: 0; line-height: 1; }
.results p { margin-top: 6px; font-size: var(--fs-body); color: inherit; }
.personas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-gap); }
.personas > li { --k: var(--violet); --t: var(--on-violet); --rot: -0.7deg; display: flex; flex-direction: column; background: var(--k); color: var(--t); border-radius: var(--radius-card); padding: var(--sp-card); rotate: var(--rot); transition: rotate .5s cubic-bezier(.2,.8,.2,1), scale .5s cubic-bezier(.2,.8,.2,1); }
.personas > li:nth-child(2) { --k: var(--mint); --t: var(--on-color); --rot: 0.6deg; margin-top: 22px; }
.personas > li:nth-child(3) { --k: var(--sun); --t: var(--on-color); --rot: 0.5deg; }
.personas > li:nth-child(4) { --k: var(--pink); --t: var(--on-color); --rot: -0.6deg; margin-top: 22px; }
.personas > li:hover { rotate: 0deg; scale: 1.012; }
.personas .id { display: flex; align-items: center; gap: 12px; }
.personas .av { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--t); color: var(--k); font-family: var(--text); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.02em; }
.personas h3 { font-size: var(--fs-h3); line-height: 1.15; color: inherit; }
.personas .tag { display: block; margin-top: 3px; font-family: var(--text); font-size: var(--fs-tiny); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.personas p { margin-top: 14px; font-size: var(--fs-body); color: inherit; }
.personas .mods { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-small); }
.personas .mods li { background: color-mix(in srgb, currentColor 13%, transparent); border-radius: 999px; padding: 4px 11px; }
.carry { position: relative; z-index: 2; margin: var(--sp-section) auto 0; max-width: 940px; padding: 0 var(--gutter); text-align: center; }
.carry p { font-family: var(--display); font-weight: 600; font-size: clamp(1.6875rem, 3.2vw, 2.625rem); line-height: 1.14; letter-spacing: -0.03em; text-wrap: balance; }
.carry cite { display: block; margin-top: 14px; font-style: normal; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.case-end { margin-top: var(--sp-section); position: relative; z-index: 2; }
.case-end .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-gap); }
.next, .hire { border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); }
.hire { background: var(--card); }
.next { background: var(--next-bg, var(--card)); color: var(--next-fg, var(--ink)); text-decoration: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr); gap: 20px; align-items: stretch; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.next:hover { color: var(--next-fg, var(--ink)); transform: translateY(-4px) rotate(-0.6deg); }
.next .next-text { display: flex; flex-direction: column; }
.next .tile { display: grid; place-items: center; min-height: 150px; }
.next .tile .vmark { width: min(130px, 100%); transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.next:hover .tile .vmark { transform: rotate(-6deg) scale(1.05); }
.next small { display: block; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.next strong { display: block; margin-top: 8px; font-family: var(--display); font-weight: 600; font-size: var(--fs-card); line-height: 1.1; letter-spacing: -0.03em; }
.hire h2 { font-size: var(--fs-card); line-height: 1.1; }
.hire .actions { margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .sec-grid, .case-end .wrap { grid-template-columns: 1fr; gap: 16px; }
  .sec-grid > h2 { position: static; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .case-facts > div:nth-child(3) { border-left: 0; }
  .case-facts.three { grid-template-columns: 1fr; }
  .case-facts.three > div + div { border-left: 0; }
  .tradeoffs { grid-template-columns: 1fr; }
  .ledger dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger .item:nth-child(3) { padding-left: 0; border-left: 0; }
  .ledger .item:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  .head-inner { grid-template-columns: 1fr auto; }
  .pill-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-panel { --band: 96px; padding-top: calc(var(--fp) + var(--band) - 18px); }
  .foot-sep { gap: 10px; }
  .foot-shape { width: 32px; }
  .field-foot { width: 100%; --po: 0.18; }
  .foot-top { min-height: 0; }
  .foot-sep { margin-top: 26px; }
  .case-top { margin: 4px 8px 0; }
  .case-glyph { position: relative; top: auto; right: auto; width: 96px; margin: 0 var(--gutter) -8px auto; padding-top: 18px; }
  .case-hero { padding-top: 0; }
  .case-hero > *:not(.case-facts) { max-width: 100%; }
}
@media (max-width: 640px) {
  body {  }
  .who { gap: 2px 14px; }
  .who span + span { border-left: 0; margin-left: 0; padding-left: 0; }
  .results { grid-template-columns: 1fr; }
  .personas { grid-template-columns: 1fr; }
  .personas > li:nth-child(n) { margin-top: 0; }
  .ledger dl { grid-template-columns: 1fr; }
  .ledger .item, .ledger .item + .item { padding: 18px 0; border-left: 0; }
  .ledger .item + .item { border-top: 1px solid var(--rule); }
  .flow { flex-direction: column; align-items: flex-start; }
  .flow li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .flow li + li::before { width: 0; height: 10px; border-top: 0; border-left: 2px solid var(--ink); margin-left: 18px; }
  .case-facts { grid-template-columns: 1fr; }
  .case-facts > div + div { border-left: 0; }
  .next { grid-template-columns: 1fr; }
  .next .tile { min-height: 0; justify-items: start; }
  .next .tile .vmark { width: 80px; }
  .label-rule { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover, .shot a:hover, .next:hover { transform: none; } }

/* ---------- Patterns ----------
   Each pattern is a two-ink tile (two SVG masks painted in palette colors) on a solid ground. A .pat layer takes its three
   colors inline (--c0 ground, --c1 and --c2 inks) and its tile size from --k. Shapes are hard and symmetric, like the
   notebook covers: circles, domes, diamonds, 45-degree triangles, quarter discs and straight bands. Nothing fades. */
.pat { --k: 1; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; overflow: hidden; background: var(--c0); }
.pat::before, .pat::after { content: ""; position: absolute; inset: 0; -webkit-mask-size: var(--ts); mask-size: var(--ts); -webkit-mask-repeat: repeat; mask-repeat: repeat; }
.pat::before { background: var(--c1); -webkit-mask-image: var(--m1); mask-image: var(--m1); }
.pat::after { background: var(--c2); -webkit-mask-image: var(--m2); mask-image: var(--m2); }
.pat-dots { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' %3E%3Ccircle cx='9' cy='9' r='7.5'/%3E%3Ccircle cx='27' cy='27' r='7.5'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36' %3E%3Ccircle cx='27' cy='9' r='3.8'/%3E%3Ccircle cx='9' cy='27' r='3.8'/%3E%3C/svg%3E"); --ts: calc(36px * var(--k)) calc(36px * var(--k)); }
.pat-stripes { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' %3E%3Cpath d='M0 32 L32 0 M-8 8 L8 -8 M24 40 L40 24' stroke-width='10' stroke='black' fill='none'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' %3E%3Cpath d='M0 16 L16 0 M16 32 L32 16' stroke-width='4' stroke='black' fill='none'/%3E%3C/svg%3E"); --ts: calc(32px * var(--k)) calc(32px * var(--k)); }
.pat-quarter { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' %3E%3Cpath d='M0 0 H28 A28 28 0 0 1 0 28 Z'/%3E%3Cpath d='M56 56 H28 A28 28 0 0 1 56 28 Z'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' %3E%3Cpath d='M56 0 V28 A28 28 0 0 1 28 0 Z'/%3E%3Cpath d='M0 56 V28 A28 28 0 0 1 28 56 Z'/%3E%3C/svg%3E"); --ts: calc(56px * var(--k)) calc(56px * var(--k)); }
.pat-wave { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 28' %3E%3Cpath d='M0 7 Q12 -5 24 7 T48 7' stroke-width='6' stroke='black' fill='none'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 28' %3E%3Cpath d='M0 21 Q12 9 24 21 T48 21' stroke-width='6' stroke='black' fill='none'/%3E%3C/svg%3E"); --ts: calc(48px * var(--k)) calc(28px * var(--k)); }
.pat-pills { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 96' %3E%3Crect x='2' y='2' width='64' height='18' rx='9'/%3E%3Crect x='2' y='50' width='40' height='18' rx='9'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 96' %3E%3Crect x='2' y='26' width='52' height='18' rx='9'/%3E%3Crect x='2' y='74' width='28' height='18' rx='9'/%3E%3C/svg%3E"); --ts: calc(72px * var(--k)) calc(96px * var(--k)); }
.pat-checker { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' %3E%3Crect x='2' y='2' width='16' height='16' rx='3.5'/%3E%3Crect x='22' y='22' width='16' height='16' rx='3.5'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' %3E%3Crect x='22' y='2' width='16' height='16' rx='3.5'/%3E%3Crect x='2' y='22' width='16' height='16' rx='3.5'/%3E%3C/svg%3E"); --ts: calc(40px * var(--k)) calc(40px * var(--k)); }
.pat-rings { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' %3E%3Cg stroke-width='7' stroke='black' fill='none'%3E%3Ccircle cx='0' cy='0' r='13'/%3E%3Ccircle cx='0' cy='0' r='30'/%3E%3Ccircle cx='56' cy='56' r='13'/%3E%3Ccircle cx='56' cy='56' r='30'/%3E%3C/g%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56' %3E%3Cg stroke-width='7' stroke='black' fill='none'%3E%3Ccircle cx='56' cy='0' r='13'/%3E%3Ccircle cx='56' cy='0' r='30'/%3E%3Ccircle cx='0' cy='56' r='13'/%3E%3Ccircle cx='0' cy='56' r='30'/%3E%3C/g%3E%3C/svg%3E"); --ts: calc(56px * var(--k)) calc(56px * var(--k)); }
.pat-bars { --m1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,56 100,12 100,34 0,78'/%3E%3C/svg%3E"); --m2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,86 100,42 100,56 0,98'/%3E%3C/svg%3E"); --ts: 100% 100%; }
.pat-bars::before, .pat-bars::after { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
/* Shapes (the element's own box is the shape) */
.sh-circle { border-radius: 50%; }
.sh-dome-l { border-radius: 999px 0 0 999px; }
.sh-dome-t { border-radius: 999px 999px 0 0; }
.sh-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sh-tri-bl { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.sh-tri-br { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.sh-tri-tr { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.sh-q-br { border-radius: 100% 0 0 0; }
.sh-q-bl { border-radius: 0 100% 0 0; }
.sh-sheet { border-radius: var(--radius); }

/* Home page cover wall: each cover wears the pattern of its own glyph, tone on tone, full along the bottom and thinned out piece by piece toward the top; the name sits on a pill in the cover's own color */
.cover { position: relative; overflow: hidden; isolation: isolate; }
.cover > .vmark { position: relative; z-index: 1; }
.cover > span { position: relative; z-index: 1; background: var(--bg); color: var(--fg); padding: 2px 9px 3px; border-radius: 999px; }
.cover > .field-cover { inset: 0; width: 100%; height: 100%; --po: 0.28; }
.cv-1 { clip-path: polygon(100% 38%, 100% 100%, 22% 100%); }
.cv-2 { clip-path: ellipse(74% 40% at 50% 100%); }
.cv-3 { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); }
.cv-4 { clip-path: polygon(50% 48%, 100% 74%, 50% 100%, 0 74%); }
.cv-5 { clip-path: ellipse(86% 50% at 0 100%); }
.cv-6 { clip-path: polygon(0 38%, 0 100%, 78% 100%); }
.cv-7 { clip-path: polygon(0 58%, 100% 34%, 100% 100%, 0 100%); }
.cv-8 { clip-path: circle(60% at 100% 100%); }

/* Case study hero: the study's pattern laid out in full in the top-right corner, thinned out piece by piece toward the text */
.field { position: absolute; pointer-events: none; z-index: 0; color: inherit; opacity: var(--po, 0.18); overflow: hidden; }
.field .i2 { opacity: 0.62; }
.field-hero { top: 0; right: 0; width: 52%; height: auto; aspect-ratio: 680 / 430; --po: 0.22; }

/* Behind screenshots: a few loose shapes taken apart from the pattern, flat on the background, peeking out from behind the edge */
.frame { position: relative; display: block; }
.frame > a { position: relative; z-index: 1; }
.decon { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mo { position: absolute; background: var(--c); }
.mo-pill { width: 180px; height: 38px; border-radius: 19px; }
.mo-pillS { width: 124px; height: 38px; border-radius: 19px; }
.mo-pillXS { width: 70px; height: 38px; border-radius: 19px; }
.mo-dot { width: 68px; height: 68px; border-radius: 50%; }
.mo-dotS { width: 40px; height: 40px; border-radius: 50%; }
.mo-ring { width: 120px; height: 120px; border-radius: 50%; background: none; border: 18px solid var(--c); }
.mo-ringS { width: 80px; height: 80px; border-radius: 50%; background: none; border: 14px solid var(--c); }
.mo-quarter { width: 140px; height: 140px; border-radius: 100% 0 0 0; }
.mo-sq { width: 56px; height: 56px; border-radius: 12px; }
.mo-sqL { width: 84px; height: 84px; border-radius: 16px; }
.mo-bar { width: 270px; height: 36px; border-radius: 18px; rotate: -45deg; transform-origin: 0 100%; }
.mo-barS { width: 160px; height: 36px; border-radius: 18px; rotate: -45deg; transform-origin: 0 100%; }
/* bars pivot on the corner nearest the page edge, so they never swing out over the caption or the text above */
.d-b > .mo-bar, .d-b > .mo-barS, .d-c > .mo-bar, .d-c > .mo-barS, .d-hero > :nth-child(4).mo-bar, .d-hero > :nth-child(4).mo-barS { rotate: 45deg; transform-origin: 0 0; }
.mo-arch { width: 150px; height: 75px; border-radius: 999px 999px 0 0; }
.tone { --c: color-mix(in srgb, currentColor 17%, transparent); }
/* four arrangements, cycled down the page */
.d-a > :nth-child(1) { left: -70px; bottom: -48px; } .d-a > :nth-child(2) { left: 90px; bottom: -42px; } .d-a > :nth-child(3) { left: -92px; bottom: 56px; }
.d-b > :nth-child(1) { left: -80px; top: -24px; } .d-b > :nth-child(2) { left: 70px; top: -28px; } .d-b > :nth-child(3) { left: -100px; top: 64px; }
.d-c > :nth-child(1) { left: -104px; top: 16%; } .d-c > :nth-child(2) { left: -70px; top: 42%; } .d-c > :nth-child(3) { left: -108px; top: 66%; }
.d-d > :nth-child(1) { left: 12%; bottom: -46px; } .d-d > :nth-child(2) { left: 40%; bottom: -38px; } .d-d > :nth-child(3) { left: -80px; bottom: 22%; }
/* the hero's screenshot sits close to the left lane of the thread, so its shapes peek out less */
.d-hero > :nth-child(1) { left: -40px; bottom: -34px; } .d-hero > :nth-child(2) { left: 76px; bottom: -38px; } .d-hero > :nth-child(3) { left: -46px; bottom: 44px; } .d-hero > :nth-child(4) { left: -42px; top: -22px; }
.frame + figcaption { margin-top: var(--sp-stack); }
.frame.f-bot + figcaption { margin-top: 62px; }

/* A strip of shapes above the closing quote: the whole set, side by side */
.strip { display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 1.6vw, 18px); max-width: 940px; margin: var(--sp-section) auto 0; padding: 0 var(--gutter); position: relative; z-index: 2; }
.strip > .pat { position: relative; inset: auto; flex: none; --k: 0.9; }
.strip + .carry { margin-top: clamp(32px, 4vw, 52px); }
.st-1 { width: clamp(52px, 8vw, 96px); aspect-ratio: 1; border-radius: 50%; }
.st-2 { width: clamp(44px, 6.5vw, 76px); aspect-ratio: 1; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.st-3 { width: clamp(56px, 9vw, 108px); aspect-ratio: 1; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.st-4 { width: clamp(64px, 10vw, 124px); aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0; }
.st-5 { width: clamp(48px, 7vw, 84px); aspect-ratio: 1; border-radius: 100% 0 0 0; }
.st-6 { width: clamp(44px, 6.5vw, 76px); aspect-ratio: 1; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* Next-case and closing cards: the same thinned-out field, running in from the right and from the lower right */
.next { position: relative; overflow: hidden; isolation: isolate; }
.next > .next-text, .next > .tile { position: relative; z-index: 1; }
.next > .field-next { top: 0; right: 0; width: 74%; height: 100%; --po: 0.24; }
.hire { position: relative; overflow: hidden; isolation: isolate; }
.hire > h2, .hire > .actions { position: relative; z-index: 1; }
.hire > .field-hire { bottom: 0; right: 0; width: 70%; height: 100%; --po: 0.2; }
@media (max-width: 760px) {
  .hero-pat { --hw: 230px; top: -90px; right: -50px; }
  .field-hero { width: 90%; --po: 0.13; }
  .decon { display: none; }
  .frame + figcaption, .frame.f-bot + figcaption { margin-top: 12px; }
  .strip { gap: 6px; }
}

.btn.is-done { background: var(--mint); border-color: var(--mint); color: var(--on-color); }
