/* ============================================================
   Ishtiaq Hossain — portfolio
   Hand-written CSS. No framework. One small script (script.js)
   handles smooth scrolling and the hero's backdrop and pointer effects.
   ============================================================ */

/* ---------- tokens ----------
   The site intentionally uses its night treatment in every environment.
   --------------------------------------------------------------- */
:root {
  /* night palette */
  --d-paper:      #0d0f12;
  --d-paper-2:    #131619;
  --d-surface:    #171a1e;
  --d-ink:        #f4f3f0;
  --d-text:       #dcdcd8;
  --d-muted:      #a0a6ae;
  --d-faint:      #737a84;
  --d-line:       rgba(244, 243, 240, .14);
  --d-line-soft:  rgba(244, 243, 240, .07);
  --d-accent:      #0d9c9c;   /* #008080 lifted so fills read on near-black */
  --d-accent-press:#16b3b3;
  --d-accent-text: #34bfbe;
  --d-on-accent:   #04211f;
  --d-shadow:      rgba(0, 0, 0, .8);
  --d-glow-core:   rgba(52, 191, 190, .34);
  --d-glow-mid:    rgba(52, 191, 190, .12);
  --d-glow-filter: saturate(1.9) brightness(1.55);
  --d-glow-size:   820px;
  --d-cursor-mode: none;           /* replaced by the custom emitter */
  --d-cursor-parts: block;
  --d-cursor-link: none;           /* the emitter replaces every cursor */
  --d-aura-size:   52px;
  --d-aura-tint:   var(--d-accent);
  --d-aura-a1: 34%;  --d-aura-a2: 30%;  --d-aura-a3: 14%;
  --d-glass-bg:    rgba(24, 28, 32, .5);
  --d-glass-edge:  rgba(244, 243, 240, .17);
  --d-glass-sheen: rgba(255, 255, 255, .16);
  --d-glass-tint:  rgba(52, 191, 190, .09);
  --d-bg-opacity:  .55;
  --d-spark:         #d5fdfc;                    /* near-white: on near-black
                                                    the core can just burn */
  --d-halo:          rgba(52, 191, 190, .55);
  --d-flare-core:    #d5fdfc;
  --d-flare-edge:    rgba(52, 191, 190, .5);
  --d-flare-w:       2px;
  --d-flare-blur:    1.3px;
  --d-flare-opacity: 1;

  /* theme-independent */
  --success:     #1f9e5a;
  --invert-bg:   #062b2c;
  --invert-fg:   #f4f7f6;
  --invert-dim:  rgba(244, 247, 246, .7);
  --invert-line: rgba(244, 247, 246, .32);

  /* same pairing and fallback order as the reference: variable Inter for text,
     JetBrains Mono at 400 and 500 for labels */
  --font-display: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --header-h: 67px; /* 66px inner height plus the header's 1px border */
  --s1: .5rem;  --s2: .75rem; --s3: 1rem;   --s4: 1.5rem;
  --s5: 2rem;   --s6: 3rem;   --s7: 4.5rem; --s8: 7rem;

  /* the mark's own geometry, as a mask source: lets progress fill the glyph
     itself rather than needing a ring drawn around it */
  --logo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0 0H100V100H58.018V83.964H83.964V58.018H58.018V41.982H83.964V16.036H16.036V41.982H41.982V58.018H16.036V83.964H41.982V100H0Z'/%3E%3C/svg%3E");

  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* --- night mapping (the only live theme) --- */
:root {
  --paper: var(--d-paper);            --paper-2: var(--d-paper-2);
  --surface: var(--d-surface);        --ink: var(--d-ink);
  --text: var(--d-text);              --text-muted: var(--d-muted);
  --text-faint: var(--d-faint);       --line: var(--d-line);
  --line-soft: var(--d-line-soft);    --accent: var(--d-accent);
  --accent-press: var(--d-accent-press);
  --accent-text: var(--d-accent-text);
  --on-accent: var(--d-on-accent);    --shadow: var(--d-shadow);
  --glow-core: var(--d-glow-core);    --glow-mid: var(--d-glow-mid);
  --glow-filter: var(--d-glow-filter);
  --bg-opacity: var(--d-bg-opacity);          --glow-size: var(--d-glow-size);
  --cursor-mode: var(--d-cursor-mode);        --cursor-parts: var(--d-cursor-parts);
  --cursor-link: var(--d-cursor-link);
  --aura-size: var(--d-aura-size);            --aura-tint: var(--d-aura-tint);
  --aura-a1: var(--d-aura-a1);  --aura-a2: var(--d-aura-a2);  --aura-a3: var(--d-aura-a3);
  --glass-bg: var(--d-glass-bg);              --glass-edge: var(--d-glass-edge);
  --glass-sheen: var(--d-glass-sheen);        --glass-tint: var(--d-glass-tint);
  --spark: var(--d-spark);            --halo: var(--d-halo);
  --flare-core: var(--d-flare-core);  --flare-edge: var(--d-flare-edge);
  --flare-w: var(--d-flare-w);        --flare-blur: var(--d-flare-blur);
  --flare-opacity: var(--d-flare-opacity);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overscroll-behavior-y: none; }
body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-display);
  /* rem, not px, so the browser's own text-size setting still works */
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Inter ships every weight; never let the browser fake one */
  font-synthesis: none;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s4); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--paper); padding: .75rem 1.25rem;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow--invert { color: var(--invert-dim); }

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent);
  flex: none;
}

