/* ==========================================================================
   HSBG — hsbg.company
   Design system + site styles
   --------------------------------------------------------------------------
   0.  Reset & tokens
   1.  Base typography
   2.  Layout primitives
   3.  Cursor / preloader / chrome
   4.  Header & nav
   5.  Buttons & links
   6.  Motion utilities (reveal)
   7.  Hero
   8.  Marquee
   9.  Statement / stats
   10. Services (pinned rail + index)
   11. Configurator
   12. Process
   13. Sectors / logos
   14. Quotes
   15. FAQ / accordion
   16. CTA & footer
   17. Inner pages (services, about, contact)
   18. Responsive
   19. Reduced motion / print
   ========================================================================== */

/* ---------- 0. Reset & tokens ------------------------------------------- */

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

* { margin: 0; padding: 0; }

:root {
  /* Palette */
  --ink:        #0A0A0C;
  --ink-800:    #131317;
  --ink-700:    #1C1C21;
  --ink-600:    #2A2A31;
  --paper:      #F4F2ED;
  --paper-2:    #EAE7DF;
  --sand:       #DCD6C8;
  --blue:       #2C3FF0;
  --blue-lift:  #4658FF;
  --lime:       #C9F24E;

  /* Semantic — flipped by [data-theme] */
  --bg:         var(--paper);
  --fg:         var(--ink);
  --fg-muted:   rgba(10, 10, 12, 0.58);
  --fg-faint:   rgba(10, 10, 12, 0.34);
  --rule:       rgba(10, 10, 12, 0.13);
  --rule-soft:  rgba(10, 10, 12, 0.07);
  --surface:    rgba(10, 10, 12, 0.035);
  --accent:     var(--blue);

  /* Type */
  --f-display: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-body:    'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale */
  --t-mega:  clamp(3.4rem, 12.5vw, 13.5rem);
  --t-h1:    clamp(2.9rem, 8.2vw, 8.2rem);
  --t-h2:    clamp(2.3rem, 5.6vw, 5.4rem);
  --t-h3:    clamp(1.6rem, 3.1vw, 2.9rem);
  --t-h4:    clamp(1.25rem, 1.9vw, 1.65rem);
  --t-lead:  clamp(1.12rem, 1.65vw, 1.5rem);
  --t-body:  clamp(1rem, 1.05vw, 1.075rem);
  --t-small: 0.875rem;
  --t-label: 0.6875rem;

  /* Space */
  --gut:     clamp(1.15rem, 4vw, 3.5rem);
  --sec:     clamp(5rem, 11vw, 11.5rem);
  --maxw:    1680px;

  /* Motion */
  --e-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --e-io:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur:     0.75s;
}

[data-theme="dark"] {
  --bg:        var(--ink);
  --fg:        var(--paper);
  --fg-muted:  rgba(244, 242, 237, 0.58);
  --fg-faint:  rgba(244, 242, 237, 0.30);
  --rule:      rgba(244, 242, 237, 0.15);
  --rule-soft: rgba(244, 242, 237, 0.07);
  --surface:   rgba(244, 242, 237, 0.045);
  --accent:    var(--lime);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* MUST be `clip`, never `hidden`. overflow-x:hidden resolves overflow-y to
     `auto`, which makes html/body a scroll container and silently breaks every
     position:sticky on the page (the services rail and the planner panel).
     `clip` suppresses overflow without creating a scroll container. */
  overflow-x: clip;
}

body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  overflow-x: clip; /* see note on html — `hidden` here would break sticky */
  transition: background-color 0.6s var(--e-io), color 0.6s var(--e-io);
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: var(--fg); color: var(--bg); }

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

/* ---------- 1. Base typography ------------------------------------------ */

h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.03em; line-height: 1.02; }
h4 { font-size: var(--t-h4); letter-spacing: -0.02em; line-height: 1.15; }

