/* ===================================================================
   DLG Labs - site.css
   Home layout + shared components (nav, footer, buttons, contact form,
   differentiator band, team band, CTA band). Built on tokens.css.
   Ported from the design prototype MINUS the old green system: every
   surface derives from the teal --accent token. No neon green.
   =================================================================== */

:root {
  --panel:      #0f151f;
  --panel-2:    #131b27;
  --bg-2:       #0b0f17;
  --line-soft:  rgba(255, 255, 255, .05);
  --accent-2:   #86bccd;              /* cool steel-blue, replaces old cyan */
  --crit:       #e0776a;              /* muted red for invalid state */
  --warn:       #e0a24c;
  --radius:     8px;                  /* sheets/cards - top of the declared 2-8px scale */
  --radius-sm:  6px;                  /* inputs/cells */
  --maxw:       1200px;
  --measure:    880px;                /* single centred measure for the editorial bands */
  --nav-h:      76px;                 /* sticky nav height; brief-tabs sticks below this */
  --fs-min:     .78rem;               /* 12.48px: floor for any DOM text */
  --tap:        44px;                 /* minimum interactive box */
  --shadow:     0 24px 60px -20px rgba(0, 0, 0, .7);
  --sky:        #050709;              /* the hero plate the star map paints onto: deeper than --bg */
  --sky-rgb:    5, 7, 9;              /* the same colour as a triplet, for the hero's alpha stops */
  --veil-ink:   .70;                  /* how hard the hero veil pulls the plate back over the stars */
  --halo:       .95;                  /* opacity of the glow that keeps the headline off a bright star */
  --halo-r:     60px;                 /* and how far it reaches: wide and soft on night */
  --halo-r2:    24px;
  /* A surface is lifted by a white wash and grounded by a black one. On paper
     both signs flip: light comes off the page, so a lift is a deeper warm tone. */
  --lift:         rgba(255, 255, 255, .05);
  --floor:        #000;
  --hover-ground: rgba(255, 255, 255, .04);
  --mix-soft:   12%;                  /* accent veils: tuned against a dark ground, re-tuned on light */
  --mix-line:   30%;
  --mono:       var(--font-mono);
  --sans:       var(--font-body);
  --disp:       var(--font-heading);
}

/* The light theme's half of this second token layer. tokens.css redefines the
   base palette; these are the surfaces and the tuned amounts that live here.
   The alpha values are not recolourings: a white hairline at 5% and a black
   drop shadow at 70% are dark-ground constructs, and on paper they need the
   opposite sign and a much smaller amount. */
:root[data-theme="light"] {
  --panel:      #ffffff;              /* cards lift off the paper instead of sinking into the dark */
  --panel-2:    #f7f4ee;
  --bg-2:       #ece8e1;
  --line-soft:  rgba(20, 24, 29, .07);
  --accent-2:   #3d6f80;
  --crit:       #a8392b;
  --warn:       #8a6430;
  --shadow:     0 18px 44px -24px rgba(20, 24, 29, .28);
  --sky:        #f2efe9;
  --sky-rgb:    242, 239, 233;
  --veil-ink:   .55;
  /* On night a wide soft halo reads as the glow of the words. On paper the same
     halo greys the stars under it into a smudge, so it becomes what it would be
     in print: a tight, near-opaque bed of paper the type sits on. */
  --halo:       .92;
  --halo-r:     26px;
  --halo-r2:    9px;
  --lift:         rgba(20, 24, 29, .045);
  --floor:        #7a6a52;            /* a warm shade rather than soot, so the floor stays paper */
  --hover-ground: rgba(20, 24, 29, .05);
  /* an accent veil that is tasteful at 12% over near-black is a stain on paper */
  --mix-soft:   8%;
  --mix-line:   26%;
}

/* accent-derived helpers (flat, no glow) */
:root {
  --accent-soft: color-mix(in oklab, var(--accent) var(--mix-soft), transparent);
  --accent-line: color-mix(in oklab, var(--accent) var(--mix-line), transparent);
}
/* Per-service accent. The element arrives from services.json carrying both
   values inline as --x-dk and --x-lt and nothing else; the live variable is
   assigned here, because an inline declaration would outrank any rule that
   tried to swap it later. */
.room, .related__item { --accent: var(--accent-dk, var(--accent)); }
.srow { --srow-accent: var(--srow-accent-dk); }
:root[data-theme="light"] .room,
:root[data-theme="light"] .related__item { --accent: var(--accent-lt); }
:root[data-theme="light"] .srow { --srow-accent: var(--srow-accent-lt); }
/* --accent-soft and --accent-line above were resolved against the ROOT accent, so
   anything that overrides --accent for itself has to re-derive them, or it
   inherits the site teal instead of its own colour. The percentages come from
   the same two tokens, so there is one place to tune them for either theme. */
