/* ==================================================================
   Dunora Labs — dunoralabs.com
   Consulting & commercial site. Same brand as the lab (dunoralabs.xyz),
   grown up and calmer. Two themes built on the logo's blue and white:
   dark (midnight navy) and light (white + marine blue).
   ================================================================== */

/* ---------- fonts (self-hosted, SIL OFL 1.1) ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-var.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-500.woff2") format("woff2");
}

/* ---------- tokens ---------- */
:root {
  --base: #070b14;           /* midnight navy */
  --base-rgb: 7, 11, 20;
  --surface: #0d1422;
  --surface-rgb: 13, 20, 34;
  --surface-2: #121b2d;
  --line: rgba(150, 180, 230, .12);
  --line-strong: rgba(150, 180, 230, .22);
  --line-hover: rgba(150, 180, 230, .36);
  --text: #eaf0fa;
  --muted: #9eabc2;
  --faint: #8190a8;          /* ≥ 4.5:1 on base and surfaces */
  --placeholder: #75839c;
  --accent: #7aaeff;         /* light tint of the logo blue: text accents, lines */
  --accent-rgb: 122, 174, 255;
  --accent-hover: #9cc3ff;
  --btn-bg: #005af5;         /* the logo's blue */
  --btn-bg-hover: #1c66ff;
  --btn-text: #ffffff;
  --btn-text-rgb: 255, 255, 255;
  --focus: #8fc6ff;          /* focus rings */
  --live: #4d9fff;           /* live dots */
  --live-glow: rgba(77, 159, 255, .55);
  --error: #ff9d8f;
  --error-rgb: 255, 157, 143;
  --input-bg: rgba(13, 20, 34, .7);
  --input-focus-bg: #0d1422;
  --shadow: rgba(0, 0, 0, .6);
  --shadow-strong: rgba(0, 0, 0, .8);
  --glow-alpha: .08;
  --grain: url("/assets/img/grain.svg");
  --grain-opacity: .06;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239eabc2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --sun: inline-block;       /* the toggle shows the theme you'd switch to */
  --moon: none;
  --logo-dark: block;
  --logo-light: none;
  --pixel-ink: #eaf0fa;      /* pixel photos */
  --pixel-blue: #4d8dff;
  --bars-rgb: 0, 90, 245;    /* footer gradient bars: the logo's blue */

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1360px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --col-gap: clamp(16px, 2.2vw, 32px);
  --nav-h: 72px;
  --radius: 16px;
  --radius-sm: 10px;
  --section-y: clamp(96px, 11vw, 176px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* Light theme: white + marine blue. Applies when the visitor picks it with the
   toggle (data-theme="light"), or by default when their OS prefers light and
   they haven't picked dark. Keep the two blocks identical. */
:root[data-theme="light"] {
  --base: #ffffff;
  --base-rgb: 255, 255, 255;
  --surface: #f3f6fa;
  --surface-rgb: 243, 246, 250;
  --surface-2: #e9eff6;
  --line: rgba(10, 31, 61, .11);
  --line-strong: rgba(10, 31, 61, .2);
  --line-hover: rgba(10, 31, 61, .34);
  --text: #0a1f3d;
  --muted: #44587a;
  --faint: #56688a;
  --placeholder: #5e6e88;
  --accent: #0b4a8f;         /* marine blue */
  --accent-rgb: 11, 74, 143;
  --accent-hover: #083a72;
  --btn-bg: #0b4a8f;
  --btn-bg-hover: #083a72;
  --btn-text: #ffffff;
  --btn-text-rgb: 255, 255, 255;
  --focus: #1f63d6;
  --live: #0e9f55;
  --live-glow: rgba(14, 159, 85, .35);
  --error: #b3261e;
  --error-rgb: 179, 38, 30;
  --input-bg: #ffffff;
  --input-focus-bg: #ffffff;
  --shadow: rgba(10, 31, 61, .14);
  --shadow-strong: rgba(10, 31, 61, .28);
  --glow-alpha: .06;
  --grain: url("/assets/img/grain-dark.svg");
  --grain-opacity: .035;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2344587a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --sun: none;
  --moon: inline-block;
  --logo-dark: none;
  --logo-light: block;
  --pixel-ink: #0a1f3d;
  --pixel-blue: #005af5;
  --bars-rgb: 0, 90, 245;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --base: #ffffff;
    --base-rgb: 255, 255, 255;
    --surface: #f3f6fa;
    --surface-rgb: 243, 246, 250;
    --surface-2: #e9eff6;
    --line: rgba(10, 31, 61, .11);
    --line-strong: rgba(10, 31, 61, .2);
    --line-hover: rgba(10, 31, 61, .34);
    --text: #0a1f3d;
    --muted: #44587a;
    --faint: #56688a;
    --placeholder: #5e6e88;
    --accent: #0b4a8f;         /* marine blue */
    --accent-rgb: 11, 74, 143;
    --accent-hover: #083a72;
    --btn-bg: #0b4a8f;
    --btn-bg-hover: #083a72;
    --btn-text: #ffffff;
    --btn-text-rgb: 255, 255, 255;
    --focus: #1f63d6;
    --live: #0e9f55;
    --live-glow: rgba(14, 159, 85, .35);
    --error: #b3261e;
    --error-rgb: 179, 38, 30;
    --input-bg: #ffffff;
    --input-focus-bg: #ffffff;
    --shadow: rgba(10, 31, 61, .14);
    --shadow-strong: rgba(10, 31, 61, .28);
    --glow-alpha: .06;
    --grain: url("/assets/img/grain-dark.svg");
    --grain-opacity: .035;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2344587a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --sun: none;
    --moon: inline-block;
    --logo-dark: none;
    --logo-light: block;
    --pixel-ink: #0a1f3d;
    --pixel-blue: #005af5;
    --bars-rgb: 0, 90, 245;
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  background: var(--base);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--base);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* subtle, static film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: var(--grain) repeat;
  opacity: var(--grain-opacity);
}
img, svg, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
em { font-style: italic; }
::selection { background: rgba(var(--accent-rgb), .28); color: var(--text); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
button { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- type ---------- */
.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--jade { color: var(--accent); }
.label .n { color: var(--accent); margin-right: 1.1em; }
.d1 { --d: .08s; } .d2 { --d: .16s; } .d3 { --d: .24s; } .d4 { --d: .34s; }
.display {
  font-family: var(--serif);
  font-size: clamp(3.1rem, 1.6rem + 6.4vw, 8.25rem);
  line-height: .94;
  letter-spacing: -.018em;
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 1.7rem + 3.6vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.015em;
}
.h3 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.4rem + 1.1vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.005em;
}
.display em, .h2 em, .h3 em { color: var(--accent); }
.lede {
  font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 34em;
}
.muted { color: var(--muted); }
.prose p + p { margin-top: 1.1em; }
.prose { color: var(--muted); max-width: 40em; }
.prose strong { color: var(--text); font-weight: 500; }
.prose a { color: var(--text); }
.prose a:hover { color: var(--accent); }

/* clearly marked placeholders: replace every [EDIT] before launch */
.ph {
  display: inline;
  padding: .05em .4em;
  border: 1px dashed rgba(var(--accent-rgb), .55);
  border-radius: 6px;
  background: rgba(var(--accent-rgb), .08);
  color: var(--accent);
  font: 500 .82em/1.5 var(--mono);
  letter-spacing: 0;
  white-space: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- buttons & links ---------- */
.btn {
  --bh: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  min-height: var(--bh);
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-text); }
.btn--primary:hover { background: var(--btn-bg-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { --bh: 42px; padding: 0 18px; font-size: 15px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }
button.link-arrow { background: none; border-width: 0 0 1px; border-radius: 0; padding: 0 0 3px; font: inherit; cursor: pointer; }
.link-arrow .arr { transition: transform .35s var(--ease); }
.link-arrow:hover .arr { transform: translateX(3px); }

/* the one neon detail */
.live-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px var(--live-glow);
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--live);
    animation: ping 3.2s var(--ease) infinite;
  }
}
@keyframes ping {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

/* ---------- logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}
/* Two variants of the dune-"D" logo (tools/make_logos.py), same canvas so nothing shifts on
   toggle: navy lettering on the light theme, white lettering on the dark theme. */
.logo-img { height: 48px; width: auto; }
.logo-img--dark { display: var(--logo-dark); }
.logo-img--light { display: var(--logo-light); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(var(--base-rgb), .86);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links {
  display: flex;
  gap: clamp(18px, 2.4vw, 36px);
  margin-left: auto;
}
.nav-links a {
  position: relative;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="true"], .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
/* EN | ES language switch: links to the same page in the other language */
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .08em;
}
.lang-switch > * {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 100%;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color .3s var(--ease), background-color .3s var(--ease);
}
.lang-switch a:hover { color: var(--text); background: rgba(var(--accent-rgb), .08); }
.lang-switch .is-current { color: var(--text); background: rgba(var(--accent-rgb), .16); }
.theme-toggle {
  display: none;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  place-items: center;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.tjs .theme-toggle { display: inline-grid; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: var(--sun); }
.theme-toggle .i-moon { display: var(--moon); }
/* no colour transitions mid-switch, so the page changes in a single step */
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  place-items: center;
}
.nav-toggle span, .nav-toggle span::before {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform .35s var(--ease);
}
.nav-toggle span { position: relative; transform: translateY(-3px); }
.nav-toggle span::before { content: ""; position: absolute; top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] span { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(-6px) rotate(-90deg); }
.nav-panel { display: none; }

@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: grid; margin-left: 10px; }
  .lang-switch { margin-left: auto; }
  .theme-toggle { margin-left: 8px; }
  .nav-panel {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    display: block;
    padding: 12px var(--gutter) 28px;
    background: var(--base);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -20px var(--shadow);
    max-height: calc(100svh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-panel[hidden] { display: none; }
  .nav-panel ul { list-style: none; margin: 0; padding: 0; }
  .nav-panel li + li { border-top: 1px solid var(--line); }
  .nav-panel a:not(.btn) {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0;
    font-family: var(--serif);
    font-size: 30px;
    line-height: 1.1;
    text-decoration: none;
  }
  .nav-panel a:not(.btn) span { font: 500 11px/1 var(--mono); color: var(--faint); letter-spacing: .14em; }
  .nav-panel .btn { width: 100%; margin-top: 20px; }
}

/* ---------- reveal on scroll (JS adds .js to <html>) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .rise { animation: rise 1.2s var(--ease) both; animation-delay: var(--d, 0s); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 1000px);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 120px));
  overflow: hidden;
  isolation: isolate;
}
.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 72% 42%, #000 18%, rgba(0, 0, 0, .55) 46%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 78% at 72% 42%, #000 18%, rgba(0, 0, 0, .55) 46%, transparent 78%);
}
.hero-visual::before { /* static fallback: same field as the canvas at t=0 */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  -webkit-mask: url("/assets/img/contours.svg") center / cover no-repeat;
  mask: url("/assets/img/contours.svg") center / cover no-repeat;
  transition: opacity 1.6s var(--ease);
}
.hero-visual.is-live::before { opacity: 0; }
.hero-visual canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero-visual.is-live canvas { opacity: 1; }
.hero::after { /* soft jade glow behind the contour field */
  content: "";
  position: absolute;
  z-index: -2;
  width: min(1100px, 85vw);
  height: min(1100px, 85vw);
  right: max(-320px, -22vw);
  top: max(-420px, -28vw);
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), var(--glow-alpha)), transparent);
  pointer-events: none;
}
.hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: clamp(56px, 8vh, 96px); }
.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: clamp(28px, 4vh, 44px);
}
.hero-eyebrow .sep { width: 28px; height: 1px; background: var(--line-strong); }
.hero h1 { grid-column: 1 / span 11; max-width: 13.5em; }
.hero-sub {
  grid-column: 1 / span 6;
  margin-top: clamp(28px, 4vh, 40px);
}
.hero-ctas {
  grid-column: 1 / span 6;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 5vh, 48px);
}
.hero-meta {
  border-top: 1px solid var(--line);
  padding-block: 22px 28px;
}
.hero-meta .grid { row-gap: 14px; align-items: start; }
.hero-meta .item { grid-column: span 4; display: flex; flex-direction: column; gap: 6px; }
.hero-meta .val { font-size: 15px; color: var(--text); }
.hero-meta .val .muted { font-size: 14px; }
.coord { display: inline-flex; align-items: center; gap: 10px; }
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.motion-toggle:hover { color: var(--text); }
.motion-toggle .ico { width: 9px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.motion-toggle[aria-pressed="true"] .ico {
  border: 0;
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* ---------- section heads ---------- */
.sec-head { row-gap: 24px; margin-bottom: clamp(56px, 7vw, 104px); align-items: end; }
.sec-head .label { grid-column: 1 / span 3; align-self: start; padding-top: .9em; }
.sec-head h2 { grid-column: 4 / span 9; }
.sec-head .lede { grid-column: 4 / span 6; }

/* ---------- services ---------- */
.svc-group { row-gap: var(--col-gap); padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.svc-group:last-child { padding-bottom: 0; }
.svc-group-head { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 14px; }
.svc-group-head .h3 { font-size: clamp(1.6rem, 1.3rem + .8vw, 2rem); }
.svc-group-head p { color: var(--muted); font-size: 15px; max-width: 18em; }
.svc-cards { grid-column: 4 / span 9; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(24px, 2.6vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--surface-rgb), .9), rgba(var(--surface-rgb), .5));
  transition: border-color .5s var(--ease), background-color .5s var(--ease);
}
.svc-card:hover { border-color: var(--line-strong); }
.svc-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); }
.svc-card--wide > .svc-intro { grid-row: span 2; }
.svc-card .svc-intro { display: flex; flex-direction: column; gap: 14px; }
.svc-card .svc-intro p { color: var(--muted); }
.svc-icon { width: 40px; height: 40px; color: var(--accent); }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15.5px; }
.svc-list li { position: relative; padding-left: 22px; }
.svc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}
.svc-for { padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); margin-top: auto; }
.svc-for .label { display: block; margin-bottom: 6px; }
.svc-block .label { display: block; margin-bottom: 12px; }
.skill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 11.5px/1.3 var(--mono);
  letter-spacing: .06em;
  color: var(--text);
}

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 96px) var(--col-gap); }
.work-grid > :nth-child(even) { margin-top: clamp(0px, 8vw, 128px); }
.work-card { position: relative; display: flex; flex-direction: column; gap: 22px; }
.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 1.2s var(--ease), opacity .6s var(--ease);
  opacity: .92;
}
.work-card:hover .work-media img { transform: scale(1.025); opacity: 1; }
.work-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(var(--base-rgb), .86);
  border: 1px solid var(--line-strong);
  font: 500 11px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.work-badge--pending { color: var(--accent); border-style: dashed; }
