:root {
  --bg: #07090c;
  --ink: #f4f1ea;
  --muted: #a39c90;
  --sky: #7dd3fc;
  --amber: #d4a24a;
  --mx: 0.5;
  --my: 0.5;
  /* Tracks the mesh colour, so the copy lights in the same hue. */
  --accent: 212, 162, 74;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

.photos,
.focus-window {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.focus-window {
  z-index: 0;
  -webkit-mask-image: radial-gradient(
    ellipse 76vw 68vh at calc(var(--mx) * 100%) calc(var(--my) * 100%),
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.68) 58%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 76vw 68vh at calc(var(--mx) * 100%) calc(var(--my) * 100%),
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.68) 58%,
    transparent 88%
  );
}

.photo-layer,
.focus-shot {
  position: absolute;
  inset: -14%;
  background-size: cover;
  background-position: center;
  transform: translate3d(
    calc((0.5 - var(--mx)) * 10vw),
    calc((0.5 - var(--my)) * 8vh),
    0
  ) scale(1.12);
  will-change: opacity, transform;
}

.photo-layer {
  opacity: 0;
  filter: blur(36px) brightness(0.24) saturate(0.7);
}

.photo-layer[data-photo="4"],
.focus-shot[data-photo="4"] .shot-still {
  background-position: 78% center;
}

/* The blur sits on the still alone. A video under a blurred ancestor has
   to be re-rasterised through that blur on every frame, which flickers
   while the pointer moves the shot around. */
.shot-still {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(1.5px) brightness(0.62) saturate(0.92) contrast(1.1);
}

/* The moving version of a photograph lives here rather than in the layer
   behind, which is blurred past the point where a face could show. It
   carries the colour half of the still's treatment; the softness comes
   free, because the shot is drawn larger than the clip. */
.focus-shot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
  filter: brightness(0.62) saturate(0.92) contrast(1.1);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.focus-shot.is-live video { opacity: 1; }

.photo-layer.is-current {
  opacity: 1;
  z-index: 1;
}

.photo-layer.is-enter {
  opacity: 1;
  z-index: 2;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.26;
}

.grain,
.vignette,
.spot {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.grain {
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.vignette {
  background: radial-gradient(ellipse at 50% 45%, transparent 28%, rgba(0,0,0,0.62) 100%);
}

.spot {
  background: radial-gradient(
    70vw 58vh at calc(var(--mx) * 100%) calc(var(--my) * 100%),
    rgba(255, 220, 150, 0.14),
    transparent 68%
  );
}

.sheen {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse at 28% 18%, rgba(212, 162, 74, 0.09), transparent 42%),
    radial-gradient(ellipse at 78% 72%, rgba(125, 211, 252, 0.05), transparent 38%);
  animation: sheen 16s ease-in-out infinite alternate;
}

@keyframes sheen {
  to { transform: translate3d(6%, 4%, 0); filter: brightness(1.15); }
}

.lab-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(5, 13, 17, 0.68);
  backdrop-filter: blur(18px);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.lab-nav > a {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: 0;
}

.lab-nav div {
  display: flex;
  gap: clamp(12px, 2.2vw, 30px);
  align-items: center;
}

.lab-nav a {
  color: inherit;
  padding: 7px 0;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.lab-nav div a:hover,
.lab-nav div a:focus-visible,
.lab-nav div a.is-active {
  border-color: var(--sky);
  color: var(--sky);
  outline: none;
}

.dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dots a {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, 0.45);
  background: transparent;
  display: block;
}

.dots a.is-active {
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(212, 162, 74, 0.2);
}

main { position: relative; z-index: 3; }

.chapter {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh 10vw;
}

.copy {
  position: relative;
  isolation: isolate;
  max-width: 38rem;
  text-align: left;
  transform: translate3d(calc((var(--mx) - 0.5) * -14px), calc((var(--my) - 0.5) * -10px), 0);
  will-change: transform;
}

.copy::before,
.doors::before {
  content: "";
  position: absolute;
  inset: -3.5rem -4.5rem;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(4, 5, 7, 0.52) 0%,
    rgba(4, 5, 7, 0.3) 48%,
    transparent 76%
  );
  filter: blur(12px);
}