.sec-head { margin-bottom: var(--s6); max-width: 46ch; }
.sec-title {
  font-size: clamp(1.7rem, 3.6vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 700;
  color: var(--ink);
  margin-top: var(--s3);
}

.sec  { padding-block: var(--s8); background: var(--paper); }
.band { padding-block: var(--s8); background: var(--paper-2); border-block: 1px solid var(--line-soft); }

/* The hero backdrop is viewport-fixed. Keep every following section in a
   higher layer with an opaque background so it scrolls cleanly over the
   marquee instead of letting the chips bleed through the page. */
main > section:not(.hero),
.site-foot {
  position: relative;
  z-index: 4;
}

/* Work normally supplies the first alternate band. While it is launch-hidden,
   shift the following treatments forward; removing `hidden` restores the
   original Experience → Work → Services → Stack → Principles sequence. */
#work[hidden] ~ #services,
#work[hidden] ~ #principles {
  background: var(--paper-2);
  border-block: 1px solid var(--line-soft);
}
#work[hidden] ~ #stack {
  background: var(--paper);
  border-block: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .02em;
  padding: .85rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--accent  { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.btn--accent:hover { background: var(--accent-press); }

.btn--ghost   { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn--outline { border-color: var(--invert-line); color: var(--invert-fg); }
.btn--outline:hover { border-color: var(--invert-fg); background: rgba(255, 255, 255, .08); }

.btn--sm { padding: .6rem 1rem; font-size: .76rem; }
.btn--lg { padding: 1rem 1.7rem; font-size: .88rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner {
  display: flex; align-items: center; gap: var(--s4);
  min-height: calc(var(--header-h) - 1px);
}
.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.brand__name {
  font-weight: 600; letter-spacing: -.015em; color: var(--ink); font-size: .98rem;
  transition: color .2s var(--ease);
}
.brand__name:hover { color: var(--accent-text); }

.nav { display: flex; gap: var(--s4); }
.nav a {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.nav a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 0;
  isolation: isolate;   /* confine the glow's blending to this section */
  overflow: hidden;
  /* The header stays in normal flow; the hero fills only the viewport left
     beneath it, and #top returns to that same unobscured position. */
  scroll-margin-top: var(--header-h);
  /* Equal top and bottom padding keeps the grid on the hero's true midpoint. */
  padding-block: clamp(var(--s6), 6vw, var(--s7));
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__grid {
  position: relative;
  z-index: 3;          /* above zones (0), backdrop (1) and glow (2) */
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4.5vw, 4rem);
  align-items: start;
}
.hero__title {
  font-size: clamp(1.85rem, 4.9vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.038em;
  text-wrap: balance;
  font-weight: 800;
  color: var(--ink);
  margin-block: var(--s4) var(--s4);
}
.hero__title em {
  font-style: normal;
  color: var(--accent-text);
  position: relative;
  white-space: nowrap;
}
.hero__title em::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: .09em;
  height: .07em;
  background: color-mix(in srgb, var(--accent) 40%, transparent);
}
.hero__body {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-muted);
  max-width: 58ch;
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

/* specs card */
.specs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4);
  position: relative;
}
.specs::before {
  content: ""; position: absolute; inset: -1px -1px auto -1px; height: 3px;
  background: var(--accent);
}
.specs__label {
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-text);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: var(--s2);
}
.specs__list { display: grid; }
.spec {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s2);
  padding-block: .55rem;
  border-bottom: 1px dashed var(--line-soft);
  font-size: .88rem;
}
.spec:last-child { border-bottom: 0; }
.spec dt { font-family: var(--font-mono); font-size: .74rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; padding-top: .15rem; }
.spec dd { color: var(--text); text-wrap: pretty; }