.room, .related__item {
  --accent-soft: color-mix(in oklab, var(--accent) var(--mix-soft), transparent);
  --accent-line: color-mix(in oklab, var(--accent) var(--mix-line), transparent);
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: var(--radius-btn); font-weight: 700;
}
.skip-link:focus { left: 12px; }

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

/* Every in-page anchor target clears the sticky nav. :where() keeps the
   specificity at 0 so section-specific offsets (room.css .ex-sec) still win. */
:where(section[id], header[id], article[id], div[id]) {
  scroll-margin-top: calc(var(--nav-h, 76px) + 12px);
}

/* Lists that the generator marks role="list" still carry the UA marker box
   (40px padding-inline-start), which silently narrows every row. */
.slist__list, .certs, .related__list { list-style: none; margin: 0; padding: 0; }

.eyebrow, .kicker {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent);
}

/* ===================== Primary action =====================
   .primary is the class the generator puts on the form's submit and on the
   two "talk to a specialist" links, and nothing styled it: the submit was
   rendering as a 100x22 UA button and the link as bare underlined text, both
   well under the --tap floor this file declares. Flat accent block, same
   rules as .btn-primary in tokens.css, with the tap height enforced here. */
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 24px;
  font-family: var(--mono); font-size: var(--fs-min); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; text-align: center;
  color: var(--on-accent); background: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius-btn);
  cursor: pointer; text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, filter .2s ease;
}
@media (hover: hover) { .primary:hover { filter: brightness(1.08); } }

/* ===================== Nav ===================== */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--nav-h); padding: 12px 6vw;
  /* opaque enough that body copy cannot be read through it while scrolling */
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
/* The wordmark is the heaviest element of the bar; the CTA is an outline, so
   the only filled accent block per fold is the one inside the content. */
.nav .brand {
  display: inline-flex; align-items: center; min-height: var(--tap);
  font-family: var(--mono); font-weight: 800; font-size: 1.06rem;
  letter-spacing: .03em; color: var(--text); white-space: nowrap;
}
.nav .brand span { font-weight: 400; color: var(--muted); }
.nav .links { display: flex; gap: 30px; }
.nav .links a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: .9rem; color: var(--muted); transition: color .2s ease; }
.nav .right { display: flex; align-items: center; gap: 16px; }
.nav .back {
  display: inline-flex; align-items: center; min-height: var(--tap);
  font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap;
}

/* Screen-reader-only label: the theme buttons are icons, so the word goes here. */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* The theme pair, built to read as the twin of the language pair beside it. */
.thm { display: flex; align-items: center; gap: 4px; }
.thm button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--dim); transition: color .2s ease;
}
.thm button.on { color: var(--accent); }
.thm i { color: var(--line); font-style: normal; font-size: var(--fs-min); font-family: var(--mono); }
@media (hover: hover) { .thm button:hover { color: var(--text); } }
.lng { display: flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: var(--fs-min); }
.lng a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); color: var(--dim); transition: color .2s ease; }
.lng a.on { color: var(--accent); font-weight: 700; }
.lng i { color: var(--line); font-style: normal; }

.nav .cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); line-height: 1;
  font-family: var(--mono); font-size: var(--fs-min); letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-btn); padding: 0 18px; cursor: pointer; white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}

@media (hover: hover) {
  .nav .links a:hover { color: var(--text); }
  .nav .back:hover { color: var(--accent); }
  .lng a:hover { color: var(--text); }
  .nav .cta:hover { color: var(--accent); border-color: var(--accent); }
}

/* ===================== Phone menu (no JavaScript) =====================
   Under 900px .nav .links is hidden, and until now Services had no route out
   of the bar at all. The replacement is a fragment-target sheet: the button is
   a link to #nav-menu, the sheet is shown while that fragment is the document
   target, and it collapses on its own the instant another fragment wins -
   which is precisely what following one of its own links does. That is the one
   behaviour <details>/<summary> could not give without script: CSS cannot
   clear the open attribute, so a details sheet would stay open on top of the
   section it had just jumped to.

   Everything below is scoped inside the 900px query, including the :target
   rule, so on desktop the sheet cannot be summoned even with #nav-menu in the
   URL. The markup sits OUTSIDE <nav class="nav"> because the bar carries a
   backdrop-filter, which makes it the containing block of any fixed-position
   descendant - a sheet nested in the bar would be trapped inside its 64px. */
