/* =========================================================================
   BRIELGIO — main stylesheet
   -------------------------------------------------------------------------
   Quick edits:
   • Brand colours ........ :root block just below (--blue, --pink, etc.)
   • Dark theme colours ... the two "dark" blocks right after :root
                            (⚠ they appear TWICE on purpose: one follows the
                            device setting, one follows the toggle. Change both.)
   • Fonts ................ @font-face rules + --font-display / --font-body

   Map of this file (search for the capitalised names):
     FONTS · TOKENS · PAGE TRANSITIONS · BASE · BUTTONS · HEADER · MOBILE MENU
     HERO · SECTIONS · MANIFESTO · SERVICES · HOW WE WORK · BLOG CARDS · CONTACT
     FOOTER · SOCIAL LINKS · INNER PAGES · CAREERS · LEGAL PAGES · COOKIE BANNER
     MOTION SAFETY NET · PRINT

   ⚠ Class names used by JavaScript (renaming them here breaks the feature):
     main.js  → .is-solid .is-theme-switch .is-js-lit .is-lit .is-invalid
                .field__error .is-ok .is-error .has-icon .social__icon
                .wordmark span (reads --w --g --s)  .manifesto__text .w (reads --p)
     consent.js → .cookie-banner .cookie-dialog .cookie-opt .switch .cookie-btn
     hero-gl.js → reads --hero-c0 … --hero-c4 colours from :root
   No frameworks, no build step. Plain CSS using 2026 browser features,
   each with a fallback for older browsers.
   ========================================================================= */

