/* SenseThreat — shared styles
   Light theme is the default; [data-theme="dark"] on <html> switches to dark.
   The hero and the illustration tiles stay dark in both themes. */

:root {
  /* brand */
  --cyan: #5FD2FF;
  --ink-900: #090C0F;
  --ink-800: #12171C;
  --ink-700: #191E23;
  --ink-line: #2A323A;
  --platinum: #F3F6F8;
  --crit: #FF6B83;

  /* theme: light */
  --bg: #F3F4F5;
  --surface: #FFFFFF;
  --band: #E3E6E9;
  --text: #0B0F13;
  --muted: #55606B;
  --line: #D3D8DD;
  --accent: #076A8F;
  --footer-bg: #0B0F13;

  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --wrap: 1320px;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #090C0F;
  --surface: #12171C;
  --band: #12171C;
  --text: #F3F6F8;
  --muted: #A3AEB8;
  --line: #2A323A;
  --accent: #5FD2FF;
  --footer-bg: #05070A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h1 { font-weight: 400; font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
.h2 { font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.h3 { font-weight: 500; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.lead--wide { max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border: 1px solid currentColor; border-radius: 2px;
  font: 500 14px/1 var(--sans); text-decoration: none; color: inherit; background: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn::after { content: "→"; transition: transform .2s; }
.btn:hover::after { transform: translateX(3px); }
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--solid { background: var(--cyan); color: var(--ink-900); border-color: var(--cyan); }
.btn--solid:hover { background: #fff; color: var(--ink-900); border-color: #fff; }
.link-arrow { font-weight: 500; font-size: 14px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s; }
a:hover > .link-arrow::after, .link-arrow:hover::after { transform: translateX(3px); }

/* ---------- nav ---------- */
/* Floating "liquid glass" bar: a translucent pill that blurs and saturates whatever scrolls
   behind it, with a bright rim and a soft inner glow. Glass tint and logo colour follow the
   theme, and the bar stays dark-glass over the hero. */
.nav {
  position: fixed; inset: 12px 16px auto; z-index: 50; pointer-events: none;
  --glass: rgba(255,255,255,.42); --rim: rgba(255,255,255,.75); --rim-low: rgba(255,255,255,.25);
  --glass-shadow: rgba(20,30,40,.14); --logo: var(--text);
  color: var(--text);
}
:root[data-theme="dark"] .nav { --glass: rgba(24,30,36,.42); --rim: rgba(255,255,255,.28); --rim-low: rgba(255,255,255,.08); --glass-shadow: rgba(0,0,0,.45); --logo: var(--cyan); }
.nav .wrap {
  pointer-events: auto; position: relative; height: 60px; max-width: calc(var(--wrap) + var(--gutter) * 2 - 24px); padding: 0 12px 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-radius: 22px; background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(1.04); backdrop-filter: blur(22px) saturate(190%) brightness(1.04);
  border: 1px solid var(--rim-low);
  box-shadow:
    inset 0 1px 0 var(--rim),
    inset 0 -1px 0 var(--rim-low),
    inset 0 0 18px rgba(255,255,255,.10),
    0 8px 30px var(--glass-shadow), 0 1px 3px var(--glass-shadow);
  transition: background-color .3s, box-shadow .3s;
}
/* Soft specular sheen across the top edge. */
.nav .wrap::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 46%);
  mix-blend-mode: soft-light;
}
.logo { display: inline-flex; color: var(--logo, var(--cyan)); flex: none; }
.footer .logo { --logo: var(--cyan); }
.logo svg { width: 178px; height: auto; fill: currentColor; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.nav__links a:not(.btn) { font-size: 14px; font-weight: 500; text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav__links a:not(.btn):hover, .nav__links a[aria-current="page"] { border-bottom-color: currentColor; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 14px; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.18); border-color: var(--rim-low); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav__burger { display: none; }

/* Over the hero, before scrolling: transparent, light text. */
/* Over the hero (dark image): dark glass, light text, blue logo. */
.nav--over:not(.is-scrolled):not(.is-open) { color: #fff; --glass: rgba(9,12,15,.34); --rim: rgba(255,255,255,.34); --rim-low: rgba(255,255,255,.12); --glass-shadow: rgba(0,0,0,.4); --logo: var(--cyan); }

@media (max-width: 860px) {
  .nav__burger { display: grid; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 14px 22px 22px; border-radius: 22px; pointer-events: auto; color: var(--text);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
    border: 1px solid var(--rim-low); box-shadow: inset 0 1px 0 var(--rim), 0 12px 36px var(--glass-shadow);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a:not(.btn) { font-size: 18px; padding: 10px 0; width: 100%; }
  .nav__links .btn { margin-top: 12px; }
  .logo svg { width: 140px; }
}

/* ---------- hero (always dark) ---------- */
.hero {
  position: relative; min-height: max(640px, 100svh); overflow: hidden;
  background: var(--ink-900); color: var(--platinum);
  display: flex; flex-direction: column;
  --muted: #A3AEB8; --line: rgba(243,246,248,.28);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__ascii { pointer-events: none; }
/* Darken behind the copy so it stays readable over the image. */
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(9,12,15,.82) 0%, rgba(9,12,15,.55) 38%, rgba(9,12,15,0) 68%),
    linear-gradient(180deg, rgba(9,12,15,.6) 0%, rgba(9,12,15,0) 22%);
}
/* Fade the image out into the page background. */
.hero__fade {
  position: absolute; inset: auto 0 0 0; height: 22%; pointer-events: none;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg) 14%, transparent) 30%,
    color-mix(in srgb, var(--bg) 48%, transparent) 58%,
    color-mix(in srgb, var(--bg) 84%, transparent) 82%,
    var(--bg) 100%);
  transition: background .3s;
}
.hero__content { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 112px; padding-bottom: 48px; }
/* The trusted-by row sits on the image, just above where it fades into the page. */
.hero__trusted { position: relative; padding-bottom: max(120px, 19vh); }
.hero__trusted .ph { background-color: rgba(9,12,15,.35); }
.hero__content > * + * { margin-top: 24px; }
/* Hero copy runs across 60% of the content width, which sets the headline on three lines. */
.hero .h1 { max-width: 60%; text-shadow: 0 2px 30px rgba(9,12,15,.6); }
.hero .lead { color: #C9D2D9; max-width: 60%; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__hint { position: absolute; right: var(--gutter); bottom: 44%; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(243,246,248,.55); pointer-events: none; }
@media (hover: none), (max-width: 860px) { .hero__hint { display: none; } }
@media (max-width: 700px) {
  .hero__shade { background: linear-gradient(180deg, rgba(9,12,15,.86) 0%, rgba(9,12,15,.6) 55%, rgba(9,12,15,.15) 100%); }
}

/* ---------- trusted by ---------- */
.trusted__row { display: flex; align-items: center; gap: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.trusted__label { font-weight: 600; font-size: 15px; line-height: 1.3; flex: none; width: 150px; }
.trusted__logos { flex: 1; min-width: 0; }
/* Client logos scroll sideways on a loop and pause while hovered or focused. */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.marquee__track ul { display: flex; gap: 20px; padding-right: 20px; }
.marquee__track li { flex: none; }
/* Client names, set as a text wordmark until logo files are supplied. */
.client {
  display: grid; place-items: center; height: 64px; padding: 0 28px; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(9,12,15,.35);
  font: 500 15px/1 var(--sans); letter-spacing: .01em; color: rgba(243,246,248,.88);
}
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
@media (max-width: 860px) {
  .trusted__row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .trusted__logos { width: 100%; flex: none; }
  .client { height: 56px; padding: 0 22px; font-size: 14px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section--plain { border-top: 0; }
.section__head { margin-bottom: clamp(32px, 4vw, 56px); }
.section__head > * + * { margin-top: 16px; }
.section__head .h2 { max-width: 28ch; }

.page-head { padding: calc(72px + clamp(56px, 8vw, 104px)) 0 clamp(48px, 6vw, 80px); }
.page-head > .wrap > * + * { margin-top: 20px; }
.page-head .h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 18ch; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1040px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid--4 { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; background: var(--surface); color: inherit; text-decoration: none;
  border: 1px solid var(--line); transition: border-color .2s, transform .2s, background-color .3s;
}
.card .tile { border-width: 0 0 1px; }
a.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__body .strap { font-weight: 600; font-size: 14px; line-height: 1.4; }
.card__body p.small { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.card__foot { margin-top: auto; padding-top: 12px; }
.card__arrow { font-size: 20px; line-height: 1; color: var(--accent); transition: transform .2s; display: inline-block; }
a.card:hover .card__arrow { transform: translate(3px, -3px); }
.card__tag { padding: 10px 20px; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); }

/* Dark illustration tile, used on service cards. */
.tile {
  aspect-ratio: 16 / 9; background-color: var(--ink-900); color: var(--cyan);
  background-image: radial-gradient(rgba(95,210,255,.16) 1px, transparent 1.2px); background-size: 14px 14px;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--ink-line);
}
.tile svg { width: 62%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tile .crit { stroke: var(--crit); }
.tile--tall { aspect-ratio: 4 / 3; }

/* Anything still waiting on real content. */
.ph {
  display: grid; place-items: center; text-align: center; min-height: 64px; padding: 12px;
  border: 1px dashed color-mix(in srgb, var(--muted) 60%, transparent);
  background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--muted) 8%, transparent) 10px 20px);
  font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.ph--image { aspect-ratio: 16 / 10; border-width: 0 0 1px; }
.ph--portrait { aspect-ratio: 1; border-width: 0 0 1px; }
.ph-text { background: color-mix(in srgb, var(--cyan) 22%, transparent); padding: 0 .25em; border-radius: 2px; }

/* ---------- service detail rows ---------- */
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.service + .service { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }
.service__text > * + * { margin-top: 16px; }
.service__num { font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--accent); }
.scope { margin-top: 28px; border-top: 1px solid var(--line); }
.scope li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
/* Thin outlined circle bullet, so the points do not read as expandable "+" controls. */
.scope li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: .5em; border: 1px solid var(--accent); border-radius: 50%; }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; } }

/* ---------- steps / facts ---------- */
.steps { counter-reset: step; }
.step { border-top: 1px solid var(--text); padding-top: 18px; }
.step::before { counter-increment: step; content: "0" counter(step); font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--accent); }
.step > * + * { margin-top: 10px; }
.step .h3 { margin-top: 14px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 20px 20px 20px 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } .facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 48px; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta { background: var(--band); padding: clamp(48px, 6vw, 80px) 0; transition: background-color .3s; }
.cta__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta__row > div > * + * { margin-top: 12px; }