.navmenu__btn, .navmenu { display: none; }
.navmenu__off { position: fixed; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
/* Both hash handlers re-land the target on load with
   `parseFloat(scrollMarginTop) || navH()`, so a 0 here would fall through to a
   76px correction and shunt the page every time the sheet is opened. 1px is
   truthy and lands inside their 2px dead band: opening the sheet scrolls
   nothing. The :where() rule above would otherwise hand .navmenu nav-h + 12. */
.navmenu, .navmenu__off { scroll-margin-top: 1px; }

@media (max-width: 900px) {
  .navmenu__btn {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 var(--tap); min-width: var(--tap); min-height: var(--tap);
    color: var(--muted); transition: color .2s ease;
  }
  .navmenu__bars, .navmenu__bars::before, .navmenu__bars::after {
    display: block; width: 20px; height: 2px; border-radius: 1px; background: currentColor;
  }
  .navmenu__bars { position: relative; }
  .navmenu__bars::before, .navmenu__bars::after { content: ""; position: absolute; left: 0; }
  .navmenu__bars::before { top: -6px; }
  .navmenu__bars::after { top: 6px; }
  @media (hover: hover) { .navmenu__btn:hover { color: var(--text); } }

  .navmenu:target { display: block; position: fixed; inset: 0; z-index: 40; }
  /* the scrim doubles as the dismiss surface: a tap anywhere off the sheet -
     including back on the button itself - closes it. Not a tab stop; the
     sheet carries its own labelled Close row for keyboard and screen reader. */
  /* dim only, no blur: the scrim also lies over the bar, and a blur there
     smeared the wordmark and the theme and language controls into pulp. */
  .navmenu__scrim {
    position: absolute; inset: 0; display: block;
    background: color-mix(in oklab, var(--bg) 66%, transparent);
  }
  .navmenu__panel {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    display: flex; flex-direction: column;
    background: var(--panel); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: navmenu-in .18s ease-out;
  }
  .navmenu__panel a {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 56px; padding: 10px 6vw;
    font-family: var(--disp); font-size: 1.12rem; font-weight: 500; letter-spacing: -.01em;
    color: var(--text);
  }
  .navmenu__panel a + a { border-top: 1px solid var(--line-soft); }
  .navmenu__panel a::after {
    content: "\203A"; font-family: var(--mono); font-size: 1.5rem; line-height: 1;
    color: var(--accent); opacity: .75;
  }
  .navmenu__panel .is-cta { color: var(--accent); }
  .navmenu__panel .navmenu__close {
    min-height: var(--tap); font-family: var(--mono); font-size: var(--fs-min);
    font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
    background: var(--panel-2);
  }
  .navmenu__panel .navmenu__close::after { content: "\00D7"; font-size: 1.25rem; color: var(--dim); opacity: 1; }
  @keyframes navmenu-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ===================== Hero ===================== */
/* The sky hero (assets/js/sky.js). Full-bleed star map, the headline centred
   over it, the readout of the service under the hand bottom-left and the
   Explore link bottom-right. The canvas paints on a transparent surface, so
   .bg stays a flat dark: any wash under it read as haze and dulled the stars. */
.hero { position: relative; min-height: calc(100svh - var(--nav-h, 76px)); min-height: max(560px, calc(100svh - var(--nav-h, 76px))); overflow: hidden; background: var(--sky); color: var(--text); }
.hero .bg { position: absolute; inset: 0; z-index: 1; background: var(--sky); }
.hero .bg canvas { width: 100%; height: 100%; display: block; }
/* keeps the headline legible over a bright patch of sky, and settles the bottom edge into the page */
.hero .veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(34% 18% at 50% 50%, rgba(var(--sky-rgb), var(--veil-ink)), rgba(var(--sky-rgb), 0) 80%),
    linear-gradient(180deg, rgba(var(--sky-rgb), 0) 78%, rgba(var(--sky-rgb), var(--veil-ink)) 100%);
}
.hero-in {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 1100px; max-width: calc(100% - 64px); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px; pointer-events: none;
}
/* Only the empty sky around the words lets the hand reach the map; the words
   themselves stay live so the headline and the lead can be selected. */
.hero-in > * { pointer-events: auto; }
.hero h1 {
  margin: 0; font-family: var(--disp); font-weight: 300; font-size: clamp(2.6rem, 5.3vw, 4.75rem);
  line-height: .96; letter-spacing: -.045em; text-wrap: balance;
  text-shadow: 0 0 var(--halo-r) rgba(var(--sky-rgb), var(--halo)), 0 0 var(--halo-r2) rgba(var(--sky-rgb), var(--halo));
}
.hero h1 b { font-weight: 500; }
.hero .lead-s { display: none; }
.hero p {
  margin: 0; max-width: 84ch; color: var(--muted); font-size: 15px; line-height: 1.6; font-weight: 300;
  text-shadow: 0 0 calc(var(--halo-r) * .5) rgba(var(--sky-rgb), var(--halo)), 0 0 calc(var(--halo-r2) * .5) rgba(var(--sky-rgb), var(--halo));
}
/* the readout: what the hand is over. Kicker only until a constellation lights up. */
.hero-read {
  position: absolute; z-index: 2; bottom: 32px; left: 40px; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; min-width: 460px; max-width: calc(100% - 80px);
}
.hero-read .kicker { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.hero-read .name { font-family: var(--disp); font-size: 24px; letter-spacing: -.02em; line-height: 1; min-height: 24px; color: var(--text); transition: color .4s; }
.hero-read .desc { font-family: var(--mono); font-size: 12px; color: var(--dim); line-height: 1.5; max-width: 52ch; min-height: 18px; }
.hero-more {
  position: absolute; z-index: 2; bottom: 32px; right: 40px; display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  min-height: var(--tap);
}
.hero-more i { display: block; width: 44px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
@media (hover: hover) { .hero-more:hover { color: var(--text); } }
@media (prefers-reduced-motion: reduce) { .hero-read .name { transition: none; } }

/* ===================== Services ===================== */
/* No forced 100vh: the section is as tall as the list plus its own rhythm. */
.services {
  scroll-margin-top: calc(var(--nav-h, 76px) + 12px);
  position: relative; overflow: hidden; background: var(--bg2);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(48px, 7vh, 90px) 6vw;
}
.sbg {
  position: absolute; inset: 0; opacity: .28; z-index: 0; transition: opacity .45s ease;
  background-image: radial-gradient(58% 44% at 78% 12%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 70%);
}
.sbg canvas { width: 100%; height: 100%; display: block; }
.services.hot .sbg { opacity: .42; }
.sveil { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 74% 50%, transparent 46%, color-mix(in oklab, var(--bg2) 66%, transparent)); }
.shead { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto 14px; width: 100%; }
.shead .kicker { margin-bottom: 14px; display: block; }
.shead h2 { font-family: var(--disp); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 400; letter-spacing: -.025em; margin: 0; }
.shead h2 b { font-weight: 700; }
/* /services/ hub: the same head, but the section title is the page h1. */
.shead h1 { font-family: var(--disp); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 400; letter-spacing: -.03em; margin: 0; }
.services--hub { min-height: 0; }
.shead p { color: var(--muted); font-size: .84rem; line-height: 1.4; margin: 5px 0 0; max-width: 60ch; }
.slist { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.srow {
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 16px; position: relative;
  padding: 3px 14px; color: var(--muted); border-radius: var(--radius-row);
  transition: color .2s ease; text-decoration: none;
}
.srow .n { font-family: var(--mono); font-size: var(--fs-min); color: var(--dim); }
/* .t is a span: the generator dropped the h3 so the service name is not a
   heading inside a link. It still has to look like the row title. */
.srow .tx .t { display: block; font-family: var(--disp); font-size: clamp(1rem, 1.4vw, 1.18rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; color: var(--text); transition: font-weight .2s ease, color .2s ease; }
.srow .tx .d { display: block; font-family: var(--mono); font-size: .79rem; letter-spacing: .01em; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow-cta { position: absolute; right: 8px; top: 50%; font-family: var(--mono); font-size: var(--fs-min); letter-spacing: .1em; text-transform: uppercase; color: var(--srow-accent, var(--accent)); white-space: nowrap; opacity: 0; transform: translateY(-50%) translateX(-6px); transition: opacity .2s ease, transform .2s ease; }
/* Hover-driven state only where a hover pointer exists: on touch the pointer
   never leaves, so .on would pin row 01 in its accent colour permanently. */
@media (hover: hover) {
  .srow:hover .tx .t { color: var(--text); }
  .srow.on .tx .t { font-weight: 700; }
  .srow.on .n, .srow.on .tx .t { color: var(--srow-accent, var(--accent)); }
  .srow:hover .srow-cta, .srow.on .srow-cta { opacity: 1; transform: translateY(-50%); }
}
.srow:focus-visible .tx .t { color: var(--text); }
.srow:focus-visible .srow-cta { opacity: 1; transform: translateY(-50%); }
/* Wide desktop only: text column pinned left; background zoomed + shifted
   right. Below 1180px there is no room for both, and splitting at 901px cut
   the list from 774px to 396px wide - the layout got worse as the window grew. */
@media (min-width: 1180px) {
  .shead, .slist { max-width: min(720px, 52%); margin-left: 0; margin-right: auto; }
  .sbg { inset: -8% -9% -8% auto; width: 78%; opacity: .5; -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .2) 0%, #000 44%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .2) 0%, #000 44%); }
  .services.hot .sbg { opacity: .64; }
}

/* ===================== Differentiator band ===================== */
/* One measure (--measure) for heading, body, comparison and pillars: four
   different centred widths inside the same container read as four blocks. */
.diff {
  position: relative; z-index: 2; text-align: center;
  padding: clamp(48px, 7vw, 84px) 6vw; border-top: 1px solid var(--line); background: var(--bg);
}
.diff .inner { max-width: var(--measure); margin: 0 auto; }
.diff h2 { font-family: var(--disp); font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 400; letter-spacing: -.02em; margin: 12px auto 18px; max-width: none; text-wrap: balance; }
.diff h2 b { font-weight: 700; }
.diff__body { color: var(--muted); font-size: 1.08rem; max-width: none; margin: 0 auto 20px; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; max-width: none; margin: 30px auto 40px; text-align: left; }
.vs__col { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; background: var(--panel); }
.vs__col.bad { border-style: dashed; }
.vs__col.good { border-color: var(--accent-line); background: color-mix(in oklab, var(--accent) 6%, var(--panel)); }
.vs__title { margin: 0 0 12px; font-size: .95rem; font-family: var(--mono); font-weight: 500; letter-spacing: .04em; }
.vs__col.bad .vs__title { color: var(--muted); }
.vs__col.good .vs__title { color: var(--accent); }
.vs__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.vs__col li { font-size: .9rem; color: var(--muted); padding-left: 20px; position: relative; }
.vs__col.bad li::before { content: "x"; position: absolute; left: 0; color: var(--dim); font-family: var(--mono); }
.vs__col.good li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.vs__mid { display: grid; place-items: center; font-family: var(--mono); color: var(--dim); font-size: .8rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; max-width: none; margin: 0 auto; }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; }
.pillar h3 { margin: 0 0 8px; font-size: 1.06rem; }
.pillar p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ===================== Team band ===================== */
.team {
  position: relative; z-index: 2; padding: clamp(48px, 6vw, 80px) 6vw;
  border-top: 1px solid var(--line); background: var(--bg2);
}
.team .inner { max-width: var(--maxw); margin: 0 auto; }
.team__head { text-align: center; margin: 0 auto 26px; max-width: 70ch; }
.team__head h2 { font-family: var(--disp); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 12px 0 0; }
.team__head p { color: var(--muted); margin: 10px auto 0; }
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 30px 0; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--mono); font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; color: var(--accent); }
.stat span { display: block; font-size: .88rem; color: var(--muted); margin-top: 6px; }
.markers { list-style: none; padding: 0; margin: 0 0 34px; display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.markers li { font-size: .84rem; color: var(--text); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-chip); padding: 7px 14px; }
.certs__label { font-family: var(--mono); font-size: var(--fs-min); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); text-align: center; margin: 0 0 20px; }
.certs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cbadge { font-family: var(--mono); font-size: .82rem; letter-spacing: .03em; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-row); padding: 9px 15px; background: var(--panel-2); transition: color .2s ease, border-color .2s ease; }
@media (hover: hover) { .cbadge:hover { color: var(--accent); border-color: var(--accent-line); } }