.copy.center { text-align: center; max-width: 46rem; }

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sky);
  margin: 0 0 1.1rem;
  font-weight: 400;
}

h1, h2 {
  margin: 0 0 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  hyphens: none;
}

h1 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); }

/* The pointer lights the copy the way it lights the mesh: a soft falloff
   in the accent colour of the moment, not an on/off switch. */
.letter {
  display: inline-block;
  transform: translate3d(0, calc(var(--lit, 0) * -2.5px), 0);
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.92),
    0 0 4px rgba(0, 0, 0, 0.78),
    0 0 calc(var(--lit, 0) * 16px) rgba(var(--accent), calc(var(--lit, 0) * 0.55)),
    0 0 calc(var(--lit, 0) * 3px) rgba(255, 250, 240, calc(var(--lit, 0) * 0.5));
}

p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #d8d2c6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  font-weight: 300;
}

.evidence {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(212, 162, 74, 0.65);
  color: #bdb6aa;
  font-size: 0.84rem;
  line-height: 1.55;
}

.copy.center .evidence {
  max-width: 41rem;
  margin-inline: auto;
  padding-left: 0;
  border-left: 0;
}

.contact-links {
  margin-top: 1.35rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.contact-links a,
.trust-proof a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 162, 74, 0.55);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  transition: color 180ms ease, border-color 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible,
.trust-proof a:hover,
.trust-proof a:focus-visible {
  color: var(--sky);
  border-color: var(--sky);
}

.trust-proof {
  margin-top: 1.7rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(244, 241, 234, 0.2);
}

.trust-proof > span {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.trust-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
}

.trust-proof a {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.3rem;
}

.trust-proof a strong {
  font-size: 0.9rem;
  font-weight: 500;
}

.trust-proof a small {
  color: #bdb6aa;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

/* ─────────────────── the capability picker ───────────────────

   Five toggles for what the unit brings. These are real <input
   type="checkbox"> elements with the box itself hidden and the surrounding
   label styled, so keyboard focus, Space, and the accessibility tree all
   come from the browser rather than from JavaScript. */

.crew-picker {
  margin: 1.9rem auto 0;
  max-width: 34rem;
  /* A fieldset's default min-inline-size is min-content, which overrides
     max-width and squeezes the grid inside it. */
  min-inline-size: 0;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid rgba(244, 241, 234, 0.16);
  border-radius: 3px;
  background: rgba(9, 12, 16, 0.52);
  backdrop-filter: blur(9px);
  text-align: left;
}

/* Left in the fieldset's top border, where the browser puts it. Floating it to
   get an unbroken border collapses the grid below to min-content, because a
   fieldset sizes to its content and a float takes the legend out of flow. */
.crew-label {
  padding: 0 0 0.7rem;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.crew-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

/* The lead card takes the full width: it is the one most jobs start from,
   and an odd count would otherwise leave a visible gap. */
.crew-cards > .crew-card:first-child { grid-column: 1 / -1; }

.crew-card {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0 0.6rem;
  align-items: start;
  /* Comfortably past the 44px minimum for a touch target. */
  min-height: 3.4rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(244, 241, 234, 0.14);
  border-radius: 3px;
  background: rgba(244, 241, 234, 0.02);
  cursor: pointer;
  transition: border-color 170ms ease, background 170ms ease;
}

.crew-card:hover { border-color: rgba(229, 173, 85, 0.45); }

.crew-card.is-on {
  border-color: rgba(229, 173, 85, 0.62);
  background: rgba(229, 173, 85, 0.09);
}

/* The native box is replaced by the drawn square below, but it stays in the
   layout so it can still take focus. Opacity rather than display:none, which
   would remove it from the tab order. */
.crew-card input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.1rem 0 0;
  opacity: 0;
  grid-area: 1 / 1;
}

.crew-card-body {
  grid-area: 1 / 2;
  display: block;
}

/* The drawn checkbox. ::before is the square, ::after the tick. */
.crew-card::before {
  content: "";
  grid-area: 1 / 1;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border: 1px solid rgba(244, 241, 234, 0.4);
  border-radius: 2px;
  transition: border-color 170ms ease, background 170ms ease;
}

.crew-card.is-on::before {
  border-color: var(--amber);
  background: var(--amber);
}

.crew-card::after {
  content: "";
  grid-area: 1 / 1;
  width: 0.36rem;
  height: 0.62rem;
  margin: 0.32rem 0 0 0.38rem;
  border: solid #0b0f14;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.4);
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}

.crew-card.is-on::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

/* Focus has to be visible on the card, because the input itself is invisible. */
.crew-card:focus-within {
  outline: 2px solid var(--sky, #77d4e4);
  outline-offset: 2px;
}

.crew-card-name {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
}

.crew-card-note {
  display: block;
  margin-top: 0.15rem;
  color: #b9b2a6;
  font-size: 0.76rem;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .crew-cards { grid-template-columns: 1fr; }
  .crew-cards > .crew-card:first-child { grid-column: auto; }
}

/* Holds two lines so the actions below do not jump as the sentence changes. */
.crew-pitch {
  margin: 0.95rem 0 0;
  min-height: 2.7em;
  color: #bdb6aa;
  font-size: 0.86rem;
  line-height: 1.55;
}

.crew-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
}

.crew-cta {
  padding: 0.72rem 1.5rem;
  border: 1px solid rgba(212, 162, 74, 0.75);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 200ms ease, border-color 200ms ease;
}

.crew-cta:hover,
.crew-cta:focus-visible {
  background: rgba(212, 162, 74, 0.16);
  border-color: var(--amber);
}

.crew-more {
  color: var(--sky);
  font-size: 12px;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .crew-picker { padding: 1rem 0.95rem 1.1rem; }
  .crew-pitch { min-height: 4.4em; }
}

.ring-wrap {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, 0.28);
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 1.2rem;
  position: relative;
  background: rgba(7, 9, 12, 0.28);
}