/* ---------- FONTS (self-hosted, SIL Open Font Licence, free for commercial use) */
@font-face {
  font-family: "Anybody Variable";
  src: url("../fonts/anybody-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anybody Variable";
  src: url("../fonts/anybody-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans Variable";
  src: url("../fonts/open-sans-latin-wdth-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans Variable";
  src: url("../fonts/open-sans-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans Variable";
  src: url("../fonts/open-sans-latin-wdth-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- TOKENS: colours, type, spacing (light theme is the default) */
:root {
  color-scheme: light;

  /* Brand palette */
  --blue: #2e22e5;        /* Brielgio blue: the dominant colour */
  --midnight: #0e0b36;    /* deep ink */
  --porcelain: #f4f2fc;   /* cool paper white */
  --pink: #ff5cc6;        /* shocking pink: sparks and highlights */
  --periwinkle: #7d74ff;  /* soft blue used in graphics */

  /* Theme roles */
  --bg: var(--porcelain);
  --surface: #ffffff;
  --text: var(--midnight);
  --muted: #4b477a;
  --line: #d9d5f3;
  --accent: var(--blue);
  --on-accent: #ffffff;
  --band: var(--blue);          /* "How we work" section */
  --on-band: var(--porcelain);
  --on-band-muted: #d3d0ff;
  --deep: var(--midnight);      /* contact section */
  --on-deep: var(--porcelain);
  --on-deep-muted: #b9b4e6;
  --focus: var(--blue);
  --logo-ink: var(--bg);

  /* Hero shader colours (read by hero-gl.js) */
  --hero-c0: #0b0830;
  --hero-c1: #2e22e5;
  --hero-c2: #7d74ff;
  --hero-c3: #ff5cc6;
  --hero-c4: #f4f2fc;

  /* Type */
  --font-display: "Anybody Variable", "Anybody", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans Variable", "Open Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 5.4rem);
  --step-5: clamp(3.1rem, 1.6rem + 7.4vw, 8.75rem);

  /* Space & layout */
  --gutter: clamp(16px, 4.5vw, 56px);
  --maxw: 1440px;
  --header-h: 72px;
  --section-y: clamp(88px, 12vw, 176px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  interpolate-size: allow-keywords; /* lets <details> animate to height:auto */
}
/* Very small phones (under 360px, e.g. iPhone SE 1st gen): slightly smaller
   headings so single long words like "Services" never run off the screen. */
@media (max-width: 359px) {
  :root { --step-4: 2.2rem; --step-5: 2.6rem; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0a2e;
    --surface: #151244;
    --text: #eeebfc;
    --muted: #aca7dc;
    --line: #2b2669;
    --accent: #8f87ff;
    --on-accent: #0c0a2e;
    --band: #2e22e5;
    --on-band: #f4f2fc;
    --on-band-muted: #d3d0ff;
    --deep: #16124a;
    --on-deep: #f4f2fc;
    --on-deep-muted: #b9b4e6;
    --focus: #ff5cc6;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0a2e;
  --surface: #151244;
  --text: #eeebfc;
  --muted: #aca7dc;
  --line: #2b2669;
  --accent: #8f87ff;
  --on-accent: #0c0a2e;
  --band: #2e22e5;
  --on-band: #f4f2fc;
  --on-band-muted: #d3d0ff;
  --deep: #16124a;
  --on-deep: #f4f2fc;
  --on-deep-muted: #b9b4e6;
  --focus: #ff5cc6;
}

/* ---------- PAGE TRANSITIONS between pages (cross-document View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-leave 0.32s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-enter 0.55s var(--ease-out) both; }
::view-transition-group(*) { animation-duration: 0.6s; animation-timing-function: var(--ease-out); }
@keyframes vt-leave { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-enter { from { opacity: 0; transform: translateY(22px); } }
/* Theme switch uses its own circular reveal (see main.js) */
html.is-theme-switch::view-transition-old(root),
html.is-theme-switch::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Blog cover images morph from card to article */
.cover--ai-search { view-transition-name: cover-ai-search; }
.cover--website-speed { view-transition-name: cover-website-speed; }
.cover--90-day-plan { view-transition-name: cover-90-day-plan; }

/* ---------- BASE */
*, *::before, *::after { box-sizing: border-box; }
/* Anything with the hidden attribute stays hidden, even if a class sets display (used by consent.js and main.js). */
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 780;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--pink); color: var(--midnight); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--pink);
  color: var(--midnight);
  font-weight: 700;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- BUTTONS */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-border: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.7em 1.5em;
  border: 2px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 650;
  font-stretch: 94%;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--small { min-height: 42px; padding: 0.45em 1.15em; font-size: var(--step--1); }
.btn--light { --btn-bg: var(--porcelain); --btn-fg: var(--midnight); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--porcelain);
  --btn-border: color-mix(in oklab, var(--porcelain) 50%, transparent);
}
.btn--ghost:hover { --btn-border: var(--porcelain); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--text); --btn-border: var(--line); }
.btn--outline:hover { --btn-border: var(--text); }
.btn--pink { --btn-bg: var(--pink); --btn-fg: var(--midnight); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid color-mix(in oklab, currentColor 30%, transparent);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.4s var(--ease-out);
}
.icon-btn:hover { border-color: currentColor; }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- HEADER
   ⚠ .is-solid is toggled by main.js (section 3). --header-h is also written as -72px in main.js. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--porcelain);
  --logo-ink: var(--blue);
  transition: background-color 0.4s, color 0.4s, box-shadow 0.4s;
}
.site-header.is-solid {
  color: var(--text);
  --logo-ink: var(--bg);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 0 var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.logo__mark { width: 36px; height: 36px; flex: none; }
.logo__bg { fill: currentColor; transition: fill 0.4s; }
.logo__ink { fill: var(--logo-ink); transition: fill 0.4s; }
.logo__ring { fill: none; stroke: var(--logo-ink); stroke-width: 9; transition: stroke 0.4s; }
.logo__spark { fill: var(--pink); }
.logo__word {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 820;
  font-stretch: 128%;
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo:hover .logo__spark { animation: spark-pop 0.6s var(--ease-out); transform-box: fill-box; transform-origin: center; }
@keyframes spark-pop { 40% { transform: scale(1.6); } }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  position: relative;
  padding: 10px 14px;
  font-weight: 600;
  font-stretch: 92%;
  text-decoration: none;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.site-header__actions { display: flex; align-items: center; gap: 10px; }
.site-header:not(.is-solid) .btn--header { --btn-bg: var(--porcelain); --btn-fg: var(--midnight); }
.menu-btn { display: none; }

.theme-icon { transition: transform 0.6s var(--ease-out); }
[data-state="dark"] .theme-icon { transform: rotate(180deg); }

@media (max-width: 1100px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 520px) {
  .btn--header { display: none; }
}

/* ---------- MOBILE MENU (native Popover API) */
.menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px);
  background: var(--blue);
  color: var(--porcelain);
  --focus: var(--pink);
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
  opacity: 1;
  clip-path: circle(150% at calc(100% - 40px) 40px);
  transition: opacity 0.35s, clip-path 0.7s var(--ease-out), overlay 0.7s allow-discrete, display 0.7s allow-discrete;
}
.menu:popover-open { display: flex; }
@starting-style {
  .menu:popover-open { opacity: 0.6; clip-path: circle(0 at calc(100% - 40px) 40px); }
}
.menu:not(:popover-open) { opacity: 0; clip-path: circle(0 at calc(100% - 40px) 40px); }
.menu::backdrop { background: transparent; }
.menu__top { display: flex; align-items: center; justify-content: space-between; min-height: 58px; }
.menu__nav { display: grid; gap: 4px; margin-top: 4vh; }
.menu__nav a {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 13vw, 5rem);
  font-weight: 800;
  font-stretch: 120%;
  line-height: 1.05;
  text-decoration: none;
  transition: font-stretch 0.5s var(--ease-out), color 0.3s;
}
.menu__nav a:hover, .menu__nav a:focus-visible { font-stretch: 150%; color: var(--pink); }
.menu .btn { align-self: flex-start; margin-top: auto; }