.serif {
  font-family: var(--f-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.015em;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.42;
  letter-spacing: -0.018em;
  color: var(--fg-muted);
  max-width: 46ch;
  text-wrap: pretty;
}

.label {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.label::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.label--plain::before { display: none; }

.mono {
  font-family: var(--f-mono);
  font-size: var(--t-small);
  letter-spacing: 0.01em;
}

.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.accent { color: var(--accent); }

/* ---------- 2. Layout primitives ---------------------------------------- */

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

.section { padding-block: var(--sec); position: relative; }
.section--tight { padding-block: clamp(3.5rem, 7vw, 7rem); }
.section--flush-t { padding-top: 0; }

.section--dark,
.section--ink {
  background: var(--ink);
  color: var(--paper);
}

.rule { height: 1px; background: var(--rule); width: 100%; border: 0; }

.grid { display: grid; gap: var(--gut); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-12 {
  grid-template-columns: repeat(12, 1fr);
  /* a full --gut between 12 columns leaves almost nothing for the columns */
  column-gap: clamp(0.9rem, 1.5vw, 1.6rem);
}

/* span-* sets only the END so it composes with start-* — using the
   `grid-column` shorthand here would have its span wiped by grid-column-start */
.span-4 { grid-column-end: span 4; }
.span-5 { grid-column-end: span 5; }
.span-6 { grid-column-end: span 6; }
.span-7 { grid-column-end: span 7; }
.span-8 { grid-column-end: span 8; }
.start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; }

.stack { display: flex; flex-direction: column; }
.gap-s  { gap: 0.75rem; }
.gap-m  { gap: 1.5rem; }
.gap-l  { gap: 2.5rem; }
.gap-xl { gap: clamp(2.5rem, 5vw, 5rem); }

.row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.between { justify-content: space-between; }
.right { margin-left: auto; }

/* Section head: eyebrow left, content right — the Termina-ish editorial rig */
.sec-head {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 3.2fr);
  gap: var(--gut);
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.sec-head__body { max-width: 62ch; }
.sec-head__body h2 { margin-bottom: 1.4rem; }

/* Faint background grid used on hero + CTA */
.gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: clamp(60px, 8vw, 120px) clamp(60px, 8vw, 120px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 100%);
}

/* ---------- 3. Cursor / preloader / chrome ------------------------------ */

.cursor,
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 9000;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s;
}

.cursor {
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  transition: width 0.35s var(--e-out), height 0.35s var(--e-out),
              background-color 0.35s var(--e-out), opacity 0.3s;
}

.cursor-dot {
  width: 5px; height: 5px;
  background: #fff;
}

.cursor.is-on, .cursor-dot.is-on { opacity: 1; }
.cursor.is-hover { width: 76px; height: 76px; background: rgba(255, 255, 255, 0.12); }
.cursor.is-drag  { width: 92px; height: 92px; background: rgba(255, 255, 255, 0.16); }

.cursor__label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.cursor.is-drag .cursor__label { opacity: 1; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--gut);
  transition: transform 1.05s var(--e-out) 0.15s;
}

.preloader.is-done { transform: translateY(-101%); }

.preloader__mark {
  align-self: center;
  justify-self: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(3rem, 11vw, 9rem);
  letter-spacing: -0.05em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* overflow lives on the letter row so it can't clip the Partners line below */
.preloader__letters { display: flex; overflow: hidden; padding-bottom: 0.06em; }

.preloader__letters > span {
  display: inline-block;
  transform: translateY(105%);
  animation: pl-in 0.9s var(--e-out) forwards;
}

.preloader__letters > span:nth-child(2) { animation-delay: 0.06s; }
.preloader__letters > span:nth-child(3) { animation-delay: 0.12s; }
.preloader__letters > span:nth-child(4) { animation-delay: 0.18s; }

/* the full name resolves in after the wordmark has landed.
   JS tracks it out to the exact width of HSBG above (see main.js) — the
   letter-spacing/margin pair below is the no-JS fallback. */
.preloader__partners {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.3em;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  line-height: 1;
  margin-top: 0.12em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.55em);
  animation: pl-partners 1.1s var(--e-out) 0.6s forwards;
}

@keyframes pl-in { to { transform: translateY(0); } }
@keyframes pl-partners { to { opacity: 1; transform: none; } }

.preloader__bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.5);
  border-top: 1px solid rgba(244, 242, 237, 0.16);
  padding-top: 1rem;
}

.preloader__num { color: var(--paper); }

.scrollbar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  z-index: 8000;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  pointer-events: none;
}

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

.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- 4. Header & nav --------------------------------------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 7000;
  padding-block: 1.15rem;
  transition: transform 0.55s var(--e-out), background-color 0.45s, backdrop-filter 0.45s, padding 0.45s;
  mix-blend-mode: normal;
}

.header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.45s var(--e-io);
}

.header.is-stuck::after { opacity: 1; }
.header.is-stuck { padding-block: 0.8rem; }
.header.is-hidden { transform: translateY(-110%); }

.header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-1px);
}