/* ---------- services ---------- */
.svc__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--s4);
}
.svc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4);
  background: var(--surface);
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.svc:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px -18px var(--shadow);
}
.svc__no {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--accent-text);
  margin-bottom: var(--s3);
}
.svc h3 { font-size: 1.08rem; font-weight: 600; color: var(--ink); letter-spacing: -.015em; margin-bottom: .5rem; }
.svc__list {
  display: grid;
  gap: .65rem;
  margin-top: var(--s2);
  color: var(--text-muted);
  font-size: .9rem;
}
.svc__list li {
  position: relative;
  padding-left: 1rem;
}
.svc__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: .32rem;
  height: 1px;
  background: var(--accent);
}
.svc__actions { display: flex; justify-content: center; margin-top: var(--s5); }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .02em;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: .25rem .6rem;
  background: var(--paper);
}
.tags--lg li { font-size: .76rem; padding: .35rem .75rem; background: var(--surface); }

/* ---------- cases ---------- */
.cases { border-top: 1px solid var(--line); }
.case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--line);
  transition: background-color .22s var(--ease);
}
.case:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.case__head h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700; letter-spacing: -.025em; color: var(--ink);
  line-height: 1.2;
}
.case__org {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin-top: .6rem;
}
.case__body p { color: var(--text-muted); font-size: .96rem; margin-bottom: var(--s3); }

/* ---------- case studies ----------
   Detail pages under /work. They reuse the site's tokens and type scale, so
   nothing here re-declares colour — only the layout the article needs. */

.sec-note {
  margin-top: var(--s3);
  color: var(--text-muted);
  font-size: .95rem;
  max-width: 52ch;
  text-wrap: pretty;
}

/* index cards that link out to a study */
.cases--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s4);
  border-top: 0;
  margin-bottom: var(--s7);
}
.cases--grid .case {
  display: block;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .22s var(--ease), border-color .22s var(--ease),
              box-shadow .22s var(--ease);
}
.case--link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px -18px var(--shadow);
}
.case__no {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--accent-text);
  margin-bottom: .5rem;
}
.case__more {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--accent-text);
}
.case--link:hover .case__more { color: var(--accent-press); }

.cases__sub {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint);
}
.cases__subnote {
  font-size: .88rem; color: var(--text-muted);
  margin: .3rem 0 var(--s3);
}
.case--brief .case__body p { font-size: .92rem; }

/* ---- the article ---- */
.cs { padding-block: var(--s7) var(--s8); }

.cs-head { max-width: 46rem; margin-bottom: var(--s6); }
.cs-title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  color: var(--ink);
  margin-block: var(--s3) var(--s3);
  text-wrap: balance;
}
.cs-lede {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--s4);
  text-wrap: pretty;
}

/* the figures worth pulling out — never invented, only what the work states */
.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--s7);
}
.cs-fact { background: var(--paper-2); padding: var(--s4); }
.cs-fact__val {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--accent-text);
}
.cs-fact__label {
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .08em;
  color: var(--text-faint);
  margin-top: .5rem;
}

.cs-block { max-width: 42rem; margin-bottom: var(--s7); }
.cs-h {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s4);
}
.cs-block p { color: var(--text-muted); margin-bottom: var(--s3); text-wrap: pretty; }

.cs-step { margin-bottom: var(--s4); }
.cs-step h3 {
  font-size: 1.02rem; font-weight: 600; letter-spacing: -.015em;
  color: var(--ink); margin-bottom: .35rem;
}
.cs-step p { margin-bottom: 0; }

/* the one paragraph a reader should leave with */
.cs-pull {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink) !important;
  border-left: 3px solid var(--accent);
  padding-left: var(--s4);
}
.cs-note {
  font-size: .88rem;
  color: var(--text-faint) !important;
  font-style: italic;
}

.cs-nav {
  display: flex; justify-content: space-between; gap: var(--s4);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
  max-width: 42rem;
}
.cs-nav__link {
  font-size: .9rem;
  color: var(--text-muted);
  max-width: 20ch;
  transition: color .18s var(--ease);
}
.cs-nav__link--next { text-align: right; }
.cs-nav__link:hover { color: var(--accent-text); }

.cs-back {
  margin-top: var(--s4);
  font-family: var(--font-mono);
  font-size: .8rem;
}
.cs-back a { color: var(--accent-text); }
.cs-back a:hover { border-bottom: 1px solid currentColor; }

@media (max-width: 640px) {
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-nav { flex-direction: column; }
  .cs-nav__link--next { text-align: left; }
}

/* ---------- diagrams ----------
   Inline SVG, styled from here rather than with hard-coded colour, so a figure
   follows the theme like everything else. Shapes carry meaning: a circle is an
   actor, a rounded box a step, a hexagon something queued or held, a diamond a
   decision, a cylinder something stored. */
.cs-fig { max-width: 46rem; margin: 0 0 var(--s7); }
.cs-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.cs-fig figcaption {
  margin-top: var(--s3);
  font-size: .86rem;
  color: var(--text-faint);
  text-wrap: pretty;
}

.dg text { font-family: var(--font-mono); fill: var(--text-muted); }
.dg .t { font-size: 12px; fill: var(--ink); }
.dg .s { font-size: 10px; fill: var(--text-faint); }
.dg .k { font-size: 12px; fill: var(--accent-text); }