/* ---------- HERO
   ⚠ .wordmark letters are sized by main.js (fitText). The -0.2225em values come from the Anybody
   font's descender: they sit the letters' baseline exactly on the hero's bottom edge. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* ⚠ keeps the column at screen width; with plain "auto" the unfitted wordmark widens the hero on phones */
  grid-template-rows: 1fr auto;
  min-height: max(640px, 100svh);
  overflow: hidden;
  color: var(--porcelain);
  --focus: var(--pink);
  background:
    radial-gradient(60% 55% at 78% 28%, rgb(255 92 198 / 0.75), transparent 70%),
    radial-gradient(70% 70% at 30% 70%, #2e22e5, transparent 75%),
    radial-gradient(50% 40% at 90% 90%, #7d74ff, transparent 70%),
    #0b0830;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero__canvas.is-ready { opacity: 1; }
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgb(11 8 48 / 0.62) 0%, rgb(11 8 48 / 0.28) 45%, transparent 70%),
    linear-gradient(180deg, rgb(11 8 48 / 0.35) 0%, transparent 25%);
}
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__content {
  align-self: center;
  display: grid;
  justify-items: start;
  gap: clamp(20px, 2.6vw, 32px);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(32px, 7vh, 88px));
  padding-bottom: clamp(32px, 6vh, 72px);
}
.hero__title {
  max-width: 13.5ch;
  font-size: var(--step-4);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 30px rgb(11 8 48 / 0.35);
}
.hero__lede {
  max-width: 50ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: color-mix(in oklab, var(--porcelain) 90%, transparent);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The wordmark: letters are painted in the page colour, so they rise out of
   the section below. Their width/weight axes react to the pointer (main.js). */
.wordmark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0 0 -0.2225em;           /* sits the baseline exactly on the hero's edge */
  padding-inline: calc(var(--gutter) * 0.5);
  font-family: var(--font-display);
  font-size: 17.5vw;               /* refined by main.js to fill the width */
  line-height: 1;
  white-space: nowrap;
  color: var(--bg);
  user-select: none;
  pointer-events: none;
  transition: color 0.4s;
}
.wordmark span {
  display: inline-block;
  font-variation-settings: "wdth" var(--w, 150), "wght" var(--g, 800);
  transform: scaleY(var(--s, 1));
  transform-origin: 50% calc(100% - 0.2225em);
}

/* One orchestrated entrance: letters rise out of the page, then the copy. */
@media (prefers-reduced-motion: no-preference) {
  .wordmark span { animation: wm-rise 1.5s var(--ease-out) backwards; }
  .wordmark span:nth-child(1) { animation-delay: 0.08s; }
  .wordmark span:nth-child(2) { animation-delay: 0.14s; }
  .wordmark span:nth-child(3) { animation-delay: 0.20s; }
  .wordmark span:nth-child(4) { animation-delay: 0.26s; }
  .wordmark span:nth-child(5) { animation-delay: 0.32s; }
  .wordmark span:nth-child(6) { animation-delay: 0.38s; }
  .wordmark span:nth-child(7) { animation-delay: 0.44s; }
  .wordmark span:nth-child(8) { animation-delay: 0.50s; }
  .hero__content > * { animation: copy-in 1.1s var(--ease-out) backwards; }
  .hero__content > :nth-child(1) { animation-delay: 0.55s; }
  .hero__content > :nth-child(2) { animation-delay: 0.7s; }
  .hero__content > :nth-child(3) { animation-delay: 0.85s; }
}
@keyframes wm-rise {
  from { font-variation-settings: "wdth" 50, "wght" 200; transform: translateY(95%) scaleY(1.6); }
}
@keyframes copy-in {
  from { opacity: 0; transform: translateY(24px); }
}

/* ---------- SECTIONS (shared) */
.section { padding-block: var(--section-y); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 64px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-title {
  font-size: var(--step-5);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.section-intro {
  max-width: 34ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}
.section-aside { display: grid; gap: 20px; justify-items: start; }
.process .section-head { margin-bottom: 0; }

/* Headings stretch along the width axis as they scroll into view */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-title {
      animation: title-stretch linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}
@keyframes title-stretch {
  from { font-stretch: 55%; font-weight: 300; }
  to { font-stretch: 125%; font-weight: 800; }
}

/* ---------- MANIFESTO (words light up as you scroll) */
.manifesto { padding-block: clamp(120px, 17vw, 240px) 0; }
.manifesto__text {
  max-width: 27ch;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 640;
  font-stretch: 100%;
  line-height: 1.14;
  letter-spacing: -0.01em;
}
.manifesto__text .w { transition: color 0.35s; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .manifesto__text { view-timeline: --manifesto block; }
    .manifesto__text .w {
      animation: word-lit linear both;
      animation-timeline: --manifesto;
      animation-range: cover calc(18% + var(--p, 0) * 42%) cover calc(24% + var(--p, 0) * 42%);
    }
  }
}
.manifesto__text.is-js-lit .w { color: color-mix(in oklab, var(--text) 20%, var(--bg)); }
.manifesto__text.is-js-lit .w.is-lit { color: var(--text); }
@keyframes word-lit {
  from { color: color-mix(in oklab, var(--text) 20%, var(--bg)); }
  to { color: var(--text); }
}
.manifesto__sign {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: clamp(32px, 4vw, 56px);
  color: var(--muted);
  font-weight: 600;
  font-stretch: 92%;
}
.manifesto__sign a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------- SERVICES */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc__summary {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 76px minmax(0, 1.6fr) minmax(0, 1fr) 48px;
  grid-template-areas: "glyph name line toggle";
  align-items: center;
  gap: 16px 32px;
  padding-block: clamp(22px, 2.6vw, 34px);
  list-style: none;
  cursor: pointer;
  transition: color 0.35s;
}
.svc__summary::-webkit-details-marker { display: none; }
.svc__summary::before {
  content: "";
  position: absolute;
  inset: -1px calc(var(--gutter) * -1);
  z-index: -1;
  background: var(--accent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s var(--ease-out);
}
@media (hover: hover) {
  .svc__summary:hover { color: var(--on-accent); }
  .svc__summary:hover::before { clip-path: inset(0 0 0 0); }
  .svc__summary:hover .svc__line { color: color-mix(in oklab, var(--on-accent) 82%, transparent); }
}
.svc__glyph { grid-area: glyph; width: 64px; height: 64px; }
.svc__glyph svg { width: 100%; height: 100%; overflow: visible; }
.svc__name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.75rem);
  font-weight: 760;
  font-stretch: 104%;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: font-stretch 0.6s var(--ease-out);
}
.svc[open] .svc__name { font-stretch: 112%; color: var(--accent); }
.svc__line { grid-area: line; max-width: 42ch; color: var(--muted); transition: color 0.35s; }
.svc__toggle {
  grid-area: toggle;
  position: relative;
  width: 48px;
  height: 48px;
  border: 1.5px solid color-mix(in oklab, currentColor 35%, transparent);
  border-radius: 50%;
  transition: transform 0.6s var(--ease-out), background-color 0.3s, border-color 0.3s;
}
.svc__toggle::before,
.svc__toggle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 2px;
  margin: -1px 0 0 -8px;
  background: currentColor;
}
.svc__toggle::after { transform: rotate(90deg); }
.svc[open] .svc__toggle { transform: rotate(135deg); background: var(--pink); border-color: var(--pink); color: var(--midnight); }