/* ---------- footer (always dark) ---------- */
.footer {
  position: relative; overflow: hidden; color: #AEB9C2; font-size: 15px;
  padding: clamp(56px, 7vw, 96px) 0 10px;
  background: radial-gradient(900px 420px at 8% 0%, rgba(95,210,255,.10), transparent 70%), var(--footer-bg);
}
.footer a { color: inherit; text-decoration: none; transition: color .25s; }
.footer a:hover { color: var(--cyan); }
/* Links on the left, legal on the right, and the wordmark across the whole width underneath. */
.footer__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 32px); row-gap: 40px; align-items: start; }
.footer__col:nth-child(1) { grid-column: 1 / span 3; }
.footer__col:nth-child(2) { grid-column: 4 / span 3; }
.footer__legal { grid-column: 9 / span 4; }
.footer__col h2 { font: 400 15px/1.35 var(--sans); color: rgba(230,236,240,.5); margin-bottom: 8px; }
.footer__col ul, .footer__legal ul { display: grid; gap: 8px; line-height: 1.35; }
.footer__col a, .footer__legal a { color: #E6ECF0; }
.footer__legal p { margin-top: clamp(28px, 4vw, 52px); font-size: 13px; color: rgba(230,236,240,.5); }
.footer__mark { display: block; margin-top: clamp(56px, 8vw, 120px); }
.footer__mark svg { display: block; width: 100%; height: auto; fill: #2B333B; transition: fill .5s ease; }
.footer__mark:hover svg, .footer__mark:focus-visible svg { fill: var(--cyan); }
.footer__mark:hover { color: inherit; }
@media (max-width: 860px) {
  .footer__col:nth-child(1), .footer__col:nth-child(2) { grid-column: span 6; }
  .footer__legal { grid-column: 1 / -1; }
}


/* ---------- reveal on scroll ---------- */
/* Slow and calm: long, soft easing, with a short pause so related pieces arrive one after another. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.5s cubic-bezier(.22,.61,.36,1) var(--d, 0ms), transform 1.5s cubic-bezier(.22,.61,.36,1) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* Headlines: one word at a time. */
.js .words .w { display: inline-block; opacity: 0; transform: translateY(.3em); filter: blur(7px);
  transition: opacity 1.3s cubic-bezier(.22,.61,.36,1) calc(var(--i) * 80ms + var(--d, 0ms)),
              transform 1.3s cubic-bezier(.22,.61,.36,1) calc(var(--i) * 80ms + var(--d, 0ms)),
              filter 1.3s cubic-bezier(.22,.61,.36,1) calc(var(--i) * 80ms + var(--d, 0ms)); }
.js .words.is-in .w { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* No rule under the hero, so the image fades straight into the page. */
.hero + .section { border-top: 0; }

/* Case studies: one featured engagement, image beside text. No rule above it, so it
   follows on from the services cards. */
#case-studies { border-top: 0; padding-top: 0; }
.feature {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background-color .3s;
}
.feature:hover { border-color: var(--accent); }
.feature__img { min-height: 380px; border-width: 0 1px 0 0; }
.feature__body { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: clamp(28px, 4vw, 56px); }
.feature__body .h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.feature:hover .link-arrow::after { transform: translateX(3px); }
.more { margin-top: 20px; font-size: 14px; color: var(--muted); }
.more a { color: var(--text); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature__img { min-height: 0; aspect-ratio: 16 / 10; border-width: 0 0 1px; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav .wrap, .nav__links { background: var(--bg); }
}

/* Client logos are shown as white marks on transparent backgrounds (see js/site.js). Hidden until
   converted so the original colours never flash. */
.client--logo { padding: 0 20px; background: none; border-color: transparent; }
.client--logo img { height: 30px; width: auto; max-width: 150px; object-fit: contain; opacity: .92; }

/* Last word of each section heading, in SenseThreat blue. On the light page it uses a deeper
   shade of the same blue so it stays readable; over the hero and in dark theme it is the brand cyan. */
:root { --hl: #0B8FBF; }
:root[data-theme="dark"] { --hl: var(--cyan); }
.hl { color: var(--hl); }
.hero .hl { color: var(--cyan); }


/* Case study photography: fill the frame, keeping the meter and the phone in view. */
.feature img.feature__img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-right: 1px solid var(--line); }
.case-hero { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 860px) { .feature img.feature__img { height: auto; border-right: 0; border-bottom: 1px solid var(--line); } }

@media (max-width: 860px) { .hero .h1, .hero .lead { max-width: none; } }

/* On the case study page the text sits under the facts row: start it at the second fact's text edge.
   The facts are three equal columns with 20 px of padding, so a 1fr/2fr split with a 30 px gap lines up. */
@media (min-width: 861px) { .split--facts { grid-template-columns: 1fr 2fr; gap: 30px; } }

/* Service scenes: looping glyph illustrations (see the services in the build). They bring their own
   colours, so the old line-icon styling is switched off for them. */
.tile--scene { background-image: none; background-color: var(--ink-900); }
.tile .art { width: 100%; height: 100%; stroke: none; stroke-width: 0; fill: none; }
.tile--tall { aspect-ratio: 16 / 9; }

/* Falling 0s and 1s behind the Services page header (js/rain.js). */
.page-head[data-rain] { position: relative; overflow: hidden; }
.page-head[data-rain] > .wrap { position: relative; z-index: 1; }
.rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%); }

/* Heart-rate trace across the Case Studies header (js/ecg.js). */
.page-head[data-ecg] { position: relative; overflow: hidden; }
.page-head[data-ecg] > .wrap { position: relative; z-index: 1; }
.ecg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* About page header: a dark 3D "digital space" (js/world.js), in both themes, that fades into the page. */
.page-head[data-world] {
  position: relative; overflow: hidden; background: var(--ink-900); color: var(--platinum);
  --muted: #A3AEB8; --hl: var(--cyan); --line: rgba(243,246,248,.18);
  min-height: clamp(480px, 66svh, 680px); display: flex; align-items: center;
}
.page-head[data-world] > .wrap { position: relative; z-index: 2; }
.page-head[data-world] .lead { color: #C9D2D9; }
.page-head[data-world]::before { /* keeps the text readable over the scene */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(9,12,15,.88) 0%, rgba(9,12,15,.62) 36%, rgba(9,12,15,0) 68%);
}
.page-head[data-world]::after { /* melts into the page below */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.world { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; cursor: crosshair; }
.page-head[data-world] .h1 { max-width: 16ch; }
@media (max-width: 860px) { .page-head[data-world]::before { background: linear-gradient(180deg, rgba(9,12,15,.85), rgba(9,12,15,.5)); } }

/* Numbered rows, one under the other, like the sections of a case study: a large number, the
   discipline's name, then what it means. */
.steps--stack { counter-reset: step; }
.steps--stack .step {
  display: grid; grid-template-columns: minmax(110px, 1fr) 3fr 4fr; gap: 12px clamp(20px, 4vw, 56px);
  align-items: start; padding: clamp(24px, 3.4vw, 44px) 0; border-top: 1px solid var(--text);
}
.steps--stack .step:last-child { border-bottom: 1px solid var(--line); }
.steps--stack .step > * + * { margin-top: 0; }
.steps--stack .step::before {
  font: 300 clamp(2.05rem, 4.8vw, 4.2rem)/0.95 var(--sans); letter-spacing: -.03em; color: var(--hl);
}
.steps--stack .step .h3 { margin-top: 0; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 400; letter-spacing: -.015em; padding-top: .35em; }
.steps--stack .step p { font-size: 1.05rem; padding-top: .55em; max-width: 46ch; }
@media (max-width: 760px) {
  .steps--stack .step { grid-template-columns: 1fr; }
  .steps--stack .step .h3, .steps--stack .step p { padding-top: 0; }
}

/* Live readout for the heart-rate trace. */
.page-head[data-ecg] { cursor: crosshair; }
.ecg-hud { position: absolute; z-index: 1; width: 190px; font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.ecg-hud__label { display: block; margin-bottom: 6px; }
.ecg-hud__row { display: flex; align-items: baseline; gap: 6px; }
.ecg-hud__bpm { font: 300 2.4rem/1 var(--sans); letter-spacing: -.03em; color: var(--text); min-width: 2.2ch; text-align: right; }
.ecg-hud__state { font-style: normal; margin-left: auto; color: var(--hl); }
.ecg-hud__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hl); align-self: center; box-shadow: 0 0 0 0 var(--hl); animation: ecg-dot 1.2s ease-out infinite; }
.ecg-hud[data-state="active"] .ecg-hud__state { color: var(--text); }
.ecg-hud[data-state="stress"] .ecg-hud__state, .ecg-hud[data-state="stress"] .ecg-hud__bpm { color: var(--crit); }
.ecg-hud[data-state="stress"] .ecg-hud__dot { background: var(--crit); }
@keyframes ecg-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hl) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .ecg-hud__dot { animation: none; } }