.ring::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(212, 162, 74, 0.35);
  border-top-color: var(--amber);
  animation: spin 8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.doors {
  position: relative;
  isolation: isolate;
  width: min(920px, 92vw);
  display: grid;
  gap: 1.6rem;
}

@media (min-width: 800px) {
  .doors { grid-template-columns: repeat(3, 1fr); }
}

.door {
  display: block;
  padding: 1.4rem 0.2rem;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid rgba(244, 241, 234, 0.16);
}

.door h3 {
  margin: 0 0 0.7rem;
  font-size: 1.15rem;
  font-weight: 500;
}

.door p {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.door span {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--amber);
}

/* The footer is shared page furniture and lives in site/chrome.css. */

@media (max-width: 600px) {
  .chapter {
    min-height: 100svh;
    padding: 8vh 8vw;
  }

  .lab-nav {
    gap: 8px;
    min-height: 58px;
    padding: 8px 14px;
    font-size: 9px;
  }

  .lab-nav > a { font-size: 13px; }
  .lab-nav > a { display: none; }
  .lab-nav div {
    width: 100%;
    justify-content: center;
    gap: 18px;
  }

  .dots { right: 14px; }
  .copy { max-width: 100%; }
  .kicker { margin-bottom: 0.7rem; }
  h1, h2 { margin-bottom: 0.9rem; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.65rem; }

  p {
    font-size: 0.82rem;
    line-height: 1.42;
  }

  .evidence {
    margin-top: 0.65rem;
    font-size: 0.7rem;
    line-height: 1.42;
  }

  .contact-links {
    margin-top: 0.7rem;
    gap: 0.35rem 0.9rem;
    font-size: 9px;
  }

  .ring-wrap { margin-top: 0.7rem; }

  .ring {
    width: 72px;
    height: 72px;
    padding: 0.55rem;
    font-size: 7px;
  }

  .ring::before { inset: -4px; }

  .trust-proof {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .trust-proof a strong { font-size: 0.8rem; }
  .trust-proof a small { font-size: 0.66rem; }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .copy { transform: none !important; }
  .letter {
    transform: none;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.92), 0 0 4px rgba(0, 0, 0, 0.78);
  }
  .ring::before { animation: none; }
  .crew-card,
  .crew-card::before,
  .crew-card::after { transition: none; }
  #field { display: none; }
  .spot, .sheen { display: none; }
  .photo-layer,
  .photo-layer.is-current,
  .photo-layer.is-enter,
  .focus-shot,
  .focus-window {
    animation: none;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .photo-layer { filter: blur(18px) brightness(0.4); }
  .focus-window { display: none; }
}