.svc::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.6s var(--ease-out), content-visibility 0.6s allow-discrete;
}
.svc[open]::details-content { block-size: auto; }
.svc__body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px 32px;
  padding: 8px calc(48px + 32px) clamp(36px, 4vw, 56px) calc(76px + 32px);
}
.svc__desc { display: grid; gap: 20px; align-content: start; max-width: 52ch; font-size: var(--step-1); line-height: 1.55; }
.svc__desc .btn { justify-self: start; }
.svc__h { font-family: var(--font-body); font-size: var(--step-0); font-weight: 700; font-stretch: 100%; letter-spacing: 0; margin-bottom: 12px; }
.svc__fit { color: var(--muted); font-size: var(--step-0); }
.tick-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.tick-list li { position: relative; padding-left: 26px; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 11px; height: 11px;
  background: var(--pink);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* Service glyph animations: play on hover and while open */
.g-pink { fill: var(--pink); }
.g-dark { fill: var(--midnight); }
.g-stroke { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.g-thick { stroke-width: 5; }
.g-fill { fill: currentColor; }
.g-soft { opacity: 0.45; }
.svc__glyph * { transform-box: fill-box; transition: transform 0.7s var(--ease-out), opacity 0.4s; }
.g-brand-sq { transform-origin: center; }
.g-web-bar { transform-origin: left center; transform: scaleX(0.55); }
.g-ads-b1, .g-ads-b2, .g-ads-b3 { transform-origin: center bottom; }
.g-ads-b1 { transform: scaleY(0.6); }
.g-ads-b2 { transform: scaleY(0.75); }
.g-ads-b3 { transform: scaleY(0.55); }
.g-cnt-1, .g-cnt-2, .g-cnt-3 { transform-origin: center bottom; }
.g-seo-spark { transform-origin: center; transform: scale(0.8); }
.g-auto-path { stroke-dasharray: 5 5; }
.g-auto-node { transform-origin: center; }

@media (hover: hover) {
  .svc__summary:hover .g-brand-sq { transform: rotate(45deg) scale(0.92); }
  .svc__summary:hover .g-brand-ci { transform: translateX(5px); }
  .svc__summary:hover .g-web-bar { transform: scaleX(1.25); }
  .svc__summary:hover .g-ads-b1,
  .svc__summary:hover .g-ads-b2,
  .svc__summary:hover .g-ads-b3 { transform: scaleY(1); }
  .svc__summary:hover .g-cnt-1 { transform: rotate(-14deg) translateX(-4px); }
  .svc__summary:hover .g-cnt-3 { transform: rotate(12deg) translateX(4px); }
  .svc__summary:hover .g-seo-spark { transform: scale(1.15) rotate(90deg); }
  .svc__summary:hover .g-auto-path { animation: dash-march 0.8s linear infinite; }
  .svc__summary:hover .g-auto-node { transform: scale(1.3); }
}
.svc[open] .g-brand-sq { transform: rotate(45deg) scale(0.92); }
.svc[open] .g-brand-ci { transform: translateX(5px); }
.svc[open] .g-web-bar { transform: scaleX(1.25); }
.svc[open] .g-ads-b1, .svc[open] .g-ads-b2, .svc[open] .g-ads-b3 { transform: scaleY(1); }
.svc[open] .g-cnt-1 { transform: rotate(-14deg) translateX(-4px); }
.svc[open] .g-cnt-3 { transform: rotate(12deg) translateX(4px); }
.svc[open] .g-seo-spark { transform: scale(1.15) rotate(90deg); }
.svc[open] .g-auto-path { animation: dash-march 0.8s linear infinite; }
.svc[open] .g-auto-node { transform: scale(1.3); }
@keyframes dash-march { to { stroke-dashoffset: -20; } }

@media (max-width: 860px) {
  .svc__summary {
    grid-template-columns: 52px minmax(0, 1fr) 44px;
    grid-template-areas: "glyph name toggle" ". line line";
    gap: 10px 16px;
  }
  .svc__glyph { width: 48px; height: 48px; }
  .svc__toggle { width: 44px; height: 44px; }
  .svc__line { font-size: var(--step--1); }
  .svc__body { grid-template-columns: 1fr; padding: 4px 0 36px calc(52px + 16px); }
}
@media (max-width: 520px) {
  .svc__body { padding-left: 0; }
}

/* ---------- HOW WE WORK (horizontal scroll-driven track on large screens)
   The section height (290vh) sets how long the sideways scroll lasts. More steps? Raise it a little. */
.process {
  position: relative;
  background: var(--band);
  color: var(--on-band);
  --focus: var(--pink);
  --accent: var(--porcelain);
  --on-accent: var(--midnight);
}
.process__sticky {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 72px);
  padding-block: var(--section-y);
}
.process .section-intro { color: var(--on-band-muted); }
.process__track {
  list-style: none;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 40px 28px;
}
.step {
  display: grid;
  align-content: start;
  gap: 16px;
  padding-top: 22px;
  border-top: 2px solid color-mix(in oklab, var(--on-band) 35%, transparent);
}
.step__num {
  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 9.5rem);
  font-weight: 800;
  font-stretch: 135%;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px var(--on-band);
  paint-order: stroke;
}
.step__title { font-size: var(--step-3); font-stretch: 118%; }
.step__text { max-width: 36ch; color: var(--on-band-muted); font-size: var(--step-1); line-height: 1.5; }
.step__out {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 6px;
  font-weight: 600;
}
.step__out span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--midnight);
  font-size: var(--step--1);
  font-weight: 700;
  font-stretch: 90%;
}
.process__bar { display: none; }