/* ===================== CTA band =====================
   The band and the contact section are one movement, not two: no divider
   between them and no second filled button above the form's own submit. */
.band { position: relative; z-index: 2; padding: clamp(56px, 7vw, 84px) 6vw 0; text-align: center; border-top: 1px solid var(--line); background: var(--bg2); }
.band .inner { max-width: 60ch; margin: 0 auto; }
.band h2 { font-family: var(--disp); font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 400; letter-spacing: -.03em; margin: 0 0 10px; }
.band h2 b { font-weight: 700; }
.band p { color: var(--muted); margin: 0 0 28px; }
.band .primary { color: var(--text); background: transparent; border-color: var(--line); }
@media (hover: hover) { .band .primary:hover { filter: none; color: var(--accent); border-color: var(--accent); } }

/* ===================== Contact ===================== */
.contact {
  padding: clamp(56px, 8vw, 96px) 6vw; border-top: 1px solid var(--line); background: var(--bg2);
  scroll-margin-top: calc(var(--nav-h, 76px) + 12px);
  /* last section on every page: skipping it cannot shift any anchor above it */
  content-visibility: auto; contain-intrinsic-size: auto 1000px;
}
.band + .contact { border-top: 0; padding-top: clamp(36px, 5vw, 56px); }
.contact .inner { max-width: var(--maxw); margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: start; }
.contact-intro h2 { font-family: var(--disp); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); margin: 10px 0 14px; }
.contact-intro .lead { color: var(--muted); margin: 0 0 24px; }
/* The raw --accent on --accent-soft drops to 4.40:1 for the Red Team /
   Penetration Testing accent. Lightening it 20% toward white clears 4.5:1 on
   all eleven service accents (worst case 5.99:1). */