.work-body { display: flex; flex-direction: column; gap: 12px; }
.work-body h3 a { text-decoration: none; }
.work-body h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.work-body p { color: var(--muted); max-width: 34em; }
.work-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li { font: 500 11.5px/1 var(--mono); color: var(--faint); letter-spacing: .04em; }
.tags li + li::before { content: "·"; margin-right: 6px; color: var(--line-strong); }
.work-more { font-size: 15px; color: var(--text); display: inline-flex; gap: .5em; transition: color .3s var(--ease); }
.work-card:hover .work-more { color: var(--accent); }
.work-card:focus-within .work-media { border-color: var(--accent); }
.lab-strip {
  margin-top: clamp(64px, 8vw, 120px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 28px clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.lab-strip p { color: var(--muted); max-width: 40em; }
.lab-strip strong { color: var(--text); font-weight: 500; }
.prompt { font: 500 14px/1 var(--mono); color: var(--accent); }
.prompt b { color: var(--live); font-weight: 500; }

/* ---------- process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--col-gap); counter-reset: step; }
.step { position: relative; padding-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.step::before { /* hairline track */
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  right: calc(var(--col-gap) * -1);
  height: 1px;
  background: var(--line-strong);
}
.step:last-child::before { right: 0; }
.step::after { /* node */
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--base);
}
.step:first-child::after { background: var(--accent); }
.step p { color: var(--muted); font-size: 16px; }
.step .get { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.step .get .label { display: block; margin-bottom: 10px; color: var(--accent); }

/* ---------- engagement ---------- */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.model {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(26px, 2.6vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.model--feature { border-color: rgba(var(--accent-rgb), .4); background: linear-gradient(180deg, rgba(var(--accent-rgb), .07), var(--surface) 45%); }
.model p { color: var(--muted); }
.model dl { display: grid; gap: 14px; margin-top: 4px; }
.model dt { margin-bottom: 4px; }
.model dd { font-size: 15.5px; }
.model-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.model-foot .price { font-family: var(--serif); font-size: 26px; line-height: 1; }

/* ---------- terminal activity cards ----------
   Illustrative work logs (site.js types them out). Decorative: aria-hidden in markup. */
.term {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(var(--surface-rgb), .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px -40px var(--shadow);
  font: 400 13px/1.5 var(--mono);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: .06em;
}
.term-dots { display: flex; gap: 5px; }
.term-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line-strong); }
.term-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 10.5px; }
.term-log { list-style: none; margin: 0; padding: 14px 16px 16px; display: grid; gap: 9px; }
.term-log[hidden] { display: none; }
.term-log li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.term-tool {
  justify-self: start;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  font-size: 11.5px;
  line-height: 1.6;
}
.term-cmd { font: inherit; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-out { color: var(--muted); white-space: nowrap; transition: opacity .3s var(--ease); }
.term-out.is-ok { color: var(--accent); }
.term-log .term-note {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px dashed var(--line-strong);
}
.term-note .term-cmd { color: var(--muted); white-space: normal; }
.term-note .term-cmd::before { content: "→ "; color: var(--accent); }
/* typing states (set by site.js) */
.term-log li.is-pending { opacity: 0; transform: translateY(4px); }
.term-log li.is-typing .term-out { opacity: 0; }
.term-log.is-out li { opacity: 0; }
.term-caret {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .term-caret { animation: caret 1s steps(1) infinite; }
}
@keyframes caret { 50% { opacity: 0; } }
.hero-term { grid-column: 8 / span 5; grid-row: 2 / span 2; align-self: start; margin-top: clamp(28px, 4vh, 40px); }
.cs-term { max-width: 640px; }

/* ---------- FAQ ---------- */
.faq { grid-column: 4 / span 9; border-bottom: 1px solid var(--line); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.15rem + .7vw, 1.75rem);
  line-height: 1.2;
  transition: color .3s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover, .faq-item[open] summary { color: var(--accent); }
.faq-item summary:focus-visible { outline-offset: 6px; }
.faq-icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  margin: -.75px 0 0 -6px;
  background: currentColor;
  transition: transform .4s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { border-color: var(--accent); transform: rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-a { padding: 0 64px 26px 0; color: var(--muted); max-width: 46em; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: faq-in .45s var(--ease); }
}
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- about ---------- */
.about-photo { grid-column: 1 / span 5; }
.about-text { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 28px; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(var(--accent-rgb), .1), transparent 60%),
    var(--surface);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Pixel photos (pixel-photo.js). The canvas bleeds 30% to the left for the scatter,
   matching BLEED in the script. Until the script takes over, the plain photo shows. */
.pixel-photo { position: relative; }
.pixel-photo canvas {
  position: absolute;
  top: 0;
  left: -30%;
  width: 130%;
  height: 100%;
  pointer-events: none;
}
.pixel-photo.is-pixel img { opacity: 0; }
.portrait.pixel-photo { border: 0; border-radius: 0; background: none; overflow: visible; }
.portrait-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--col-gap); padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { margin-bottom: 6px; }
.facts dd { font-size: 15.5px; }
.lab-card {
  display: grid;
  gap: 10px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .4s var(--ease);
}
.lab-card:hover { border-color: var(--accent); }
.lab-card .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lab-card p { color: var(--muted); font-size: 15.5px; }
.lab-card .arr { color: var(--accent); transition: transform .35s var(--ease); }
.lab-card:hover .arr { transform: translate(3px, -3px); }

/* ---------- contact ---------- */
.about-text .label + .h2, .contact-side .label + .h2 { margin-top: 20px; }
.contact-side .h2 + .lede { margin-top: 26px; }
.contact-side { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 30px; }
.contact-form-wrap { grid-column: 7 / span 6; }
.direct { display: grid; gap: 12px; }
.direct a.big {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem);
  line-height: 1.1;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  justify-self: start;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.direct a.big:hover { color: var(--accent); border-color: var(--accent); }
.clock-card {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.clock-card .time { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.clock-card .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clock-card .rel { font-size: 14.5px; color: var(--muted); }
.next-steps { list-style: none; margin: 0; padding: 0; counter-reset: ns; display: grid; gap: 14px; }
.next-steps li { counter-increment: ns; display: grid; grid-template-columns: 34px 1fr; color: var(--muted); font-size: 15.5px; }
.next-steps li::before { content: "0" counter(ns); font: 500 12px/1.9 var(--mono); color: var(--accent); }
.next-steps strong { color: var(--text); font-weight: 500; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field > label, .field > .flabel, .field legend {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 0;
}
.field .opt { color: var(--faint); font-weight: 400; font-size: 14px; }
.input {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font: 400 16px/1.4 var(--sans);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: var(--line-hover); }
.input:focus { border-color: var(--accent); background: var(--input-focus-bg); outline: none; }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
textarea.input { min-height: 150px; resize: vertical; }
select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 18px center;
  cursor: pointer;
}
select.input option { background: var(--surface); color: var(--text); }
.input[aria-invalid="true"] { border-color: var(--error); }
.field-error { display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--error); }
.field-error:empty { display: none; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid currentColor; font: 600 10px/1 var(--mono); transform: translateY(2px); }
.hint { font-size: 14px; color: var(--faint); }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
  pointer-events: none;
}
.choice label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--faint);
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.choice input:hover + label { border-color: var(--line-hover); color: var(--text); }
.choice input:checked + label { border-color: var(--accent); color: var(--text); background: rgba(var(--accent-rgb), .08); }
.choice input:checked + label::before { background: var(--accent); border-color: var(--accent); }
.choice input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.choices[aria-invalid="true"] .choice label { border-color: rgba(var(--error-rgb), .55); }