@supports (animation-timeline: view()) {
  @media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
    .process { height: 290vh; view-timeline: --process block; }
    .process__sticky {
      position: sticky;
      top: 0;
      height: 100vh;
      height: 100svh;
      overflow: hidden;
      align-content: center;
      padding-block: calc(var(--header-h) + 24px) 48px;
    }
    .process__track {
      display: flex;
      width: max-content;
      max-width: none;
      margin: 0;
      gap: 5vw;
      padding-inline: var(--gutter) calc(var(--gutter) + 4vw);
      animation: track-slide linear both;
      animation-timeline: --process;
      animation-range: contain 4% contain 96%;
    }
    .step { width: min(36vw, 540px); }
    .step:nth-child(even) { margin-top: 8vh; }
    .process__bar {
      display: block;
      margin-inline: var(--gutter);
      height: 3px;
      background: color-mix(in oklab, var(--on-band) 25%, transparent);
    }
    .process__bar span {
      display: block;
      height: 100%;
      background: var(--pink);
      transform-origin: left;
      animation: bar-grow linear both;
      animation-timeline: --process;
      animation-range: contain 4% contain 96%;
    }
  }
}
@keyframes track-slide { to { transform: translateX(calc(-100% + 100vw)); } }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- BLOG CARDS (home + blog index) */
.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px) clamp(24px, 3.5vw, 48px);
  align-items: start;
}
.post-grid--index { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.post-card--featured { grid-row: span 2; }
.post-card__link {
  display: grid;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}
.post-card__media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  background: var(--surface);
}
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.post-card__link:hover .post-card__media img { transform: scale(1.045); }
.post-card__body { display: grid; gap: 10px; }
.post-card__meta { color: var(--muted); font-size: var(--step--1); font-weight: 600; font-stretch: 90%; }
.post-card__title {
  font-size: var(--step-2);
  font-stretch: 104%;
  line-height: 1.08;
  transition: color 0.25s;
}
.post-card--featured .post-card__title { font-size: var(--step-3); }
.post-card__link:hover .post-card__title { color: var(--accent); }
.post-card__excerpt { max-width: 56ch; color: var(--muted); }
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-card--featured { grid-row: auto; }
}