.brand__sub {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
  align-self: center;
  padding-left: 0.7rem;
  margin-left: 0.15rem;
  border-left: 1px solid var(--rule);
}

.nav { display: flex; align-items: center; gap: clamp(1.2rem, 2.4vw, 2.4rem); }

/* :not(.btn) throughout — the CTA pill must keep its own colour and padding */
.nav a:not(.btn) {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  position: relative;
  padding-block: 0.35rem;
  opacity: 0.72;
  transition: opacity 0.3s;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.1rem;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.45s var(--e-out);
}

.nav a:not(.btn):hover { opacity: 1; }
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav a:not(.btn)[aria-current="page"] { opacity: 1; }
.nav a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); background: var(--accent); }

.burger {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  position: relative;
  flex: none;
}

.burger span {
  position: absolute;
  left: 50%; top: 50%;
  width: 17px; height: 1.4px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--e-out), opacity 0.25s;
}

.burger span:first-child { transform: translate(-50%, calc(-50% - 4px)); }
.burger span:last-child  { transform: translate(-50%, calc(-50% + 4px)); }

body.is-menu .burger span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
body.is-menu .burger span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 6900;
  background: var(--ink);
  color: var(--paper);
  padding: calc(var(--gut) + 4.5rem) var(--gut) var(--gut);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.85s var(--e-out);
  visibility: hidden;
}

body.is-menu .menu { clip-path: inset(0 0 0 0); visibility: visible; }

.menu__list { display: flex; flex-direction: column; gap: 0.2rem; }

.menu__list a {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 9vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: inherit;
  text-decoration: none;
  display: block;
  overflow: hidden;
}

.menu__list a span {
  display: block;
  transform: translateY(105%);
  transition: transform 0.7s var(--e-out);
}

body.is-menu .menu__list a span { transform: translateY(0); }
body.is-menu .menu__list li:nth-child(1) a span { transition-delay: 0.16s; }
body.is-menu .menu__list li:nth-child(2) a span { transition-delay: 0.22s; }
body.is-menu .menu__list li:nth-child(3) a span { transition-delay: 0.28s; }
body.is-menu .menu__list li:nth-child(4) a span { transition-delay: 0.34s; }
body.is-menu .menu__list li:nth-child(5) a span { transition-delay: 0.40s; }

.menu__foot {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(244, 242, 237, 0.15);
  padding-top: 1.5rem;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.55);
}

.menu__foot a { color: inherit; text-decoration: none; }
.menu__foot a:hover { color: var(--paper); }

/* ---------- 5. Buttons & links ------------------------------------------ */

.btn {
  --btn-fg: var(--bg);
  --btn-bg: var(--fg);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.05rem 1.85rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition: color 0.4s var(--e-io);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.55s var(--e-out);
}

.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--ink); }

.btn__arrow {
  width: 15px; height: 15px;
  flex: none;
  transition: transform 0.45s var(--e-out);
}

.btn:hover .btn__arrow { transform: translate(3px, -3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border: 1px solid var(--rule);
}

.btn--ghost:hover { color: var(--ink); border-color: var(--accent); }

.btn--lg { padding: 1.25rem 2.25rem; font-size: 1rem; }
.btn--sm { padding: 0.75rem 1.35rem; font-size: 0.85rem; }

.link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  position: relative;
  padding-bottom: 0.3rem;
}

.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  opacity: 0.35;
  transform-origin: 0 50%;
  transition: transform 0.5s var(--e-out), opacity 0.3s;
}

.link:hover::after { opacity: 1; transform: scaleX(1.02); }
.link svg { transition: transform 0.45s var(--e-out); }
.link:hover svg { transform: translateX(4px); }

/* ---------- 6. Motion utilities ----------------------------------------- */

.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--e-out), transform 0.9s var(--e-out);
}

.rv.is-in { opacity: 1; transform: none; }

/* padding/margin pair stops overflow:hidden from clipping descenders (y, g, p) */
.rv-line {
  overflow: hidden;
  display: block;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.rv-line > span {
  display: block;
  transform: translateY(103%);
  transition: transform 1.05s var(--e-out);
}

.rv-line.is-in > span { transform: translateY(0); }

.rv-mask {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--e-out);
}

.rv-mask.is-in { clip-path: inset(0 0 0 0); }

[data-d="1"] { transition-delay: 0.08s; }
[data-d="2"] { transition-delay: 0.16s; }
[data-d="3"] { transition-delay: 0.24s; }
[data-d="4"] { transition-delay: 0.32s; }
[data-d="5"] { transition-delay: 0.40s; }
[data-d="6"] { transition-delay: 0.48s; }