.dg .sh   { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.dg .sh--k { fill: color-mix(in srgb, var(--accent) 10%, transparent);
             stroke: var(--accent); stroke-width: 1.2; }
.dg .sh--g { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }

.dg .ln  { stroke: var(--line); stroke-width: 1.2; fill: none; }
.dg .ln--k { stroke: var(--accent); stroke-width: 1.4; fill: none; }
.dg .ln--x { stroke: var(--text-faint); stroke-width: 1; fill: none; stroke-dasharray: 3 3; }
.dg .head { fill: var(--text-faint); }
.dg .head--k { fill: var(--accent); }

/* current travelling along a wire — the dash moves, the line does not */
.dg .flow {
  stroke-dasharray: 5 7;
  animation: dg-flow 1.1s linear infinite;
}
.dg .flow--slow { animation-duration: 2.2s; }

@keyframes dg-flow { to { stroke-dashoffset: -12; } }

/* a pulse on the one node the diagram is about */
.dg .pulse { animation: dg-pulse 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes dg-pulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  /* infinite animations must stop outright — the global .01ms duration strobes */
  .dg .flow, .dg .pulse { animation-name: none !important; }
}

@media (max-width: 640px) {
  .cs-fig { overflow-x: auto; }
  .cs-fig svg { min-width: 32rem; }
}

/* ---------- experience ---------- */
.roles { border-top: 1px solid var(--line); }
.role {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: var(--s5);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.role__date {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  color: var(--ink);
}
.role__place {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--text-faint); margin-top: .3rem;
}
.role__title {
  font-size: 1.28rem; font-weight: 700; letter-spacing: -.025em; color: var(--ink);
  line-height: 1.25;
}
.role__tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 400;
  letter-spacing: .05em; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 100px;
  padding: .15rem .55rem;
  vertical-align: middle; margin-left: .35rem;
}
.role__co {
  color: var(--accent-text);
  font-size: .95rem; font-weight: 500;
  margin-block: .25rem var(--s3);
}
/* the employer name is a link where the company could be verified — a reader
   should be able to check the claim without leaving the page to search */
.role__co a {
  border-bottom: 1px solid transparent;
  transition: border-color .18s var(--ease);
}
.role__co a:hover { border-color: currentColor; }
.role__co a::after {
  content: " ↗";
  font-size: .8em;
  opacity: .55;
}
.bullets { display: grid; gap: .55rem; }
.bullets li {
  position: relative;
  padding-left: 1.35rem;
  font-size: .95rem;
  color: var(--text-muted);
}
.bullets li::before {
  content: "";
  position: absolute; left: 0; top: .68em;
  width: .5rem; height: 1px;
  background: var(--accent);
}

/* ---------- stack grid ---------- */
.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s5) var(--s4);
}
.stack__col h3 {
  font-family: var(--font-mono);
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s3);
}

/* ---------- hero cursor light ----------
   Position comes from script.js (transform, eased per frame). Everything
   else — colour, shape, pulse, and the backdrop-filter that lights up the
   chips — is CSS, so the look is tunable without touching the script.
   --------------------------------------------------------------------- */

/* outer element owns position + fade; the pseudo-elements below own their
   own transforms, so the drift animation never fights the pointer tracking */
.hero__glow {
  position: absolute;
  z-index: 2;
  left: 0; top: 0;
  width: min(var(--glow-size), 115vw);
  aspect-ratio: 1;
  /* script.js overwrites this each frame with the live pointer position;
     the standalone value keeps it centred before the first pointermove */
  transform: translate(50vw, 42%) translate(-50%, -50%);
  will-change: transform;
  pointer-events: none;
  opacity: 0;

  /* THIS is what illuminates the chips: backdrop-filter re-renders whatever
     is painted behind the element. saturate() intensifies the teal chips
     while leaving the near-neutral background almost untouched, so the
     light reads as falling ON them rather than sitting over them. */
  -webkit-backdrop-filter: var(--glow-filter);
          backdrop-filter: var(--glow-filter);

  /* the filter would otherwise stop at a hard square edge — this feathers
     both the filter region and the gradients inside it */
  -webkit-mask-image: radial-gradient(circle closest-side,
    #000 0%, rgba(0, 0, 0, .82) 40%, transparent 78%);
          mask-image: radial-gradient(circle closest-side,
    #000 0%, rgba(0, 0, 0, .82) 40%, transparent 78%);

  transition: opacity .4s var(--ease);
}
.hero:hover .hero__glow { opacity: 1; }

/* ONE blob, not a stack of them. The irregular silhouette comes from four
   offset gradient lobes painted into a *single* layer, so they can never
   drift apart or pulse against each other — the whole mass moves as one
   body. Shape change comes from the two animations below. */
.hero__glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 25% 21% at 46% 46%, var(--glow-core), transparent 70%),
    radial-gradient(ellipse 43% 32% at 37% 41%, var(--glow-core), transparent 74%),
    radial-gradient(ellipse 32% 42% at 61% 58%, var(--glow-core), transparent 74%),
    radial-gradient(ellipse 61% 51% at 50% 50%, var(--glow-mid),  transparent 78%);

  /* Two animations on ONE element, split across the individual transform
     properties so they compose instead of overwriting each other — a single
     `transform` on both would mean the last one simply wins. Drift rocks and
     wanders (15s), breath swells and dims (6.5s). The periods don't divide
     evenly, so the combination never visibly repeats. */
  animation: glow-drift   15s  ease-in-out infinite,
             glow-breathe 7s   ease-in-out infinite;
}