/* Photographic service scene: the picture fills the tile and an SVG overlay animates its nodes. */
.scene-photo { position: relative; width: 100%; height: 100%; }
.scene-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-photo .art--over { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Email link in the contact details. */
.mail { color: var(--text); text-decoration: underline; text-decoration-color: var(--hl); text-underline-offset: .25em; text-decoration-thickness: 1px; transition: color .25s; overflow-wrap: anywhere; }
.mail:hover { color: var(--hl); }

/* About: the team in a single column on the right, the heading on the left. */
.split--team { align-items: start; }
.split--team > .h2 { max-width: 12ch; }
.people { display: grid; gap: clamp(40px, 6vw, 72px); }
.person { display: grid; grid-template-columns: minmax(120px, 260px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: end; max-width: 640px; }
/* Portraits are shown in a calm, consistent treatment: monochrome with a soft SenseThreat-blue tone. */
.person__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-900); border: 1px solid var(--line); isolation: isolate; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: grayscale(1) contrast(1.08) brightness(.98); display: block; }
.person__photo:has(img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(95,210,255,.30), rgba(9,12,15,.55)); mix-blend-mode: multiply; pointer-events: none; }
.person__photo:has(img)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(9,12,15,.55)); z-index: 1; pointer-events: none; }
.person__mono { position: absolute; inset: 0; display: grid; place-items: center; font: 200 clamp(4rem, 9vw, 7rem)/1 var(--sans); letter-spacing: -.04em; color: var(--cyan);
  background-image: radial-gradient(rgba(95,210,255,.16) 1px, transparent 1.2px); background-size: 14px 14px; }
