@font-face {
  font-family: "Chakra Petch";
  src: url("chakra-petch-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("chakra-petch-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #080808;
  --film-tint: rgb(0 0 0 / .2775);
  --foreground: #f0f0e9;
  --muted: #b1b2a9;
  --rule: #363832;
  --accent: #c9cfaf;
  --security-professional-color: color-mix(in srgb, var(--accent) 85%, black);
  --gutter: clamp(1.35rem, 6vw, 7rem);
  --heading-font: "Chakra Petch", "Arial Narrow", sans-serif;
  --label-font: "IBM Plex Mono", Consolas, monospace;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-size: .9rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #eee; outline-offset: 5px; }
p { font-size: calc(1rem * .9); line-height: 1.65; margin: 0; }
h1, h2, .detail dt, .directory-links a {
  font-family: var(--heading-font);
  font-weight: 600;
  text-transform: uppercase;
}
.site-header nav, .hero-copy p, .hero-link, .text-link, .site-footer {
  font-family: var(--label-font);
  text-transform: uppercase;
  letter-spacing: .045em;
}
.frame { width: 100%; max-width: 100rem; padding-inline: var(--gutter); margin-inline: auto; }
.skip {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 5;
  padding: .85rem 1rem;
  background: #e8e8e8;
  color: #080808;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.site-header {
  min-height: 5.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .85rem 2rem;
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  background: transparent;
}
.index .site-header {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
}
.wordmark {
  display: inline-grid;
  flex: none;
  width: 4.2rem;
  height: 4.2rem;
  place-items: center;
}
.wordmark img { display: block; width: 3.9rem; height: auto; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 clamp(.75rem, 2.3vw, 2.5rem); }
.site-header nav a {
  display: grid;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: calc(.875rem * .9);
  white-space: nowrap;
}
.site-header nav a:hover, .site-header nav a[aria-current] { color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  :is(.wordmark, .site-header nav a, .hero h1 > span, .hero-copy p, .hero-link,
      .directory-intro, .directory-links li, .interior-intro, .details, .interior-next, .site-footer) {
    animation: reveal .72s var(--reveal-offset, 0s) both cubic-bezier(.2,.65,.3,1);
  }
  .site-header nav a:nth-child(1), .directory-intro, .interior-intro { --reveal-offset: .07s; }
  .site-header nav a:nth-child(2), .hero h1 > span, .directory-links li:nth-child(1) { --reveal-offset: .12s; }
  .site-header nav a:nth-child(3), .directory-links li:nth-child(2) { --reveal-offset: .17s; }
  .site-header nav a:nth-child(4), .directory-links li:nth-child(3), .details { --reveal-offset: .22s; }
  .site-header nav a:nth-child(5), .directory-links li:nth-child(4) { --reveal-offset: .27s; }
  .site-header nav a:nth-child(6), .hero-copy p { --reveal-offset: .32s; }
  .interior-next, .hero-link { --reveal-offset: .4s; }
  .site-footer { --reveal-offset: .47s; }

  body:has(:focus-visible, :target) :is(.wordmark, .site-header nav a, .hero h1 > span,
      .hero-copy p, .hero-link, .directory-intro, .directory-links li,
      .interior-intro, .details, .interior-next, .site-footer) { animation: none; }

  .site-header nav a, .wordmark, .hero-link, .directory-links a, .site-footer a {
    transition: color .22s ease, border-color .22s ease, background-color .22s ease;
  }

  @keyframes reveal {
    from { opacity: 0; transform: translateY(.25rem); }
    to { opacity: 1; transform: none; }
  }
}

.hero {
  --camera-origin: 88% 61%;
  min-height: clamp(32rem, 100svh, 67.4rem);
  position: relative;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  background: var(--background);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("vignette-dither.png"),
    linear-gradient(var(--film-tint), var(--film-tint)),
    linear-gradient(180deg, #080808bd, #0808089e 6%, #0808085e 12%,
      #0808081e 18%, #08080800 25%, #08080800 64%, #08080822 72%,
      #08080864 82%, #080808b7 94%, #080808d9),
    linear-gradient(90deg, #080808d8, #080808b0 12%, #08080874 30%,
      #0808084e 49%, #08080832 68%, #08080825 87%, #08080824);
}
.hero-inner { display: grid; grid-template-rows: 1fr auto; padding-top: 5.4rem; }
.hero-copy { align-self: end; padding-block: 4rem 2.5rem; }
.hero h1 {
  margin: 0 0 1.2rem;
  font-family: var(--label-font);
  font-size: clamp(.76rem, 2vw, 1.125rem);
  font-weight: 400;
  letter-spacing: .22em;
  line-height: 1.2;
  white-space: nowrap;
}
.hero-copy p { color: var(--security-professional-color); letter-spacing: .13em; font-size: calc(.9rem * .9); }
.hero-link, .text-link { display: inline-flex; align-items: center; width: fit-content; min-height: 2.75rem; font-size: calc(.875rem * .9); }
.hero-link { margin-bottom: 2.5rem; padding-inline: 1rem; border: 1px solid #838779; }
.hero-link:hover { color: #080808; background: var(--accent); border-color: var(--accent); }
.text-link:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.directory { display: grid; grid-template-columns: minmax(12rem, .85fr) 1fr; gap: 3rem clamp(2rem, 8vw, 10rem); padding-block: clamp(4rem, 10vw, 9rem); }
.directory-intro h2 { font-size: calc(clamp(1.85rem, 3.8vw, 3.1rem) * .9); letter-spacing: -.035em; line-height: 1; margin: 0 0 .85rem; }
.directory-intro p { max-width: 34ch; color: var(--muted); }
.directory-links { list-style: none; padding: 0; margin: 0; }
.directory-links li { border-top: 1px solid var(--rule); }
.directory-links li:last-child { border-bottom: 1px solid var(--rule); }
.directory-links a { display: flex; justify-content: space-between; align-items: center; min-height: 3.5rem; font-size: calc(1.2rem * .9); letter-spacing: .025em; gap: 1rem; padding-inline: .25rem .6rem; }
.directory-links a::after { content: ""; flex: none; width: .45rem; height: .45rem; background: var(--accent); }
.directory-links a:hover { color: var(--accent); }

.interior { display: grid; grid-template-columns: minmax(13rem, .78fr) 1fr; align-content: start; gap: 3rem clamp(2rem, 8vw, 10rem); padding-block: clamp(4rem, 12vw, 11rem) clamp(4rem, 8vw, 8rem); }
.interior-intro h1 {
  font-size: calc(clamp(2.1rem, 4.35vw, 4.6rem) * .9);
  line-height: .98;
  letter-spacing: -.04em;
  margin: 0 0 1.2rem;
}
.interior-intro p { color: var(--muted); max-width: 32ch; }
.details { margin: 0; }
.detail { border-top: 1px solid var(--rule); padding-block: 1.2rem 1.55rem; }
.detail:last-child { border-bottom: 1px solid var(--rule); }
.detail dt { font-size: calc(1.22rem * .9); font-weight: 500; letter-spacing: .025em; margin-bottom: .42rem; }
.detail dd { margin: 0; color: #b8b8b8; max-width: 55ch; }
.detail ul { margin: 0; list-style: none; padding: 0; }
.detail li { font-size: calc(1rem * .9); line-height: 1.65; }
.detail li + li { margin-top: .22rem; }
.detail .text-link { min-height: 2rem; }
.interior-next { grid-column: 2; }

.site-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 1rem; padding-block: .65rem 1.1rem; position: relative; min-height: 5rem; color: var(--muted); font-size: calc(.875rem * .9); }
.site-footer::before { content: ""; position: absolute; inset: 0 var(--gutter) auto; border-top: 1px solid var(--rule); }
.site-licence { grid-column: 1 / -1; color: #868686; font-size: 9pt; letter-spacing: 0; text-transform: none; }
.site-footer a { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; }

@media (max-width: 800px) {
  .site-header { padding-block: .9rem .45rem; align-items: start; flex-direction: column; gap: .35rem; }
  .site-header nav { column-gap: .95rem; }
  .hero { min-height: max(32rem, 100svh); }
  .hero-inner { padding-top: 11.5rem; }
  .directory, .interior { grid-template-columns: 1fr; gap: 2rem; }
  .interior-next { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.aerial-scene {
  --aerial-height: clamp(23rem, calc(100svh - 5.4rem), 59rem);
}

.aerial-frame {
  position: relative;
  height: var(--aerial-height);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  background: #17191a;
}

.aerial-image,
.aerial-frame::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.aerial-image {
  z-index: -2;
  display: block;
  object-fit: cover;
  object-position: 64% 52%;
}

.aerial-frame::after {
  content: "";
  z-index: -1;
  background:
    url("vignette-dither.png"),
    linear-gradient(var(--film-tint), var(--film-tint)),
    linear-gradient(0deg, #080808eb, #080808cc 8%, #08080879 23%,
      #08080841 35%, #08080816 49%, #08080800 63%);
  pointer-events: none;
}

.aerial-caption {
  padding-block: clamp(1.75rem, 5vw, 4rem);
}

.hero h1,
.hero-link:not(:hover),
.aerial-caption h1,
.aerial-caption p {
  color: color-mix(in srgb, var(--foreground) 85%, black);
}

.feature-content {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.feature-content .details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 4vw, 4rem);
}

.feature-content .detail:last-child { border-bottom: 0; }
.feature-content .interior-next { margin-top: 1rem; }

@media (max-width: 800px) {
  .aerial-scene { --aerial-height: clamp(21rem, 77svh, 43rem); }
  .feature-content .details { grid-template-columns: 1fr; gap: 0; }
}

.aerial-scene.has-motion {
  min-height: calc(var(--aerial-height) + clamp(13rem, 39svh, 23rem));
}

.aerial-scene.has-motion .aerial-frame {
  position: sticky;
  top: 0;
}


.background-film, .film-end, .film-surface, .film-loop {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.background-film, .film-end, .film-surface, .film-loop { opacity: 0; }
.background-film.canvas-source { visibility: hidden; }
.background-film::-webkit-media-controls { display: none !important; }
.background-film::-webkit-media-controls-start-playback-button { display: none !important; }
.background-film::-webkit-media-controls-overlay-play-button { display: none !important; }
.background-film::-webkit-media-controls-panel { display: none !important; }

.hero :is(.scene-poster, .background-film, .film-end, .film-surface) { object-position: 100% center; }
:is(.background-film, .film-end, .film-surface, .film-loop).is-visible { opacity: 1; }

.protection-film, .page-film { --aerial-height: clamp(23rem, 77svh, 50rem); }
.protection-film .aerial-caption, .page-film .aerial-caption { padding-bottom: clamp(5rem, 8vw, 6.5rem); }

@media (max-width: 800px) {
  .aerial-caption { padding-bottom: 5rem; }
  .aerial-scene {
    --aerial-height: max(32rem, 100svh);
  }
  .aerial-frame {
    min-height: max(32rem, 100svh);
  }
  .hero::after {
    background:
      url("vignette-dither.png"),
      linear-gradient(var(--film-tint), var(--film-tint)),
      linear-gradient(180deg, #08080850, #08080820 23%, #08080800 60%, #0808088c 84%, #080808d9),
      linear-gradient(90deg, #08080868, #08080830 40%, #08080818);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .background-film, .film-end, .film-surface { transition: opacity .65s ease; }
}


.page-film--experience .aerial-image { object-position: 52% 55%; }
.page-film--qualifications .aerial-image { object-position: 50% center; }
.page-film--contact .aerial-image { object-position: 70% center; }

.experience .feature-content .details,
.qualifications .feature-content .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 800px) {
  .experience .feature-content .details,
  .qualifications .feature-content .details { grid-template-columns: 1fr; }
  .intelligence .aerial-image { object-position: 81% 52%; }
  .protection-film .aerial-image { object-position: 79% center; }
  .page-film--qualifications .aerial-image { object-position: 40% center; }
  .page-film--experience .aerial-image { object-position: 83% 55%; }
  .page-film--contact .aerial-image { object-position: 11% center; }
}

@media (max-width: 400px) {
  .qualifications .interior-intro h1 { font-size: calc(clamp(1.75rem, 8vw, 2.1rem) * .9); }
}

.film-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.film-loading {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  padding: .5rem .7rem;
  border-left: 1px solid #8a8a8a;
  background: rgb(8 8 8 / .66);
  color: #c8c8c8;
  font: .675rem / 1.35 var(--label-font);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.film-loading.is-loading { opacity: 1; }
:root:not(.motion-enabled) .film-loading { display: none; }

.film-loading--detail { min-width: 8rem; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
/* Centre-out bar: a 1px line drawn by two points travelling east and west from the middle. */
.film-loading--detail progress {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: .45rem;
  border: 0;
  color: #d3d3d3;
  -webkit-appearance: none;
  appearance: none;
  background:
    linear-gradient(currentColor, currentColor) calc(50% - var(--p) * 50%) 50% / 3px 3px no-repeat,
    linear-gradient(currentColor, currentColor) calc(50% + var(--p) * 50%) 50% / 3px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 50% / calc(var(--p) * 100%) 1px no-repeat,
    linear-gradient(rgb(211 211 211 / .25), rgb(211 211 211 / .25)) 50% 50% / 100% 1px no-repeat;
}
.film-loading--detail progress::-webkit-progress-bar { background: transparent; }
.film-loading--detail progress::-webkit-progress-value { background: transparent; }
.film-loading--detail progress::-moz-progress-bar { background: transparent; }
/* Unknown size: the points sweep out from the centre and repeat. */
.film-loading--detail progress:indeterminate { animation: centre-out 1.4s ease-in-out infinite; }
@keyframes centre-out { from { --p: 0; } to { --p: 1; } }

.camera-position {
  position: absolute;
  z-index: 1;
  top: 50%;
  bottom: auto;
  left: max(1rem, env(safe-area-inset-left));
  translate: 0 -50%;
  color: rgb(240 240 233);
  opacity: .3;
  font-size: .5625rem;
  line-height: 1.45;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px #080808, 0 0 7px #080808;
  pointer-events: none;
}
.camera-position-grid { font-size: inherit; }

/* Keep the mist moving separately from playback, including over a poster. */
.scene-mist {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at 34% 30%, rgb(185 190 192 / .25), transparent 58%) 0 18% / 165% 74%,
    radial-gradient(ellipse at 66% 54%, rgb(181 184 188 / .21), transparent 56%) 100% 84% / 158% 89%;
  background-repeat: no-repeat;
}

:root:not(.motion-disabled) .scene-mist {
  animation: moving-mist 23s ease-in-out infinite alternate;
  opacity: 1;
}

/* Extend mist beyond the aerial frame so its moving bounds never show. */
.intelligence .aerial-scene { --film-tint: rgb(0 0 0 / .38); }
.intelligence .scene-mist { background-size: 165% 125%, 158% 135%; }

@keyframes moving-mist {
  from { background-position: 6% 4%, 94% 96%; }
  to { background-position: 100% 34%, 0 56%; }
}

.motion-control {
  justify-self: start;
  border: 1px solid #898983;
  padding: .65em .9em;
  color: var(--foreground);
  background: rgb(8 8 8 / .72);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}

.motion-control:focus-visible { outline: 2px solid #eee; outline-offset: 4px; }
.is-opening .motion-control:not(:focus-visible) { visibility: hidden; }

.scene-poster {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@property --camera-scale {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

@property --camera-x {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}

@property --camera-y {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 0%;
}

:root:not(.motion-disabled) :is(.hero, .aerial-frame) {
  --camera-scale: 1.025;
  --camera-x: 0%;
  --camera-y: 0%;
  --scroll-zoom: .18;
  --scroll-shift: 7%;
  --camera-opening-duration: 14.72s;
  animation: scene-opening var(--camera-opening-duration) linear both,
             scene-drift 17s ease-in-out var(--camera-opening-duration) infinite;
}

:root:not(.motion-disabled) .hero {
  --camera-scale: 1;
  animation: none;
}

/* Home opening: a clear push-in towards the skyline, then the slow drift from there.
   The same animation list on both rules, so it never restarts when the film settles. */
:root:not(.motion-disabled) .hero,
:root:not(.motion-disabled) .hero:is(.film-settled, :has(video[data-playback="poster"])) {
  animation: home-push 10s cubic-bezier(.3,.05,.35,1) both,
             thames-drift 38s ease-in-out 10s infinite;
}
@keyframes home-push {
  0% { --camera-scale: 1; }
  100% { --camera-scale: 1.07; }
}
@media (max-width: 800px) {
  :root:not(.motion-disabled) .hero,
  :root:not(.motion-disabled) .hero:is(.film-settled, :has(video[data-playback="poster"])) {
    animation: home-push-mobile 10s cubic-bezier(.3,.05,.35,1) both,
               thames-drift-mobile 38s ease-in-out 10s infinite;
  }
}
@keyframes home-push-mobile {
  0% { --camera-scale: 1; }
  100% { --camera-scale: 1.14; }
}

@keyframes thames-drift-mobile {
  0%, 100% { --camera-scale: 1.14; --camera-x: 0%; --camera-y: 0%; }
  44% { --camera-scale: 1.159; --camera-x: .48%; --camera-y: .24%; }
  74% { --camera-scale: 1.152; --camera-x: .2%; --camera-y: -.15%; }
}
@keyframes thames-drift {
  0%, 100% { --camera-scale: 1.07; --camera-x: 0%; --camera-y: 0%; }
  44% { --camera-scale: 1.089; --camera-x: .48%; --camera-y: .24%; }
  74% { --camera-scale: 1.082; --camera-x: .2%; --camera-y: -.15%; }
}

:root:not(.motion-disabled) .intelligence .aerial-frame {
  --scroll-zoom: .4;
  --scroll-shift: -7%;
}

:root:not(.motion-disabled) :is(.hero, .aerial-frame) > :is(.scene-poster, .aerial-image, .background-film, .film-end, .film-atmosphere, .film-surface, .film-loop, .film-clearing) {
  transform-origin: var(--camera-origin, 65% 61%);
  transform: translate(var(--camera-x), calc(var(--camera-y) + var(--parallax-progress, 0) * var(--scroll-shift)))
             scale(calc(var(--camera-scale) + var(--parallax-progress, 0) * var(--scroll-zoom)));
}

.film-zoom-detail {
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}

:root.motion-enabled .aerial-scene .film-zoom-detail.is-ready,
:root.motion-enabled .film-settled .film-zoom-detail.is-ready,
:root.motion-enabled :is(.hero, .page-film, .protection-film):not(:has(.background-film.is-visible)) .film-zoom-detail.is-ready {
  opacity: clamp(0, calc((var(--parallax-progress, 0) - .30) * 2.8), 1);
}

/* Pull back on the office shot while keeping the river in the portrait crop. */
:root:not(.motion-disabled) .page-film--qualifications {
  --camera-origin: 48% 58%;
  --scroll-zoom: .035;
  --scroll-shift: 2%;
  --camera-opening-duration: 5s;
  /* Faster pull-back that eases to a stop once fully out; no drift afterwards. */
  animation: office-pullback var(--camera-opening-duration) cubic-bezier(.25,.6,.3,1) both;
}

@keyframes office-pullback {
  0% { --camera-scale: 1.035; --camera-x: -.15%; --camera-y: 0%; }
  100% { --camera-scale: 1; --camera-x: 0%; --camera-y: 0%; }
}

@keyframes office-drift {
  0%, 100% { --camera-scale: 1; --camera-x: 0%; --camera-y: 0%; }
  33% { --camera-scale: 1.018; --camera-x: -.55%; --camera-y: -.25%; }
  67% { --camera-scale: 1.016; --camera-x: .55%; --camera-y: .30%; }
}

@media (max-width: 800px) {
  .page-film--qualifications { --aerial-height: max(32rem, 88svh); }
  .aerial-frame.page-film--qualifications { min-height: max(32rem, 88svh); }
}

@keyframes scene-opening {
  0% { --camera-scale: 1.025; --camera-x: 0%; --camera-y: 0%; }
  100% { --camera-scale: 1.093; --camera-x: -.65%; --camera-y: -.4%; }
}

@keyframes scene-drift {
  0%, 100% { --camera-scale: 1.093; --camera-x: -.65%; --camera-y: -.4%; }
  33% { --camera-scale: 1.068; --camera-x: 2.1%; --camera-y: .72%; }
  67% { --camera-scale: 1.086; --camera-x: -.98%; --camera-y: .28%; }
}

.profile-subtitle {
  margin: .45rem 0 0;
  color: color-mix(in srgb, var(--foreground) 85%, black);
  font-size: clamp(.73rem, 3.2vw, .9rem);
  line-height: 1.6;
}

.typed-original {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.typed-remaining { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 > span:has(.typed-characters),
  .hero-copy > p:has(.typed-characters),
  .interior-intro:has(.typed-characters),
  .interior-intro:has(.was-typed),
  .hero h1.was-typed > span,
  .hero-copy > p.was-typed {
    animation: none;
  }

  :root.motion-enabled .detail:has(> dt .typed-original),
  :root.motion-enabled .directory:has(.directory-intro .typed-original) .directory-links li {
    border-top-color: transparent;
  }

  :root.motion-enabled .detail.draw-heading-rule,
  :root.motion-enabled .directory.draw-heading-rule .directory-links li {
    border-top-color: transparent;
    background: linear-gradient(var(--rule), var(--rule)) right top / 100% 1px no-repeat border-box;
    animation: draw-heading-rule .42s ease-out both;
  }

  @keyframes draw-heading-rule {
    from { background-size: 0% 1px; }
    to { background-size: 100% 1px; }
  }
}

.heading-copy,
.hero-link.heading-copy {
  animation: none;
  transition: opacity .46s ease-out, translate .46s ease-out;
}

.heading-copy-pending:not(:focus-within) {
  opacity: 0;
  translate: 0 .28rem;
}

.is-typing .typed-characters::after {
  content: "";
  position: absolute;
  height: .82em;
  margin-top: .13em;
  border-inline-start: .075em solid currentColor;
  animation: heading-caret .43s step-end infinite;
}

@keyframes heading-caret {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

.profile-summary {
  max-width: 65ch;
  margin-bottom: .35rem;
}

.profile-download { margin-bottom: 1.5rem; }
@media (max-width: 650px) {
  .profile .interior-intro h1 { font-size: clamp(1.1rem, 6.1vw, 2.3rem); }
}

.recommendations {
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.recommendation-letters { scroll-margin-top: 1.5rem; }
.recommendation-letters > summary {
  padding-block: 1.2rem;
  cursor: pointer;
  font-family: var(--label-font);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.recommendation-letters > summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: .3rem;
}
.recommendation-content {
  max-width: 76ch;
  padding-bottom: 2rem;
}
.recommendation-content article + article {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.recommendation-content h3 {
  margin-bottom: .5rem;
  font-size: 1.05rem;
}
.recommendation-content p { color: var(--muted); }
.recommendation-content .recommendation-byline {
  font-size: .875rem;
  margin-bottom: 1.5rem;
}
.recommendation-signature { margin-top: 1.5rem; }
@media (prefers-reduced-motion: no-preference) {
  .recommendation-letters[open] .recommendation-content {
    animation: reveal .4s ease-out both;
  }
}

.site-header nav a { position: relative; }
.site-header nav a.is-selecting::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .3rem;
  height: 1px;
  background: var(--accent);
  transform-origin: right;
  animation: navigation-line .14s ease-out both;
}
.site-header nav a.is-selecting::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: calc(.3rem - 2px);
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
@keyframes navigation-line {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: .8; }
}

.sound-control {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 4;
  padding: .45rem .7rem;
  color: #b7b9ac;
  background: rgb(8 8 8 / .72);
  border: 1px solid rgb(183 185 172 / .22);
  font: .6875rem / 1.4 var(--label-font);
  letter-spacing: .08em;
  cursor: pointer;
}
.sound-control:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.camera-threat {
  display: block;
  width: fit-content;
  max-width: min(24rem, calc(100vw - 3rem));
  margin-top: .4rem;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  font: inherit;
  letter-spacing: .06em;
}
.camera-threat-checked {
  display: block;
  margin-top: .18rem;
  color: inherit;
  font-size: inherit;
  letter-spacing: .035em;
}
.camera-threat:hover { color: #e6e7df; }
.camera-threat:focus-visible {
  outline: 1px solid #b4b7a2;
  outline-offset: .3rem;
}

.persistent-page {
  position: fixed;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 0;
  background: #080808;
}
.has-persistent-page { overflow: hidden; }
.has-persistent-page > :not(.persistent-page):not(.sound-control) { display: none; }
.persistent-page[hidden] { display: none; }

/* Reserve a quiet strip below the home action for the corner metadata. */
.index .hero-link { margin-bottom: 6.2rem; }

/* Keep the small corner readout clear of interior captions on narrow screens. */
.protection-film .aerial-caption, .page-film .aerial-caption, .aerial-caption {
  padding-bottom: clamp(6rem, 8vw, 6.5rem);
}

/* Home entry prompt: scene only, then a small typed question with two choices. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.index .hero-inner {
  grid-template-rows: 1fr;
  place-items: center;
  padding-block: 5.4rem;
}
.hero-prompt {
  max-width: 36ch;
  text-align: center;
}
.hero-question {
  white-space: pre-line;
  color: color-mix(in srgb, var(--foreground) 85%, black);
  font: .75rem / 1.7 var(--label-font);
  letter-spacing: .06em;
  text-shadow: 0 1px 6px #080808;
}
/* Zero-width inline caret: it never adds width or a line-break point, so text can't reflow while typing. */
.prompt-caret {
  position: relative;
}
.prompt-caret::after {
  content: "";
  position: absolute;
  left: .12em;
  top: -.02em;
  width: .55em;
  height: 1.05em;
  background: currentColor;
  opacity: 0;
}
/* Cursor only shows for one quick blink before and after typing. */
.caret-flash .prompt-caret::after { animation: caret-flash .22s step-end 1; }
@keyframes caret-flash {
  0% { opacity: .85; }
  50% { opacity: 0; }
}
.hero-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem 1rem;
  margin-top: 1.6rem;
}
.index .hero-choices .hero-link {
  margin: 0;
  font-size: .6875rem;
  animation: none;
}
.prompt-pending :is(.site-header, .hero-choices, .camera-position) {
  opacity: 0;
  visibility: hidden;
}
.hero-choices .hero-link { transform: translateY(.35rem); }
.prompt-ready .hero-choices { transition: opacity .9s ease; }
.prompt-ready .hero-choices .hero-link {
  transform: none;
  transition: transform 1s cubic-bezier(.2,.65,.3,1), color .22s ease, background-color .22s ease, border-color .22s ease;
}
.prompt-ready .hero-choices .hero-link + .hero-link { transition-delay: .12s, 0s, 0s, 0s; }
.prompt-ready .site-header { transition: opacity .9s ease .6s; }
.prompt-ready .camera-position { transition: opacity .9s ease .9s; }
.prompt-ready .site-header :is(.wordmark, nav a) { animation: none; }
@media (max-width: 800px) {
  .index .hero-inner { place-items: start center; padding-top: 30svh; }
}

/* Chosen route: profile visitors don't see the services offer, and vice versa. */
[data-audience="profile"] .site-header nav a[href="services.html"],
[data-audience="profile"] .contact :is(#intelligence-enquiries, #close-protection-enquiries, #services-enquiries),
[data-audience="services"] .site-header nav a[href="profile.html"],
[data-audience="services"] .contact #cv-request { display: none; }
/* On the home page the visitor is choosing again, so show the full menu. */
.index .site-header nav a { display: grid; }

/* Home: the logo only fades in top left with the menu. */
.index .brand-intro-mark { display: none; }
.hero-question:not(.is-typing):not(.is-typed) .prompt-caret { visibility: hidden; }
@media (max-width: 800px) {
  .index .camera-position { top: 66%; }
}
/* Typing lines are fixed to their final breaks, so nothing reflows and the cursor stays with the text. */
.prompt-line { display: block; white-space: pre; }
.hero-question:not(.is-typing):not(.is-typed) { visibility: hidden; }
/* No menu on the home page: the visitor chooses a route first. */
.index .site-header nav { display: none; }

/* Footer credential: plain verifiable claim linked to the public SIA register (no SIA logo). */
.footer-id { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; }
.sia-badge {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 0 !important;
  padding: .32em .6em .3em .5em;
  border: 1px solid rgb(255 255 255 / .28);
  color: rgb(255 255 255 / .78);
  font: .5625rem / 1 var(--label-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sia-badge svg { width: 1.15em; height: 1.3em; flex: none; }
.sia-badge:hover { color: #fff; border-color: rgb(255 255 255 / .55); text-decoration: none !important; }
.site-footer > a { white-space: nowrap; }
/* One line's return between body copy and its link. */
.detail dd p + p:has(> .text-link) { margin-top: 1.65em; }
/* Pre-promote the prompt and the fading elements so iOS doesn't re-rasterise
   (visibly flash) the typed text when the buttons and header start to fade in. */
.index .hero-prompt { transform: translateZ(0); backface-visibility: hidden; }
.index .hero-question { transform: translateZ(0); -webkit-font-smoothing: antialiased; }
.index :is(.hero-choices, .site-header, .camera-position) { will-change: opacity; }
/* People loop crossfades in over the frozen last frame. */
.film-loop { transition: opacity .8s ease; }
:root:not(.motion-enabled) .film-loop { display: none; }
video.canvas-source:not(.background-film) { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; pointer-events: none; }

/* Loading readouts: unboxed, small and subtle, centred in the scene. */
.film-loading,
.film-loading--detail {
  top: 50%;
  bottom: auto;
  left: 50%;
  translate: -50% -50%;
  text-align: center;
  width: max-content;
  min-width: 0;
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: none;
  color: rgb(240 240 233);
  font-size: .5625rem;
  line-height: 1.45;
  letter-spacing: .08em;
  text-shadow: 0 1px 3px #080808, 0 0 7px #080808;
}
.film-loading.is-loading { opacity: .5; }
.film-loading--detail progress { margin-top: .3rem; color: rgb(240 240 233); }
@media (max-width: 800px) {
  /* Centred, but lifted clear of the GPS readout on narrow screens. */
  .film-loading { top: calc(50% - 4.2rem); }
  .index .film-loading { top: calc(66% - 4.2rem); }
}
/* GPS readout sits ~70px lower, just above the page heading. */
.camera-position { top: calc(50% + 4.4rem); }

/* Fog clearing over the Gherkin: opens as the zoom arrives, the mist still drifting around it. */
.film-clearing { opacity: 0; pointer-events: none; filter: contrast(1.6) brightness(.86); }
:root.motion-enabled .aerial-scene .film-clearing.is-ready {
  opacity: clamp(0, calc((var(--parallax-progress, 0) - .32) * 2.6), .94);
}

/* Home opening: drone rising from the Thames, up through cloud, then straight down on the Gherkin. */
.drone {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: #0a0a0a;
}
.drone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drone-river { transform-origin: 50% 100%; transform: scale(1.5); object-position: 88% center; }
.drone-city { opacity: 0; }
.drone-cloud {
  position: absolute;
  inset: -25%;
  opacity: 0;
  background: url("drone-cloud-1.webp") center / cover no-repeat;
}
.drone-cloud--2 { background-image: url("drone-cloud-2.webp"); }
.drone-cloud--3 { background-image: url("drone-cloud-1.webp"); rotate: 180deg; }
.drone-veil { position: absolute; inset: 0; opacity: 0; background: rgb(150 152 147); }

.drone.is-flying .drone-river { animation: drone-river 2.9s cubic-bezier(.55,0,.8,.45) forwards; }
.drone.is-flying .drone-city { animation: drone-city 6.6s cubic-bezier(.12,.6,.22,1) 2.35s forwards; }
.drone.is-flying .drone-cloud--1 { animation: drone-cloud 2.3s ease-in 1.5s forwards; }
.drone.is-flying .drone-cloud--2 { animation: drone-cloud 2.4s ease-in 1.95s forwards; }
.drone.is-flying .drone-cloud--3 { animation: drone-wisp 3.4s ease-out 3.4s forwards; }
.drone.is-flying .drone-veil { animation: drone-veil 1.5s ease-in-out 1.75s forwards; }

@keyframes drone-river {
  0% { transform: scale(1.5) translateY(0); }
  100% { transform: scale(1.04) translateY(16%); }
}
@keyframes drone-city {
  0% { opacity: 0; transform: scale(2.6); }
  10% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes drone-cloud {
  0% { opacity: 0; transform: scale(.85); }
  40% { opacity: .95; }
  100% { opacity: 0; transform: scale(2.8); }
}
@keyframes drone-wisp {
  0% { opacity: 0; transform: scale(.9); }
  30% { opacity: .45; }
  100% { opacity: 0; transform: scale(2.2); }
}
@keyframes drone-veil {
  0% { opacity: 0; }
  45%, 60% { opacity: .82; }
  100% { opacity: 0; }
}
/* Hovering high above the City once the climb is done. */
.drone.is-settled .drone-river { opacity: 0; }
.drone.is-settled .drone-city { opacity: 1; animation: drone-hover 26s ease-in-out infinite alternate; }
@keyframes drone-hover {
  from { transform: scale(1); }
  to { transform: scale(1.035) translate(-.4%, .3%); }
}
:root.motion-disabled .drone.is-settled .drone-city { animation: none; }

/* Short scenario line under each service: small, mono, scannable. */
.detail dd .service-scenarios {
  margin-top: .8em;
  color: #8f918a;
  font: .625rem / 1.8 var(--label-font);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Overhead Gherkin scene (Profile, Intelligence): scrolling pulls the camera OUT to the
   full, sharpest frame instead of pushing in. It starts slightly tighter so there is room to pull back. */
:root:not(.motion-disabled) .intelligence .aerial-frame { --scroll-zoom: .3; --scroll-shift: 0%; }
:root:not(.motion-disabled) .intelligence .aerial-frame > :is(.scene-poster, .aerial-image, .background-film, .film-end, .film-atmosphere, .film-surface, .film-loop, .film-clearing) {
  transform: translate(var(--camera-x), var(--camera-y))
             scale(calc(var(--camera-scale) + (1 - var(--parallax-progress, 1)) * var(--scroll-zoom)));
}
/* Anchor the pull-back on the Gherkin so it stays in frame as the drone climbs. */
:root:not(.motion-disabled) .intelligence .aerial-frame { --camera-origin: 72% 38%; }
@media (max-width: 800px) {
  :root:not(.motion-disabled) .intelligence .aerial-frame { --camera-origin: 42% 44%; }
}
/* Keep the scroll-driven zoom on the GPU so it glides rather than stutters. */
:root:not(.motion-disabled) .aerial-scene .aerial-frame > :is(.aerial-image, .background-film, .film-end, .film-atmosphere, .film-surface, .film-zoom-detail) {
  will-change: transform;
  backface-visibility: hidden;
}
/* GPS readout: top left, below the logo and menu, a touch more visible. */
.camera-position,
.index .camera-position { top: 7rem; bottom: auto; translate: none; opacity: .36; }
@media (max-width: 800px) {
  .index .camera-position { top: 7rem; }
}

/* Scenario lists stacked as traditional bullets: small square markers, mono caps. */
.detail dd ul.service-scenarios {
  margin: 1.65rem 0 0;
  padding: 0;
  list-style: none;
}
.detail dd ul.service-scenarios li {
  position: relative;
  padding-left: 1.3em;
}
.detail dd ul.service-scenarios li::before {
  content: "";
  position: absolute;
  left: .15em;
  top: .78em;
  width: .38em;
  height: .38em;
  background: currentColor;
  opacity: .7;
}
.detail dd ul + p:has(> .text-link) { margin-top: 1.65em; }

/* Enquiry form: quiet, precise, in the site's voice. */
.enquiry-form { max-width: 46rem; }
.form-section { margin: 0 0 2.8rem; padding: 0; border: 0; }
.form-section legend {
  margin-bottom: 1.4rem;
  padding: 0;
  color: var(--foreground);
  font: 500 1.1rem / 1.2 var(--heading-font);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.field--wide { grid-column: 1 / -1; }
.field[hidden] { display: none; }
.field label, .field-label {
  display: block;
  margin-bottom: .55rem;
  color: #8f918a;
  font: .625rem / 1.4 var(--label-font);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.field label span { color: #b9bab3; }
.field:focus-within label { color: var(--foreground); }
.enquiry-form :is(input:not([type="radio"]), textarea, select) {
  width: 100%;
  padding: .55rem 0 .7rem;
  border: 0;
  border-bottom: 1px solid rgb(240 240 233 / .22);
  border-radius: 0;
  background: transparent;
  color: var(--foreground);
  font: 1rem / 1.5 inherit;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.enquiry-form textarea { resize: vertical; min-height: 3rem; }
.enquiry-form select {
  padding-right: 1.6rem;
  background: linear-gradient(45deg, transparent 50%, #8f918a 50%) right .35rem center / .4rem .4rem no-repeat,
              linear-gradient(-45deg, transparent 50%, #8f918a 50%) right 0 center / .4rem .4rem no-repeat;
  cursor: pointer;
}
.enquiry-form select option { background: #111; color: var(--foreground); }
.enquiry-form ::placeholder { color: rgb(240 240 233 / .28); }
.enquiry-form :is(input, textarea, select):hover { border-bottom-color: rgb(240 240 233 / .4); }
.enquiry-form :is(input, textarea, select):focus { border-bottom-color: var(--foreground); }
.enquiry-form [aria-invalid] { border-bottom-color: #c98a78 !important; }
.field-error { min-height: 1em; margin-top: .4rem; color: #c98a78; font: .625rem / 1.4 var(--label-font); letter-spacing: .1em; text-transform: uppercase; }
.choice-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block;
  padding: .55rem 1rem;
  border: 1px solid rgb(240 240 233 / .22);
  color: #b9bab3;
  font: .6875rem / 1 var(--label-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.choice:hover span { border-color: rgb(240 240 233 / .5); }
.choice input:checked + span { border-color: var(--foreground); color: #0a0a0a; background: var(--foreground); }
.choice input:focus-visible + span { outline: 1px solid var(--foreground); outline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.form-submit, .form-secondary {
  display: inline-block;
  padding: .95rem 1.6rem;
  border: 1px solid var(--foreground);
  background: var(--foreground);
  color: #0a0a0a;
  font: .6875rem / 1 var(--label-font);
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.form-submit:hover { background: transparent; color: var(--foreground); text-decoration: none; }
.form-secondary { background: transparent; color: var(--foreground); border-color: rgb(240 240 233 / .4); }
.form-secondary:hover { border-color: var(--foreground); }
.form-note { flex: 1 1 14rem; color: #8f918a; font-size: .8125rem; line-height: 1.5; }
.enquiry-done { max-width: 40rem; outline: none; }
.enquiry-done .done-title { margin-bottom: .8rem; font: 500 1.6rem / 1.2 var(--heading-font); letter-spacing: .02em; text-transform: uppercase; }
.enquiry-done .done-lead { color: #b9bab3; }
.done-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0; }
.done-actions [hidden] { display: none; }
.done-call { color: #b9bab3; }
.done-status { margin-top: .8rem; color: #8f918a; font: .625rem / 1.4 var(--label-font); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-submit { width: 100%; text-align: center; }
}

/* Enquiry form: slightly larger text. */
.form-section legend { font-size: 1.2rem; }
.field label, .field-label { font-size: .6875rem; }
.enquiry-form :is(input:not([type="radio"]), textarea, select) { font-size: 1.0625rem; }
.field-error { font-size: .6875rem; }
.choice span { font-size: .75rem; }
.form-submit, .form-secondary { font-size: .75rem; }
.form-note { font-size: .875rem; }
/* Send button: subtle, translucent, in the same style as the contact choice buttons. */
.enquiry-form .form-submit {
  border-color: rgb(240 240 233 / .38);
  background: rgb(240 240 233 / .08);
  color: rgb(240 240 233 / .9);
  backdrop-filter: blur(2px);
}
.enquiry-form .form-submit:hover,
.enquiry-form .form-submit:focus-visible {
  border-color: rgb(240 240 233 / .7);
  background: rgb(240 240 233 / .16);
  color: var(--foreground);
}
.choice input:checked + span {
  border-color: rgb(240 240 233 / .7);
  background: rgb(240 240 233 / .16);
  color: var(--foreground);
}

/* Scroll hint: a fine chevron that breathes at the foot of the opening scene, then fades away. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(1.4rem, env(safe-area-inset-bottom));
  z-index: 2;
  width: 1.6rem;
  translate: -50% 0;
  color: rgb(240 240 233);
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s ease;
}
.scroll-cue svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 1px 3px #080808); }
.scroll-cue.is-visible { opacity: 1; }
.scroll-cue.is-visible svg { animation: scroll-cue 2.2s ease-in-out infinite; }
.scroll-cue.is-done { opacity: 0; transition-duration: .5s; }
@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); opacity: .28; }
  50% { transform: translateY(.38rem); opacity: .7; }
}
:root.motion-disabled .scroll-cue svg { animation: none; opacity: .5; }
/* "Welcome." (or "Welcome, Stephen.") at twice the size of the question beneath it. */
/* "Welcome." two points larger than the question, regular weight. */
.hero-question .prompt-welcome {
  display: block;
  font-size: calc(1em + 2px);
  white-space: normal;
}

/* Typography tidy-up: hyphenated words never split across lines, no lone words left
   dangling on a last line, headings wrap into even lines, comfortable line lengths. */
.nb { white-space: nowrap; }
main :is(p, li, dd, blockquote, figcaption, .form-note) { text-wrap: pretty; }
main :is(h1, h2, h3, dt, legend, .interior-intro p, .aerial-caption p) { text-wrap: balance; }
main :is(.details, .feature-content) :is(p, li) { max-width: 62ch; }
main .details { overflow-wrap: normal; hyphens: manual; }
/* Chevron is tappable: a generous invisible hit area around the fine line. */
.scroll-cue {
  width: 3.6rem;
  padding: 1rem;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  bottom: max(.4rem, env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
.scroll-cue:focus-visible { outline: 1px solid rgb(240 240 233 / .6); outline-offset: -.4rem; }
.scroll-cue:not(.is-visible) { pointer-events: none; }
/* No scroll anchoring: content revealing above/below must never yank the scroll position. */
html, body { overflow-anchor: none; }

/* Tighter step from the scene caption (title + subtitle) down into the body text. */
.feature-content { padding-top: clamp(1rem, 2.6vw, 2.4rem); }
.protection-film .aerial-caption, .page-film .aerial-caption, .aerial-caption {
  padding-bottom: clamp(4.5rem, 6vw, 5rem);
}

/* Profile section rail (all screen sizes). */
.section-rail { display: none; }
@media all {
  .section-rail {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 6;
    display: block;
    translate: 0 -50%;
    color: var(--foreground);
    opacity: 0;
    transition: opacity .6s ease;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .section-rail.is-visible { opacity: 1; }
  .rail-panel {
    position: relative;
    padding: .5rem .85rem .5rem 1.1rem;
    border: 1px solid transparent;
    border-right: 0;
    border-radius: 3px 0 0 3px;
    background: rgb(8 8 8 / 0);
    transition: background-color .3s ease, border-color .3s ease, -webkit-backdrop-filter .3s ease, backdrop-filter .3s ease;
  }
  .section-rail.is-open .rail-panel {
    border-color: rgb(240 240 233 / .09);
    background: rgb(8 8 8 / .46);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .rail-item {
    display: grid;
    grid-template-columns: auto 1.6rem;
    align-items: center;
    column-gap: .9rem;
    height: 2.35rem;
    color: inherit;
    text-decoration: none;
    border: 0;
  }
  .rail-label {
    justify-self: end;
    font: .6rem / 1 var(--label-font);
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    translate: .4rem 0;
    transition: opacity .25s ease, translate .25s ease;
    pointer-events: none;
  }
  .section-rail.is-open .rail-label { opacity: .55; translate: 0 0; }
  .section-rail.is-open .rail-item[aria-current] .rail-label { opacity: .8; }
  .section-rail.is-open .rail-item.is-hot .rail-label { opacity: 1; }
  .rail-tick {
    justify-self: end;
    width: .5rem;
    height: 1px;
    background: currentColor;
    opacity: .4;
    transition: width .25s ease, opacity .25s ease;
  }
  .rail-item[aria-current] .rail-tick { width: 1rem; opacity: .9; }
  .rail-item.is-hot .rail-tick { width: 1.1rem; opacity: 1; }
  .rail-pointer {
    position: absolute;
    top: 0;
    right: calc(.85rem + 1.25rem);
    width: .75rem;
    height: .625rem;
    margin-top: -.3125rem;
    opacity: .85;
    transition: translate .22s cubic-bezier(.2,.7,.3,1);
  }
  .section-rail.is-open .rail-pointer { opacity: 1; }
  .is-opening .section-rail { opacity: 0; }
}
@media all {
  /* Closed: only a slim strip at the edge takes touches, so the page beside it stays usable. */
  .section-rail, .section-rail:not(.is-open) .rail-panel { pointer-events: none; }
  .section-rail.is-open .rail-panel { pointer-events: auto; }
  .rail-item { position: relative; }
  .rail-item::after {
    content: "";
    position: absolute;
    inset: 0 -.85rem 0 auto;
    width: 3rem;
    pointer-events: auto;
  }
}

@media all {
  /* Small spaced word above the rail: blinks once when the rail appears, then rests at 50%. */
  .rail-word {
    position: absolute;
    right: .85rem;
    bottom: calc(100% - .1rem);
    margin-right: -.34em;
    font: 400 .5rem / 1 "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: .34em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
  }
  .section-rail.is-visible .rail-word { animation: rail-word 3.2s ease-in-out .5s both; }
  @keyframes rail-word {
    0% { opacity: 0; }
    14% { opacity: .95; }
    24% { opacity: .1; }
    34% { opacity: .95; }
    68% { opacity: .95; }
    100% { opacity: .5; }
  }
}
@media all {
  /* Closed rail: very small section names beside the ticks; the current one at full strength. */
  .section-rail:not(.is-open) .rail-label {
    opacity: .5;
    translate: 0 0;
    font-size: .45rem;
    letter-spacing: .16em;
    text-shadow: 0 1px 4px rgb(8 8 8 / .8);
  }
  .section-rail:not(.is-open) .rail-item[aria-current] .rail-label { opacity: 1; }
  .rail-label { transition: opacity .25s ease, translate .25s ease, font-size .25s ease; }
}

/* SIA credential without the keyline box; a little more room below the footer. */
.sia-badge, .sia-badge:hover { border: 0; padding: .3em 0; }
.site-footer { padding-bottom: calc(1.1rem + 1.25rem + env(safe-area-inset-bottom)); }
@media all {
  /* Closed rail sits on a soft tinted glass so it reads cleanly over the body text. */
  .section-rail .rail-panel {
    padding-top: 1.55rem;
    border-color: rgb(240 240 233 / .05);
    background: rgb(8 8 8 / .38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .section-rail.is-open .rail-panel {
    border-color: rgb(240 240 233 / .09);
    background: rgb(8 8 8 / .5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .rail-word { top: .7rem; bottom: auto; }
  .section-rail:not(.is-open) .rail-label { text-shadow: none; }
}
@media all {
  /* No box when closed; the rail fades back when body text passes underneath. */
  .section-rail:not(.is-open) .rail-panel {
    border-color: transparent;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .section-rail:not(.is-open) .rail-label { text-shadow: 0 1px 4px rgb(8 8 8 / .8); }
  .section-rail.is-visible.over-text:not(.is-open) { opacity: .15; }
  .section-rail { transition: opacity .35s ease; }
}

@media all {
  /* Open rail magnifies the section under your finger (and slightly its neighbours). */
  .rail-label { transform-origin: right center; transition: opacity .25s ease, translate .25s ease, font-size .25s ease, scale .18s cubic-bezier(.2,.7,.3,1); }
  .section-rail.is-open .rail-item.is-near .rail-label { scale: 1.08; }
  .section-rail.is-open .rail-item.is-hot .rail-label { scale: 1.28; }
}
@media all {
  /* Room on the left for the magnified label inside the glass. */
  .section-rail.is-open .rail-panel { padding-left: 2.6rem; }
  .rail-panel { transition: background-color .3s ease, border-color .3s ease, padding .25s ease, -webkit-backdrop-filter .3s ease, backdrop-filter .3s ease; }
}
@media all {
  /* Gentler magnification and more breathing room around the names when open. */
  .section-rail.is-open .rail-item.is-near .rail-label { scale: 1.04; }
  .section-rail.is-open .rail-item.is-hot .rail-label { scale: 1.15; }
  .rail-item { transition: height .25s ease; }
  .section-rail.is-open .rail-item { height: 2.75rem; }
  .section-rail.is-open .rail-panel { padding: 1.9rem 1rem .9rem 2.4rem; }
  .section-rail.is-open .rail-word { top: .85rem; }
}
@media all {
  /* Stable geometry: rows and vertical padding are identical open or closed, so nothing
     shifts under the finger when the panel opens (only the glass and left padding change). */
  .rail-item, .section-rail.is-open .rail-item { height: 2.6rem; transition: none; }
  .section-rail .rail-panel { padding: 1.7rem .85rem .9rem 1.1rem; }
  .section-rail.is-open .rail-panel { padding: 1.7rem .85rem .9rem 2.4rem; }
  .rail-word, .section-rail.is-open .rail-word { top: .8rem; }
}
@media all {
  /* The small names are tappable even when the rail is closed. */
  .section-rail:not(.is-open) .rail-item { pointer-events: auto; }
}

/* Recommendations: full-width band with the drone shot at 15%, parallax on scroll. */
body { overflow-x: clip; }
.recommendations {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.rec-backdrop {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  overflow: hidden;
  opacity: .2;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.rec-backdrop img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 40vh);
  object-fit: cover;
  will-change: transform;
}
@media (min-width: 801px) {
  /* Desktop: whole-pixel sizes for the index (it animates, so it is sized here, not snapped). */
  .section-rail:not(.is-open) .rail-label { font-size: 7px; }
  .section-rail.is-open .rail-label { font-size: 10px; }
  .rail-word { font-size: 8px; }
}

/* No play/pause or other native controls on any video, in any browser (incl. iOS Low Power Mode overlay). */
video { pointer-events: none; -webkit-user-select: none; user-select: none; }
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-enclosure,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-play-button { display: none !important; -webkit-appearance: none; opacity: 0 !important; }
.recommendations { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

/* Phones: normal line filling for body text. Safari's "pretty" wrapping breaks lines early and leaves ragged returns. */
@media (max-width: 800px) {
  main :is(p, li, dd, blockquote, figcaption, .form-note) { text-wrap: wrap; }
}

/* Small date line under a detail heading. */
.detail-date {
  display: block;
  margin-top: .35rem;
  font: 400 .62rem / 1.2 var(--label-font);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}

/* Hide the browser's page scrollbar everywhere; the page still scrolls normally. */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; background: transparent; }

/* Opening choice buttons: 18% dark tint inside the boxes so they stand off the film. */
.hero-choices .hero-link:not(:hover) { background: rgb(0 0 0 / .18); }

/* Home: opening film another 8% darker, and the choice boxes another 8% darker (18% → 25%). */
.index { --film-tint: rgb(0 0 0 / .335); }
.hero-choices .hero-link:not(:hover) { background: rgb(0 0 0 / .25); }

/* Detail lists: hanging bullets and clear gaps, so a wrapped line reads as part of its item, not a new one. */
.detail dd ul:not(.service-scenarios) li {
  position: relative;
  padding-left: 1.15em;
}
.detail dd ul:not(.service-scenarios) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: .34em;
  height: .34em;
  background: currentColor;
  opacity: .55;
}
.detail dd ul:not(.service-scenarios) li + li { margin-top: .6rem; }
.detail dd p + p { margin-top: .9rem; }
@media (max-width: 800px) {
  .detail li { line-height: 1.5; }
  /* Let short words wrap naturally on phones; forced joins ("a team") caused orphaned lines. */
  .detail dd { max-width: none; }
}

/* Phones: index sits in the top-right corner, clear of the thumb's scrolling path. */
@media (max-width: 800px) {
  .section-rail {
    top: 6rem; /* "Index" sits level with Home · Profile · Contact */
    translate: 0 0;
  }
  /* Closed it is just the ticks and small names: tighter rows keep it compact in the corner. */
  .rail-item, .section-rail.is-open .rail-item { height: 2.2rem; }
  .section-rail .rail-panel { padding: 1.5rem .85rem .5rem 1.1rem; }
  .section-rail.is-open .rail-panel { padding: 1.5rem .85rem .5rem 2.4rem; }
  .rail-word, .section-rail.is-open .rail-word { top: .6rem; }
}

/* Recommendations backdrop: the image fills the screen, not the whole (very tall) band, so it
   is never stretched past its real resolution. It stays put while the letters scroll over it. */
.rec-backdrop {
  overflow: visible;
  clip-path: inset(0);
}
.rec-backdrop img {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* River backdrop sits inside a <picture>; the image itself stays pinned to the screen. */
.rec-backdrop picture { display: contents; }

/* Andrew Husband letter: clear space between paragraphs. */
.recommendation-content article[aria-labelledby="andrew-husband-reference"] p + p:not(.recommendation-signature) { margin-top: 1em; }

/* River backdrop: lighter and clearer, fading in as the band arrives. */
.rec-backdrop { opacity: 0; transition: opacity 1.6s ease; }
.rec-backdrop.is-in { opacity: .46; }
.rec-backdrop img { filter: brightness(1.3) contrast(1.05); }
@media (prefers-reduced-motion: reduce) { .rec-backdrop { transition: none; } }

/* Recommendations river: zoom only, from the centre; no sideways drift. */
.rec-backdrop img { left: 0; width: 100%; translate: none; transform-origin: 50% 50%; object-position: 50% 50%; }

/* Lock the page to vertical scrolling: the zoomed river image must never widen the page,
   or a finger drag slides the whole page sideways. overflow: clip keeps the image sticky. */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
.rec-backdrop { overflow: clip; inset: 0; left: calc(50% - 50vw); right: auto; width: 100vw; }
@supports not (overflow: clip) { .rec-backdrop { overflow: hidden; } }
.rec-backdrop picture, .rec-backdrop img { max-width: 100vw; }

/* No play-button disc, in any browser: a video is transparent unless it is actually playing
   (video-guard.js marks it). The still image underneath shows instead. */
video:not(.is-playing) { opacity: 0 !important; }
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button { display: none !important; opacity: 0 !important; width: 0 !important; height: 0 !important; }

/* Recommendation signatures: the writer's position in smaller, quieter type under the name. */
.signature-role {
  display: block;
  margin-top: .3em;
  font-size: .82em;
  line-height: 1.5;
  color: var(--muted);
}

/* Safari: films are painted onto a canvas and the real <video> sits underneath. "visibility: hidden"
   alone lets Safari's own play-button disc show through (its controls can override visibility),
   so these source videos are fully transparent too; opacity can't be overridden from inside. */
video.canvas-source,
.background-film.canvas-source { opacity: 0 !important; }


/* A little breathing room between a heading and the list that follows it (site-wide). */
.detail dd > ul:first-child,
main :is(h2, h3, h4) + :is(ul, ol) { margin-top: .85rem; }

/* Bullet-to-bullet spacing back to the original tight rhythm (the extra room belongs under the heading). */
.detail dd ul:not(.service-scenarios) li + li { margin-top: .22rem; }

/* Enquiry form entries: body font, smaller, in spaced capitals (typed text, choices and hints). */
.enquiry-form :is(input:not([type="radio"]), textarea, select),
.enquiry-form ::placeholder {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.enquiry-form textarea { line-height: 1.6; }
/* Phones: iPhone zooms the whole page into any field set below 16px, so keep 16px there. */
@media (max-width: 800px) {
  .enquiry-form :is(input:not([type="radio"]), textarea, select),
  .enquiry-form ::placeholder { font-size: 16px; letter-spacing: .06em; }
}


/* Contact page: the enquiry form sits below the contact details. */
.contact-form {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}
.contact-form > h2 {
  margin: 0 0 .9rem;
  font-size: calc(1.22rem * .9);
  font-weight: 500;
  letter-spacing: .025em;
}
.contact-form-lead { margin: 0 0 2.6rem; max-width: 52ch; color: #b8b8b8; }

/* 404 page */
.not-found main { padding-block: 28vh 12vh; }
.not-found main img { display: block; margin-bottom: 2rem; opacity: .8; }
