/* ============================================================
   RAVEN - the shared components of the homepage's world (see DESIGN.md)
   Loaded by home.dc.html and every case study after styles.css.
   Page-only layout stays in each page's own <style>.
   ============================================================ */
html { scroll-padding-top: 88px; background: var(--raven); }
/* no scroll-behavior: smooth on html: ScrollTrigger measures by jumping the page, and a smooth jump lands its triggers in the
   wrong place (the hero stuck faded after an early scroll). nav.js turns smooth scrolling on only for an in-page link's jump */
body { margin: 0; background: var(--raven); color: var(--ice-200); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--poppy); color: var(--on-poppy); }
:focus-visible { outline: 2px solid var(--ice-100); outline-offset: 3px; border-radius: var(--radius-md); }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.serif { font-family: var(--font-display); font-weight: 400; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ice-100); color: var(--raven); font-weight: 500; transition: top 0.2s var(--ease-out); }
.skip:focus { top: 16px; }
/* ---- glass (Apple style): frosted fill, lit top edge, offset shadow ---- */
.glass { background: var(--glass-light); border: 1px solid var(--glass-rim); box-shadow: var(--glass-edge), var(--glass-shadow); border-radius: var(--radius-glass); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: var(--glass-blur); }
.glass-dark { background: var(--glass-dark); border: 1px solid var(--glass-rim-dark); box-shadow: var(--glass-edge-dark), var(--glass-shadow); border-radius: var(--radius-glass); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: var(--glass-blur); }
/* clear glass: lets the field through, a raven tint keeps light text readable on ice */
.glass-clear { background: var(--glass-clear); border: 1px solid var(--glass-clear-rim); box-shadow: var(--glass-clear-edge), var(--glass-shadow); border-radius: var(--radius-glass); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); }
.link { color: var(--ice-100); border-bottom: 1px solid var(--ice-underline); padding-bottom: 2px; transition: border-color 0.3s ease; }
.link:hover { border-color: var(--poppy-300); }
.links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; font-size: var(--text-base); font-weight: 500; }
.links a { display: inline-flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--radius-control); font-size: var(--text-base); font-weight: 500; cursor: pointer; border: 0; font-family: var(--font-body); transition: transform 0.4s var(--ease-out), background-color 0.3s ease; }
.btn i { font-size: 17px; }
.btn-red { background: var(--poppy); color: var(--on-poppy); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 30px -16px rgba(208, 55, 42, 0.9); }
.btn-red:hover { background: var(--poppy-hover); transform: translateY(-2px); }
/* the header's edges line up with the page's 1280px column (.wrap) at every width */
.site-head { position: fixed; z-index: 40; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px max(clamp(20px, 4vw, 56px), calc((100% - 1280px) / 2)); pointer-events: none; }
.site-head > * { pointer-events: auto; }
.brand { font-size: var(--text-lg); color: var(--ice-100); text-shadow: var(--shadow-text); }
/* a small glass button on moving media, so anything that loops can be stopped (WCAG 2.2.2) */
.loop-toggle, .expand-toggle { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--glass-clear-rim); background: var(--glass-clear); color: var(--ice-100); font-size: var(--text-md); cursor: pointer; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
/* full screen sits in the top right corner of any recording (added by nav.js); the pause button keeps the bottom right */
.expand-toggle { top: 10px; bottom: auto; }
.loop-toggle:hover, .expand-toggle:hover { background: var(--glass-dark); }
/* the lettermark is set like a glyph: it takes the colour of the text beside it (currentColor), stands on that text's baseline and is sized in em, so it follows the type wherever it goes */
.lettermark { display: inline-block; height: var(--lettermark-size, 0.82em); aspect-ratio: 356 / 278.5; vertical-align: baseline; flex: none; font-style: normal; }
.lettermark::before { content: ""; display: block; height: 100%; background: currentColor; -webkit-mask: url(/brand/lettermark.svg?v=2) center / contain no-repeat; mask: url(/brand/lettermark.svg?v=2) center / contain no-repeat; }
@media (forced-colors: active) { .lettermark::before { forced-color-adjust: none; background: CanvasText; } }
/* in the header it leads the name as a lockup, with an x-height gap and the name's own shadow */
/* a tight shadow under the name's soft glow keeps the mark clear where the hero film's sky sits behind it (stacked screens) */
.brand .lettermark { margin-right: 0.42em; filter: drop-shadow(0 1px 2px rgba(7, 4, 3, 0.7)) drop-shadow(0 0 6px rgba(7, 4, 3, 0.35)) drop-shadow(var(--shadow-text)); }
/* a frosted band behind the header once the page scrolls, so text under the name and the mark never shows through */
.brand-bg { position: absolute; inset: 0 0 auto 0; height: 124px; background: linear-gradient(180deg, rgba(7, 4, 3, 0.9), rgba(7, 4, 3, 0.75) 55%, rgba(7, 4, 3, 0)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); opacity: var(--head-shade, 0); transition: opacity 0.4s ease; pointer-events: none; z-index: -1; }
/* liquid glass for things that float over content (the nav and the Menu button). No refraction: an SVG displacement
   behind the nav would be redrawn with every frame of the hero film. The 1px transparent border keeps the box the size
   the glass panes have, and the rim is drawn over it */