/* ---------- 7. Hero ------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 8rem;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

/* width/height are required, not just inset:0 — canvas is a replaced element, so
   `width:auto` resolves to its intrinsic 300x150 default rather than filling the
   box. Without these the bitmap stays 600x300 and gets stretched to fit. */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.hero__in { position: relative; z-index: 2; width: 100%; }

.hero__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--gut);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.hero__eyebrow { margin-bottom: 1.6rem; }

.hero__title {
  font-size: var(--t-h1);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
  max-width: 15ch;
}

.hero__title em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

.hero__side {
  max-width: 34ch;
  padding-bottom: 0.5rem;
}

.hero__side p { color: var(--fg-muted); font-size: 1.02rem; line-height: 1.5; margin-bottom: 1.75rem; }

.hero__bar {
  border-top: 1px solid var(--rule);
  padding-top: 1.15rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gut);
  align-items: start;
}

.hero__cell .k {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.hero__cell .v {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  max-width: 22ch;
  display: block;
  line-height: 1.6;
}

/* Sits in the outer page margin, not in the --gut content column — at
   right:var(--gut) it was overlapping the hero's right-hand text column. */
.hero__scroll {
  position: absolute;
  right: 0.85rem;
  bottom: clamp(9rem, 17vw, 13rem);
  z-index: 3;
  writing-mode: vertical-rl;
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero__scroll::after {
  content: "";
  width: 1px; height: 54px;
  background: linear-gradient(var(--fg-faint), transparent);
  animation: scrollpulse 2.4s var(--e-io) infinite;
}

@keyframes scrollpulse {
  0%   { transform: scaleY(0); transform-origin: 0 0; }
  45%  { transform: scaleY(1); transform-origin: 0 0; }
  55%  { transform: scaleY(1); transform-origin: 0 100%; }
  100% { transform: scaleY(0); transform-origin: 0 100%; }
}

/* ---------- 8. Marquee --------------------------------------------------- */

.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  padding-block: 1.35rem;
  position: relative;
  display: flex;
  user-select: none;
}

.marquee--ink { background: var(--ink); color: var(--paper); border-color: rgba(244,242,237,0.14); }

.marquee__track {
  display: flex;
  align-items: center;
  gap: 3rem;
  /* padding-right matches the gap so the join between the two tracks keeps its
     spacing — without it the loop seam jams the last dot against the next word.
     It is inside the track, so translateX(-100%) stays seamless. */
  padding-right: 3rem;
  flex: none;
  min-width: 100%;
  animation: slide 42s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__track span {
  font-family: var(--f-display);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}

.marquee__track span::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

@keyframes slide { to { transform: translateX(-100%); } }

/* ---------- 9. Statement / stats ---------------------------------------- */

.statement {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.5vw, 3.35rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  /* a wider measure + `pretty` gives an even rag. `balance` is capped at a few
     lines by browsers, so on a block this long it did nothing and the rag
     came out jagged — short line, long line, short line. */
  max-width: 28ch;
  text-wrap: pretty;
  hyphens: none;
}

.statement em { font-family: var(--f-serif); font-style: italic; font-weight: 400; }

/* not as faint as --fg-faint: unlit words should read as de-emphasised,
   not as a rendering fault when the reader stops mid-scroll */
.statement .dim { color: color-mix(in srgb, var(--fg) 42%, transparent); transition: color 0.5s; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}

.stat {
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 2vw, 2rem) clamp(1.75rem, 3vw, 2.75rem) 0;
  border-right: 1px solid var(--rule);
  position: relative;
}

.stat:last-child { border-right: 0; }
.stat:not(:first-child) { padding-left: clamp(1rem, 2vw, 2rem); }

.stat__n {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.9;
  display: block;
  margin-bottom: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.stat__l {
  font-size: 0.9rem;
  color: var(--fg-muted);
  max-width: 24ch;
  line-height: 1.45;
}

/* ---------- 10. Services ------------------------------------------------- */

.svc-rail { position: relative; }

.svc-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* clears the fixed header when the user scrolls back up inside the rail */
  padding-top: clamp(4.25rem, 9vh, 5.5rem);
  padding-bottom: clamp(1rem, 3vh, 2rem);
}

.svc-viewport { width: 100%; overflow: hidden; }

.svc-track {
  display: flex;
  gap: clamp(1rem, 1.8vw, 1.75rem);
  padding-inline: var(--gut);
  will-change: transform;
}

.svc-card {
  flex: none;
  width: clamp(280px, 30vw, 460px);
  min-height: clamp(400px, 58vh, 560px);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.5rem, 2.2vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.5s, transform 0.6s var(--e-out);
}

.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(100%);
  transition: transform 0.7s var(--e-out);
}

