/* codebyte site styles
   Tokens → base → components → sections → responsive
------------------------------------------------------------------ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* palette */
  --ink: #0f2a30;
  --ink-2: #1d4149;
  --paper: #ffffff;
  --mist: #ebf1f0;
  --line: #c9d6d3;
  --line-strong: #8ea3a0;
  --muted: #55696d;
  --signal: #f5c400;
  --signal-ink: #6b5600;

  /* type scale, ratio ≈ 1.25 */
  --t-1: 0.9375rem;  /* 15 */
  --t0: 1.0625rem;   /* 17 */
  --t1: 1.3125rem;   /* 21 */
  --t2: 1.625rem;    /* 26 */
  --t3: 2.0625rem;   /* 33 */
  --t4: 2.5625rem;   /* 41 */
  --t5: 3.25rem;     /* 52 */
  --t6: 4rem;        /* 64 */

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;  /* logo */
  --title: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;           /* headings */
  --body: "IBM Plex Sans", "Segoe UI", Roboto, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* base ------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--t0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--title); margin: 0; }
p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
.nowrap { white-space: nowrap; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .5rem .75rem; background: var(--ink); color: var(--paper);
  text-decoration: none; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.wrap--narrow > * { max-width: 48rem; }

/* buttons & links ------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.35rem;
  font: 500 var(--t0) / 1 var(--body);
  color: var(--paper); background: var(--ink);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn--small { padding: .55rem .95rem; font-size: var(--t-1); }
.btn--signal { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn--signal:hover { background: #ffd21a; border-color: #ffd21a; }
.btn--ghost { background: transparent; border-color: color-mix(in srgb, var(--paper) 35%, transparent); color: var(--paper); }
.btn--ghost:hover { background: color-mix(in srgb, var(--paper) 10%, transparent); border-color: var(--paper); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 500; text-decoration: none;
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: .1rem;
}
.link-arrow::after {
  content: ""; width: .55em; height: .55em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .18s var(--ease);
}
.link-arrow:hover { border-color: var(--ink); }
.link-arrow:hover::after { transform: translateX(.15em) rotate(-45deg); }

/* brand ------------------------------------------------------------ */

.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  text-decoration: none;
  font: 600 var(--t1) / 1 var(--display);
  letter-spacing: -.01em;
}
.byte .bit { fill: none; stroke: currentColor; stroke-width: 1.25; }
.byte .bit--1 { fill: currentColor; }
.brand__name { padding-top: .05em; }