.liquid { position: relative; isolation: isolate; border: 1px solid transparent; background: var(--liquid-fill); box-shadow: var(--liquid-edge), var(--liquid-shadow); border-radius: var(--radius-bar); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: var(--liquid-blur); }
.liquid::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; background: var(--liquid-rim); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
.pill { display: flex; gap: 2px; padding: 6px; border-radius: var(--radius-bar); }
.pill a { font-size: var(--text-ui); color: var(--ice-100); padding: 9px 16px; border-radius: var(--radius-bar-item); white-space: nowrap; text-shadow: var(--liquid-text-shadow); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.pill a:hover { color: var(--ice-100); background: var(--liquid-hover); }
.pill a[aria-current="true"] { background: var(--liquid-lens); box-shadow: var(--liquid-lens-edge); color: var(--raven); text-shadow: none; }
/* the lens (nav.js, after KokonutUI's Smooth Tab): one lens springs between the items over the pill, and the labels are drawn
   again in the dark ink above it, clipped to it, so a label turns dark exactly where the lens covers it. Without JavaScript the
   item itself is lit. The lens sits over the pill, never inside it: the runtime owns the pill's children */
.site-head:has(> .pill-over) .pill a[aria-current="true"] { background: none; box-shadow: none; color: var(--ice-100); text-shadow: var(--liquid-text-shadow); }
.pill-over { position: absolute; z-index: 1; pointer-events: none; }
.pill-lens { position: absolute; top: 0; left: 0; border-radius: var(--radius-bar-item); background: var(--liquid-lens); box-shadow: var(--liquid-lens-edge); transition: opacity 0.3s ease; will-change: transform, width; }
.pill-ink { position: absolute; inset: 0; transition: opacity 0.3s ease; }
.pill-ink span { position: absolute; display: grid; place-items: center; font-size: var(--text-ui); white-space: nowrap; color: var(--raven); }
/* phones and tablets: the pill folds into a Menu button that opens a full-screen sheet (a native popover; nav.js closes it after a tap) */
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 18px; border-radius: var(--radius-bar); text-shadow: var(--liquid-text-shadow); font-family: var(--font-body); font-size: var(--text-ui); font-weight: 500; color: var(--ice-100); cursor: pointer; }
.menu-btn i { font-size: 18px; }
.menu-sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: var(--ice-100); background: var(--sheet-veil); -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%); }
.menu-sheet::backdrop { background: transparent; }
.menu-sheet:popover-open { display: flex; flex-direction: column; }
.menu-sheet .menu-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.menu-sheet .menu-btn { display: inline-flex; }
.menu-sheet nav { display: flex; flex-direction: column; margin-top: auto; padding: 0 16px max(40px, env(safe-area-inset-bottom)); }
.menu-sheet nav a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; border-bottom: 1px solid var(--raven-line); font-family: var(--font-display); font-size: clamp(34px, 9vw, 48px); line-height: 1.1; color: var(--ice-300); }
.menu-sheet nav a i { font-size: 22px; color: var(--ice-500); }
.menu-sheet nav a[aria-current="true"] { color: var(--ice-100); }
.menu-sheet nav a[aria-current="true"] i { color: var(--poppy-300); }
:root:has(.menu-sheet:popover-open) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .menu-sheet { opacity: 0; transition: opacity 0.35s var(--ease-out), overlay 0.35s allow-discrete, display 0.35s allow-discrete; }
  .menu-sheet:popover-open { opacity: 1; }
  .menu-sheet nav a { transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms + 60ms); }
  @starting-style {
    .menu-sheet:popover-open { opacity: 0; }
    .menu-sheet:popover-open nav a { opacity: 0; transform: translateY(16px); }
  }
}
.mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.mesh-fallback { background: radial-gradient(38% 52% at 40% 46%, color-mix(in oklab, var(--poppy) 70%, transparent), transparent 70%), radial-gradient(42% 60% at 86% 34%, var(--ice-300), transparent 72%), var(--raven); }
.ice-panel { margin: 0; position: relative; padding: clamp(64px, 9vw, 130px) clamp(56px, 9vw, 140px); color: var(--raven); background: radial-gradient(60% 90% at 100% 100%, rgba(208, 55, 42, 0.85), rgba(208, 55, 42, 0) 60%), radial-gradient(50% 80% at 82% 110%, rgba(52, 66, 80, 0.7), rgba(52, 66, 80, 0) 70%), radial-gradient(90% 120% at 0% 0%, var(--ice-50), rgba(226, 241, 251, 0) 70%), var(--ice-300); -webkit-mask-image: var(--mask-dissolve-panel); mask-image: var(--mask-dissolve-panel); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.ice-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.12; mix-blend-mode: multiply; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }
.ice-panel blockquote { position: relative; z-index: 1; margin: 0; max-width: 20ch; font-size: clamp(34px, 4.6vw, 68px); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
/* ---- pebbles: small natural stones that mark steps (homepage timeline, case stages); each data-p is its own stone ---- */
.pebble { display: block; width: var(--pw, 17px); height: var(--ph, 14px); border-radius: var(--pebble-shape, 50%); background: var(--pebble-fill); border: 1px solid var(--pebble-rim); box-shadow: var(--pebble-edge); transform: rotate(var(--pr, 0deg)) scale(var(--ps, 1)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform 0.5s var(--ease-out), background 0.4s ease, border-color 0.4s ease; }
.pebble.is-now { background: var(--pebble-active); border-color: var(--pebble-rim-active); }
.pebble[data-p="1"] { --pw: 20px; --ph: 13px; --pr: -6deg; --pebble-shape: var(--pebble-1); }
.pebble[data-p="2"] { --pw: 14px; --ph: 13px; --pr: 14deg; --pebble-shape: var(--pebble-2); }
.pebble[data-p="3"] { --pw: 19px; --ph: 14px; --pr: 4deg; --pebble-shape: var(--pebble-3); }
.pebble[data-p="4"] { --pw: 16px; --ph: 15px; --pr: -18deg; --pebble-shape: var(--pebble-4); }
.pebble[data-p="5"] { --pw: 18px; --ph: 12px; --pr: 24deg; --pebble-shape: var(--pebble-5); }
.pebble[data-p="6"] { --pw: 16px; --ph: 12px; --pr: -4deg; --pebble-shape: var(--pebble-6); }
.pebble[data-p="7"] { --pw: 17px; --ph: 14px; --pr: 9deg; --pebble-shape: var(--pebble-7); }
.pebble[data-p="8"] { --pw: 21px; --ph: 15px; --pr: -12deg; --pebble-shape: var(--pebble-8); }
@media (prefers-reduced-motion: reduce) { .pebble { transition: none; } }
.site-foot { padding: 28px 0 40px; border-top: 1px solid var(--raven-line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ice-500); }
.site-foot .foot-mark { display: inline-flex; align-items: baseline; gap: 0.5em; }

@media (max-width: 900px) {
  html { scroll-padding-top: 80px; }
  .site-head { padding: 12px 16px; }
  .site-head > .pill, .site-head > .pill-over { display: none; }
  .menu-btn { display: inline-flex; }
  .brand-bg { height: 108px; }
  .wrap { padding: 0 16px; }
  .ice-panel { padding: 64px 36px; }
}
@media (max-width: 430px) {
  .brand { font-size: 20px; }
}
/* the smallest phones keep only the mark beside the Menu button (the name is in the page's first lines) */
@media (max-width: 374px) {
  :is(.site-head, .menu-top) .brand > span { display: none; }
  .brand .lettermark { margin-right: 0; }
}
/* icons:start (written by icons/subset-icons.py; the unicode-range lets the full set win on pages that load both) */
@font-face { font-family: "Phosphor"; src: url("/icons/regular/Phosphor-site-592f3e31af.woff2") format("woff2"); font-weight: normal; font-style: normal; font-display: block; unicode-range: U+20,U+E042,U+E058,U+E06C,U+E092,U+E136,U+E1D0,U+E2F0,U+E300,U+E308,U+E398,U+E39E,U+E3D0,U+E3D4,U+E44A,U+E45A,U+E4F6; }
.ph {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: "Phosphor" !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Enable Ligatures ================ */
  letter-spacing: 0;
  -webkit-font-feature-settings: "liga";
  -moz-font-feature-settings: "liga=1";
  -moz-font-feature-settings: "liga";
  -ms-font-feature-settings: "liga" 1;
  font-feature-settings: "liga";
  -webkit-font-variant-ligatures: discretionary-ligatures;
  font-variant-ligatures: discretionary-ligatures;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ph.ph-arrow-down-right:before { content: "\e042"; }
.ph.ph-arrow-left:before { content: "\e058"; }
.ph.ph-arrow-right:before { content: "\e06c"; }
.ph.ph-arrow-up-right:before { content: "\e092"; }
.ph.ph-caret-down:before { content: "\e136"; }
.ph.ph-corners-out:before { content: "\e1d0"; }
.ph.ph-list:before { content: "\e2f0"; }
.ph.ph-lock-key-open:before { content: "\e300"; }
.ph.ph-lock-simple:before { content: "\e308"; }
.ph.ph-paper-plane-tilt:before { content: "\e398"; }
.ph.ph-pause:before { content: "\e39e"; }
.ph.ph-play:before { content: "\e3d0"; }
.ph.ph-plus:before { content: "\e3d4"; }
.ph.ph-speaker-high:before { content: "\e44a"; }
.ph.ph-speaker-slash:before { content: "\e45a"; }
.ph.ph-x:before { content: "\e4f6"; }
/* icons:end */

/* rolling labels (after KokonutUI's Slide Text Button): on hover the label rolls up and an identical copy rolls in from below,
   on the same quick in-out curve; the copy is aria-hidden. Still under reduced motion */
.roll { display: inline-grid; overflow: hidden; vertical-align: top; line-height: inherit; }
.roll > span { grid-area: 1 / 1; transition: transform 0.32s cubic-bezier(0.77, 0, 0.175, 1); }
.roll > span + span { transform: translateY(105%); }
:is(a, button):is(:hover, :focus-visible) .roll > span:first-child { transform: translateY(-105%); }
:is(a, button):is(:hover, :focus-visible) .roll > span + span { transform: none; }
button:disabled .roll > span { transform: none !important; }
button:disabled .roll > span + span { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .roll > span { transition: none; } .roll > span + span { display: none; } :is(a, button):is(:hover, :focus-visible) .roll > span:first-child { transform: none; } }