.svc-card:hover::before { transform: translateY(0); }
.svc-card:hover { border-color: transparent; color: var(--ink); }
.svc-card:hover .svc-card__n,
.svc-card:hover .svc-card__list li,
.svc-card:hover .svc-card__d { color: var(--ink); opacity: 1; }
.svc-card:hover .svc-card__list li { border-color: rgba(10,10,12,0.2); }

.svc-card__n {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.18em;
  color: var(--fg-faint);
  transition: color 0.5s;
}

.svc-card__h {
  font-size: clamp(1.5rem, 2.3vw, 2.15rem);
  margin-block: 1.6rem 1rem;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.svc-card__d {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color 0.5s;
  max-width: 34ch;
}

.svc-card__list { margin-top: auto; padding-top: 2rem; }

.svc-card__list li {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
  color: var(--fg-muted);
  transition: color 0.5s, border-color 0.5s;
}

/* In normal flow, not absolute — an absolutely positioned bar was being drawn
   across the bottom of the cards on short viewports. */
.svc-progress {
  margin: clamp(1.1rem, 2.4vh, 2rem) var(--gut) 0;
  height: 1px;
  background: var(--rule);
  flex: none;
}

.svc-progress__b {
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* Service index list (alternative, used on services page) */
.svc-index { border-top: 1px solid var(--rule); }

.svc-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1.15fr) minmax(0, 1.35fr) auto;
  gap: var(--gut);
  align-items: start;
  padding-block: clamp(1.6rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
  color: inherit;
  text-decoration: none;
  transition: padding-inline 0.55s var(--e-out);
}

.svc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: -1;
}

.svc-row:hover::before { opacity: 1; }
.svc-row:hover { padding-inline: 1.25rem; }

.svc-row__n { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.16em; color: var(--fg-faint); padding-top: 0.55rem; }
.svc-row__h { font-size: clamp(1.45rem, 2.4vw, 2.3rem); letter-spacing: -0.035em; }
.svc-row__d { color: var(--fg-muted); font-size: 0.965rem; max-width: 52ch; }
.svc-row__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

.tag {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--fg-muted);
  white-space: nowrap;
}

.svc-row__go {
  width: 42px; height: 42px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  transition: background-color 0.45s, color 0.45s, transform 0.45s var(--e-out);
}

.svc-row:hover .svc-row__go { background: var(--accent); color: var(--ink); transform: rotate(45deg); border-color: transparent; }

/* ---------- 11. Configurator -------------------------------------------- */

.cfg {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: start;
}

.cfg__opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }

.opt {
  text-align: left;
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1.15rem 1.25rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  transition: border-color 0.35s, background-color 0.35s, transform 0.35s var(--e-out);
  position: relative;
}

.opt:hover { border-color: var(--fg-faint); transform: translateY(-2px); }

.opt__box {
  width: 18px; height: 18px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  flex: none;
  margin-top: 2px;
  display: grid;
  place-items: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.opt__box svg { opacity: 0; transform: scale(0.6); transition: opacity 0.25s, transform 0.3s var(--e-out); color: var(--ink); }

.opt[aria-pressed="true"] { border-color: var(--fg); background: var(--surface); }
.opt[aria-pressed="true"] .opt__box { background: var(--accent); border-color: var(--accent); }
.opt[aria-pressed="true"] .opt__box svg { opacity: 1; transform: scale(1); }

.opt__t { font-weight: 500; font-size: 0.975rem; letter-spacing: -0.015em; display: block; margin-bottom: 0.2rem; }
.opt__s { font-size: 0.8rem; color: var(--fg-muted); line-height: 1.4; display: block; }

.cfg__panel {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.4rem, 2.2vw, 2rem);
  position: sticky;
  top: 6rem;
  background: var(--surface);
}

.cfg__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.cfg__row:last-of-type { border-bottom: 0; }
.cfg__row dt { color: var(--fg-muted); }
.cfg__row dd { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }

.cfg__big {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-block: 0.35rem 0.15rem;
  display: block;
}