.contact-preset { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .76rem; color: color-mix(in oklab, var(--accent) 80%, var(--text)); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-chip); padding: 7px 12px; margin: 0 0 16px; }
.contact-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.contact-points li { position: relative; padding-left: 26px; color: var(--muted); }
.contact-points li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 2px; transform: rotate(45deg); }
.contact-direct { color: var(--muted); font-size: .95rem; margin: 0; }
.contact-direct a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--accent); font-family: var(--mono); }
@media (hover: hover) { .contact-direct a:hover { text-decoration: underline; } }

.form-legend { margin: 0; font-family: var(--mono); font-size: var(--fs-min); letter-spacing: .04em; color: var(--dim); }

.contact-form {
  display: grid; gap: 15px; padding: clamp(22px, 3vw, 30px);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; }
.field .lbl { font-size: .84rem; color: var(--muted); font-weight: 500; }
.req { color: var(--accent); font-style: normal; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238595a3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
/* A real outline, not a 18%-alpha shadow that disappears on the panel. */
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 40%, transparent);
}
.field textarea { resize: vertical; min-height: 130px; }
/* The consent box. The control itself carries the 44px tap box and paints a
   24px square inside it, rather than being a 24px box inside a big label:
   a pointer landing anywhere in the 44px square hits the input, not the text.
   The negative inline margin keeps the visible square on the form's left
   edge, where the 24px native box used to sit. Both states are token colours,
   so the control follows the theme instead of the UA accent. */
