/* ============================================================
   Forecheck — Option A "Systems Board"
   ============================================================ */

:root {
  --bg:        #08090A;
  --surface:   #0E1114;
  --line:      #1B2126;
  --line-2:    #2A3238;
  --text:      #EDF2F4;
  --muted:     #A7B2B9;
  --dim:       #97A3AA;
  --faint:     #7A868E; /* lifted from #5A666E to clear 4.5:1 on --bg at 11px */
  --accent:    #93D0EC;
  --accent-dp: #2E7A9E;

  --pad: clamp(20px, 5.6vw, 72px);
  --sans: "Bricolage Grotesque", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* hero verb metrics — JS keeps --wheel-w in sync with the active word */
  --wheel-lh: clamp(48px, 8.2vw, 96px);
  --wheel-w: 160px;
  --wheel-bleed: 40px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #C6EAF8; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--bg);
  padding: 12px 20px; font-family: var(--mono); font-size: 12px;
}
.skip:focus { left: 0; }

/* ---------- shared type ---------- */

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.label--num { margin-bottom: 16px; }

.micro {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

.h2 {
  font-size: clamp(27px, 3.1vw, 38px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 21ch;
  text-wrap: pretty;
}
.h2--wide { max-width: 26ch; margin-bottom: 48px; }
.h2--sm   { font-size: clamp(25px, 2.8vw, 34px); }
.h2--big  { font-size: clamp(31px, 3.8vw, 46px); max-width: 18ch; }

.h3 {
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.h3--sm { font-size: clamp(19px, 1.8vw, 22px); }

.lede {
  font-size: clamp(16px, 1.4vw, 17px);
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 62ch;
}
.lede:last-child { margin-bottom: 0; }
.lede--tight  { margin-bottom: 44px; max-width: 52ch; }
.lede--center { margin: 0 auto 38px; text-align: center; max-width: 52ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 16px 30px;
  min-height: 48px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--solid { background: var(--accent); color: var(--bg); }
.btn--solid:hover { background: #C6EAF8; color: var(--bg); }
.btn--ghost {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 9px 18px;
  min-height: 0;
  font-size: 11px;
}
.btn--ghost:hover { background: var(--accent); color: var(--bg); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 26px;
}
.cta-row--center { justify-content: center; }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: #fff;
}

.hero__bg { position: absolute; inset: 0; }
.hero__bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  filter: grayscale(1) contrast(1.06) brightness(0.60);
  animation: bgcycle 35s cubic-bezier(.4,0,.2,1) infinite;
  animation-delay: var(--d);
}
@keyframes bgcycle {
  0%   { opacity: 0; transform: scale(1.12); }
  4%   { opacity: 1; }
  20%  { opacity: 1; }
  24%  { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

.hero__tint {
  position: absolute; inset: 0;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: .34;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,9,10,.94) 0%, rgba(8,9,10,.72) 42%, rgba(8,9,10,.28) 100%),
    linear-gradient(180deg, rgba(8,9,10,.72) 0%, rgba(8,9,10,0) 26%, rgba(8,9,10,0) 70%, rgba(8,9,10,.66) 100%);
}

/* ---------- nav ---------- */

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px var(--pad);
}
.nav__brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav__brand span { color: #fff; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.nav__links > a:not(.btn) {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C3CDD3;
}
.nav__links > a:not(.btn):hover { color: #fff; }

/* ---------- hero content ---------- */

.hero__inner {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding: clamp(28px, 5vh, 40px) var(--pad) clamp(48px, 8vh, 92px);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.hero__h1 { margin: 0; font-weight: 500; }

.wheel {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: clamp(38px, 6.6vw, 78px);
  letter-spacing: -0.035em;
  line-height: var(--wheel-lh);
}

.wheel__slot {
  flex: 0 0 auto;
  display: block;
  width: calc(var(--wheel-w) + var(--wheel-bleed));
  height: calc(var(--wheel-lh) * 3);
  margin-right: calc(var(--wheel-bleed) * -1);
  overflow: hidden;
  /* The slot must never be narrower than the word currently on screen, or the
     verb collides with "with Forecheck" mid-transition. script.js sets the
     delay per step: widen immediately (ahead of a longer word arriving), but
     narrow only after the outgoing longer word has left the centre band. */
  transition: width .42s cubic-bezier(.65,0,.35,1);
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.16) 22%, #000 42%, #000 58%, rgba(0,0,0,.16) 78%, transparent 100%),
    linear-gradient(90deg, #000 calc(100% - var(--wheel-bleed)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.16) 22%, #000 42%, #000 58%, rgba(0,0,0,.16) 78%, transparent 100%),
    linear-gradient(90deg, #000 calc(100% - var(--wheel-bleed)), transparent 100%);
  mask-composite: intersect;
}

.wheel__track {
  display: block;
  transform: translateY(var(--wheel-lh));
  transition: transform .62s cubic-bezier(.76,0,.24,1);
}
.wheel__track span {
  display: block;
  height: var(--wheel-lh);
  line-height: var(--wheel-lh);
  white-space: nowrap;
  color: var(--accent);
}

.wheel__static { white-space: nowrap; }

.hero__foot { display: flex; flex-direction: column; gap: clamp(24px, 4vh, 34px); }
.hero__sub {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: #CBD4D9;
  margin: 0;
  max-width: 48ch;
}

/* ---------- animation toggle ---------- */

.motion-toggle {
  position: absolute;
  right: var(--pad);
  bottom: clamp(20px, 4vh, 36px);
  z-index: 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(8,9,10,.55);
  border: 1px solid rgba(237,242,244,.28);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color .18s ease, background-color .18s ease;
}
.motion-toggle:hover { border-color: var(--accent); background: rgba(8,9,10,.8); }
.motion-toggle__play { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__pause { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__play  { display: block; }

/* paused state — set on <body> by script.js */
body.is-paused .hero__bg img { animation-play-state: paused; }

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
  padding: clamp(56px, 8vw, 76px) var(--pad);
  border-top: 1px solid var(--line);
}
.section > .label { margin-bottom: 20px; }

/* ---------- section backgrounds ----------
   Same treatment as the hero — desaturated, then tinted with the brand
   blue — but held under 16% so it reads as texture, not photography.
   Only some sections carry one; the dense text sections stay clean so
   the page still has somewhere to breathe. */

.section--photo { position: relative; overflow: hidden; }
.section--photo > *:not(.section__bg) { position: relative; z-index: 1; }

.section__bg {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;           /* keeps the tint's blend off the page behind */
  pointer-events: none;
}
.section__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(.72);
  opacity: var(--photo-opacity, .12);
}
.section__bg::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: .34;
}
/* keeps type off the brighter parts of the image */
.section__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,9,10,.55) 0%, rgba(8,9,10,.15) 34%, rgba(8,9,10,.15) 66%, rgba(8,9,10,.55) 100%);
}

.section--split { display: flex; gap: clamp(24px, 5vw, 64px); align-items: flex-start; }
.section--split > .label { flex: 0 0 190px; padding-top: 12px; margin-bottom: 0; }
.section__body { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: clamp(24px, 3vw, 40px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.section #work + .grid { margin-top: 44px; }
#work .grid { margin-top: 44px; }

.pillar { border-top: 1px solid var(--line-2); padding-top: 22px; }
.pillar--lead { border-top-color: var(--accent); }
.pillar p:not(.label) { font-size: 15px; line-height: 1.68; color: var(--muted); margin: 0; }

/* ---------- fit ---------- */

.fit { gap: clamp(28px, 4.4vw, 56px); }
.fit__col { border-left: 1px solid var(--line-2); padding-left: 28px; }
.fit__col--yes { border-left-color: var(--accent); }
.fit__col--no .label { color: var(--dim); }

.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ticks li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: clamp(15px, 1.4vw, 16px); line-height: 1.6;
}
.ticks svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 4px; }
.fit__col--yes .ticks li { color: var(--text); }
.fit__col--yes .ticks svg { color: var(--accent); }
.fit__col--no .ticks li { color: #7E8B93; }
.fit__col--no .ticks svg { color: var(--faint); }

/* ---------- cards ---------- */

.card {
  border: 1px solid var(--line-2);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.card .h3 { margin: 0; }
.card p:not(.label) { font-size: 15px; line-height: 1.68; color: var(--muted); margin: 0; }

/* ---------- about ---------- */

.section--about {
  display: flex;
  gap: clamp(28px, 4.4vw, 56px);
  align-items: center;
  flex-wrap: wrap;
}
.portrait {
  flex: 0 0 auto;
  width: min(300px, 100%);
  aspect-ratio: 300 / 340;
  border: 1px dashed var(--accent-dp);
  display: grid; place-items: center;
  text-align: center; padding: 20px;
}
.portrait .label { color: var(--faint); line-height: 1.8; }
.section--about .section__body { flex: 1 1 380px; }
.section--about .label { margin-bottom: 20px; }

/* ---------- cta ---------- */

.section--cta {
  border-top-color: var(--accent);
  text-align: center;
  padding-top: clamp(64px, 10vw, 96px);
  padding-bottom: clamp(64px, 10vw, 96px);
}
.section--cta .h2 { margin-left: auto; margin-right: auto; margin-bottom: 22px; }
.section--cta .micro a { color: var(--accent); }

/* ---------- footer ---------- */

.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
}
.footer .label { color: var(--faint); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr; }
  .section--split { display: block; }
  .section--split > .label { margin-bottom: 20px; padding-top: 0; }
  .nav__links > a:not(.btn) { display: none; }
}

@media (max-width: 680px) {
  .grid--2 { grid-template-columns: 1fr; }

  /* Stack the verb above the static line. The ghosted neighbours are
     dropped here: with "with Forecheck" sitting directly underneath,
     a half-visible third word reads as a third line of headline rather
     than as a list. Negative margins collapse the two hidden slots so
     they take no vertical space — the JS geometry stays untouched. */
  .wheel { display: block; }
  .wheel__slot {
    width: 100%;
    margin-right: 0;
    margin-top: calc(var(--wheel-lh) * -1);
    margin-bottom: calc(var(--wheel-lh) * -1);
    -webkit-mask-image: linear-gradient(180deg, transparent 0 33.34%, #000 33.34% 66.66%, transparent 66.66% 100%);
    mask-image: linear-gradient(180deg, transparent 0 33.34%, #000 33.34% 66.66%, transparent 66.66% 100%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
    transition: none;
  }
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(8,9,10,.86) 0%, rgba(8,9,10,.6) 40%, rgba(8,9,10,.86) 100%);
  }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .hero__bg img { animation: none; }
  .hero__bg img:first-child { opacity: 1; transform: scale(1); }
  .wheel__slot, .wheel__track { transition: none; }
}