.person__name { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 400; letter-spacing: -.02em; }
.person__role { margin-top: 6px; color: var(--text); }
.person__cred { margin-top: 2px; color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .split--team > .h2 { max-width: none; } }

/* The consultancy scene drifts gently left and right and up and down as a whole, on top of the motion inside it. */
.scene-photo--drift { overflow: hidden; }
.scene-photo__inner { position: relative; width: 100%; height: 100%; transform: scale(1.07); animation: scene-drift 18s ease-in-out infinite alternate; }
.scene-photo__inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-photo__inner .art--over { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes scene-drift { 0% { transform: scale(1.07) translate(-1.6%, 1%); } 50% { transform: scale(1.07) translate(0, -1%); } 100% { transform: scale(1.07) translate(1.6%, .6%); } }
@media (prefers-reduced-motion: reduce) { .scene-photo__inner { animation: none; } }

/* The supplied portraits already share a navy studio backdrop, so they are shown in full colour. */
.person__photo img { filter: none; object-position: 50% 20%; }
.person__photo:has(img)::after, .person__photo:has(img)::before { display: none; }

/* Names and titles sit beside the portrait, lined up with its bottom edge. */
.person__text { padding-bottom: 4px; }
@media (max-width: 520px) { .person { grid-template-columns: 110px minmax(0, 1fr); } .person__name { font-size: 1.25rem; } }

/* Autonomous scene: the live canvas replaces the still picture once it is ready. */
.scene-auto { position: relative; width: 100%; height: 100%; }
.scene-auto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-auto .auto-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-auto.is-live img { visibility: hidden; }

/* Two case study photos side by side. */
.feature__imgs, .case-hero-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); border-right: 1px solid var(--line); }
.feature__imgs img, .case-hero-pair img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.case-hero-pair { border: 1px solid var(--line); }
.case-hero-pair img { aspect-ratio: 4 / 5; }
@media (max-width: 860px) { .feature__imgs { border-right: 0; border-bottom: 1px solid var(--line); } }