/* rotate + translate only */
@keyframes glow-drift {
  0%, 100% { rotate: -14deg; translate: -1% 1%; }
  25%      { rotate: 5deg;   translate: 2% -2%; }
  50%      { rotate: 16deg;  translate: 1% 2%; }
  75%      { rotate: 2deg;   translate: -2% -1%; }
}

/* scale + opacity only — the breath. Slightly non-uniform so it swells
   more across than down, like light spreading rather than a balloon. */
@keyframes glow-breathe {
  0%, 100% { scale: .8 .76;   opacity: .62; }
  40%      { scale: 1.2 1.13; opacity: 1; }
  60%      { scale: 1.17 1.1; opacity: .97; }
}

/* ---------- custom cursor ----------
   Two parts moving at different speeds: a dot pinned exactly to the pointer
   and a ring that lags a fraction behind it. script.js positions both and
   toggles the state classes; the sizing and states live here. The system
   cursor is only hidden once JS has confirmed it can draw a replacement. */
.hero--custom-cursor,
.hero--custom-cursor * { cursor: var(--cursor-mode); }

/* the blanket rule above also wipes the pointer the browser gives links, so
   put it back — except at night, where nothing shows a system cursor */
.hero--custom-cursor a,
.hero--custom-cursor button,
.hero--custom-cursor label,
.hero--custom-cursor summary { cursor: var(--cursor-link); }

/* day shows no custom cursor at all — emitter, aura, star and trail are
   night-mode kit. The light itself still tracks; it just isn't drawn. */
.hero__cursor { display: var(--cursor-parts); }

.hero__cursor {
  position: absolute; inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.hero__cursor.is-visible { opacity: 1; }

.cursor__ring,
.cursor__dot,
.cursor__trail {
  position: absolute; left: 0; top: 0;
  display: block;
  will-change: transform;
}

/* the ring's own transform is owned by JS, so state changes ride on a child
   box instead — otherwise the two would overwrite each other */

/* the aura: a small, soft copy of the hero light, breathing on the same
   6.5s clock so the emitter and the light it casts pulse together. Four
   offset lobes plus a blur keep it off-round — a single circle gradient
   reads as a disc no matter how soft its falloff is. */
.cursor__ring { width: var(--aura-size); height: var(--aura-size); z-index: 1; }
.cursor__ring::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 44% 34% at 40% 42%, color-mix(in srgb, var(--aura-tint) var(--aura-a1), transparent), transparent 72%),
    radial-gradient(ellipse 33% 45% at 60% 58%, color-mix(in srgb, var(--aura-tint) var(--aura-a2), transparent), transparent 74%),
    radial-gradient(ellipse 58% 50% at 50% 50%, color-mix(in srgb, var(--aura-tint) var(--aura-a3), transparent), transparent 78%);
  filter: blur(7px);
  animation: glow-breathe 7s ease-in-out infinite;
  transition: transform .28s var(--ease), opacity .28s var(--ease);
}

/* the filament: a hot point fading into its own halo. The blur dissolves
   the gradient's edge so it reads as light rather than a drawn dot. */
.cursor__dot { width: 12px; height: 12px; z-index: 2; }
.cursor__star { transition: transform .28s var(--ease); }

.cursor__dot::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    var(--spark) 0%,
    var(--accent) 54%,
    color-mix(in srgb, var(--accent) 35%, transparent) 100%);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--halo) 92%, transparent),
    0 0 24px color-mix(in srgb, var(--halo) 55%, transparent),
    0 0 46px color-mix(in srgb, var(--halo) 30%, transparent);
  filter: blur(1.6px);
  transition: transform .28s var(--ease);
}

/* the flare: two crossed ray pairs making an eight-point star. It rides
   INSIDE .cursor__dot, so it inherits the filament's exact position from JS
   for free — no extra element to drive each frame. Rays pulse on the same
   7s clock as the glow, so the whole light breathes as one. */