.cfg__list { margin-block: 1rem 1.5rem; min-height: 3rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cfg__empty { font-size: 0.85rem; color: var(--fg-faint); }

.cfg__bar { height: 4px; background: var(--rule); border-radius: 999px; overflow: hidden; margin-top: 1.25rem; }
.cfg__bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.7s var(--e-out); }

/* ---------- 12. Process -------------------------------------------------- */

.proc { position: relative; }

.proc__line {
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 100%;
  background: var(--rule);
}

.proc__line i {
  position: absolute;
  left: 0; top: 0;
  width: 1px;
  background: var(--accent);
  height: 0;
  transition: height 0.15s linear;
}

.proc__steps { padding-left: clamp(1.5rem, 5vw, 5rem); }

.step {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: var(--gut);
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.step:first-child { border-top: 1px solid var(--rule); }

.step::before {
  content: "";
  position: absolute;
  left: calc(clamp(1.5rem, 5vw, 5rem) * -1 - 4px);
  top: calc(clamp(2rem, 4vw, 3.5rem) + 0.5rem);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--fg-faint);
  transition: background-color 0.5s, border-color 0.5s, transform 0.5s var(--e-out);
}

.step.is-in::before { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }

.step__k { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.17em; color: var(--fg-faint); margin-bottom: 1rem; display: block; }
.step__h { font-size: clamp(1.5rem, 2.6vw, 2.4rem); letter-spacing: -0.035em; }
.step__d { color: var(--fg-muted); max-width: 54ch; }
.step__d p + p { margin-top: 1rem; }
.step__meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.step__meta div { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); }
.step__meta strong { display: block; color: var(--fg); font-weight: 500; margin-top: 0.35rem; font-size: 0.82rem; }

/* ---------- 13. Sectors / logos ------------------------------------------ */

.sectors { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }

.sector {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.5rem, 2.6vw, 2.4rem);
  min-height: clamp(180px, 20vw, 260px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sector::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: 0 100%;
  transition: transform 0.6s var(--e-out);
}

.sector:hover::before { transform: scaleY(1); transform-origin: 0 0; }
.sector:hover { color: var(--bg); }
.sector:hover .sector__d, .sector:hover .sector__n { color: inherit; opacity: 0.7; }

.sector__n { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.16em; color: var(--fg-faint); transition: color 0.4s; }
.sector__h { font-size: clamp(1.2rem, 1.9vw, 1.7rem); letter-spacing: -0.03em; margin-top: auto; padding-top: 2rem; }
.sector__d { font-size: 0.875rem; color: var(--fg-muted); margin-top: 0.7rem; transition: color 0.4s; max-width: 30ch; }

.logos {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  justify-content: center;
  padding-block: 1rem;
}

.logos span {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  opacity: 0.42;
  transition: opacity 0.4s;
}

.logos span:hover { opacity: 1; }

/* ---------- 14. FAQ / accordion ------------------------------------------ */

.acc { border-top: 1px solid var(--rule); }
.acc__item { border-bottom: 1px solid var(--rule); }

.acc__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-block: clamp(1.25rem, 2.2vw, 1.85rem);
  text-align: left;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 1.85vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  transition: color 0.35s;
}

.acc__btn:hover { color: var(--accent); }

.acc__ic {
  width: 22px; height: 22px;
  flex: none;
  position: relative;
  margin-top: 0.35rem;
}

.acc__ic::before, .acc__ic::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.45s var(--e-out), opacity 0.3s;
}

.acc__ic::before { width: 14px; height: 1.5px; }
.acc__ic::after  { width: 1.5px; height: 14px; }

.acc__item.is-open .acc__ic::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.acc__panel { overflow: hidden; height: 0; transition: height 0.6s var(--e-out); }

.acc__inner {
  padding-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
  max-width: 62ch;
  color: var(--fg-muted);
  display: grid;
  gap: 1rem;
}

/* ---------- 16. CTA & footer --------------------------------------------- */

.cta {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(6rem, 14vw, 14rem);
}

.cta__h {
  font-size: var(--t-mega);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.85;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.cta__h em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.03em; }

.cta .lead { margin-inline: auto; color: rgba(244,242,237,0.6); text-align: center; }

.cta__actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: clamp(2rem, 4vw, 3rem); }
.cta .btn { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.cta .btn--ghost { --btn-bg: transparent; --btn-fg: var(--paper); border-color: rgba(244,242,237,0.28); }

.footer {
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

.footer a { color: inherit; text-decoration: none; }

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr));
  gap: var(--gut);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid rgba(244,242,237,0.14);
}

.footer__col h5 {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,242,237,0.42);
  margin-bottom: 1.5rem;
}