.check { display: flex; align-items: center; gap: 4px; padding: 6px 0; min-height: var(--tap); font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; margin: 0 0 0 -10px;
  flex: 0 0 var(--tap); width: var(--tap); height: var(--tap);
  display: grid; place-items: center; background: none; border: 0; cursor: pointer;
}
.check input::before {
  content: ""; grid-area: 1 / 1; width: 24px; height: 24px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: background .18s ease, border-color .18s ease;
}
.check input:checked::before { background: var(--accent); border-color: var(--accent); }
.check input:checked::after {
  content: ""; grid-area: 1 / 1; width: 6px; height: 11px; margin-top: -2px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check input:focus-visible { outline: 0; }
.check input:focus-visible::before { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-form .primary { justify-self: start; margin-top: 4px; }
.contact-form .primary:disabled { opacity: .6; cursor: not-allowed; filter: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-privacy { margin: 0; font-size: .88rem; color: var(--muted); }
.form-privacy a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--accent); }
.form-status { margin: 2px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-status.is-ok { color: var(--accent); }
.form-status.is-error { color: var(--crit); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--crit); box-shadow: 0 0 0 3px color-mix(in oklab, var(--crit) 14%, transparent); }
.field.invalid .lbl { color: var(--crit); }
.check.invalid { color: var(--crit); }
.check.invalid input::before { outline: 2px solid var(--crit); outline-offset: 2px; border-color: var(--crit); }

/* ===================== Footer ===================== */
footer.site {
  padding: 24px 6vw; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--dim); font-family: var(--mono); font-size: var(--fs-min); flex-wrap: wrap; gap: 12px; background: var(--bg);
}
.flinks { display: inline-flex; align-items: center; gap: 10px; }
.flinks a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 4px; color: var(--dim); text-decoration: none; transition: color .2s ease; }
@media (hover: hover) { .flinks a:hover { color: var(--accent); } }
.flinks i { font-style: normal; opacity: .5; }