/* A source link with the title of the article it points to underneath. */
.prose .source { display: grid; gap: 6px; margin-top: 28px; }
.prose .source .muted { font-size: .95rem; }

/* The source link is set in SenseThreat blue. */
.prose .source .link-arrow { justify-self: start; color: var(--hl); }

/* PUB case study page: the photo area is 16:9, whether it shows one picture or two. */
.case-hero { aspect-ratio: 16 / 9; }
.case-hero-pair { aspect-ratio: 16 / 9; }
.case-hero-pair img { aspect-ratio: auto; height: 100%; min-height: 0; }

/* "Coming soon" popup for pages that are not written yet */
.soon { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); padding: 32px 32px 28px; width: min(420px, calc(100vw - 40px)); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.soon::backdrop { background: rgba(5,8,11,.6); backdrop-filter: blur(4px); }
.soon__eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
:root[data-theme="dark"] .soon__eyebrow { color: var(--cyan); }
.soon__title { font-size: 26px; line-height: 1.15; margin: 0 0 12px; font-weight: 500; }
.soon__text { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }

/* "Coming soon" popup for pages that are not written yet */
.soon { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); padding: 32px 32px 28px; width: min(420px, calc(100vw - 40px)); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.soon::backdrop { background: rgba(5,8,11,.6); backdrop-filter: blur(4px); }
.soon__eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
:root[data-theme="dark"] .soon__eyebrow { color: var(--cyan); }
.soon__title { font-size: 26px; line-height: 1.15; margin: 0 0 12px; font-weight: 500; }
.soon__text { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
