/* Ofacto Labs. Layout: a bright lab bench. Cool off-white page, white instrument panels,
   one teal signal colour, mono labels for measurements; sharp 2px corners throughout. Single light theme by design. */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f3f5f6;
  --bg-raised: #ffffff;
  --bg-panel: #e8edf0;
  --line: rgba(12, 28, 36, 0.1);
  --line-strong: rgba(12, 28, 36, 0.2);
  --fg: #0d161c;
  --fg-muted: #45525c;
  --fg-subtle: #66727c;
  --accent: #067d89;        /* text-safe teal */
  --accent-brand: #00adbb;  /* brand teal for fills */
  --signal: #b8740c;        /* mould gas, used in visuals only */

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 2px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --maxw: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-brand); color: #fff; }
.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: 12px; top: -60px; z-index: 100; background: var(--fg); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ type */
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 560; text-wrap: balance; }
.display { font-size: clamp(2.6rem, 5.2vw, 5rem); line-height: 1; letter-spacing: -0.038em; font-stretch: 106%; font-weight: 580; }
.h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1.04; letter-spacing: -0.032em; font-stretch: 104%; }
.lead { font-size: clamp(1.08rem, 1.35vw, 1.25rem); line-height: 1.55; color: var(--fg-muted); max-width: 52ch; margin: 0; }
.body { color: var(--fg-muted); max-width: 56ch; margin: 0; }
.big-num { font-family: var(--font-display); font-stretch: 125%; font-weight: 300; letter-spacing: -0.04em; line-height: 0.92; font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }
.fine { font-size: 13px; line-height: 1.5; color: var(--fg-subtle); max-width: 70ch; margin: 0; }