/* header ------------------------------------------------------------ */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-head.is-stuck { border-bottom-color: var(--line); }
.site-head__row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.25rem;
}
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) {
  font-size: var(--t-1); font-weight: 500;
  text-decoration: none; color: var(--ink);
  border-bottom: 1.5px solid transparent;
  padding: .2rem 0;
  transition: border-color .18s var(--ease);
}
.nav a:not(.btn):hover { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none; width: 2.5rem; height: 2.5rem;
  padding: 0; border: 0; background: none; cursor: pointer;
  position: relative;
}
.nav-toggle__bar {
  position: absolute; left: .5rem; right: .5rem; height: 2px;
  background: var(--ink); transition: transform .2s var(--ease), top .2s var(--ease);
}
.nav-toggle__bar:nth-child(1) { top: calc(50% - 4px); }
.nav-toggle__bar:nth-child(2) { top: calc(50% + 3px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { top: 50%; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { top: 50%; transform: rotate(-45deg); }

/* hero -------------------------------------------------------------- */

.hero { position: relative; isolation: isolate; padding: clamp(3rem, 8vw, 6.5rem) 0 var(--band); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 100%;
  opacity: .55;
  mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.hero__title {
  font-size: clamp(var(--t4), 5.2vw, var(--t6));
  font-weight: 650;
  line-height: 1.02; letter-spacing: -.025em;
  max-width: 14ch;
  text-wrap: balance;
}
.hero__lead {
  margin-top: 1.75rem; font-size: var(--t1); line-height: 1.5;
  color: var(--ink-2); max-width: 34ch;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2.25rem; }
.hero__note { margin-top: 1.5rem; font-size: var(--t-1); color: var(--muted); }

/* hero intro: title words rise out of a clip, then lead → actions → note, then the map sweeps */
.js .hero__title { opacity: 0; }
.js .hero__title.is-split { opacity: 1; }
.hero__title .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: .08em 0 .16em; margin: -.08em 0 -.16em;
}
.hero__title .w > span {
  display: inline-block; transform: translateY(125%);
  transition: transform .65s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.hero.is-in .hero__title .w > span { transform: none; }
.js .hero__copy > :not(.hero__title) {
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js .hero.is-in .hero__copy > :not(.hero__title) { opacity: 1; transform: none; }
.js .hero__lead { transition-delay: .45s; }
.js .hero__actions { transition-delay: .55s; }
.js .hero__note { transition-delay: .65s; }

/* automation map: the one loud element on the page */
.automap { margin: 0; }
.automap__frame {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: .5rem .75rem;
}
.automap__cols {
  grid-column: 2; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  font-size: .68rem; color: var(--muted); text-align: center; align-items: end;
}
.automap__cols span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.automap__rows {
  grid-row: 2; display: grid; grid-template-rows: repeat(8, 1fr); gap: 4px;
  font-size: .78rem; color: var(--ink-2); align-items: center; text-align: right;
}
.automap__rows span { white-space: nowrap; line-height: 1; }
.automap__cells {
  grid-row: 2; grid-column: 2;
  display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  gap: 4px;
}
.cell {
  display: block; aspect-ratio: 1;
  border: 1.5px solid var(--line); border-radius: 3px;
  background: var(--paper);
  transition: background .32s var(--ease), border-color .32s var(--ease), transform .32s var(--ease), opacity .18s var(--ease);
  transition-delay: var(--d, 0ms);
}
.automap.is-ready .cell { transition-delay: 0ms; }
.cell--auto.is-on { background: var(--ink); border-color: var(--ink); }
.cell--human.is-on {
  border-color: var(--ink);
  background:
    radial-gradient(circle, var(--signal) 0 30%, transparent 32%) center / 100% 100% no-repeat,
    var(--paper);
}
.cell:not(.is-on) { transform: scale(.75); }
.automap__legend {
  display: flex; gap: 1.5rem; justify-content: flex-end;
  margin-top: 1rem; font-size: var(--t-1); color: var(--muted);
}
.automap__legend span { display: inline-flex; align-items: center; gap: .5rem; }
.automap__legend .cell { width: .9rem; transform: none; transition: none; }

/* hover: the pointed-at cell's row and column stay, the rest steps back, the legend explains */
.automap__rows span, .automap__cols span { transition: color .18s var(--ease), opacity .18s var(--ease); }
.automap.is-hover .automap__cells .cell:not(.is-hl) { opacity: .22; }
.automap.is-hover .automap__cells .cell:hover { transform: scale(1.1); }
.automap.is-hover :is(.automap__rows, .automap__cols) span:not(.is-hl) { opacity: .35; }
.automap.is-hover :is(.automap__rows, .automap__cols) span.is-hl { color: var(--ink); }
.automap__legend { flex-wrap: wrap; row-gap: .5rem; }
.automap__hint { flex: 1 0 100%; order: 1; justify-content: flex-end; color: var(--ink); min-height: 1.4em; }
.automap__hint:empty::before { content: "Hover a cell"; color: var(--line-strong); }
@media (hover: none) { .automap__hint { display: none; } }

/* bands ------------------------------------------------------------- */

.band { padding: var(--band) 0; }
.band--mist { background: var(--mist); }
.band--ink { background: var(--ink); color: var(--paper); }
.band--ink .h-section { color: var(--paper); }

.h-section {
  font-size: clamp(var(--t3), 3.6vw, var(--t5));
  font-weight: 600;
  line-height: 1.06; letter-spacing: -.02em;
  max-width: 22ch; text-wrap: balance;
  margin-bottom: clamp(2.25rem, 5vw, 4rem);
}

/* legal pages (imprint, privacy) */
.legal .h-section { margin-bottom: 1.25rem; }
.legal__meta { color: var(--muted); font-size: var(--t-1); margin-bottom: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: var(--t2); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin: clamp(2rem, 5vw, 3rem) 0 .75rem; }
.legal p + p, .legal ul + p, .legal p + ul, .legal dl + p { margin-top: .75rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal li + li { margin-top: .35rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.5rem; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.legal a { text-decoration-thickness: 1px; text-underline-offset: .15em; }
.legal .todo { background: var(--signal); color: var(--signal-ink); padding: 0 .25em; border-radius: 2px; } /* placeholder highlight; remove the span when filling in */
@media (max-width: 40rem) {
  .legal dl { grid-template-columns: 1fr; gap: .1rem; }
  .legal dt { margin-top: .6rem; }
}

/* approach */
.triptych {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.triptych__item { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.triptych__item h3 { font-size: var(--t2); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.triptych__item p { margin-top: 1rem; color: var(--ink-2); max-width: 36ch; }

/* diagrams: same grammar as the automap — outlined square = step, filled = runs on its own,
   yellow dot = a person decides, lines = how work moves. Drawn once the diagram is well inside the viewport. */
.dia { display: block; width: 100%; max-width: 22rem; height: auto; margin-bottom: 1.25rem; overflow: visible; }
.dia__sq { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.dia__sq--on { fill: var(--ink); }
.dia__dot { fill: var(--signal); }
.dia__ln { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-linecap: round; }
.dia__ln--ink { stroke: var(--ink); }
.js .dia__ln--draw {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 1s + .25s);
}
.js .dia.is-in .dia__ln--draw { stroke-dashoffset: 0; }
.js .dia__pop {
  opacity: 0; transform: scale(.6); transform-box: fill-box; transform-origin: center;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  transition-delay: calc(var(--d, 0) * 1s + .25s);
}
.js .dia.is-in .dia__pop { opacity: 1; transform: none; }

/* services: definition list, title left, body right */
.services { display: grid; }
.services__item {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem 4rem;
  padding: 2.25rem 0; border-top: 1px solid var(--line);
}
.services__item:last-child { border-bottom: 1px solid var(--line); }
.services__item dt {
  font: 600 var(--t2) / 1.15 var(--title); letter-spacing: -.015em;
}
.services__item dd { margin: 0; }
.services__item p { color: var(--ink-2); max-width: 52ch; }
.services__item ul { margin-top: 1.1rem; display: grid; gap: .35rem; }
.services__item li {
  position: relative; padding-left: 1.4rem; color: var(--ink); font-size: var(--t-1);
}
.services__item li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .55rem; height: .55rem; background: var(--ink); border-radius: 2px;
}

/* process: a real sequence, so it gets numbers */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.steps__item {
  counter-increment: step;
  position: relative; padding-top: 1.25rem;
  border-top: 2px solid transparent; /* the visible line is ::after, so it can start right of the badge */
}
.steps__item::before {
  content: counter(step);
  position: absolute; top: -1.05rem; left: 0;
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  background: var(--ink); color: var(--paper); border-radius: 3px;
  font: 600 var(--t-1) / 1 var(--display);
}
.steps__item::after {
  content: ""; position: absolute; left: 2.6rem; right: 0; top: -2px; height: 2px;
  background: var(--ink); transform-origin: left;
}
/* Steps that enter together play strictly one after another (--seq from script.js):
   badge pops → copy fades in → line draws → next step. One step every .55s. */
.js .steps .steps__item { transition-delay: calc(var(--seq, 0) * .55s + .1s); }
.js .steps__item::before {
  opacity: 0; transform: scale(.6);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  transition-delay: calc(var(--seq, 0) * .55s);
}
.js .steps__item.is-in::before { opacity: 1; transform: none; }
.js .steps__item::after {
  transform: scaleX(0);
  transition: transform .35s var(--ease);
  transition-delay: calc(var(--seq, 0) * .55s + .2s);
}
.js .steps__item.is-in::after { transform: none; }
.steps__item h3 { margin-top: .9rem; font-size: var(--t2); font-weight: 600; letter-spacing: -.015em; }
.steps__when { display: block; font-size: var(--t-1); color: var(--muted); }
.steps__item p { margin-top: .75rem; color: var(--ink-2); }

/* outcomes: fan of threads left, the three outcomes right */
.outcomes__grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.outcomes__grid .h-section { margin-bottom: 2rem; }
.outcomes__grid .outcomes { grid-template-columns: 1fr; gap: 1.5rem; }
.fan { display: block; width: 100%; height: auto; }
.fan__thread { fill: none; stroke: var(--paper); stroke-opacity: .32; stroke-width: 1.25; }
.fan__trunk { fill: none; stroke: var(--paper); stroke-width: 3; stroke-linecap: round; }
.fan__node { fill: var(--signal); }
.js .fan__thread, .js .fan__trunk {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s var(--ease);
  transition-delay: calc(var(--d, 0) * 60ms + .2s);
}
.js .fan__trunk { transition-duration: .7s; transition-delay: 1.3s; }
.js .fan__node {
  opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center;
  transition: opacity .3s var(--ease), transform .3s var(--ease); transition-delay: 1.7s;
}
.js .fan.is-in :is(.fan__thread, .fan__trunk) { stroke-dashoffset: 0; }
.js .fan.is-in .fan__node { opacity: 1; transform: none; }
.outcomes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.outcomes__item { border-top: 2px solid var(--signal); padding-top: 1.25rem; }
.outcomes__item h3 { font-size: var(--t2); font-weight: 600; letter-spacing: -.015em; }
.outcomes__item p { margin-top: .9rem; color: color-mix(in srgb, var(--paper) 78%, var(--ink)); max-width: 34ch; }
.outcomes__note {
  margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 44ch;
  color: color-mix(in srgb, var(--paper) 72%, var(--ink));
  border-left: 3px solid var(--signal); padding-left: 1rem;
}

/* duotone: greyscale photo, luminosity-blended over ink → one-colour image in our palette */
.duo { position: relative; background: var(--ink); overflow: hidden; }
.duo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; opacity: .55; }

/* where it applies: full-bleed photo band, light text */
.applies { position: relative; color: var(--paper); }
.applies__photo { position: absolute; inset: 0; }
.applies__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(15 42 48 / .92) 0 35%, rgb(15 42 48 / .55)); }
.applies > .wrap { position: relative; }
.applies .h-section { color: var(--paper); }
.applies .domains__item { border-top-color: var(--signal); }
.applies .domains__item li { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); border-bottom-color: rgb(255 255 255 / .18); }

/* domains */
.domains {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.domains__item { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.domains__item h3 { font-size: var(--t2); font-weight: 600; letter-spacing: -.015em; }
.domains__item ul { margin-top: 1rem; display: grid; gap: .5rem; }
.domains__item li {
  padding: .45rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-size: var(--t-1);
}
.tools { margin-top: clamp(2.5rem, 5vw, 4rem); }
.tools__label { font-size: var(--t-1); font-weight: 600; margin-bottom: .75rem; }

/* ticker: one list, repeated once, slid by exactly one list width so the loop is seamless */
.ticker {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding: .75rem 0;
}
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__list { display: flex; }
.ticker__list li {
  display: inline-flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem;
  font: 500 var(--t-1) / 1 var(--body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: color-mix(in srgb, var(--paper) 70%, var(--ink));
}
.ticker__list li::after { content: ""; width: .5rem; height: .5rem; background: color-mix(in srgb, var(--paper) 40%, var(--ink)); border-radius: 1px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* faq */
.faq { border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line-strong); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0;
  font: 500 var(--t1) / 1.3 var(--title); letter-spacing: -.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: 0 0 auto; width: .9rem; height: .9rem;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform .25s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__body { overflow: hidden; }
.faq__body p { padding-bottom: 1.5rem; color: var(--ink-2); max-width: 60ch; }

/* contact: duotone photo behind, copy on the left */
.contact { position: relative; }
.contact__photo { position: absolute; inset: 0; }
.contact__photo img { transform: scale(1.35); transform-origin: 0% 50%; } /* scale from the left edge: the tower moves into the empty right half, no gap */
.contact__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(15 42 48 / .94) 0 40%, rgb(15 42 48 / .6)); }
.contact__inner { position: relative; text-align: left; }
.contact__title {
  font-size: clamp(var(--t3), 4.4vw, var(--t5));
  font-weight: 600; line-height: 1.06; letter-spacing: -.02em;
  text-wrap: balance;
}
.contact__lead { margin-top: 1.25rem; font-size: var(--t1); max-width: 40ch; color: color-mix(in srgb, var(--paper) 80%, var(--ink)); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2.25rem; }
.contact__mail { color: var(--paper); text-decoration: none; border-bottom: 1.5px solid var(--signal); padding-bottom: .1rem; }
.contact__mail:hover { border-bottom-width: 2px; }

/* footer */
.site-foot { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.site-foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand--foot { font-size: var(--t0); }
.site-foot__nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-foot__nav a { font-size: var(--t-1); color: var(--muted); text-decoration: none; }
.site-foot__nav a:hover { color: var(--ink); }
.site-foot__legal { font-size: var(--t-1); color: var(--muted); }

/* scroll reveal ------------------------------------------------------
   Selector list mirrors REVEAL in script.js. --i is set per batch that
   enters the viewport together, so grid items stagger and lone items don't. */
.js :is(.h-section, .triptych__item, .services__item, .steps__item, .outcomes__item, .outcomes__note, .fan,
        .domains__item, .tools, .faq__item, .contact__title, .contact__lead, .contact__actions) {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js :is(.h-section, .triptych__item, .services__item, .steps__item, .outcomes__item, .outcomes__note, .fan,
        .domains__item, .tools, .faq__item, .contact__title, .contact__lead, .contact__actions).is-in {
  opacity: 1; transform: none;
}

/* booking dialog ------------------------------------------------------ */

.book {
  width: min(100% - 2rem, 40rem); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0; background: transparent; color: var(--paper);
  opacity: 0; transform: translateY(10px) scale(.985);
  transition: opacity .22s var(--ease), transform .22s var(--ease),
              display .22s allow-discrete, overlay .22s allow-discrete;
}
.book[open] { opacity: 1; transform: none; }
@starting-style { .book[open] { opacity: 0; transform: translateY(10px) scale(.985); } }
.book::backdrop {
  background: rgb(15 42 48 / .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .22s var(--ease), display .22s allow-discrete, overlay .22s allow-discrete;
}
.book[open]::backdrop { opacity: 1; }
@starting-style { .book[open]::backdrop { opacity: 0; } }

.book__card {
  display: flex; flex-direction: column; max-height: calc(100dvh - 2rem);
  background: var(--ink); border-radius: 6px; overflow: hidden;
}
.book__head { position: relative; padding: 1.5rem 1.75rem 1.25rem; }
.book__title { font: 600 var(--t2) / 1.15 var(--title); letter-spacing: -.015em; padding-right: 2.5rem; }
.book__lead { margin-top: .4rem; font-size: var(--t-1); color: color-mix(in srgb, var(--paper) 68%, var(--ink)); }
.book__close {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 2.25rem; height: 2.25rem;
  border: 0; background: none; border-radius: var(--radius); color: var(--paper); cursor: pointer;
  transition: background .18s var(--ease);
}
.book__close:hover { background: var(--ink-2); }
.book__close-bar { position: absolute; left: .6rem; right: .6rem; top: 50%; height: 2px; background: currentColor; }
.book__close-bar:nth-child(1) { transform: rotate(45deg); }
.book__close-bar:nth-child(2) { transform: rotate(-45deg); }
.book__body { display: grid; gap: 1.1rem; padding: 1.5rem 1.75rem; background: var(--ink-2); overflow: auto; }
.book__foot { display: flex; justify-content: flex-end; gap: 1rem; padding: 1.1rem 1.75rem; }
.book__card.is-done :is(.book__body, .book__foot) { display: none; }
.book__card.is-done .book__done { display: grid; }
.book__done { gap: 1rem; justify-items: start; padding: 1.5rem 1.75rem 1.75rem; background: var(--ink-2); }
.book__done-title { font: 600 var(--t1) / 1.2 var(--title); letter-spacing: -.01em; }
.book__done p { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); }
.book__done-link { color: var(--paper); text-decoration: none; border-bottom: 1.5px solid var(--signal); }

.field { display: grid; gap: .45rem; }
.field__label { font-size: var(--t-1); font-weight: 500; }
.field__label em { margin-left: .35rem; font-style: normal; font-weight: 400; color: color-mix(in srgb, var(--paper) 55%, var(--ink-2)); }
.field__input {
  width: 100%; padding: .7rem .85rem;
  font: inherit; font-size: var(--t0); line-height: 1.3; color: var(--paper);
  background: var(--ink); border: 1px solid color-mix(in srgb, var(--paper) 16%, var(--ink)); border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field__input:hover { border-color: color-mix(in srgb, var(--paper) 30%, var(--ink)); }
.field__input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 28%, transparent); }
.field__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--ink) inset; -webkit-text-fill-color: var(--paper); }
.field__select { position: relative; display: block; }
.field__select select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; cursor: pointer; }
.field__select option { color: var(--ink); background: var(--paper); }
.field__select::after {
  content: ""; position: absolute; right: .95rem; top: 50%; width: .5rem; height: .5rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
  color: color-mix(in srgb, var(--paper) 70%, var(--ink));
}
.is-invalid .field__input:invalid { border-color: #ff8f8f; }
.field__error { font-size: var(--t-1); color: #ffb3b3; }

/* responsive -------------------------------------------------------- */

@media (max-width: 64em) {
  .hero__grid { grid-template-columns: 1fr; }
  .outcomes__grid { grid-template-columns: 1fr; }
  .fan { max-width: 34rem; }
  .automap { max-width: 34rem; }
  .hero__title { max-width: 16ch; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 3rem 2.5rem; }
}

@media (max-width: 48em) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; justify-content: center; }

  .triptych, .outcomes, .domains { grid-template-columns: 1fr; }
  .services__item { grid-template-columns: 1fr; gap: 1rem; }
  .applies__photo::after, .contact__photo::after { background: rgb(15 42 48 / .85); }
  .steps { grid-template-columns: 1fr; }
  .automap__rows { font-size: .7rem; }
  .automap__cols { font-size: .66rem; align-items: end; }
  .automap__cols span {
    writing-mode: vertical-rl; transform: rotate(180deg);
    justify-self: center; overflow: visible; text-align: left; padding-top: .25rem;
  }
  .automap__legend { justify-content: flex-start; }

  .book { width: 100%; margin: auto 0 0; }
  .book__card { border-radius: 6px 6px 0 0; max-height: 100dvh; }
  .book__head, .book__body, .book__foot, .book__done { padding-inline: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  .cell, .link-arrow::after, .btn, .faq__item summary::after, .nav-toggle__bar { transition: none; }
  .cell:not(.is-on) { transform: none; }
  .js .hero__title, .js .hero__copy > :not(.hero__title), .hero__title .w > span { opacity: 1; transform: none; transition: none; }
  .js :is(.h-section, .triptych__item, .services__item, .steps__item, .outcomes__item, .outcomes__note, .fan,
          .domains__item, .tools, .faq__item, .contact__title, .contact__lead, .contact__actions) { opacity: 1; transform: none; transition: none; }
  .js .steps__item::after { transform: none; transition: none; }
  .js .steps__item::before { opacity: 1; transform: none; transition: none; }
  .automap.is-hover .automap__cells .cell:hover { transform: none; }
  .book, .book::backdrop, .field__input, .book__close { transition: none; }
  .js .dia__ln--draw, .js .fan__thread, .js .fan__trunk { stroke-dashoffset: 0; transition: none; }
  .js .dia__pop, .js .fan__node { opacity: 1; transform: none; transition: none; }
  .ticker { mask-image: none; -webkit-mask-image: none; }
  .ticker__track { animation: none; width: auto; }
  .ticker__list { flex-wrap: wrap; gap: .75rem 0; }
  .ticker__list[aria-hidden="true"] { display: none; }
}