.cursor__star {
  position: absolute;
  left: 50%; top: 50%;
  width: 132px; height: 132px;
  margin: -66px 0 0 -66px;
  pointer-events: none;
  animation: star-flare 7s  ease-in-out infinite,
             star-turn  26s linear      infinite;
}
.cursor__star::before,
.cursor__star::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 0%,
      var(--flare-edge) 34%, var(--flare-core) 50%, var(--flare-edge) 66%,
      transparent 100%) center / 100% var(--flare-w) no-repeat,
    linear-gradient(180deg, transparent 0%,
      var(--flare-edge) 34%, var(--flare-core) 50%, var(--flare-edge) 66%,
      transparent 100%) center / var(--flare-w) 100% no-repeat;
  /* thicker and crisper on paper, thinner and hazier on black — a soft ray
     that works against near-black simply disappears against #fbfaf7 */
  filter: blur(var(--flare-blur));
  /* parent opacity is animated by star-flare, so the theme's visibility
     multiplier rides here on the children instead — the two compose */
  opacity: var(--flare-opacity);
}
/* second pair turned 45°, shorter and dimmer — an even star reads flat */
.cursor__star::after {
  transform: rotate(45deg) scale(.62);
  opacity: calc(.5 * var(--flare-opacity));
}

@keyframes star-flare {
  0%, 100% { scale: .5;   opacity: .3; }
  40%      { scale: 1.16; opacity: .95; }
  60%      { scale: 1.04; opacity: .82; }
}
@keyframes star-turn {
  to { rotate: 360deg; }
}

/* trail ghosts, built by script.js. Each is blurrier and fainter than the
   one ahead, so the gap between pointer and light reads as a tail. */
.cursor__trail {
  position: absolute; left: 0; top: 0;
  z-index: 0;                    /* appended last — keep it behind the emitter */
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    color-mix(in srgb, var(--accent) 42%, transparent) 0%,
    color-mix(in srgb, var(--accent) 16%, transparent) 46%,
    transparent 78%);
  filter: blur(6px);
  will-change: transform;
  pointer-events: none;
}

/* over something clickable the source flares up */
.hero__cursor.is-active .cursor__ring::before { transform: scale(1.8); }
.hero__cursor.is-active .cursor__dot::before  { transform: scale(1.5); }
.hero__cursor.is-active .cursor__star { transform: scale(1.45); }

/* press dims and contracts it, like a lamp being pushed down */
.hero__cursor.is-down .cursor__ring::before { transform: scale(.85); opacity: .7; }
.hero__cursor.is-down .cursor__dot::before  { transform: scale(.75); }
.hero__cursor.is-down .cursor__star { transform: scale(.6); }
.hero__cursor.is-down.is-active .cursor__ring::before { transform: scale(1.5); }

@media (hover: none), (pointer: coarse) {
  .hero__cursor { display: none; }
}

/* ---------- hero backdrop marquee ---------- */
.hero__bg {
  --mq-gap: .6rem;
  /* Pin only the decorative backdrop; the hero copy remains in normal flow.
     Following sections paint above this layer and cover it as they enter. */
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;   /* decorative — must never eat a click */
  user-select: none;
  opacity: var(--bg-opacity);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

.hero__bg-flow,
.hero__bg-set { height: 100%; }

.hero__bg-set {
  display: grid;
  /* Equal-height slots keep every row centre the same distance apart,
     including the last-to-first join between the two looping sets. */
  grid-template-rows: repeat(7, minmax(0, 1fr));
  align-items: center;
}

/* JS adds the leading copy before enabling this motion, so the no-script
   fallback remains a single, correctly spaced set of rows. */
.hero__bg--flowing .hero__bg-flow {
  height: 200%;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  translate: 0 -50%;
  will-change: translate;
}

/* Click easter egg: a short-lived wave brightens the chips it crosses. Width
   and height animate instead of transform, so the one-pixel rings stay crisp
   as they expand. */
.hero__ripple {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  translate: -50% -50%;
  border: 1px solid color-mix(in srgb, var(--accent-text) 72%, transparent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  contain: layout paint;
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 32%, transparent);
  -webkit-backdrop-filter: saturate(2.2) brightness(1.25);
          backdrop-filter: saturate(2.2) brightness(1.25);
  animation: hero-ripple 1.3s ease-out forwards;
}

.hero__ripple::before,
.hero__ripple::after {
  content: "";
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--accent-text) 48%, transparent);
  border-radius: inherit;
}
.hero__ripple::before { inset: 16%; }
.hero__ripple::after  { inset: 34%; opacity: .65; }

@keyframes hero-ripple {
  0%   { width: 0; height: 0; opacity: 0; }
  10%  { opacity: .9; }
  68%  { opacity: .42; }
  100% { width: var(--ripple-size); height: var(--ripple-size); opacity: 0; }
}