.footer__col li { margin-bottom: 0.8rem; }

.footer__col li a {
  font-size: 0.95rem;
  opacity: 0.78;
  transition: opacity 0.3s, padding-left 0.4s var(--e-out);
  display: inline-block;
}

.footer__col li a:hover { opacity: 1; padding-left: 0.4rem; }

.footer__lede { font-size: clamp(1.15rem, 1.9vw, 1.55rem); letter-spacing: -0.025em; line-height: 1.3; max-width: 26ch; margin-bottom: 2rem; }
.footer__mail { font-family: var(--f-mono); font-size: 0.95rem; border-bottom: 1px solid rgba(244,242,237,0.3); padding-bottom: 0.2rem; }
.footer__mail:hover { border-color: var(--lime); color: var(--lime); }

.footer__mark {
  padding-block: clamp(2rem, 4vw, 3.5rem) 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(4.5rem, 22vw, 22rem);
  letter-spacing: -0.06em;
  line-height: 0.78;
  text-align: center;
  color: rgba(244,242,237,0.1);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.footer__mark-sub {
  display: block;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.17em;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 0.06em;
  color: rgba(244,242,237,0.22);
}

.footer__bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.6rem;
  border-top: 1px solid rgba(244,242,237,0.14);
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,242,237,0.42);
}

.footer__bot a:hover { color: var(--paper); }
.clock { font-variant-numeric: tabular-nums; }

/* ---------- 17. Inner pages ---------------------------------------------- */

.page-hero {
  padding-top: clamp(9rem, 16vw, 15rem);
  padding-bottom: clamp(3rem, 6vw, 6rem);
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.page-hero h1 { max-width: 17ch; margin-block: 1.5rem 2rem; }
.page-hero__meta { display: flex; gap: clamp(1.5rem, 4vw, 4rem); flex-wrap: wrap; margin-top: 2.5rem; }
.page-hero__meta div { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint); }
.page-hero__meta strong { display: block; font-family: var(--f-body); font-size: 0.95rem; letter-spacing: -0.01em; text-transform: none; color: var(--fg); font-weight: 500; margin-top: 0.5rem; }

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.25rem; color: var(--fg-muted); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--fg); font-weight: 500; }

/* Detailed practice block on services page */
.practice {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
  gap: var(--gut);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 6rem;
}

.practice__h { font-size: clamp(1.75rem, 3.2vw, 3rem); letter-spacing: -0.04em; margin-block: 1rem 1.5rem; }
.practice__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 2rem; }
.practice__cell { background: var(--bg); padding: 1.35rem 1.4rem; transition: background-color 0.4s; }
.practice__cell:hover { background: var(--surface); }
.practice__cell h5 { font-size: 0.975rem; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 0.45rem; font-family: var(--f-body); }
.practice__cell p { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.45; }

/* People */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gut); }
.people--4 { grid-template-columns: repeat(4, 1fr); }
.person { border-top: 1px solid var(--rule); padding-top: 1.35rem; }
.person__ph {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 1.25rem;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--fg-faint);
  overflow: hidden;
  position: relative;
}
.person__ph::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.5s;
}
.person:hover .person__ph::after { opacity: 0.85; }
.person h4 { font-size: 1.15rem; }
.person span { font-size: 0.875rem; color: var(--fg-muted); display: block; margin-top: 0.3rem; }

/* Values grid */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.value { background: var(--bg); padding: clamp(1.75rem, 3vw, 2.75rem); }
.value__n { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: 0.18em; color: var(--fg-faint); }
.value h3 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); margin-block: 1.5rem 0.9rem; }
.value p { color: var(--fg-muted); font-size: 0.95rem; max-width: 42ch; }

/* Form */
.form { display: grid; gap: 1.35rem; }
.form__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.35rem; }

.field { position: relative; display: block; }

.field > span {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: block;
  margin-bottom: 0.6rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  border-radius: 0;
  transition: border-color 0.4s;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field select option { background: var(--bg); color: var(--fg); }

.field input:focus,
.field textarea:focus,
.field select:focus { outline: 0; border-color: var(--accent); }

.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); }

.form__note { font-size: 0.8rem; color: var(--fg-faint); max-width: 52ch; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }

.contact-card { border: 1px solid var(--rule); border-radius: 6px; padding: clamp(1.5rem, 2.5vw, 2.25rem); background: var(--surface); }
.contact-card + .contact-card { margin-top: 1rem; }
.contact-card h4 { margin-bottom: 1rem; }
.contact-card p { font-size: 0.95rem; color: var(--fg-muted); margin-bottom: 0.4rem; }
.contact-card a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact-card a:hover { border-color: var(--accent); color: var(--accent); }