/* ---------- CONTACT (also used by the careers application band) */
.contact {
  background: var(--deep);
  color: var(--on-deep);
  --focus: var(--pink);
  padding-block: var(--section-y);
}
.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px clamp(40px, 7vw, 120px);
  align-items: start;
}
.contact__title {
  font-size: var(--step-4);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.contact__intro { display: grid; gap: 28px; align-content: start; }
.contact__intro > p { max-width: 44ch; font-size: var(--step-1); line-height: 1.5; color: var(--on-deep-muted); }
.contact__details { display: grid; gap: 18px; }
.contact__details dt { color: var(--on-deep-muted); font-size: var(--step--1); font-weight: 600; }
.contact__details dd { font-size: var(--step-1); font-weight: 600; }
.contact__details a { text-decoration-color: var(--pink); text-underline-offset: 5px; text-decoration-thickness: 2px; }
@media (max-width: 900px) { .contact__inner { grid-template-columns: 1fr; } }

.form { display: grid; gap: 30px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 24px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.form legend { padding: 0; }
.field label, .form legend {
  color: var(--on-deep-muted);
  font-size: var(--step--1);
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 2px solid color-mix(in oklab, var(--on-deep) 28%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--on-deep);
  font: inherit;
  font-size: var(--step-1);
  transition: border-color 0.25s;
}
.field textarea { min-height: 3lh; resize: vertical; field-sizing: content; max-height: 14lh; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklab, var(--on-deep) 40%, transparent); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pink); }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--pink); box-shadow: 0 2px 0 var(--pink); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff8a8a; }
.field__error { color: #ffb3b3; font-size: var(--step--1); font-weight: 600; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1.5px solid color-mix(in oklab, var(--on-deep) 32%, transparent);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--ease-out);
}
.chip:hover span { border-color: var(--on-deep); }
.chip input:checked + span { background: var(--pink); border-color: var(--pink); color: var(--midnight); }
.chip input:checked + span::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--midnight); }
.chip input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 3px; }
.form__hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__note { color: var(--on-deep-muted); font-size: var(--step--1); max-width: 40ch; }
.form__status { min-height: 1.5em; font-weight: 600; }
.form__status.is-ok { color: #9ff0c6; }
.form__status.is-error { color: #ffb3b3; }
.form button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- FOOTER */
.site-footer { padding-top: clamp(64px, 9vw, 120px); overflow: hidden; }
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px 64px;
}
.footer__lead { display: grid; gap: 10px; }
.footer__lead p { color: var(--muted); font-weight: 600; }
.footer__email {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 0.9rem + 3.2vw, 3.25rem);
  font-weight: 760;
  font-stretch: 110%;
  line-height: 1;
  text-decoration: none;
  background: linear-gradient(var(--pink), var(--pink)) 0 100% / 0 3px no-repeat;
  transition: background-size 0.6s var(--ease-out);
  padding-bottom: 6px;
  overflow-wrap: anywhere;
}
.footer__email:hover { background-size: 100% 3px; }
.footer__lead .socials { margin-top: 18px; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 32px clamp(40px, 6vw, 88px); }
.footer__col { display: grid; gap: 4px; align-content: start; }
.footer__h { margin-bottom: 6px; color: var(--muted); font-size: var(--step--1); font-weight: 700; }
.footer__col a,
.footer__linkbtn {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.footer__col a:hover, .footer__linkbtn:hover { color: var(--accent); }
.footer__legal { max-width: 80ch; }
.footer__mark {
  margin-top: clamp(48px, 7vw, 96px);
  padding-inline: calc(var(--gutter) * 0.5);
  font-family: var(--font-display);
  font-size: 17vw;
  font-variation-settings: "wdth" 150, "wght" 850;
  line-height: 1.04;
  text-align: center;
  white-space: nowrap;
  color: var(--accent);
  user-select: none;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .footer__mark {
      animation: mark-stretch linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}
@keyframes mark-stretch {
  from { font-variation-settings: "wdth" 50, "wght" 250; color: var(--pink); }
  to { font-variation-settings: "wdth" 150, "wght" 850; color: var(--accent); }
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}
.footer__bottom a { text-underline-offset: 3px; }
.footer__bottom p { max-width: 100%; }

/* Placeholder text you still need to fill in (company number, address…). Remove the class once done. */
.todo { background: color-mix(in oklab, var(--pink) 22%, transparent); border-radius: 3px; padding: 0 3px; }

/* ---------- INNER PAGES (blog, careers, legal, 404) */
.page-top { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(48px, 8vw, 112px)); }
.page-title {
  font-size: var(--step-5);
  font-weight: 800;
  font-stretch: 130%;
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.page-lede { max-width: 46ch; margin-top: 24px; font-size: var(--step-1); color: var(--muted); }
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--step--1);
  text-decoration: none;
}
.crumb:hover { color: var(--accent); }
.crumb svg { width: 16px; height: 16px; }

