/* =============================================================================
   SAURON — STYLES
   Design tokens live in :root. Change the palette or the spacing scale there
   and it propagates everywhere; nothing below hardcodes a colour.
   ========================================================================== */

:root {
  /* --- Colour ----------------------------------------------------------- */
  --bg:           #0a0a0a;   /* page ground */
  --bg-raise:     #101010;   /* inputs, subtle panels */
  --accent:       #ffffff;   /* the single sharp accent — change this one line */
  --fg:           #f2f2f2;   /* primary text */
  --fg-mid:       #9a9a9a;   /* body copy */
  --fg-dim:       #6a6a6a;   /* mono labels, metadata */
  --fg-faint:     #3a3a3a;   /* deep background text */
  --hairline:     #212121;   /* 1px dividers */
  --hairline-lit: #3d3d3d;   /* hover / focus dividers */
  --danger:       #ff5a4d;

  /* --- Spacing scale ---------------------------------------------------- */
  --s1: 0.5rem;  --s2: 1rem;   --s3: 1.5rem;  --s4: 2rem;
  --s5: 3rem;    --s6: 4.5rem; --s7: 7rem;    --s8: 10rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);   /* page side padding */
  --gap:    clamp(1rem, 2vw, 2rem);      /* grid gutter */
  --section-y: clamp(4rem, 9vw, 9rem);   /* vertical section rhythm */

  /* --- Type ------------------------------------------------------------- */
  --display: 'Inter Tight', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* --- Motion — short, sharp, no bounce --------------------------------- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
  --t-base: 240ms;
}

/* ---------- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ---------- Primitives ----------------------------------------------------- */
.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 400;
}
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }
.shell { padding-inline: var(--gutter); }

/* Asymmetric 12-column grid: a narrow label rail, a wide content field. */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.rail    { grid-column: 1 / 4; }
.field   { grid-column: 4 / 13; }
.field-n { grid-column: 4 / 11; }   /* narrower measure for reading copy */

@media (max-width: 860px) {
  .rail, .field, .field-n { grid-column: 1 / 13; }
  .rail { margin-bottom: var(--s2); }
}

/* ---------- Header --------------------------------------------------------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3);
  padding: var(--s2) var(--gutter);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.hdr[data-stuck='true'] {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.hdr__mark { display: flex; align-items: center; gap: 0.625rem; }
.hdr__mark img { width: 15px; height: auto; }
.hdr__mark span {
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--fg);
}
.hdr__nav { display: flex; gap: var(--s3); }
.hdr__nav a { position: relative; padding-block: 2px; transition: color var(--t-fast) linear; }
.hdr__nav a:hover { color: var(--accent); }
.hdr__nav a::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.hdr__nav a:hover::after { transform: scaleX(1); }
@media (max-width: 700px) { .hdr__nav a:not(.hdr__cta) { display: none; } }

/* ---------- Hero ----------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--s8) + var(--s4)) var(--gutter) var(--s5);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; background: var(--bg); }
.hero__media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: none;            /* HARD CUT — never soften this to a fade */
}
.hero__media video.is-live { opacity: 1; }
/* Legibility scrim: flat, directional, no soft radial glow. */
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgb(10 10 10 / 0.72) 0%, rgb(10 10 10 / 0.35) 38%,
    rgb(10 10 10 / 0.62) 74%, rgb(10 10 10 / 0.92) 100%);
}
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__eyebrow { display: block; margin-bottom: var(--s3); color: var(--fg-mid); }
.hero__h1 {
  font-size: clamp(2.35rem, 6.1vw, 6.25rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
  max-width: 17ch;
}
.hero__standfirst {
  margin-top: var(--s3);
  max-width: 56ch;
  color: var(--fg-mid);
  font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.1875rem);
}
.hero__actions { margin-top: var(--s4); display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }

/* Clip readout — the "which clip are we on" ticker, bottom right of hero. */
.hero__readout {
  position: absolute; right: var(--gutter); bottom: var(--s5);
  z-index: 1; display: flex; gap: var(--s2); align-items: center;
}
.hero__ticks { display: flex; gap: 6px; }
.hero__tick { width: 22px; height: 2px; background: var(--hairline-lit); }
.hero__tick.is-live { background: var(--accent); }
@media (max-width: 860px) { .hero__readout { display: none; } }

/* ---------- Button --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border: 1px solid var(--accent);
  background: transparent; color: var(--accent);
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-fast) linear, color var(--t-fast) linear;
}
.btn:hover:not(:disabled) { background: var(--accent); color: var(--bg); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn__arrow { transition: transform var(--t-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ghost { border-color: var(--hairline-lit); color: var(--fg-mid); }
.btn--ghost:hover { border-color: var(--accent); }

/* ---------- Sections ------------------------------------------------------- */
.sec { padding-block: var(--section-y); border-bottom: 1px solid var(--hairline); }
.sec__head { margin-bottom: var(--s6); }
.sec__title {
  font-size: clamp(1.8rem, 3.4vw, 3.15rem);
  line-height: 1.03; letter-spacing: -0.028em; font-weight: 600;
  text-wrap: balance; max-width: 22ch;
}
.sec__label { display: block; }