.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.turnstile-wrap { grid-column: 1 / -1; min-height: 65px; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 6px; }
.form-foot .hint a { color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(var(--btn-text-rgb), .3); border-top-color: var(--btn-text); display: none; }
.is-sending .spinner { display: inline-block; animation: spin .8s linear infinite; }
.is-sending .arr { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 15.5px;
}
.notice::before { grid-row: span 2; font: 600 13px/1 var(--mono); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; }
.notice--error { border-color: rgba(var(--error-rgb), .45); background: rgba(var(--error-rgb), .06); color: var(--error); }
.notice--error::before { content: "!"; }
.notice p { color: var(--text); }
.notice a { color: var(--text); }
.notice strong { font-weight: 600; }
.success {
  display: grid;
  gap: 18px;
  padding: clamp(28px, 3.5vw, 48px);
  border: 1px solid rgba(var(--accent-rgb), .45);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .08), var(--surface));
}
.success .check { width: 48px; height: 48px; color: var(--accent); }
.success p { color: var(--muted); }
.success:focus { outline: none; }
.success:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-top: clamp(72px, 9vw, 128px); position: relative; overflow: hidden; }
.footer-cta { grid-column: 1 / span 7; display: grid; gap: 22px; align-content: start; }
.footer-cta .h2 a { text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: color .3s var(--ease), border-color .3s var(--ease); }
.footer-cta .h2 a:hover { color: var(--accent); border-color: var(--accent); }
.footer-cols { grid-column: 9 / span 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--col-gap); }
.footer-cols h2 { margin-bottom: 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15.5px; }
.footer-cols a { color: var(--muted); text-decoration: none; transition: color .3s var(--ease); }
.footer-cols a:hover { color: var(--text); }
.footer-base {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-size: 14px;
  color: var(--faint);
}
.footer-base a { color: var(--muted); }
.footer-base .clock-inline { display: inline-flex; align-items: center; gap: 8px; }