/* scrim so the headline never fights the chips behind it */
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    100deg,
    var(--paper) 0%,
    color-mix(in srgb, var(--paper) 88%, transparent) 38%,
    color-mix(in srgb, var(--paper) 40%, transparent) 66%,
    transparent 100%
  );
}

.hero__bg .chip {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}

.marquee {
  overflow: hidden;
  /* fade the ends so chips enter and leave instead of being clipped */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__inner {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: mq-scroll var(--mq-dur, 44s) linear infinite;
}
.marquee__track {
  display: flex;
  gap: var(--mq-gap);
  flex: none;
  /* The seam gap belongs inside each equal-width half. An outer flex gap
     would make -50% stop half a gap short and reveal the animation restart. */
  padding-right: var(--mq-gap);
}

/* Two identical tracks, each including its trailing seam gap, make the second
   track start at exactly 50% of the strip. */
@keyframes mq-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee--right .marquee__inner { animation-direction: reverse; }

/* backdrop is pointer-events:none, so hover can't pause it either —
   prefers-reduced-motion is what stops it */

.chip {
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1;
  white-space: nowrap;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: .6rem 1rem;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent-text); }

/* Must sit AFTER `.marquee { overflow: hidden }` — the shorthand would otherwise
   win on source order and clip the row instead of letting it scroll. */
@media (prefers-reduced-motion: reduce) {
  /* infinite animations must be cancelled outright — the global
     `animation-duration: .01ms` would turn them into strobing */
  .marquee__inner,
  .hero__glow::before,
  .cursor__ring::before,
  .cursor__star { animation-name: none !important; }
  .marquee {
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .marquee__track[aria-hidden="true"] { display: none; }
  .hero__bg--flowing .hero__bg-flow { translate: 0 -50% !important; }
  .hero__ripple { display: none; }
}
.soft {
  margin-top: var(--s6);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--s4);
  background: var(--surface);
}
.soft h3 {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: .6rem;
}
.soft p { color: var(--text); font-size: .95rem; }

/* ---------- principles ---------- */
.principles__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.sec-head--sticky { position: sticky; top: 90px; margin-bottom: 0; }
.rules { counter-reset: rule; display: grid; }
.rules li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: var(--s3);
  padding-block: var(--s4);
  border-top: 1px solid var(--line);
}
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules li::before {
  grid-column: 1; grid-row: 1;
  content: "0" counter(rule);
  font-family: var(--font-mono); font-size: .8rem;
  color: var(--accent-text);
  padding-top: .18rem;
}
/* both text children stay in column 2 — otherwise <p> auto-places under the counter */
.rules h3 {
  grid-column: 2; grid-row: 1;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -.015em;
  color: var(--ink); margin-bottom: .3rem;
}
.rules p { grid-column: 2; grid-row: 2; font-size: .93rem; color: var(--text-muted); max-width: 62ch; }
.rules li:first-child { padding-top: 0; border-top: 0; }

/* ---------- CTA ---------- */
.cta {
  background: var(--invert-bg);
  color: var(--invert-fg);
  padding-block: var(--s8);
}
.cta__inner { max-width: 62ch; }
.cta__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.06; letter-spacing: -.038em; font-weight: 800;
  color: var(--invert-fg);
  margin-block: var(--s3) var(--s3);
}
.cta__body { color: var(--invert-dim); font-size: 1.05rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

/* ---------- footer ---------- */
.site-foot { background: var(--paper-2); border-top: 1px solid var(--line-soft); padding-block: var(--s6) var(--s4); }
.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
}
.foot__name { font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-size: 1.1rem; }
.foot__role { font-family: var(--font-mono); font-size: .76rem; color: var(--text-faint); margin-top: .35rem; }
.foot__nav { display: grid; gap: .45rem; align-content: start; }
.foot__label {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: .2rem;
}
.foot__nav a { font-size: .88rem; color: var(--text-muted); width: fit-content; border-bottom: 1px solid transparent; }
.foot__nav a:hover { color: var(--ink); border-color: var(--accent); }
.foot__copy {
  grid-column: 1 / -1;
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: .72rem; color: var(--text-faint);
}

/* ---------- pet ----------
   Lives in the banner: the brand mark IS its body, so it is present on every
   part of the page rather than being a hero decoration. Bubbles hang from it
   and travel downward — in, and out. */
.pet {
  position: relative;
  display: flex;
  align-items: center;
}

/* owns the close button's positioning context, so the × stays pinned to the
   mark rather than drifting to the corner of whatever bubble is open */
.pet__mark { position: relative; display: block; }