/* ===================== Legal pages ===================== */
.legal { max-width: 780px; margin: 0 auto; padding: clamp(40px, 7vw, 72px) 6vw 64px; }
.legal h1 { font-family: var(--disp); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.03em; margin: 0 0 6px; }
.legal-updated { font-family: var(--mono); font-size: var(--fs-min); color: var(--dim); margin: 0 0 34px; }
.legal section { margin: 0 0 30px; }
.legal h2 { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.legal p { color: var(--muted); font-size: .98rem; line-height: 1.65; margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; color: var(--muted); font-size: .96rem; line-height: 1.6; }
.legal li { margin-bottom: 6px; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .nav { padding: 8px 5vw; }
  .nav .links { display: none; }
  /* On phones/tablets the sky is decorative only: the service list is the
     real nav, so the hero canvas must not capture taps or steal them from it. */
  .hero .bg { pointer-events: none; }
  /* The headline stays centred on a phone, as on every other screen. What the
     hero gives it is the whole viewport, so the bands of sky above and below
     the words are deep enough for a constellation to be drawn in one of them. */
  .hero { min-height: calc(100svh - var(--nav-h, 64px)); }
  .hero-in { gap: 12px; }
  .hero h1 { font-size: clamp(30px, 7.6vw, 46px); }
  /* one line each, so the sky keeps both bands */
  .hero p { display: none; }
  .hero .lead-s { display: block; max-width: none; white-space: nowrap; font-size: clamp(12.5px, 3.5vw, 15px); }
  .hero-read .kicker { white-space: nowrap; }
  .hero h1 { font-size: clamp(34px, 8.4vw, 60px); }
  /* The readout and Explore stop sharing a row. Side by side they collided on
     every phone (measured 18px of overlap in EN, 26px in ES), and the reserve
     that was meant to prevent it could never be right: Explore is 118px in EN
     and 126px in ES plus its 20px inset, against a 140px reserve. Stacked,
     each one owns the full width and the language cannot break the layout. */
  /* The foot is what the lower band of sky gives up, so it is one row, not two:
     the readout on the left and Explore on the right, sharing a line. The name
     is clipped rather than allowed to push into the link. */
  .hero-read {
    left: 20px; right: 20px; min-width: 0; max-width: none;
    bottom: 16px; gap: 2px; padding-right: 126px;
  }
  .hero-read .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-read .desc { display: none; }
  /* the canvas takes no pointer events at this width, so the readout can never
     be driven: the name box would be a permanently empty 24px reserve. */
  /* The name of the service under the finger is the point of the readout; it was
     hidden back when a phone could not light one at all. */
  .hero-read .name { font-size: 16px; min-height: 16px; }
  /* 11px is under the --fs-min floor this file sets for any DOM text, and
     Explore is a primary route into the service list, not a caption. */
  .hero-read .kicker { font-size: var(--fs-min); letter-spacing: .1em; line-height: 1.5; }
  /* a constellation can form anywhere in the sky, including under these two, so
     they carry the same bed of sky the headline does */
  .hero-read .kicker, .hero-read .name, .hero-more span {
    text-shadow: 0 0 14px rgba(var(--sky-rgb), var(--halo)), 0 0 5px rgba(var(--sky-rgb), var(--halo));
  }
  .hero-more {
    left: auto; right: 20px; bottom: 16px; justify-content: flex-end;
    font-size: var(--fs-min); letter-spacing: .16em; gap: 8px;
  }
  .hero-more i { flex: 0 0 28px; }
  .services { padding: clamp(40px, 6vh, 64px) 7vw; }
  /* The services backdrop cost a 10.5MB backing store and a full-rate rAF for
     a 1.5% pixel delta at opacity .24. home.js does not mount it here either. */
  .sbg, .sveil { display: none; }
  /* Undo the desktop 11-rows-one-screen compaction: phones scroll, so the
     head and rows get comfortable type back and descriptions may wrap. */
  .shead { margin-bottom: 24px; }
  .shead h2 { font-size: clamp(1.7rem, 4.5vw, 2rem); }
  .shead p { font-size: .95rem; line-height: 1.55; margin-top: 10px; }
  /* Rows must read as links: a hairline per row and a chevron column. The
     absolute "See details" label would overlap the wrapped description. */
  .slist__list li + li .srow { border-top: 1px solid var(--line); }
  .srow-cta { display: none; }
  .srow {
    grid-template-columns: 30px 1fr 20px; gap: 12px; align-items: start;
    padding: 14px 8px; border-radius: 0;
  }
  .srow::after {
    content: "\203A"; grid-column: 3; align-self: center; justify-self: end;
    font-family: var(--mono); font-size: 1.5rem; line-height: 1;
    color: var(--srow-accent, var(--accent)); opacity: .75;
  }
  .srow .n { padding-top: 4px; }
  .srow .tx .t { font-size: 1.12rem; color: var(--text); }
  .srow .tx .d {
    white-space: normal; overflow: visible; text-overflow: clip;
    font-family: var(--sans); font-size: .88rem; letter-spacing: 0;
    line-height: 1.45; color: var(--muted); margin-top: 4px;
  }
  .legal { padding-inline: 7vw; }
  .band { padding: clamp(44px, 7vw, 64px) 7vw 0; }
  .pillars { grid-template-columns: 1fr; }
  /* Left-aligned like the hero and the services head, and the comparison keeps
     its hinge: without the "vs" the two stacked columns lose their relation. */
  .diff, .diff__body { text-align: left; }
  .diff h2 { margin-inline: 0; }
  .diff__body { font-size: 1rem; }
  .vs { grid-template-columns: 1fr; gap: 10px; }
  .vs__mid {
    place-items: stretch; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 12px; font-size: var(--fs-min); letter-spacing: .16em; text-transform: uppercase;
  }
  .vs__mid::before, .vs__mid::after { content: ""; height: 1px; background: var(--line); }
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  /* The "13 team certifications" stat needs its referent on screen: one
     scrollable line of chips rather than the desktop three-row wall. */
  /* The fade belongs to the wrapper, not to the scroller. A scroll container
     paints its background and its mask against the scrollable overflow area,
     so the old mask on .certs travelled with the chips and resolved its
     "100% - 40px" against the 903px of content: the fade sat past the last
     chip, off screen, and the visible right edge was a hard cut. The wrapper
     does not scroll, so its gradient stays on the edge the reader sees. */
  /* A mask, not an overlay gradient: it carries no colour at all (#000 and
     transparent here are alpha, not palette), so it cannot be wrong on paper
     or on night. On the wrapper its 100% is the 390px the reader sees; on the
     scroller it was the 957px of chips. */
  .certs-wrap {
    position: relative; margin-inline: -6vw;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  }
  .certs {
    flex-wrap: nowrap; justify-content: flex-start; gap: 8px;
    overflow-x: auto; overscroll-behavior-x: contain;
    /* scroll-padding must match the inline padding or the first snap pins
       the leading chip against the viewport edge. */
    scroll-snap-type: x proximity; scroll-padding-inline: 6vw; scrollbar-width: none;
    padding-bottom: 4px; margin-inline: 0; padding-inline: 6vw;
  }
  /* a trailer the width of the fade, so that at the end of the scroll the last
     chip sits clear of it and reads at full strength */
  .certs::after { content: ""; flex: 0 0 56px; }
  .certs::-webkit-scrollbar { display: none; }
  .cbadge { flex: 0 0 auto; scroll-snap-align: start; font-size: var(--fs-min); padding: 7px 11px; }
  .certs__label { text-align: left; margin-bottom: 12px; }
  .markers { justify-content: flex-start; }
  .team__head { text-align: left; margin-inline: 0; }
}
/* Below this width the bar is tight. Rather than drop "Get in touch" - the one
   control the whole site is built to lead to - the theme control gives up half
   of itself: it shows only the theme you are not in, so the pair becomes a
   single 44px button that swaps. Back becomes its glyph for the same reason. */
@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: 1fr 1fr; }
  .thm button.on, .thm i { display: none; }
  .nav .cta { padding: 0 11px; letter-spacing: .02em; }
  /* the language pair lives in the sheet at this width (see menuSheet) */
  .nav .lng { display: none; }
  .navmenu__lang { display: flex; align-items: center; gap: 4px; padding: 0 6vw; border-top: 1px solid var(--line); }
  .navmenu__lang a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--tap); min-height: var(--tap);
    font-family: var(--mono); font-size: var(--fs-min); letter-spacing: .1em; color: var(--dim);
  }
  .navmenu__lang a.on { color: var(--accent); font-weight: 700; }
  .nav .back {
    justify-content: center; flex: 0 0 34px; font-size: 0;
    margin-inline-start: -6px;
  }
  .nav .back::before { content: "\2190"; font-size: 1.1rem; line-height: 1; }
}
/* Tablets and large phones. The theme pair beside the language pair needs
   ~150px more than the bar used to carry, and at 412px it overflowed by 45px.
   The width used to come out of the controls themselves (34px, then 30px);
   it now comes out of the separators and the gaps, so ES / EN / moon / sun
   each keep the full 44x44 box that --tap declares. */