/* Footer gradient bars: a calm bar chart in the logo's blue at the very bottom of
   every page. site.js builds the bars (heights, stagger, hover lift); without JS the
   stripes below are drawn by CSS alone. Decorative: aria-hidden in the markup. */
.footer-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: clamp(110px, 14vw, 210px);
  margin-top: clamp(40px, 5vw, 64px);
  background: linear-gradient(to top, rgb(var(--bars-rgb)), rgba(var(--bars-rgb), 0));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 28px, transparent 28px 30px);
  mask: repeating-linear-gradient(90deg, #000 0 28px, transparent 28px 30px);
}
.footer-bars.has-bars { background: none; -webkit-mask: none; mask: none; }
.footer-bars span {
  flex: 1 1 0;
  height: calc(var(--h, 1) * 100%);
  background: linear-gradient(to top, rgb(var(--bars-rgb)) 0%, rgba(var(--bars-rgb), .55) 45%, rgba(var(--bars-rgb), 0) 100%);
  transform-origin: bottom;
  transform: scaleY(calc(1 + var(--lift, 0)));
  transition: transform .45s var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .js .footer-bars:not(.is-in) span { transform: scaleY(0); }
  .js .footer-bars.is-in:not(.is-settled) span { transition: transform 1.3s var(--ease) var(--d, 0s); }
}