.post-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 5vw, 80px);
  align-items: end;
}
.post-hero__title {
  font-size: clamp(2.1rem, 1.2rem + 3.3vw, 4.4rem);
  overflow-wrap: break-word;
  hyphens: auto;
  font-weight: 800;
  font-stretch: 108%;
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.post-hero__meta { margin-top: 24px; color: var(--muted); font-weight: 600; font-stretch: 92%; }
.post-hero__media { aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden; background: var(--surface); }
.post-hero__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .post-hero { grid-template-columns: 1fr; } }

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  padding-block: clamp(48px, 7vw, 96px) var(--section-y);
}
.prose { max-width: 68ch; font-size: 1.125rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose > .lead { font-size: var(--step-1); line-height: 1.6; color: var(--text); }
.prose h2 {
  margin-top: 2.2em;
  font-size: var(--step-2);
  font-stretch: 110%;
  line-height: 1.1;
}
.prose h2 + * { margin-top: 0.7em; }
.prose h3 { margin-top: 1.8em; font-size: var(--step-1); font-stretch: 105%; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose code {
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.prose blockquote {
  padding-left: 1.1em;
  border-left: 4px solid var(--pink);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.4;
}

.post-cta {
  display: grid;
  gap: 18px;
  justify-items: start;
  width: 100%;
  max-width: 68ch;
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(28px, 4vw, 44px);
  background: var(--band);
  color: var(--on-band);
  --focus: var(--pink);
}
.post-cta h2 { font-size: var(--step-2); font-stretch: 112%; }
.post-cta p { color: var(--on-band-muted); max-width: 48ch; }

.more-posts { padding-bottom: var(--section-y); }
.more-posts__title { font-size: var(--step-3); font-stretch: 118%; margin-bottom: 36px; }

.read-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .read-progress {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    height: 3px;
    background: var(--pink);
    transform-origin: left;
    animation: bar-grow linear both;
    animation-timeline: scroll(root);
  }
}

.simple-page { padding-bottom: var(--section-y); }
.simple-page .prose { margin-top: clamp(40px, 5vw, 64px); }

.not-found {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 28px;
  justify-items: start;
}


/* =========================================================================
   SOCIAL LINKS
   Round buttons with a text monogram. main.js fills in the URLs from
   site-config.js and, if socialIcons is true, adds the official icon
   (assets/img/social/<name>.svg) as <span class="social__icon"> and the
   class .has-icon.
   The icon is a CSS mask: the SVG gives the SHAPE, background-color gives
   the COLOUR. That's why every platform's icon comes out in the same
   Brielgio colours, whatever colours the downloaded file has.
   ⚠ Changing .social__icon's background-color from currentColor breaks the
     automatic light/dark/hover colouring.
   ========================================================================= */
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.social {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid color-mix(in oklab, currentColor 30%, transparent);
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.35s var(--ease-out);
}
.social:hover { background: var(--pink); border-color: var(--pink); color: var(--midnight); transform: translateY(-2px); }
.social__mono { font-family: var(--font-display); font-size: 0.8rem; font-weight: 800; font-stretch: 120%; line-height: 1; }
.social__icon {
  display: none;
  width: 18px;
  height: 18px;
  background-color: currentColor;                         /* the icon's colour */
  -webkit-mask: var(--icon) center / contain no-repeat;   /* the icon's shape (set by main.js) */
          mask: var(--icon) center / contain no-repeat;
}
.social.has-icon .social__icon { display: block; }
.social.has-icon .social__mono { display: none; }
.contact__details .socials { margin-top: 4px; }
/* Phones: 8 equal columns that shrink slightly, so all eight fit on one line
   (on very narrow screens they wrap neatly instead). */
@media (max-width: 480px) {
  .socials { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(34px, calc((100% - 42px) / 8)), 1fr)); gap: 6px;   /* never more than 8 columns */ }
  .social { width: 100%; max-width: 42px; height: auto; aspect-ratio: 1; }
  .footer__lead { width: 100%; }   /* full width, so the icons have room for one line */
}

/* =========================================================================
   FORMS: consent checkbox (careers)
   ========================================================================= */
.field--check { gap: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; color: var(--on-deep); font-size: var(--step--1); line-height: 1.5; }
.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--pink);
  cursor: pointer;
}
.check a { color: inherit; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.field--check.is-invalid .check { color: #ffb3b3; }

/* =========================================================================
   CAREERS
   ========================================================================= */
.careers-hero { display: grid; gap: 28px; justify-items: start; padding-bottom: clamp(24px, 4vw, 48px); }
.careers-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px clamp(40px, 7vw, 120px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: clamp(48px, 7vw, 88px);
}
.careers-intro__title { font-size: var(--step-4); font-weight: 800; font-stretch: 112%; line-height: 0.96; letter-spacing: -0.015em; }
.careers-intro__text { display: grid; gap: 18px; max-width: 48ch; font-size: var(--step-1); line-height: 1.55; color: var(--muted); }
.careers-block { padding-top: 0; }
.careers-block > .section-title { margin-bottom: clamp(36px, 5vw, 64px); }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 40px 32px; }
.value { display: grid; gap: 12px; align-content: start; padding-top: 20px; border-top: 2px solid var(--text); }
.value__title { font-size: var(--step-2); font-stretch: 112%; overflow-wrap: anywhere; transition: font-stretch 0.6s var(--ease-out), color 0.3s; }
.value:hover .value__title { font-stretch: 124%; color: var(--accent); }
.value p { max-width: 38ch; color: var(--muted); }
.careers-band { background: var(--band); color: var(--on-band); padding-block: var(--section-y); margin-bottom: var(--section-y); }
.careers-band__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px clamp(40px, 7vw, 120px); align-items: start; }
.perks { font-size: var(--step-1); gap: 16px; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.role { display: grid; gap: 4px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.role__name { font-family: var(--font-display); font-size: var(--step-2); font-weight: 760; font-stretch: 108%; line-height: 1.1; }
.role__desc { color: var(--muted); }
.apply-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 32px; margin: 0; padding: 0; list-style: none; }
.apply-step { display: grid; gap: 12px; align-content: start; }
.apply-step__num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 7vw, 6.5rem);
  font-weight: 800;
  font-stretch: 135%;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
.apply-step h3 { font-size: var(--step-2); font-stretch: 112%; }
.apply-step p { max-width: 38ch; color: var(--muted); }
#apply .contact__intro > p + p { font-size: var(--step-0); }
@media (max-width: 860px) {
  .careers-intro, .careers-band__inner { grid-template-columns: 1fr; }
}

/* =========================================================================
   LEGAL PAGES (Privacy, Cookies, Terms)
   ========================================================================= */