@media (max-width: 760px) {
  .nav .right { gap: 6px; }
  .lng { gap: 0; }
  .lng i, .thm i { display: none; }
  .thm { gap: 0; }
}
/* Phones: keep the nav on a single row without clipping the CTA. Every nav
   control keeps a 44px box, so --nav-h rises with them. */
@media (max-width: 520px) {
  :root { --nav-h: 64px; }
  .nav { padding: 8px 5vw; gap: 8px; }
  .nav .brand { font-size: .94rem; }
  .nav .brand span { display: none; }
  .nav .right { gap: 6px; }
  .nav .cta { padding: 0 12px; letter-spacing: .03em; }
  /* Five words plus separators need ~400px at the 12px floor: the kicker owns
     the full width now that Explore has its own row below it. */
  .hero-read .kicker { text-wrap: balance; }
  .hero-in { max-width: calc(100% - 40px); gap: 14px; }
  .hero p { font-size: 14px; }
  /* brand / privacy-terms / copyright stack instead of a ragged
     space-between wrap. */
  footer.site { flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 6vw; }
}
/* Very narrow phones. With the CTA moved into the menu the bar is wordmark +
   theme pair + language pair + menu, which fits at 320px with every control
   at its full 44x44 box; only the padding and the gaps give way. */
/* Below this width the readout and Explore cannot share a line without clipping the
   longer service names, so the link takes its own row again. Above it they share,
   which is what keeps the lower band of sky deep enough to draw in. */
@media (max-width: 360px) {
  .hero-read { padding-right: 0; bottom: calc(12px + var(--tap)); }
  .hero-read .name { overflow: visible; text-overflow: clip; }
  .hero-more { left: 20px; right: 20px; bottom: 8px; justify-content: flex-start; }
  .hero-more i { flex: 0 1 100px; }
}
@media (max-width: 400px) {
  .nav { padding-inline: 4vw; gap: 4px; }
  .nav .right { gap: 2px; }
}
/* Landscape phones: 36% of the viewport height was sticky chrome. */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --nav-h: 48px; }
  .nav { padding: 4px 5vw; }
  /* the menu button joins the rest: left at 44px it alone made the bar 53px
     tall while --nav-h said 48, and the sheet hung 5px into the bar. */
  .nav .brand, .nav .cta, .nav .back, .lng a, .thm button, .navmenu__btn { min-height: 40px; }
  .hero { min-height: 70vh; }
}

/* Per-field validation message injected by contact.js (it also sets these via CSSOM
   as a fallback, so the rule here is what actually styles them). */
.field-error {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-min);
  line-height: 1.4;
  color: var(--crit);
}