/* ---------- case study pages ---------- */
.page-top { padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 112px)); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: clamp(28px, 4vw, 44px); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }
.cs-head { row-gap: 32px; }
.cs-head > .label { grid-column: 1 / -1; }
.cs-head h1 { grid-column: 1 / span 10; }
.cs-head .lede { grid-column: 1 / span 7; }
.cs-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px var(--col-gap);
  margin-top: clamp(16px, 3vw, 40px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.cs-meta dt { margin-bottom: 8px; }
.cs-meta dd { font-size: 15.5px; }

.demo { margin-top: clamp(48px, 6vw, 88px); }
.demo-frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font: 500 12px/1.3 var(--mono);
  color: var(--muted);
  letter-spacing: .04em;
}
.demo-bar .l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.demo-bar .dots { display: flex; gap: 6px; }
.demo-bar .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-strong); }
.demo-bar .url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar a { color: var(--muted); white-space: nowrap; }
.demo-bar a:hover { color: var(--accent); }
.demo-stage { position: relative; aspect-ratio: 16 / 10; background: var(--base); }
.demo-stage iframe, .demo-stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-stage .poster img { width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: .45; filter: saturate(.8); }
.poster { --muted: #c3cde0; --text: #eaf0fa; color: var(--text); background: #070b14; } /* always dark: it frames a dark screenshot */
.demo-stage .poster .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(7, 11, 20, .55), rgba(7, 11, 20, .2) 70%);
}
.demo-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 14px; font-size: 14px; color: var(--faint); }
.demo--phones .demo-stage { aspect-ratio: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 4vw, 64px); padding: clamp(24px, 4vw, 56px) 16px; }
.phone { position: relative; width: min(100%, 360px); }
.phone-shell {
  position: relative;
  aspect-ratio: 390 / 800;
  border: 1px solid var(--line-strong);
  border-radius: 40px;
  padding: 10px;
  background: #04070d;
  box-shadow: 0 40px 80px -40px var(--shadow-strong);
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: var(--base); }
.phone-screen iframe, .phone-screen .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.phone-screen .poster img { width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: .5; }
.phone-screen .poster .play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 16px; background: rgba(7, 11, 20, .35); }
.phone figcaption { margin-top: 16px; text-align: center; }