.page-title--legal { font-size: var(--step-4); font-stretch: 118%; line-height: 0.95; }
.legal { padding-bottom: var(--section-y); }
.legal__head { margin-bottom: clamp(40px, 6vw, 72px); }
.legal__layout { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.legal__toc {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px);
  font-size: var(--step--1);
}
.legal__toc-title { margin-bottom: 10px; color: var(--muted); font-weight: 700; }
.legal__toc ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.legal__toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.legal__toc a:hover { color: var(--accent); border-left-color: var(--accent); }
.legal__body { max-width: 76ch; }
.legal__section { scroll-margin-top: calc(var(--header-h) + 24px); }
.legal__section + .legal__section { margin-top: 2.4em; }
.legal__section h2 { margin-top: 0; }
.legal__section > * + * { margin-top: 1.1em; }
.legal__section > h2 + * { margin-top: 0.7em; }
.legal__caps { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
/* Company details: a quiet closing note at the very end of the Privacy Policy
   (the only place on the website they appear). Small, muted, no heading.
   ⚠ Don't hide it (display:none, tiny text, same colour as the background):
     UK law requires these details to be readable on the website. */
.legal__company {
  scroll-margin-top: calc(var(--header-h) + 24px);   /* "at the end of this policy" link lands below the header */
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--muted);
}
.table-wrap { overflow-x: auto; margin-block: 1.2em; border: 1px solid var(--line); }
.prose table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose .btn { text-decoration: none; }
.linklike { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.active-tools { padding: 14px 16px; background: var(--surface); border-left: 4px solid var(--pink); }
@media (max-width: 900px) {
  .legal__layout { grid-template-columns: minmax(0, 1fr); }  /* minmax(0,…): lets wide tables scroll inside .table-wrap instead of widening the page */
  .legal__toc { position: static; }
}
/* Phones: each table row becomes a small card, with the column name above each
   value (taken from data-label="…", which build.py adds to every cell).
   ⚠ A new table without data-label still works, it just shows no labels here. */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; }
  .prose table { min-width: 0; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }  /* hidden visually, still read aloud */
  .prose tr { border: 1px solid var(--line); }
  .prose tr:not([hidden]) ~ tr { margin-top: 10px; }   /* gap between cards, skipping hidden rows */
  .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .prose tr td:last-child { border-bottom: 0; }
  .prose td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .prose td:first-child { background: var(--surface); }
}

/* =========================================================================
   COOKIE BANNER + SETTINGS PANEL (markup is created by consent.js)
   "Accept all" and "Necessary only" deliberately look the same: UK and EU
   regulators expect declining to be as easy as accepting.
   ========================================================================= */
.cookie-banner {
  position: fixed;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 22px;
  background: var(--midnight);
  color: var(--porcelain);
  --focus: var(--pink);
  border: 1px solid color-mix(in oklab, var(--porcelain) 14%, transparent);
  box-shadow: 0 24px 60px -20px rgb(14 11 54 / 0.55);
  animation: cookie-in 0.7s var(--ease-out) both;
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(24px); } }
.cookie-banner__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 780; font-stretch: 115%; }
.cookie-banner__text { font-size: var(--step--1); line-height: 1.55; color: #cfcbef; }
.cookie-banner__text a { color: var(--porcelain); text-decoration-color: var(--pink); text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-btn { --btn-bg: var(--porcelain); --btn-fg: var(--midnight); flex: 1 1 auto; }
.cookie-btn--quiet { --btn-bg: transparent; --btn-fg: var(--porcelain); --btn-border: color-mix(in oklab, var(--porcelain) 45%, transparent); }

.cookie-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: clamp(22px, 4vw, 32px);
  border: 0;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 30px 80px -24px rgb(14 11 54 / 0.6);
}
.cookie-dialog::backdrop { background: rgb(14 11 54 / 0.55); backdrop-filter: blur(4px); }
.cookie-dialog[open] { display: grid; gap: 16px; animation: cookie-in 0.5s var(--ease-out) both; }
.cookie-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-dialog__head h2 { font-size: var(--step-2); font-stretch: 115%; }
.cookie-dialog__intro, .cookie-dialog__more { color: var(--muted); font-size: var(--step--1); }
.cookie-dialog__more a { color: var(--accent); }
.cookie-opt { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.cookie-opt p { font-size: var(--step--1); color: var(--muted); }
.cookie-opt .cookie-opt__title { font-size: var(--step-0); font-weight: 700; color: var(--text); margin-bottom: 2px; }
.cookie-opt__state { flex: none; font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.cookie-dialog__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
@media (max-width: 520px) {
  /* Phones: "Save choices" on its own row, then "Accept all" and "Necessary only"
     side by side at the same size (declining must be as easy as accepting). */
  .cookie-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-dialog__actions [data-consent-action="save"] { grid-column: 1 / -1; }
}

/* Toggle switch built from a real checkbox (keyboard and screen-reader friendly) */
.switch {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 52px;
  height: 30px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background-color 0.25s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform 0.3s var(--ease-out);
}
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(22px); }

/* ---------- MOTION SAFETY NET */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
}

/* ---------- PRINT */
@media print {
  .site-header, .menu, .hero__canvas, .hero__grain, .wordmark, .contact form, .footer__mark, .read-progress { display: none !important; }
  body { background: #fff; color: #000; }
}