/* ------------------------------------------------------------------ buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: var(--radius);
  font-weight: 560; font-size: 15px; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--fg);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { border-color: var(--fg); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--fg); color: #fff; border-color: var(--fg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ------------------------------------------------------------------ nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid transparent; transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease); }
.nav.is-solid { background: rgba(243, 245, 246, 0.86); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); }
.brand img { height: 36px; width: auto; display: block; }
.brand-word { font-family: var(--font-display); font-stretch: 125%; font-weight: 600; font-size: 14px; letter-spacing: 0.14em; white-space: nowrap; }
.brand-word span { color: var(--accent); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; }
.nav-links a:not(.btn) { color: var(--fg-muted); transition: color 0.2s; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav .btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
@media (max-width: 760px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 16px; } .brand img { height: 32px; } }
@media (max-width: 480px) { .nav-links a[href="technology.html"] { display: none; } }

/* ------------------------------------------------------------------ hero: device breathing in room air */
.hero { position: relative; overflow: hidden; background: radial-gradient(60% 70% at 72% 52%, #ffffff 0%, var(--bg) 72%); border-bottom: 1px solid var(--line); }
.hero-flow { position: absolute; inset: 0; }
.hero-flow canvas { display: block; width: 100%; height: 100%; }
.hero-flow.no-gl { background: url("../img/vex-still-light-1200.webp") 78% 50% / auto 70% no-repeat; }
.hero-flow.no-gl canvas { display: none; }
.hero-inner { position: relative; z-index: 1; min-height: min(100svh, 920px); display: flex; align-items: center; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 64px; pointer-events: none; }
.hero-copy { max-width: 540px; pointer-events: auto; }
.hero-copy .display { margin-bottom: 22px; }
.hero-copy .lead { margin-bottom: 32px; }
.hero-legend { display: flex; gap: 18px; margin-top: 28px; color: var(--fg-subtle); }
.hero-legend span { display: inline-flex; align-items: center; gap: 8px; }
.hero-legend i { width: 8px; height: 8px; border-radius: 50%; background: #2aa9b6; }
.hero-legend i.gas { background: #e08a12; }
html.js .hero-copy > * { animation: rise 1s var(--ease) both; }
html.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
html.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
html.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { html.js .hero-copy > * { animation: none; } }
@media (max-width: 860px), (max-aspect-ratio: 21/20) {
  .hero { display: flex; flex-direction: column; background: radial-gradient(90% 50% at 50% 78%, #ffffff 0%, var(--bg) 75%); }
  .hero-inner { min-height: 0; padding-top: calc(var(--nav-h) + 36px); padding-bottom: 0; }
  .hero-flow { position: relative; inset: auto; order: 2; height: clamp(300px, 50svh, 480px); }
  .hero-copy .display { font-size: clamp(2.3rem, 10vw, 3.4rem); margin-bottom: 14px; }
  .hero-copy .lead { margin-bottom: 24px; }
}

/* ------------------------------------------------------------------ sections */
section.block { position: relative; padding-block: clamp(88px, 12vw, 160px); border-bottom: 1px solid var(--line); }
section.block.alt { background: var(--bg-raised); }
.sec-head { display: grid; gap: 20px; max-width: 900px; }

/* reveal: visible at rest; animates only when JS marks it */
html.js .rv { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .rv { opacity: 1; transform: none; transition: none; } }

/* problem: text beside a field of homes where mould spreads */
.problem-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.problem-copy { display: grid; gap: 24px; }
.problem-big { margin-top: clamp(16px, 3vw, 40px); }
.problem-big .big-num { font-size: clamp(5rem, 11vw, 10rem); margin-bottom: 14px; }
.problem-big p { margin: 0; color: var(--fg-muted); font-size: clamp(1.1rem, 1.5vw, 1.3rem); max-width: 22em; }
.problem-big p strong { color: var(--fg); font-weight: 520; }
.mould-field { margin: 0; position: relative; }
.mould-field canvas { display: block; width: 100%; aspect-ratio: 1 / 1; }
.mould-field figcaption { margin-top: 14px; color: var(--fg-subtle); }
.mould-field figcaption span { color: #4c5a2e; }
.stat-row { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 28px 28px 0 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat .big-num { font-size: clamp(2.6rem, 4.4vw, 4rem); margin-bottom: 14px; }
.stat p { margin: 0; color: var(--fg-muted); max-width: 22em; }
@media (max-width: 900px) {
  .problem-grid { grid-template-columns: minmax(0, 1fr); }
  .mould-field { max-width: 520px; }
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat + .stat { padding: 26px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
}

/* how it works */
.steps3 { list-style: none; padding: 0; margin: clamp(48px, 6vw, 80px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px); }
.steps3 li { border-top: 1px solid var(--line-strong); padding-top: 24px; }
.steps3 .n { display: block; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 18px; }
.steps3 li:nth-child(3) { border-top: 2px solid var(--accent-brand); padding-top: 23px; }
.steps3 li:nth-child(3) h3 { color: var(--accent); }
.steps3 h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 540; letter-spacing: -0.02em; margin-bottom: 10px; }
.steps3 p { margin: 0; color: var(--fg-muted); max-width: 26em; }
@media (max-width: 960px) { .steps3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps3 { grid-template-columns: minmax(0, 1fr); } }

/* accuracy */
.insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.insight-copy { display: grid; gap: 24px; }
.acc { display: grid; gap: 26px; margin-top: 12px; }
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: end; }
.acc-label b { display: block; font-weight: 560; font-size: 1.05rem; }
.acc-label span { color: var(--fg-subtle); font-size: 14px; }
.acc-val { font-size: clamp(2.6rem, 4.2vw, 3.8rem); grid-row: span 2; align-self: end; }
.acc-row.is-vex .acc-val { color: var(--accent); }
.acc-bar { position: relative; height: 10px; border-bottom: 1px solid var(--line-strong); }
.acc-bar i { position: absolute; left: 0; bottom: 0; height: 10px; width: var(--v); background: var(--fg-subtle); transform-origin: left; transition: transform 1.4s var(--ease) 0.2s; }
.acc-row.is-vex .acc-bar i { background: var(--accent-brand); }
html.js .acc:not(.in) .acc-bar i { transform: scaleX(0); }
.fp { position: relative; aspect-ratio: 1 / 1; max-width: 100%; }
.fp canvas { width: 100%; height: 100%; display: block; }
.fp-meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--fg-subtle); }
.fp-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-raised); }
.fp-toggle button { background: transparent; border: 0; padding: 7px 12px; cursor: pointer; color: var(--fg-muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.fp-toggle button[aria-pressed="true"] { background: var(--fg); color: #fff; }
.fp-toggle button:hover:not([aria-pressed="true"]) { color: var(--fg); }
@media (max-width: 960px) { .insight-grid { grid-template-columns: minmax(0, 1fr); } .fp { max-width: 520px; } }

/* why now */
.timeline { margin-top: clamp(56px, 7vw, 88px); position: relative; overflow-x: auto; scrollbar-width: thin; padding-bottom: 8px; }
.tl-track { position: relative; list-style: none; margin: 0; padding: 0 0 0 10px; display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); min-width: 880px; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 1px; background: var(--line-strong); }
.tl-item { position: relative; padding: 0 22px 0 0; }
.tl-item .when { display: block; color: var(--fg-subtle); height: 24px; }
.tl-item .tick { position: relative; display: block; width: 9px; height: 9px; margin: 6px 0 24px -4px; border: 1px solid var(--fg-subtle); background: var(--bg); transform: rotate(45deg); }
.tl-item.done .tick { background: var(--fg-subtle); }
.tl-item.next .tick { border-color: var(--accent-brand); background: var(--accent-brand); box-shadow: 0 0 0 6px rgba(0, 173, 187, 0.15); }
.tl-item.next .when { color: var(--accent); }
.tl-item h3 { font-size: 1.12rem; font-weight: 520; letter-spacing: -0.01em; max-width: 13em; }
.tl-now { position: absolute; top: 18px; width: 1px; height: 34px; background: var(--accent-brand); }
.tl-now span { position: absolute; right: 6px; top: 22px; color: var(--accent); white-space: nowrap; font-size: 10.5px; }
.clocks { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.clock { background: var(--bg-raised); padding: 26px 24px 24px; }
.clock .big-num { font-size: clamp(2.6rem, 4vw, 3.6rem); }
.clock .big-num small { font-size: 0.36em; font-weight: 400; letter-spacing: 0; margin-left: 0.2em; color: var(--fg-muted); font-stretch: 100%; }
.clock p { margin: 12px 0 0; color: var(--fg-muted); font-size: 15px; }
@media (max-width: 860px) { .clocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* economics: three yearly amounts drawn to scale, then the result */
.econ { margin-top: clamp(48px, 6vw, 80px); background: var(--bg); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 48px); display: grid; gap: clamp(20px, 2.4vw, 28px); }
.e-row { display: grid; grid-template-columns: clamp(170px, 19vw, 260px) minmax(0, 1fr); gap: 24px; align-items: center; }
.e-num { font-size: clamp(2rem, 3.4vw, 3.1rem); white-space: nowrap; }
.e-body { min-width: 0; display: grid; gap: 10px; }
.e-bar { position: relative; height: 44px; }
.e-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 6px; border-radius: var(--radius); background: linear-gradient(90deg, #c9d2d7, #dbe2e6); transform-origin: left; transition: transform 1.4s var(--ease); }
.e-row.is-save .e-bar i { background: linear-gradient(90deg, rgba(0, 173, 187, 0.55), rgba(0, 173, 187, 0.32)); transition-delay: 0.15s; }
.e-row.is-vex .e-bar i { background: var(--accent-brand); transition-delay: 0.3s; }
.e-row.is-vex .e-num { color: var(--accent); }
.e-body p { margin: 0; color: var(--fg-muted); font-size: 15px; }
html.js .econ:not(.in) .e-bar i { transform: scaleX(0); }
@media (prefers-reduced-motion: reduce) { html.js .econ:not(.in) .e-bar i { transform: none; } }
.e-kpis { margin-top: clamp(8px, 1.4vw, 16px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--line-strong); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.e-kpis .big-num { display: block; font-size: clamp(2.6rem, 4.6vw, 4.2rem); }
.e-kpis p { margin: 10px 0 0; color: var(--fg-muted); }
@media (max-width: 760px) {
  .e-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .e-bar { height: 30px; }
  .e-kpis { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* progress: centred carousel. The photo in focus sits in the middle at its own shape,
   neighbours either side are smaller and greyed. Layout is set per slide in site.js. */
.cs { position: relative; margin-top: clamp(40px, 5vw, 72px); outline: none; --cs-h: clamp(300px, 40vw, 540px); }
.cs:focus-visible .cs-stage { outline: 2px solid var(--accent); outline-offset: 6px; }
.cs-stage { position: relative; z-index: 0; isolation: isolate; height: var(--cs-h); overflow: hidden; touch-action: pan-y; user-select: none; }
.cs-slide { position: absolute; left: 50%; top: 50%; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-panel); cursor: pointer;
  box-shadow: 0 30px 60px -36px rgba(12, 40, 52, 0.45); will-change: transform, opacity, filter;
  transition: transform 0.85s var(--ease), opacity 0.6s var(--ease), filter 0.6s var(--ease); }
.cs-slide img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cs-slide.is-active { cursor: default; box-shadow: 0 40px 80px -40px rgba(12, 40, 52, 0.55); }
.cs-slide.is-side { filter: grayscale(1) contrast(0.92) brightness(1.06); opacity: 0.45; }
.cs-slide.is-side:hover { opacity: 0.65; }
.cs-slide.is-off { opacity: 0; pointer-events: none; }
.cs-slide.no-anim { transition: none; }
.cs-btn { position: absolute; top: calc(var(--cs-h) / 2); transform: translateY(-50%); z-index: 5; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.94); color: var(--fg); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 12px 30px -14px rgba(12, 40, 52, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform 0.25s var(--ease), background-color 0.2s, box-shadow 0.25s var(--ease); }
.cs-btn:hover { background: #fff; box-shadow: 0 16px 36px -14px rgba(12, 40, 52, 0.6); }
.cs-btn:active { transform: translateY(-50%) scale(0.95); }
.cs-btn.prev { left: max(16px, var(--gutter)); }
.cs-btn.next { right: max(16px, var(--gutter-r)); }
.cs-foot { display: grid; justify-items: center; gap: 16px; margin-top: 26px; }
.cs-cap { margin: 0; min-height: 1.6em; font-size: 15px; color: var(--fg-muted); text-align: center; transition: opacity 0.35s var(--ease); }
.cs-cap.swap { opacity: 0; }
.cs-dots { display: flex; gap: 6px; }
.cs-dots button { width: 28px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.cs-dots button::before { content: ""; width: 100%; height: 2px; border-radius: 2px; background: var(--line-strong); transition: background-color 0.3s var(--ease); }
.cs-dots button[aria-current="true"]::before { background: var(--fg); }
.cs-dots button:hover::before { background: var(--fg-subtle); }
@media (prefers-reduced-motion: reduce) { .cs-slide, .cs-cap { transition: none; } }
@media (max-width: 760px) { .cs { --cs-h: clamp(280px, 92vw, 420px); } .cs-btn { width: 44px; height: 44px; } .cs-dots button { width: 22px; } }

/* team */
.team-grid { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); }
.person figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--bg-panel); }
.person img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 1.2s var(--ease); }
.person:hover img { transform: scale(1.03); }
.person-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 16px; }
.person h3 { font-size: 1.35rem; font-weight: 560; letter-spacing: -0.015em; }
.person-meta { display: block; }
.person h3 a { display: inline-flex; align-items: baseline; gap: 8px; transition: color 0.2s; }
.person h3 a:hover { color: var(--accent); }
.person h3 .in { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-subtle); font-weight: 400; }
.person h3 a:hover .in { color: var(--accent); }
@media (max-width: 760px) { .team-grid { grid-template-columns: minmax(0, 1fr); max-width: 420px; } }

/* closing */
.closing { padding-block: clamp(100px, 14vw, 190px); position: relative; overflow: hidden; }
.closing-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.closing .display { max-width: 15ch; margin-bottom: 36px; }
@media (max-width: 860px) { .closing-grid { grid-template-columns: minmax(0, 1fr); } .closing-still { order: -1; max-width: 420px; } }
.contact-line { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.contact-line .addr { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em; user-select: all; }
.copy-btn { background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; color: var(--fg-muted); }
.copy-btn:hover { color: var(--fg); border-color: var(--fg); }

.footer { border-top: 1px solid var(--line); padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px)); color: var(--fg-subtle); font-size: 14px; background: var(--bg-raised); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.notes { margin-top: 20px; }
.notes summary { cursor: pointer; width: max-content; }
.notes summary:hover { color: var(--fg-muted); }
.notes p { font-size: 13px; line-height: 1.55; max-width: 90ch; margin: 12px 0 0; }

/* ================================================================== technology page */
.tech-hero { padding-top: calc(var(--nav-h) + clamp(36px, 6vw, 72px)); }
.tech-hero-head { display: grid; gap: 18px; margin-bottom: clamp(16px, 2vw, 24px); }
.tech-hero-head .display { max-width: 15ch; }
.viewer { position: relative; height: min(78vh, 760px); min-height: 440px; background: radial-gradient(55% 60% at 50% 48%, #ffffff 0%, var(--bg) 70%); border-bottom: 1px solid var(--line); }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-ui { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: 20px; pointer-events: none; }
.viewer-panel { pointer-events: auto; display: inline-flex; align-items: center; gap: 16px; padding: 10px 12px; background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); flex-wrap: wrap; }
.viewer-panel input[type="range"] { width: 180px; accent-color: var(--accent-brand); }
.layer-step { display: inline-flex; align-items: center; gap: 6px; }
.layer-step button { width: 34px; height: 34px; border: 1px solid var(--line-strong); background: var(--bg-raised); border-radius: var(--radius); cursor: pointer; display: grid; place-items: center; }
.layer-step button:hover { border-color: var(--fg); }
.layer-step output { min-width: 64px; text-align: center; }
.viewer-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fg-subtle); pointer-events: none; }

.pipeline { list-style: none; padding: 0; margin: clamp(48px, 6vw, 80px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.pipe { padding: 28px 24px 0 0; }
.pipe + .pipe { padding-left: 24px; border-left: 1px solid var(--line); }
.pipe h3 { font-size: clamp(1.5rem, 2.1vw, 1.9rem); font-weight: 520; letter-spacing: -0.03em; font-stretch: 110%; margin-bottom: 10px; }
.pipe p { margin: 0; color: var(--fg-muted); }
.scope { margin-top: clamp(40px, 5vw, 64px); height: clamp(220px, 24vw, 300px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); overflow: hidden; }
.scope canvas { width: 100%; height: 100%; display: block; }
.scope-cap { margin: 14px 0 0; color: var(--fg-muted); font-size: 15px; }
.scope-cap .signal { color: var(--signal); }
@media (max-width: 960px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe:nth-child(3) { padding-left: 0; border-left: 0; } .pipe:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 28px; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: minmax(0, 1fr); } .pipe + .pipe { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 28px; } }

.fusion { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.fusion-list { margin-top: 28px; border-top: 1px solid var(--line); }
.fusion-item { padding: 20px 0; }
.fusion-item + .fusion-item { border-top: 1px solid var(--line); }
.fusion-item h3 { font-size: 1.1rem; font-weight: 560; margin-bottom: 4px; }
.fusion-item p { margin: 0; color: var(--fg-muted); font-size: 15px; }
.fusion-item.is-vex h3 { color: var(--accent); }
.fusion-svg { width: 100%; height: auto; display: block; }
.fusion-svg .flow { stroke-dasharray: 2 7; animation: flow 2.4s linear infinite; }
.fusion-svg .flow.strong { stroke-width: 1.8; stroke-dasharray: 3 6; }
@keyframes flow { to { stroke-dashoffset: -36; } }
@media (prefers-reduced-motion: reduce) { .fusion-svg .flow { animation: none; } }
@media (max-width: 960px) { .fusion { grid-template-columns: minmax(0, 1fr); } }

.bento { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(200px, auto); gap: 14px; }
.cell { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg-raised); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; min-height: 220px; }
.cell h3 { font-size: 1.3rem; font-weight: 560; letter-spacing: -0.015em; position: relative; }
.cell.photo { padding: 0; }
.cell.photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cell.photo .cap { position: relative; margin-top: auto; padding: 40px 28px 24px; background: linear-gradient(0deg, rgba(255, 255, 255, 0.96) 35%, rgba(255, 255, 255, 0)); }
.cell.c-a { grid-column: span 3; grid-row: span 2; }
.cell.c-a img { object-fit: contain; object-position: 50% 40%; padding: 24px; }
.cell.c-b, .cell.c-c { grid-column: span 3; }
.cell.c-d { grid-column: span 2; }
.cell.c-e { grid-column: span 4; }
.cell.tint { background: linear-gradient(135deg, rgba(0, 173, 187, 0.14), rgba(0, 173, 187, 0.03) 60%), var(--bg-raised); border-color: rgba(0, 140, 152, 0.3); }
.cell .radios { display: flex; flex-wrap: wrap; gap: 8px; }
.cell .radios span { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; font-family: var(--font-mono); font-size: 12px; }
.cell .big-num { font-size: clamp(3rem, 5vw, 4.4rem); }
.times { font-weight: 200; font-size: 0.55em; vertical-align: 0.28em; margin: 0 0.12em; }
@media (max-width: 960px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell.c-a, .cell.c-b, .cell.c-c, .cell.c-d, .cell.c-e { grid-column: auto; grid-row: auto; }
  .cell.photo img { position: relative; height: auto; aspect-ratio: 6 / 5; }
  .cell.c-e img { aspect-ratio: 16 / 9; }
  .cell.photo .cap { background: none; padding-top: 6px; }
}

.platform { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.shot { border-radius: var(--radius); border: 1px solid var(--line-strong); overflow: hidden; background: #fff; box-shadow: 0 30px 80px -30px rgba(12, 40, 52, 0.35); transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transition: transform 1.2s var(--ease); }
.shot:hover { transform: perspective(1600px) rotateY(-2deg); }
.steps-inline { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.steps-inline li { padding: 15px 0; font-size: clamp(1.2rem, 1.6vw, 1.4rem); letter-spacing: -0.015em; font-weight: 520; }
.steps-inline li + li { border-top: 1px solid var(--line); }
@media (max-width: 960px) { .platform { grid-template-columns: minmax(0, 1fr); } .shot { transform: none; } }

.roadmap { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.roadmap::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: linear-gradient(90deg, var(--accent-brand) 0%, var(--accent-brand) 41%, var(--line-strong) 41%); }
.rm { position: relative; padding: 34px 24px 0 0; }
.rm::before { content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border: 1px solid var(--fg-subtle); background: var(--bg); transform: rotate(45deg); }
.rm.done::before { background: var(--accent-brand); border-color: var(--accent-brand); }
.rm.now::before { border-color: var(--accent-brand); box-shadow: 0 0 0 6px rgba(0, 173, 187, 0.15); }
.rm .mono { display: block; margin-bottom: 10px; color: var(--fg-subtle); }
.rm.done .mono, .rm.now .mono { color: var(--accent); }
.rm h3 { font-size: 1.08rem; font-weight: 560; letter-spacing: -0.01em; }
@media (max-width: 960px) {
  .roadmap { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-left: 28px; }
  .roadmap::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--accent-brand) 0%, var(--accent-brand) 41%, var(--line-strong) 41%); }
  .rm { padding: 0; }
  .rm::before { left: -28px; top: 4px; }
}

/* technology bento: text beside photo, so the photo keeps a sensible crop */
.cell.split { padding: 0; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: stretch; min-height: 300px; }
.cell.split .split-text { padding: 28px; display: flex; align-items: flex-end; }
.cell.split img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; object-position: 50% 62%; }
@media (max-width: 960px) { .cell.split { grid-template-columns: minmax(0, 1fr); } .cell.split img { order: -1; aspect-ratio: 4 / 3; height: auto; min-height: 0; } }

.src-link { color: var(--accent); border-bottom: 1px solid rgba(6, 125, 137, 0.35); transition: border-color 0.2s; }
.src-link:hover { border-bottom-color: var(--accent); }
.notes a { color: var(--fg-muted); text-decoration: underline; text-underline-offset: 2px; }
.notes a:hover { color: var(--accent); }