/* 404 */
.err { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.err__n { font-family: var(--f-display); font-size: clamp(6rem, 26vw, 20rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.8; }

/* ---------- 18. Responsive ------------------------------------------------ */

@media (max-width: 1180px) {
  .footer__top { grid-template-columns: 1fr 1fr; row-gap: 3rem; }
  .people, .people--4 { grid-template-columns: repeat(2, 1fr); }
  .svc-row { grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
  .svc-row__d { grid-column: 2 / -1; }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .burger { display: block; }
  .hero__top { grid-template-columns: 1fr; }
  .hero__side { max-width: 46ch; }
  .hero__bar { grid-template-columns: repeat(2, 1fr); row-gap: 1.75rem; }
  .hero__scroll { display: none; }
  .cfg { grid-template-columns: 1fr; }
  .cfg__panel { position: static; }
  .sec-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .step { grid-template-columns: 1fr; gap: 1rem; }
  .practice { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 720px) {
  :root { --t-body: 1rem; }
  .g-2, .g-3, .g-4, .cfg__opts, .values, .people, .people--4, .practice__grid, .form__row, .sectors { grid-template-columns: 1fr; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: 1 / -1; }
  .start-6, .start-7 { grid-column-start: 1; }
  .hero__bar { grid-template-columns: 1fr; row-gap: 1.35rem; }
  .hero { min-height: 92svh; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; }
  .svc-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .svc-row__go { display: none; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bot { justify-content: flex-start; }
  .cursor, .cursor-dot { display: none; }
  .practice__grid { border-left: 0; border-right: 0; }

  /* Touch targets — small text links are ~17px tall by default, well under the
     44px comfortable-tap size. Padding grows the hit area; negative margin is
     used where the extra height would otherwise shift the layout. */
  .footer__col li { margin-bottom: 0.2rem; }
  .footer__col li a { padding-block: 0.85rem; }
  .menu__foot a { padding-block: 0.85rem; display: inline-block; }
  .footer__mail { padding-block: 0.65rem; display: inline-block; }
  .footer__bot a { padding-block: 0.7rem; display: inline-block; }
  .link { padding-block: 0.5rem 0.8rem; }
  .contact-card a { padding-block: 0.45rem; display: inline-block; }
  .brand { padding-block: 0.75rem; margin-block: -0.75rem; }
}

/* The pinned horizontal rail needs both width AND height to work. Below either
   threshold it falls back to a plain stacked list — this is what saves a phone
   in landscape (844x390), where the pinned layout was clipping by 154px.
   The JS rail module matches on this exact query. */
@media (max-width: 720px), (max-height: 560px) {
  /* !important so the CSS wins over any inline height the JS may have set at a
     previous viewport size — the stacked layout must never depend on JS state */
  .svc-rail { height: auto !important; }
  /* nothing drags when the rail is stacked */
  .svc-hint { display: none; }
  .svc-sticky { height: auto; position: static; padding-block: 0; }
  .svc-viewport { overflow: visible; }
  .svc-track { flex-direction: column; transform: none !important; padding-inline: 0; }
  .svc-card { width: 100%; min-height: 0; }
  .svc-progress { display: none; }
}

/* Short viewports (laptops at 1366x700, split screens). The pinned rail has a
   fixed 100svh budget, so the card interior tightens rather than being clipped. */
@media (min-width: 721px) and (max-height: 820px) and (min-height: 561px) {
  .svc-rail h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
  .svc-card { min-height: 0; padding: clamp(1.15rem, 1.8vw, 1.6rem); }
  .svc-card__h { font-size: clamp(1.3rem, 1.9vw, 1.7rem); margin-block: 1rem 0.7rem; }
  .svc-card__d { font-size: 0.885rem; line-height: 1.45; }
  .svc-card__list { padding-top: 1.1rem; }
  .svc-card__list li { padding-block: 0.4rem; font-size: 0.68rem; }
}

/* ---------- 19. Reduced motion / print ------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rv, .rv-line > span, .rv-mask { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .marquee__track { animation: none; }
  .cursor, .cursor-dot { display: none; }
}

@media print {
  .header, .footer, .cursor, .cursor-dot, .preloader, .scrollbar, .marquee { display: none !important; }
  body { background: #fff; color: #000; }
}
