/* ==========================================================================
   UniQ Lab — Cinematic scroll-driven laboratory site
   Palette, type and layout. Motion lives in lab.js (GSAP ScrollTrigger).
   ========================================================================== */

:root {
  --bg: #F7F8F6;
  --bg-2: #EEF1F0;
  --ink: #101820;
  --ink-2: #3b4650;
  --ink-3: #6b767f;
  --blue: #174A68;
  --teal: #277A7A;
  --accent: #B58A55;
  --line: rgba(16, 24, 32, .14);

  --gut: clamp(20px, 4.2vw, 72px);
  --nav-h: 76px;

  --f-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-hero: clamp(3.1rem, 9.4vw, 10.5rem);
  --fs-xl: clamp(3rem, 10vw, 11rem);
  --fs-l: clamp(2.3rem, 5.6vw, 6rem);
  --fs-m: clamp(1.7rem, 3.4vw, 3.4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hide animated copy until the motion system has set initial states. */
html.is-preparing .ch:not(.hero) .copy { visibility: hidden; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gut);
  transition: height .35s cubic-bezier(.2,.7,.2,1), background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  height: 58px;
  background: rgba(247, 248, 246, .78);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { max-height: 36px; width: auto; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--ink); position: relative; flex: none;
}
.brand__mark::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  transform: translate(-50%, -50%);
}
.brand__name { font-weight: 700; letter-spacing: -.02em; font-size: 1.12rem; line-height: 1; }
.brand__name small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }

.nav__links { display: flex; align-items: center; gap: clamp(14px, 2vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; position: relative; padding: 6px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  padding: 15px 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: background-color .3s, color .3s, border-color .3s;
}
.btn:hover, .btn:focus-visible { background: var(--blue); border-color: var(--blue); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--sm { padding: 11px 16px; font-size: .68rem; }
.btn .arr { display: inline-block; transition: transform .3s; }
.btn:hover .arr { transform: translateX(4px); }

.nav__toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .3s; }

@media (max-width: 1080px) {
  .nav__links, .nav .btn { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open { background: var(--bg); height: 100svh; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding-top: 18px; }
  .nav.is-open .nav__top { width: 100%; }
  .nav.is-open .nav__links { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; margin-top: 40px; }
  .nav.is-open .nav__links a { font-family: var(--f-display); font-size: 2rem; letter-spacing: -.02em; font-weight: 600; }
  .nav.is-open .btn { display: inline-flex; margin-top: 28px; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
}
.nav__top { display: flex; align-items: center; justify-content: space-between; }

/* --------------------------------------------------------------------------
   Chapter frame: tall section + sticky 100vh stage
   -------------------------------------------------------------------------- */
.ch { position: relative; height: calc(var(--len, 300) * 1vh); background: var(--bg); }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--bg);
}
.media {
  position: absolute; inset: 0; margin: 0; overflow: hidden;
  background: #dfe5e3 linear-gradient(135deg, #e7ecea 0%, #cfd8d6 100%);
  will-change: clip-path;
}
.media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; transform-origin: 50% 50%; }
.scrim { position: absolute; inset: 0; pointer-events: none; }
.scrim--hero {
  background:
    linear-gradient(180deg, rgba(247,248,246,.78) 0%, rgba(247,248,246,0) 18%),
    linear-gradient(20deg, rgba(247,248,246,.97) 0%, rgba(247,248,246,.86) 30%, rgba(247,248,246,.25) 58%, rgba(247,248,246,0) 75%);
}
.scrim--left {
  background:
    linear-gradient(180deg, rgba(247,248,246,.7) 0%, rgba(247,248,246,0) 16%),
    linear-gradient(90deg, rgba(247,248,246,.96) 0%, rgba(247,248,246,.86) 34%, rgba(247,248,246,.2) 62%, rgba(247,248,246,0) 78%);
}

.copy { position: absolute; z-index: 3; }
.copy--left { left: var(--gut); bottom: clamp(56px, 10vh, 120px); width: min(46vw, 720px); }
.copy--right { right: var(--gut); bottom: clamp(56px, 10vh, 120px); width: min(46vw, 720px); }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }

/* Masked lines: .ln is the mask, .li is the moving text. */
.display {
  font-family: var(--f-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: -.045em; line-height: .88; margin: 0; color: var(--ink);
}
.display .ln { display: block; overflow: hidden; padding: .04em 0 .07em; margin-bottom: -.07em; }
.display .li { display: block; will-change: transform; }
.display--hero { font-size: var(--fs-hero); }
.display--xl { font-size: var(--fs-xl); letter-spacing: -.055em; }
.display--l { font-size: var(--fs-l); }
.display--m { font-size: var(--fs-m); letter-spacing: -.035em; line-height: .95; }
.display .dim { color: var(--blue); }
.display .tealc { color: var(--teal); }

.lede {
  font-size: clamp(1.02rem, 1.25vw, 1.22rem); line-height: 1.5; color: var(--ink-2);
  max-width: 34em; margin: 26px 0 0;
}
.lede--clip { will-change: clip-path; }

.tags { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; max-width: 560px; }
.tags li {
  font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  border-top: 1px solid var(--line); padding: 12px 0 12px; display: flex; gap: 12px; align-items: baseline;
}
.tags li i { font-style: normal; color: var(--teal); font-size: .64rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero .copy { left: var(--gut); bottom: clamp(70px, 12vh, 140px); right: var(--gut); }
.hero__meta {
  display: flex; gap: 28px; flex-wrap: wrap; margin-top: 34px;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 10px; }
.hero__meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.scroll-cue {
  position: absolute; z-index: 4; right: var(--gut); bottom: clamp(26px, 5vh, 48px);
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
}
.scroll-cue b { font-weight: 400; display: inline-block; width: 1px; height: 38px; background: var(--ink); position: relative; overflow: hidden; }

/* --------------------------------------------------------------------------
   Chapter indicator
   -------------------------------------------------------------------------- */
.chap-ind {
  position: fixed; z-index: 40; right: var(--gut); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.chap-ind.is-on { opacity: 1; }
.chap-ind__num { color: var(--ink); }
.chap-ind__title { color: var(--ink-3); writing-mode: vertical-rl; transform: rotate(180deg); max-height: 40vh; }
.chap-ind__bar { width: 1px; height: 80px; background: var(--line); position: relative; }
.chap-ind__bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(0); }
@media (max-width: 899px) { .chap-ind { display: none; } }

/* --------------------------------------------------------------------------
   Chapter 03 — Method steps
   -------------------------------------------------------------------------- */
.method__head { display: grid; }
.method__head > * { grid-area: 1 / 1; }
.steps { list-style: none; margin: 0; padding: 0; align-self: end; }
.steps li {
  display: grid; grid-template-columns: 64px 1fr; align-items: baseline;
  border-top: 1px solid var(--line); padding: 12px 0;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font-family: var(--f-mono); font-size: .74rem; color: var(--teal); letter-spacing: .1em; }
.steps .t { font-weight: 600; font-size: clamp(1.25rem, 2.2vw, 2.05rem); letter-spacing: -.03em; text-transform: uppercase; line-height: 1.05; }
.steps .d { grid-column: 2; font-size: .9rem; color: var(--ink-3); margin-top: 4px; }

/* --------------------------------------------------------------------------
   Chapter 04 — Elements
   -------------------------------------------------------------------------- */
.elements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 30px; max-width: 560px; }
.el {
  position: relative; border: 1px solid var(--line); background: rgba(247,248,246,.9);
  padding: 12px 14px 10px; min-height: 118px; display: flex; flex-direction: column;
}
.el__z { font-family: var(--f-mono); font-size: .66rem; color: var(--ink-3); letter-spacing: .08em; }
.el__sym { font-weight: 600; font-size: clamp(2rem, 3vw, 2.8rem); letter-spacing: -.04em; line-height: 1; margin-top: 4px; }
.el__name { font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.el__mz { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; color: var(--blue); position: absolute; right: 12px; top: 12px; }
.el svg { position: absolute; right: 12px; bottom: 12px; width: 58px; height: 34px; overflow: visible; }
.el svg path { fill: none; stroke: var(--teal); stroke-width: 1.2; }
.el svg line { stroke: var(--line); stroke-width: 1; }

/* --------------------------------------------------------------------------
   Chapter 06 — Replace stack
   -------------------------------------------------------------------------- */
.swap { position: relative; }
.swap__item { position: absolute; left: 0; bottom: 0; }
.swap__item:first-child { position: relative; }

/* --------------------------------------------------------------------------
   Chapter 07 — Incubation cards
   -------------------------------------------------------------------------- */
.incu-cards { position: absolute; z-index: 3; right: var(--gut); top: 50%; transform: translateY(-46%); width: min(36vw, 480px); display: grid; gap: 14px; }
.card {
  background: rgba(247,248,246,.94); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: grid; grid-template-columns: 116px 1fr; gap: 16px; padding: 12px; align-items: center;
}
.card img { width: 116px; height: 86px; object-fit: cover; }
.card h4 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; text-transform: uppercase; }
.card p { margin: 4px 0 0; font-size: .84rem; color: var(--ink-3); line-height: 1.4; }
.card--cond { grid-template-columns: 1fr; padding: 16px 18px; }
.cond { display: grid; grid-template-columns: 1fr auto; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .06em; border-top: 1px solid var(--line); padding: 8px 0; }
.cond:first-of-type { border-top: 0; }
.cond b { font-weight: 500; color: var(--blue); }
.card--cond small { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: block; margin-top: 6px; }

.incu__b { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 !important; }
@media (max-width: 899px) { #incubation .copy { top: calc(var(--nav-h) + 4vh); bottom: auto; } }
html.no-motion .incu__b { position: relative; top: auto; }

/* --------------------------------------------------------------------------
   Chapter 08 — Instruments showcase
   -------------------------------------------------------------------------- */
.inst__frames { position: absolute; top: 0; right: 0; bottom: 0; width: 58%; }
.inst__frames .media { will-change: clip-path; }
.inst__cap {
  position: absolute; z-index: 2; left: 22px; bottom: 20px;
  font-family: var(--f-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  background: rgba(247,248,246,.9); padding: 7px 10px;
}
.inst__copy { left: var(--gut); top: 50%; transform: translateY(-50%); width: min(36vw, 560px); }
.inst__count { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .14em; margin-bottom: 26px; display: flex; align-items: center; gap: 14px; }
.inst__count .cur-mask { display: inline-block; overflow: hidden; height: 1.2em; vertical-align: bottom; }
.inst__count .cur { display: block; }
.inst__count .rail { flex: 1; max-width: 180px; height: 1px; background: var(--line); position: relative; }
.inst__count .rail i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.inst__names { position: relative; height: calc(var(--fs-l) * 2.02); }
.inst__names .display { position: absolute; left: 0; bottom: 0; right: 0; }
.inst__purposes { position: relative; min-height: 5.5em; margin-top: 22px; }
.inst__purposes p { position: absolute; left: 0; top: 0; margin: 0; max-width: 30em; color: var(--ink-2); font-size: clamp(1rem, 1.2vw, 1.15rem); }
.inst__purposes p span { display: block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }

/* --------------------------------------------------------------------------
   Chapter 09 — Food journey (horizontal track)
   -------------------------------------------------------------------------- */
.journey .stage { background: var(--bg-2); }
.journey__head { position: absolute; z-index: 3; left: var(--gut); top: calc(var(--nav-h) + 3vh); right: var(--gut); display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.journey__word { position: relative; height: calc(var(--fs-xl) * .98); overflow: hidden; flex: 1; }
.journey__word .display { position: absolute; left: 0; top: 0; line-height: .95; }
.journey__steps { display: flex; gap: 8px; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 10px; }
.journey__steps span { padding: 7px 10px; border: 1px solid var(--line); transition: none; }
.journey__steps span.on { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.track { position: absolute; left: 0; bottom: clamp(36px, 7vh, 80px); display: flex; gap: clamp(16px, 2vw, 28px); padding: 0 var(--gut); will-change: transform; }
.food { flex: none; width: clamp(240px, 26vw, 400px); }
.food figure { margin: 0; height: clamp(220px, 44vh, 470px); overflow: hidden; background: #dfe5e3; }
.food img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 60%; }
.food__meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding-top: 14px; border-top: 1px solid var(--ink); margin-top: 14px; }
.food__meta .n { font-family: var(--f-mono); font-size: .66rem; color: var(--teal); letter-spacing: .1em; padding-top: 6px; }
.food__meta h3 { margin: 0; font-size: clamp(1.4rem, 2vw, 2rem); letter-spacing: -.03em; text-transform: uppercase; line-height: 1.1; }
.food__meta p { grid-column: 2; margin: 0; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Chapter 10 — Scientists
   -------------------------------------------------------------------------- */
.people__frames { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; }
.roles { list-style: none; padding: 0; margin: 34px 0 0; max-width: 520px; }
.roles li {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 10px;
  border-top: 1px solid var(--line); padding: 13px 0; color: var(--ink-3);
}
.roles li:last-child { border-bottom: 1px solid var(--line); }
.roles .n { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; }
.roles .t { font-weight: 600; font-size: clamp(1.05rem, 1.6vw, 1.45rem); letter-spacing: -.02em; text-transform: uppercase; }
.roles .w { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.roles li .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-right: 10px; transform: scale(0); vertical-align: middle; }

/* --------------------------------------------------------------------------
   Chapter 11 — Data
   -------------------------------------------------------------------------- */
.data .stage { background: var(--bg-2); }
.data__nums {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  font-family: var(--f-mono); font-size: .72rem; line-height: 1.9; color: rgba(23, 74, 104, .09);
  white-space: pre; padding: 10vh 0 0 52vw; letter-spacing: .12em;
}
.data__copy { left: var(--gut); top: 50%; transform: translateY(-50%); width: min(38vw, 600px); }
.data__phrases { position: relative; height: calc(var(--fs-l) * 2.95); }
.data__phrases .display { position: absolute; left: 0; bottom: 0; }
.monitor {
  position: absolute; z-index: 2; right: var(--gut); top: 50%; transform: translateY(-50%);
  width: min(52vw, 860px);
}
.monitor__bezel { background: #0f161d; padding: 12px; border-radius: 10px; box-shadow: 0 40px 80px -30px rgba(16,24,32,.45), 0 2px 0 rgba(255,255,255,.04) inset; }
.monitor__screen { background: #fbfcfb; border-radius: 3px; overflow: hidden; aspect-ratio: 16 / 10; display: grid; grid-template-rows: auto 1fr; }
.monitor__stand { width: 18%; height: 44px; margin: 0 auto; background: linear-gradient(#d7dcdb, #c3c9c8); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.scr__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #e3e7e6; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; color: #55616a; }
.scr__bar b { color: var(--ink); font-weight: 500; }
.scr__bar .pill { border: 1px solid #cfd6d5; padding: 3px 8px; border-radius: 20px; }
.scr__body { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 0; }
.scr__chart { padding: 14px 16px; border-right: 1px solid #e3e7e6; display: flex; flex-direction: column; min-height: 0; }
.scr__label { font-family: var(--f-mono); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: #7a858d; margin-bottom: 6px; display: flex; justify-content: space-between; }
.scr__chart svg { flex: 1; width: 100%; min-height: 0; }
.scr__chart .grid line { stroke: #e8ecec; stroke-width: 1; }
.scr__chart .trace { fill: none; stroke: var(--blue); stroke-width: 1.4; }
.scr__chart .trace2 { fill: none; stroke: var(--teal); stroke-width: 1; opacity: .55; }
.scr__chart .rt { font-family: var(--f-mono); font-size: 8px; fill: #7a858d; }
.scr__table { padding: 14px 16px; font-family: var(--f-mono); font-size: .6rem; }
.scr__row { display: grid; grid-template-columns: 1.5fr .8fr .6fr; gap: 6px; padding: 7px 0; border-bottom: 1px solid #edf0ef; color: #33404a; }
.scr__row.h { color: #7a858d; letter-spacing: .12em; text-transform: uppercase; font-size: .52rem; }
.scr__row span:not(:first-child) { text-align: right; }
.scr__foot { margin-top: 10px; display: flex; justify-content: space-between; color: #7a858d; font-size: .52rem; letter-spacing: .12em; text-transform: uppercase; }
.scr__foot .sig { color: var(--teal); }
.illus { position: absolute; left: 0; bottom: -28px; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Chapter 12 — Final
   -------------------------------------------------------------------------- */
.final .copy { left: var(--gut); right: var(--gut); bottom: clamp(60px, 11vh, 130px); }
.final .lede { max-width: 30em; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot { background: var(--ink); color: #dfe5e3; padding: 90px var(--gut) 34px; position: relative; z-index: 5; }
.foot a { text-decoration: none; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot h2 { font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.04em; line-height: .95; margin: 0; text-transform: uppercase; font-weight: 600; color: #fff; }
.foot h5 { font-family: var(--f-mono); font-weight: 400; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #8c989f; margin: 0 0 16px; }
.foot p, .foot li { font-size: .95rem; line-height: 1.7; margin: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li a:hover { color: #fff; }
.foot .btn { margin-top: 28px; background: var(--bg); color: var(--ink); border-color: var(--bg); }
.foot .btn:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.foot__base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); margin-top: 70px; padding-top: 22px; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: #8c989f; }
.foot__base .acc { color: var(--accent); }

/* WordPress admin bar */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }

/* Generic page (WordPress inner pages) */
.page-wrap { max-width: 880px; margin: 0 auto; padding: calc(var(--nav-h) + 70px) var(--gut) 100px; }
.page-wrap h1 { font-size: var(--fs-l); letter-spacing: -.045em; line-height: .92; text-transform: uppercase; margin: 0 0 40px; }
.page-wrap .entry { font-size: 1.08rem; color: var(--ink-2); }
.page-wrap .entry a { color: var(--blue); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  :root { --nav-h: 64px; }
  body { font-size: 16px; }
  .copy--left, .copy--right { left: var(--gut); right: var(--gut); width: auto; bottom: 36px; }
  .tags { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .tags li { font-size: .66rem; padding: 9px 0; }
  .lede { margin-top: 16px; font-size: .98rem; }
  .elements { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; }
  .el { min-height: 86px; padding: 8px 9px; }
  .el svg { width: 38px; height: 22px; right: 8px; bottom: 8px; }
  .el__mz { display: none; }
  .steps li { grid-template-columns: 44px 1fr; padding: 8px 0; }
  .steps .d { display: none; }
  .incu-cards { left: var(--gut); right: var(--gut); width: auto; top: auto; bottom: 30px; transform: none; gap: 8px; }
  .card { grid-template-columns: 76px 1fr; padding: 8px; }
  .card img { width: 76px; height: 56px; }
  .inst__frames, .people__frames { width: 100%; height: 50%; bottom: auto; }
  .inst__copy { top: auto; bottom: 34px; transform: none; right: var(--gut); width: auto; }
  .inst__names { height: calc(var(--fs-l) * 2.02); }
  .data__copy { top: calc(var(--nav-h) + 20px); transform: none; right: var(--gut); width: auto; }
  .data__phrases { height: calc(var(--fs-l) * 2.95); }
  .monitor { left: var(--gut); right: var(--gut); width: auto; top: auto; bottom: 40px; transform: none; }
  .scr__body { grid-template-columns: 1fr; }
  .scr__table { display: none; }
  .journey__head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .journey__steps { flex-wrap: wrap; padding-bottom: 0; }
  .food { width: 72vw; }
  .food figure { height: 38vh; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__grid > :first-child { grid-column: 1 / -1; }
  .roles { margin-top: 18px; }
  .roles li { padding: 9px 0; }
  .roles .w { display: none; }
  .scroll-cue { left: var(--gut); right: auto; }
}

/* --------------------------------------------------------------------------
   Reduced motion / no-animation fallback: everything static & visible
   -------------------------------------------------------------------------- */
html.no-motion .ch { height: auto; }
html.no-motion .stage { position: relative; height: auto; min-height: 100svh; padding: calc(var(--nav-h) + 40px) 0 60px; }
html.no-motion .media { position: relative; height: 60vh; }
html.no-motion .scrim { display: none; }
html.no-motion .copy,
html.no-motion .inst__copy,
html.no-motion .data__copy,
html.no-motion .monitor,
html.no-motion .incu-cards { position: relative; inset: auto; transform: none; width: auto; margin: 40px var(--gut) 0; }
html.no-motion .inst__frames, html.no-motion .people__frames { position: relative; width: 100%; height: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; padding: 0 var(--gut); }
html.no-motion .inst__frames .media, html.no-motion .people__frames .media { height: 300px; }
html.no-motion .inst__names, html.no-motion .inst__purposes, html.no-motion .data__phrases, html.no-motion .journey__word { height: auto; min-height: 0; }
html.no-motion .inst__names .display, html.no-motion .inst__purposes p, html.no-motion .data__phrases .display,
html.no-motion .journey__word .display, html.no-motion .swap__item { position: relative; margin-bottom: 14px; }
html.no-motion .method__head { display: block; }
html.no-motion .steps { margin-top: 30px; }
html.no-motion .track { position: relative; flex-wrap: wrap; bottom: auto; margin-top: 30px; }
html.no-motion .journey__head { position: relative; top: auto; }
html.no-motion .data__nums { display: none; }
html.no-motion .chap-ind { display: none; }
html.no-motion .scroll-cue { display: none; }

/* Split-chapter sizing: keep headline inside the free half of the frame */
@media (min-width: 900px) {
  .split .copy--left, .split .copy--right { width: min(38vw, 620px); }
  .split .display--xl { font-size: clamp(3rem, 7vw, 8rem); }
}
#biosafety .display--xl { font-size: clamp(2.6rem, 8vw, 9rem); }
#biosafety .copy { width: auto; right: var(--gut); }
@media (max-width: 899px) { #icpms .lede { display: none; } }

/* Hero headline plays once on page load so visitors never see an empty first screen */
@keyframes jumpUp { from { transform: translateY(115%); } to { transform: translateY(0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__title .li { animation: jumpUp .7s cubic-bezier(.2,.8,.2,1) both; }
.hero__title .ln:nth-child(2) .li { animation-delay: .12s; }
.hero__title .ln:nth-child(3) .li { animation-delay: .24s; }
.hero__meta, .scroll-cue { animation: riseIn .6s .45s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  .hero__title .li, .hero__meta, .scroll-cue { animation: none; }
}

/* ==========================================================================
   Content blocks (About, Services, Daily tests) — normal flow, no pinning
   ========================================================================== */
.blk { position: relative; z-index: 2; background: var(--bg); padding: clamp(80px, 12vh, 150px) 0; }
.blk__in { padding: 0 var(--gut); max-width: 1480px; margin: 0 auto; }
.blk__title { font-weight: 600; text-transform: uppercase; letter-spacing: -.045em; line-height: .9; font-size: var(--fs-l); margin: 0; text-wrap: balance; }
.blk__title--s { font-size: clamp(2rem, 4.4vw, 4.4rem); }
.tealc { color: var(--teal); }

.about { border-top: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 90px); align-items: start; }
.about__text p { margin: 0 0 18px; color: var(--ink-2); max-width: 36em; }
.about__text .about__lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--ink); line-height: 1.45; }
.values { list-style: none; padding: 0; margin: clamp(50px, 8vh, 90px) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.values li { padding: 22px 24px 26px 0; border-bottom: 1px solid var(--line); }
.values li:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.values .mono { font-size: .68rem; color: var(--teal); letter-spacing: .12em; }
.values h3 { margin: 8px 0 6px; font-size: 1.2rem; letter-spacing: -.02em; text-transform: uppercase; }
.values p { margin: 0; color: var(--ink-3); font-size: .95rem; }

/* Services */
.services { background: var(--bg-2); }
.svc__top { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 90px); align-items: end; margin-bottom: 44px; }
.svc__intro { margin: 0; color: var(--ink-2); max-width: 34em; }
.svc__tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.svc__tabs button {
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2); padding: 10px 14px; cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.svc__tabs button:hover { border-color: var(--ink); color: var(--ink); }
.svc__tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.svc__tabs button:focus-visible, .poster__open:focus-visible, .btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.svc__panel { padding-top: 26px; min-height: 250px; animation: panelIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.svc__list { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 40px; }
.svc__list li { break-inside: avoid; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; font-size: .98rem; }
.svc__list li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 10px; height: 1px; background: var(--teal); }
.svc__bottom { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; margin-top: 60px; }
.worry, .matrix { background: var(--bg); border: 1px solid var(--line); padding: clamp(22px, 3vw, 36px); }
.worry h3, .matrix h3 { margin: 0 0 16px; font-size: 1.4rem; text-transform: uppercase; letter-spacing: -.02em; }
.worry ul { list-style: none; padding: 0; margin: 0 0 26px; }
.worry li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); padding: 9px 12px; }

/* Daily test posters — continuous strip */
.posters { overflow: hidden; border-top: 1px solid var(--line); }
.posters__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 40px; }
.posters__note { margin: 0; color: var(--ink-3); max-width: 26em; }
.marquee { position: relative; overflow: hidden; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 8vw; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee__track { display: flex; gap: 22px; width: max-content; padding: 4px 0; animation: marquee var(--speed, 60s) linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.poster { margin: 0; width: clamp(220px, 20vw, 300px); flex: none; }
.poster__open { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2); cursor: zoom-in; aspect-ratio: 4 / 5; overflow: hidden; }
.poster__open img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.poster__open:hover img { transform: scale(1.04); }
.poster figcaption { padding-top: 12px; display: grid; gap: 3px; }
.poster__date { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.poster b { font-size: 1.05rem; letter-spacing: -.01em; }
.poster__tests { font-size: .86rem; color: var(--ink-3); line-height: 1.4; }
.posters__empty { padding: 0 var(--gut); color: var(--ink-3); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(16, 24, 32, .82); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; }
.lightbox p { color: #fff; margin: 12px 0 0; font-size: .95rem; text-align: center; }
.lightbox button { position: absolute; top: 8px; right: 8px; background: var(--bg); border: 0; width: 40px; height: 40px; font-size: 1.3rem; cursor: pointer; }

/* Logo */
.brand--logo img { height: 46px; width: auto; max-height: none; }
.nav.is-solid .brand--logo img { height: 36px; }

@media (max-width: 899px) {
  .about__grid, .svc__top, .svc__bottom { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .values li, .values li:not(:nth-child(3n+1)) { padding: 18px 0; border-left: 0; }
  .svc__tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .svc__tabs button { flex: none; }
  .posters__head { flex-direction: column; align-items: flex-start; }
  .poster { width: 62vw; }
  .brand--logo img { height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
  .marquee__track [aria-hidden="true"] { display: none; }
  .svc__panel { animation: none; }
}

/* ==========================================================================
   Know your food testing — product search
   ========================================================================== */
.know { border-top: 1px solid var(--line); }
.know__top { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 90px); align-items: end; margin-bottom: 34px; }
.know__intro { margin: 0; color: var(--ink-2); max-width: 32em; }
.know__search { position: relative; }
.know__search input {
  width: 100%; font: inherit; font-size: clamp(1.1rem, 2vw, 1.6rem); letter-spacing: -.01em;
  padding: 20px 60px 20px 22px; border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.know__search input:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.know__icon { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--ink-3); pointer-events: none; }
.know__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 36px; }
.know__chips button, .know__also button {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); padding: 8px 12px; cursor: pointer; color: var(--ink-2);
}
.know__chips button:hover, .know__also button:hover { border-color: var(--ink); color: var(--ink); }
.know__card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 60px); align-items: start; animation: panelIn .35s cubic-bezier(.2,.8,.2,1); }
.know__cat { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.know__info h3 { margin: 8px 0 22px; font-size: clamp(1.8rem, 3.4vw, 3rem); letter-spacing: -.035em; line-height: 1; text-transform: uppercase; text-wrap: balance; }
.know__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 30px; }
.know__group h4 { margin: 0 0 6px; font-family: var(--f-mono); font-weight: 500; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.know__group ul { list-style: none; margin: 0 0 12px; padding: 0; }
.know__group li { padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line); position: relative; }
.know__group li::before { content: ""; position: absolute; left: 0; top: 1.1em; width: 10px; height: 1px; background: var(--teal); }
.know__note, .know__more { color: var(--ink-3); font-size: .92rem; margin: 14px 0 0; }
.know__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.know__also { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 26px; }
.know__also span { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.know__poster { border: 0; padding: 0; background: var(--bg-2); cursor: zoom-in; display: block; width: 100%; box-shadow: 0 30px 60px -30px rgba(16,24,32,.35); }
.know__poster img { width: 100%; height: auto; }
.know__none { border: 1px solid var(--line); background: var(--bg-2); padding: clamp(22px, 3vw, 40px); max-width: 760px; }
.know__none h3 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -.03em; text-transform: uppercase; }
.know__none p { margin: 0; color: var(--ink-2); }

/* WhatsApp */
.btn--wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn--wa:hover, .btn--wa:focus-visible { background: #17803f; border-color: #17803f; }
.wa-float {
  position: fixed; z-index: 60; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(16, 24, 32, .45);
  transition: transform .25s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.scroll-cue { right: auto; left: 50%; transform: translateX(-50%); }
@media (max-width: 899px) { .scroll-cue { left: 50%; } }

/* ==========================================================================
   Daily tests — posters flowing downward in columns
   ========================================================================== */
.posters .marquee { display: none; }
.flow {
  display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 18px;
  height: min(92vh, 980px); overflow: hidden; padding: 0 var(--gut); position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.flow[data-cols="3"] { --cols: 3; }
.flow[data-cols="2"] { --cols: 2; }
.flow__col { overflow: hidden; min-width: 0; }
.flow__track { display: flex; flex-direction: column; gap: 18px; animation: flowDown var(--speed, 60s) linear infinite; will-change: transform; }
.flow:hover .flow__track, .flow:focus-within .flow__track { animation-play-state: paused; }
@keyframes flowDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes flowUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.flow .poster { width: 100%; }
.flow .poster__open { aspect-ratio: auto; }
.flow .poster__open img { height: auto; }
.flow .poster figcaption { padding: 8px 0 0; }
.flow .poster b { font-size: .95rem; }
@media (max-width: 899px) {
  .know__top, .know__card { grid-template-columns: 1fr; }
  .know__poster { max-width: 420px; }
  .flow { gap: 10px; height: 80vh; }
  .flow__track { gap: 10px; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .flow { height: auto; -webkit-mask-image: none; mask-image: none; }
  .flow__track { animation: none; }
  .flow__track [aria-hidden="true"] { display: none; }
  .know__card { animation: none; }
}

/* ==========================================================================
   v1.1 — Bigger logo + phone layout fixes
   ========================================================================== */
/* Logo: larger and always readable (white backing so it never blends into photos) */
:root { --nav-h: 116px; }
.nav.is-solid { height: 88px; }
.brand--logo { background: none; padding: 0; border-radius: 0; box-shadow: none; }
/* no box: a soft page-coloured glow keeps the logo readable over photos while blending into the page */
.brand--logo img { filter: drop-shadow(0 0 10px rgba(247, 248, 246, .95)) drop-shadow(0 0 2px rgba(247, 248, 246, .9)); }
.nav.is-solid .brand--logo img { filter: none; }
.brand--logo img { height: 92px; }
.nav.is-solid .brand--logo img { height: 70px; }

@media (max-width: 899px) {
  :root { --nav-h: 86px; }
  .nav { height: var(--nav-h); }
  .nav.is-solid { height: 74px; }
  .brand--logo img { height: 62px; }
  .nav.is-solid .brand--logo img { height: 56px; }
  .nav.is-open .nav__top { align-items: center; }
  .nav.is-open .nav__toggle { position: absolute; top: 30px; right: var(--gut); }

  /* Incubation card: keep the conditions table readable */
  .card--cond { grid-template-columns: 1fr; padding: 12px 14px; }
  .cond { grid-template-columns: 1fr auto; gap: 10px; font-size: .7rem; }
  .card--cond small { margin-top: 4px; }

  /* People behind the science: use the full phone width */
  #people .copy { width: auto !important; left: var(--gut); right: var(--gut); }
}
@media (max-width: 899px) and (max-height: 760px) {
  /* Short phones: compact incubation cards so they do not cover the heading */
  .incu-cards { gap: 6px; bottom: 20px; }
  .card { grid-template-columns: 64px 1fr; gap: 10px; padding: 6px; }
  .card img { width: 64px; height: 48px; }
  .card p { font-size: .76rem; }
  .card--cond { grid-template-columns: 1fr; }
  .card--cond small { display: none; }
}
@media (max-width: 380px) {
  .brand--logo img { height: 56px; }
  .nav.is-solid .brand--logo img { height: 50px; }
}

/* ==========================================================================
   v1.2 — "What do we test in your product?" = NABL scope test names (+ poster photo)
   ========================================================================== */
.know__tests { list-style: none; margin: 0; padding: 0; columns: 2 240px; column-gap: 34px; }
.know__tests li { break-inside: avoid; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line); position: relative; }
.know__tests li::before { content: ""; position: absolute; left: 0; top: 1.1em; width: 10px; height: 1px; background: var(--teal); }
.know__card--solo { grid-template-columns: minmax(0, 1fr); }
.know__card--solo .know__tests { columns: 3 230px; }