/* --- Capability rows --- */
.cap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-block: var(--s4);
  border-top: 1px solid var(--hairline);
  transition: border-color var(--t-base) var(--ease);
}
.cap:last-child { border-bottom: 1px solid var(--hairline); }
.cap:hover { border-top-color: var(--hairline-lit); }
.cap__n { grid-column: 1 / 3; color: var(--fg-faint); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; }
.cap__t { grid-column: 3 / 7; font-size: clamp(1.1rem, 1.35vw, 1.4rem); line-height: 1.22; letter-spacing: -0.015em; font-weight: 600; }
.cap__b { grid-column: 7 / 12; color: var(--fg-mid); max-width: 46ch; }
@media (max-width: 860px) {
  .cap { padding-block: var(--s3); row-gap: var(--s1); }
  .cap__n, .cap__t, .cap__b { grid-column: 1 / 13; }
}

/* --- Proof strip --- */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--hairline); }
.proof__i { padding: var(--s4) var(--s3) var(--s4) 0; border-right: 1px solid var(--hairline); }
.proof__i:last-child { border-right: 0; }
.proof__i:not(:first-child) { padding-left: var(--s3); }
.proof__s { font-size: clamp(1.25rem, 2vw, 1.85rem); letter-spacing: -0.03em; font-weight: 600; line-height: 1.1; }
.proof__b { margin-top: var(--s1); color: var(--fg-mid); font-size: 0.875rem; }
@media (max-width: 860px) {
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof__i:nth-child(2n) { border-right: 0; }
  .proof__i:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); }
  /* first item of each row loses the inter-column indent */
  .proof__i:not(:first-child):nth-child(odd) { padding-left: 0; }
}
@media (max-width: 480px) {
  .proof { grid-template-columns: 1fr; }
  .proof__i { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .proof__i:not(:first-child) { padding-left: 0; }
  .proof__i:last-child { border-bottom: 0; }
}

/* --- About ---
   NOTE: the CSP in _headers forbids inline styles, so spacing that used to be
   a style="" attribute in build.js lives here. Keep it that way. */
.about__title { margin-bottom: var(--s4); }
.about p + p { margin-top: var(--s3); }
.about p { color: var(--fg-mid); max-width: 62ch; font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); }
.about p:first-child { color: var(--fg); }

/* ---------- Form ----------------------------------------------------------- */
.enq__standfirst { margin-top: var(--s3); color: var(--fg-mid); max-width: 52ch; }
.form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3) var(--gap);
  margin-top: var(--s5);
}
.f { display: flex; flex-direction: column; gap: 0.5rem; }
.f--wide { grid-column: 1 / -1; }
.f label { color: var(--fg-dim); }
.f label .req { color: var(--fg-faint); }
.f input, .f textarea {
  width: 100%;
  padding: 0.8125rem 0.9375rem;
  background: var(--bg-raise);
  border: 1px solid var(--hairline);
  border-radius: 0;
  transition: border-color var(--t-fast) linear, background var(--t-fast) linear;
}
.f textarea { resize: vertical; min-height: 8.5rem; }
.f input::placeholder, .f textarea::placeholder { color: var(--fg-faint); }
.f input:hover, .f textarea:hover { border-color: var(--hairline-lit); }
.f input:focus, .f textarea:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.f[data-invalid='true'] input, .f[data-invalid='true'] textarea { border-color: var(--danger); }
.f__err { color: var(--danger); font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; min-height: 1em; }
/* Honeypot — off-screen, never displayed, hidden from assistive tech. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s1); }
.form__status { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; }
.form__status[data-tone='ok']   { color: var(--accent); }
.form__status[data-tone='err']  { color: var(--danger); }
.form__status[data-tone='busy'] { color: var(--fg-dim); }
.form__alt { margin-top: var(--s4); color: var(--fg-dim); font-size: 0.875rem; }
.form__alt a { border-bottom: 1px solid var(--hairline-lit); }
.form__alt a:hover { color: var(--accent); border-bottom-color: var(--accent); }
@media (max-width: 700px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer --------------------------------------------------------- */
.ftr { padding-block: var(--s5) var(--s4); }
.ftr__top { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; align-items: flex-start; }
.ftr__mark img { width: 130px; opacity: 0.9; }
.ftr__links { display: flex; gap: var(--s3); flex-wrap: wrap; }
.ftr__links a:hover { color: var(--accent); }
.ftr__meta {
  margin-top: var(--s6); padding-top: var(--s2);
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap;
}

/* ---------- Scroll reveal --------------------------------------------------
   Applied by src/reveal.js. Elements start shifted + transparent and snap in.
   `.is-in` is the only state class; nothing here bounces or overshoots. */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion / no-JS ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
.no-js [data-reveal] { opacity: 1; transform: none; }
.no-js .hero__media video:first-child { opacity: 1; }