.cs-section { padding-block: clamp(64px, 8vw, 128px); border-top: 1px solid var(--line); }
.cs-section .cs-label { grid-column: 1 / span 3; padding-top: .6em; }
.cs-section .cs-body { grid-column: 4 / span 8; display: grid; gap: 26px; }
.cs-body .prose { font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem); }
.cs-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--col-gap); }
.cs-list li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.cs-list li strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.outcome-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
.stat { padding-top: 18px; border-top: 1px solid var(--line-strong); display: grid; gap: 8px; }
.stat .v { font-family: var(--serif); font-size: clamp(2.2rem, 1.8rem + 1.4vw, 3.2rem); line-height: 1; }
.stat .v .ph { font-size: .32em; vertical-align: middle; }
.stat p { font-size: 15px; color: var(--muted); }
.next-case { display: grid; gap: 16px; padding-block: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.next-case a.h2 { text-decoration: none; transition: color .3s var(--ease); justify-self: start; }
.next-case a.h2:hover { color: var(--accent); }
.next-case a.h2 .arr { font-family: var(--sans); font-size: .5em; vertical-align: middle; margin-left: .2em; }

/* ---------- legal / 404 ---------- */
.legal { max-width: 46em; }
.legal h2 { font-family: var(--serif); font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem); line-height: 1.1; margin: 56px 0 16px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 1em; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; margin-top: 12px; }
.legal strong { color: var(--text); font-weight: 500; }
.legal a { color: var(--text); }
.legal a:hover { color: var(--accent); }
.not-found { min-height: 100svh; display: flex; flex-direction: column; }
.not-found .hero-body { padding-top: calc(var(--nav-h) + 40px); }
.not-found h1 { margin-top: 18px; }
.not-found .lede { margin-top: 22px; }
.not-found .not-found-es { margin-top: 36px; font-size: 1rem; }
.not-found .not-found-es a { color: var(--text); }
.legal .label + .h2 { margin-top: 18px; }
.legal .h2 + .lede { margin-top: 24px; }
.legal .lede + .hint { margin-top: 18px; }
.big-404 { margin-top: 14px; font-family: var(--serif); font-size: clamp(7rem, 4rem + 18vw, 20rem); line-height: .8; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px rgba(var(--accent-rgb), .6); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .footer-cta { grid-column: 1 / -1; }
  .footer-cols { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; }
  .step:nth-child(2)::before { right: 0; }
}
@media (max-width: 1024px) {
  .hero h1 { grid-column: 1 / -1; }
  .hero-sub { grid-column: 1 / span 9; }
  .hero-ctas { grid-column: 1 / -1; }
  .hero-term { grid-column: 1 / span 9; grid-row: auto; max-width: 520px; margin-top: 44px; }
  .faq { grid-column: 1 / -1; }
  .sec-head .label { grid-column: 1 / -1; padding-top: 0; }
  .sec-head h2, .sec-head .lede { grid-column: 1 / -1; }
  .sec-head .lede { max-width: 36em; }
  .svc-group-head { grid-column: 1 / -1; }
  .svc-group-head p { max-width: 36em; }
  .svc-cards { grid-column: 1 / -1; }
  .about-photo { grid-column: 1 / span 5; }
  .about-text { grid-column: 6 / span 7; }
  .contact-side, .contact-form-wrap { grid-column: 1 / -1; }
  .contact-side { margin-bottom: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--col-gap); }
  .contact-side > :first-child { grid-column: 1 / -1; }
  .cs-section .cs-label { grid-column: 1 / -1; margin-bottom: 20px; }
  .cs-section .cs-body { grid-column: 1 / -1; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .models { grid-template-columns: 1fr; max-width: 640px; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .hero { min-height: auto; }
  .hero-sub { grid-column: 1 / -1; }
  .hero-meta .item { grid-column: 1 / -1; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .faq-a { padding-right: 0; }
  .hero-visual {
    -webkit-mask-image: radial-gradient(ellipse 120% 70% at 85% 25%, #000 5%, rgba(0, 0, 0, .35) 45%, transparent 80%);
    mask-image: radial-gradient(ellipse 120% 70% at 85% 25%, #000 5%, rgba(0, 0, 0, .35) 45%, transparent 80%);
  }
  .svc-cards, .svc-card--wide { grid-template-columns: 1fr; }
  .svc-card--wide > .svc-intro { grid-row: auto; }
  .work-grid { grid-template-columns: 1fr; }
  .work-grid > :nth-child(even) { margin-top: 0; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .step { padding: 0 0 44px 34px; }
  .step::before { top: 6px; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .step:last-child::before { display: none; }
  .step:nth-child(2)::before { right: auto; }
  .step::after { top: 1px; }
  .about-photo, .about-text { grid-column: 1 / -1; }
  .about-photo { max-width: 420px; margin-bottom: 40px; }
  .contact-side { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-head h1, .cs-head .lede { grid-column: 1 / -1; }
  .cs-meta, .cs-list, .outcome-stats { grid-template-columns: 1fr; }
  .cs-list li:first-child { border-top: 0; }
  .demo-stage { aspect-ratio: 9 / 14; }
  .demo-bar .dots { display: none; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-term { display: none; }
}
@media (max-width: 480px) {
  .logo-img { height: 40px; }
}
@media (max-width: 420px) {
  .lang-switch { padding: 0; }
  .lang-switch .is-current { display: none; }   /* phones: just the link to the other language */
  .lang-switch a { min-width: 42px; }
}
@media (max-width: 400px) {
  .btn { padding: 0 20px; }
}
@media (max-width: 360px) {
  .logo-img { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body::after, .nav, .hero-visual, .footer-cols { display: none; }
  body { background: #fff; color: #000; }
}