.pet__body {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.pet__body:hover { transform: scale(1.08); color: var(--accent-press); }

/* The mark: the logo shape masking a flat accent fill. It used to fill from
   the bottom as a model downloaded; that download moved to the server, so the
   glyph is simply the logo again. */
.brand__mark {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  display: block;
  background: var(--accent);
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
}


/* While it's waiting on the server the mark breathes and a halo pulses out
   behind it. Two unrelated clocks (2.6s, 3.9s) so they never lock into one
   throb. Scale only on the mark, so the logo shape stays readable. */
.pet[data-state="speaking"] .brand__mark {
  animation: pet-breathe 2.6s ease-in-out infinite;
}

@keyframes pet-breathe {
  0%, 100% { scale: .94; }
  50%      { scale: 1.07; }
}

.pet__body::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    color-mix(in srgb, var(--accent) 42%, transparent) 0%,
    color-mix(in srgb, var(--accent) 16%, transparent) 45%,
    transparent 74%);
  opacity: 0;
  pointer-events: none;
}
.pet[data-state="speaking"] .pet__body::after {
  animation: pet-halo 3.9s ease-in-out infinite;
}

@keyframes pet-halo {
  0%, 100% { opacity: .25; scale: .75; filter: blur(2px); }
  50%      { opacity: .9;  scale: 1.25; filter: blur(5px); }
}

/* ---- bubble: hangs below the mark, liquid glass ---- */
.pet__bubble {
  position: absolute;
  top: calc(100% + 26px);        /* clears the header rule before it appears */
  left: -6px;
  z-index: 5;
  width: max-content;
  max-width: min(20rem, 60vw);
  padding: .7rem 1rem;
  border-radius: 1.15rem;
  color: var(--ink);
  font-size: .86rem;
  line-height: 1.42;
  text-wrap: pretty;
  cursor: pointer;
  background:
    linear-gradient(150deg, var(--glass-tint) 0%, transparent 58%),
    var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
          backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 16px 36px -22px var(--shadow), inset 0 1px 0 var(--glass-sheen);
  transform-origin: 28px -22px;        /* swings down from the mark */
  animation: pet-say .4s cubic-bezier(.2, 1.3, .4, 1) both;
}
.pet__bubble[hidden] { display: none; }

.pet__text { margin: 0; min-height: 1.2em; }

/* drops in from the mark… */
@keyframes pet-say {
  from { opacity: 0; transform: scale(.8) translateY(-22px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* …and keeps going down on the way out */
.pet__bubble.is-out { animation: pet-smoke .9s ease-in forwards; }

@keyframes pet-smoke {
  0%   { opacity: 1;   filter: blur(0);    transform: scale(1) translateY(0); }
  30%  { opacity: .85; filter: blur(3px);  transform: scale(1.06) translateY(12px); }
  100% { opacity: 0;   filter: blur(18px); transform: scale(1.4) translateY(42px); }
}

/* the model is desktop-only, but the mark is the logo — it always stays */
@media (max-width: 900px) {
  .pet__bubble { max-width: min(17rem, 72vw); }
}

@media (prefers-reduced-motion: reduce) {
  /* infinite ones must stop outright — the global .01ms duration would strobe */
  .pet[data-state="speaking"] .brand__mark,
  .pet[data-state="speaking"] .pet__body::after { animation-name: none !important; }
}

/* ---------- responsive ---------- */
/* the specs card is the first thing to suffer as the viewport narrows —
   let it give up width before the headline does */
@media (max-width: 1180px) {
  .hero__grid { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
}

@media (max-width: 1000px) {
  .hero__grid,
  .principles__wrap { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2rem, 6vw, 3.2rem); }
  .specs { max-width: 34rem; }
  .sec-head--sticky { position: static; margin-bottom: var(--s5); }
  .role { grid-template-columns: 11rem minmax(0, 1fr); gap: var(--s4); }
  .case { grid-template-columns: 1fr; gap: var(--s3); }
}

@media (max-width: 820px) {
  .nav { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  :root { --s7: 3rem; --s8: 4rem; }
  .head-inner { gap: .5rem; }
  .head-inner .brand__name { display: none; }
  .head-inner > .btn { padding-inline: .75rem; font-size: .7rem; }
  .role { grid-template-columns: 1fr; gap: var(--s2); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
  .hero__cta .btn, .cta__actions .btn { flex: 1 1 auto; }
  .chip { font-size: .74rem; padding: .5rem .8rem; }
  .hero { --mq-gap: .45rem; }
  .hero__bg { opacity: calc(var(--bg-opacity) * .8); }
  .hero__title { font-size: clamp(1.65rem, 8vw, 2.4rem); }
  .specs { max-width: none; }
  .spec { grid-template-columns: 1fr; gap: .15rem; }
  .spec dt { letter-spacing: .12em; }
}

/* ---------- print ---------- */
@media print {
  .site-head, .cta__actions, .hero__cta, .hero__bg, .site-foot { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sec, .band, .hero { padding-block: 1rem; }
  .case, .role { break-inside: avoid; }
}
