/* FermentIQ product page. Near-monochrome: colour lives only in the logo and the alarm marker. */
:root {
    --bg: #ffffff;
    --surface: #f6f7f9;
    --line: #e4e7ec;
    --line-strong: #cbd2db;
    --ink: #0f172a;
    --ink-2: #475569;
    --ink-3: #64748b;
    --alarm: #dc2626;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 8px;
    --nav-h: 68px;
    --ease-slow: cubic-bezier(0.22, 0.68, 0.24, 1);
    --ease-fade: cubic-bezier(0.39, 0.575, 0.565, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

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

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 200; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: var(--radius); text-decoration: none; font-size: 14px; font-weight: 600; }
.skip:focus { top: 12px; }

/* Logo: the only place that carries colour gradients. */
.logo-link { text-decoration: none; color: inherit; display: inline-block; line-height: 1; }
.logo {
    font-size: 1.75rem;
    font-weight: 700;
    display: inline-flex;
    position: relative;
    overflow: visible;
}

.logo-ferment {
    background: linear-gradient(135deg, #4b5563 0%, #667eea 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-iq {
    background: linear-gradient(135deg, #f97316 0%, #dc2626 50%, #1f2937 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-container { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.nav-menu { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-link { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 6px 0; }
.nav-link:hover { color: var(--ink); }

.lang { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.lang button { border: 0; background: var(--bg); color: var(--ink-2); font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 6px 10px; cursor: pointer; }
.lang button + button { border-left: 1px solid var(--line-strong); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.hamburger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; border-radius: var(--radius); }
.hamburger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 8px; border: 1px solid transparent; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: opacity .15s, border-color .15s; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: .88; }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-nav { padding: 9px 16px; font-size: 14px; }

/* Type */
h1, h2 { letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.15; font-weight: 700; }
.lead { font-size: 1.125rem; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }

/* Sections */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--surface); }
.section-head { margin-bottom: 40px; }
.section-head .lead { margin-top: 16px; }

/* Hero */
.hero { padding: 64px 0 88px; }
.hero-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.hero-text .lead { margin-top: 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.status { display: flex; gap: 14px; align-items: flex-start; margin-top: 32px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.status-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ink-3); }
.status-label { display: block; font-weight: 600; color: var(--ink); }

/* Dashboard preview */
.dashboard-preview { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06); overflow: hidden; min-width: 0; }
.preview-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.preview-dots { display: flex; gap: 6px; }
.preview-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.preview-title { font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { margin-left: auto; flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.preview-body { padding: 16px; }
.chart-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.chart-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.tank-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.tank-tabs button { min-width: 34px; height: 30px; border: 0; background: var(--bg); color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.tank-tabs button + button { border-left: 1px solid var(--line-strong); }
.tank-tabs button:hover { background: var(--surface); }
.tank-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chart-wrap { position: relative; width: 100%; height: 260px; }
.chart-wrap canvas { width: 100%; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 18px; height: 0; border-top: 1.75px solid var(--ink); }
.lg-dash { border-top: 1.75px dashed var(--ink-2); }
.lg-ghost { border-top: 1.5px dashed var(--ink-3); opacity: .45; }
.lg-dot { width: 8px; height: 8px; border: 1.5px solid var(--ink-3); border-radius: 50%; background: var(--bg); }
.metric .metric-status { white-space: normal; font-size: 11px; line-height: 1.3; min-height: 2.6em; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.metric-label { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.metric-value { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Cascade schematic */
.frame { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px 16px 12px; }
.sch-v { display: none; padding: 8px 0 4px; }
.sch-v .sch { max-width: 480px; margin-inline: auto; }
.sch { width: 100%; height: auto; }
.titleblock { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 520px; margin: 12px 0 0 auto; border: 1px solid var(--line-strong); background: var(--bg); }
.tb-cell { padding: 8px 12px; min-width: 0; }
.tb-cell + .tb-cell { border-left: 1px solid var(--line-strong); }
.tb-wide { grid-column: 1 / -1; border-bottom: 1px solid var(--line-strong); }
.tb-wide + .tb-cell { border-left: 0; }
.tb-key { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tb-val { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }

.s-line { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.s-thin { stroke: var(--line-strong); stroke-width: 1.25; }
.s-dash { stroke-dasharray: 4 3; }
.s-label { font-family: var(--font); font-weight: 500; font-size: 15px; fill: var(--ink-2); }
.s-name { font-family: var(--font); font-weight: 700; font-size: 20px; fill: var(--ink); }
.s-tag { font-family: var(--font); font-weight: 600; font-size: 15px; fill: var(--ink); text-anchor: middle; }
.s-mid { text-anchor: middle; }
.s-end { text-anchor: end; }
.s-lamp { fill: var(--alarm); }
.sch-v .s-label { font-size: 13px; }
.sch-v .s-name { font-size: 18px; }
.sch-v .s-tag { font-size: 12px; }

/* Plot animation: keyframes only under .is-in, so removing it resets and re-adding replays */
.js .s-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .s-fade { opacity: 0; }
.js .s-lamp { opacity: 0; }
.js .is-in .s-draw { animation: plot 700ms ease-out var(--d, 0ms) forwards; }
.js .is-in .s-fade { animation: fadein 400ms ease-out calc(var(--d, 0ms) + 600ms) forwards; }
.js .is-in .s-lamp { animation: fadein 300ms ease-out 1500ms forwards; }
.r1 { --d: 0ms; }
.r2 { --d: 350ms; }
.r3 { --d: 700ms; }
@keyframes plot { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

/* Story: five steps. Mobile-first vertical, horizontal from 1000px. */
.story { position: relative; }
.story li { position: relative; padding: 0 0 36px 56px; --d: calc(var(--i) * 180ms); }
.story li:last-child { padding-bottom: 0; }
.story-num { position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--ink); }
.story-fig { width: 120px; height: 80px; margin: 2px 0 10px; overflow: visible; }
.story-fig .s-line { stroke-width: 1.5; }
.story-fig .s-thin { stroke: var(--line-strong); }
.story-fig .f-coin { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.story-fig .f-cur { font-family: var(--font); font-weight: 700; font-size: 11px; fill: var(--ink); text-anchor: middle; }
.story-fig .f-ti { font-family: var(--font); font-weight: 600; font-size: 7px; fill: var(--ink-2); text-anchor: middle; }
.story-fig .f-t { font-family: var(--font); font-weight: 600; font-size: 11px; fill: var(--ink-2); text-anchor: middle; }
.story-fig .f-btn { fill: var(--ink); stroke: var(--ink); }
.story-fig .f-chk { fill: none; stroke: #fff; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.story-fig .f-ptr { fill: var(--bg); stroke: var(--ink-2); stroke-width: 1.2; stroke-linejoin: round; }
.story h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.story li p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 36ch; }
.story li p a { color: var(--ink); text-underline-offset: 3px; }
/* connecting line: one segment per step, drawn when the list gets .is-in (removed again off-screen, so it replays) */
.story li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 32px; width: 1px; height: calc(100% - 32px); background: var(--line-strong); transform-origin: top; }
.js .story li:not(:last-child)::before { transform: scaleY(0); }
.js .story.is-in li:not(:last-child)::before { transform: none; transition: transform 500ms ease-out calc(var(--i) * 180ms + 250ms); }
.js .story li { opacity: 0; transform: translate3d(0, 14px, 0); }
.js .story.is-in li { opacity: 1; transform: none; transition: opacity .9s var(--ease-fade), transform 1.1s var(--ease-slow); transition-delay: calc(var(--i) * 180ms); }

/* Economics */
.ec-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.ec-inputs { display: grid; gap: 22px; }
.ec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ec-head label { font-size: 14px; font-weight: 600; color: var(--ink); }
.ec-badge { flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 9px; background: var(--bg); }
.ec-ctl { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; align-items: center; }
.ec-single { grid-template-columns: 150px; }
.ec-ctl input[type="range"] { width: 100%; min-width: 0; accent-color: var(--ink); height: 28px; cursor: pointer; }
.ec-num { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ec-num .input { padding: 8px 10px; min-width: 0; font-variant-numeric: tabular-nums; }
.ec-unit { flex: none; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.ec-help { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.ec-out { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-width: 0; }
.ec-k { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.ec-bigval { display: block; margin-top: 2px; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ec-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-strong); }
.ec-row .ec-k { color: var(--ink-2); }
.ec-val { font-size: 1.125rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ec-muted { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-strong); font-size: 14px; color: var(--ink-3); }
.ec-muted[hidden], .ec-row[hidden] { display: none; }
.ec-formula { margin-top: 18px; font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.ec-notes { margin-top: 32px; max-width: 78ch; display: grid; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.ec-notes a { color: var(--ink-2); text-underline-offset: 3px; }
.ec-notes a:hover { color: var(--ink); }
.ec-notes a + a { margin-left: 12px; }

/* Economics timeline (HTML, percent-positioned, 48 h fixed scale) */
.tl { position: relative; height: 112px; margin-top: 22px; }
.tl-bar { position: absolute; left: 4%; right: 4%; top: 52px; height: 0; border-top: 1.5px solid var(--ink-3); }
.tl-span { position: absolute; top: 40px; height: 24px; background: rgba(15,23,42,.1); border-radius: 2px; transition: left .25s, width .25s; }
.tl-dot { position: absolute; top: 47px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.tl-mk { position: absolute; top: 38px; width: 0; height: 28px; border-left: 2px solid var(--ink); transition: left .25s; }
.tl-lab { position: absolute; font-size: 12px; line-height: 1.2; color: var(--ink-2); white-space: nowrap; }
.tl-top { top: 10px; }
.tl-bot { top: 74px; }
#tlLStart { left: 4%; font-weight: 500; color: var(--ink-3); }
.tl-amt { transform: translateX(-50%); font-size: 13px; font-weight: 700; color: var(--ink); transition: left .25s; }
.tl-hrs { top: 92px; transform: translateX(-50%); color: var(--ink-3); transition: left .25s; }
#tlLWith { transform: translateX(-100%); text-align: right; padding-right: 6px; transition: left .25s; }
#tlLWithout { padding-left: 6px; transition: left .25s; }
#tlLWithout.tl-end { transform: translateX(-100%); padding-left: 0; padding-right: 6px; }

/* How it is used */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.facts { border-top: 1px solid var(--line); }
.facts li { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }

/* Pilot */
.pilot-cta { margin-top: 28px; }

/* Contact */
.contact-meta { margin-top: 28px; border-top: 1px solid var(--line); }
.meta-row { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.meta-key { flex: none; width: 110px; color: var(--ink-3); font-weight: 500; }
.meta-val { min-width: 0; overflow-wrap: anywhere; }
.meta-val a { text-underline-offset: 3px; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); font-size: 15px; }
.input::placeholder { color: var(--ink-3); opacity: .8; }
.input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
textarea.input { resize: vertical; min-height: 120px; }
.form-actions { display: flex; }
.form-note { font-size: 13px; color: var(--ink-3); }
.form-note a { color: var(--ink-2); text-underline-offset: 3px; }

/* Footer */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.footer-about { margin-top: 12px; max-width: 52ch; font-size: 14px; color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.footer-links a { color: var(--ink-2); text-underline-offset: 3px; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }

/* Scroll reveals (only when JS is running).
   script.js adds .is-in once an element is a little way into the viewport and removes it only when the
   element is completely off-screen, so every entry replays (scrolling down and up) and nothing ever
   fades out in view. The fade is time-based, not tied to the scroll position: it runs at the same calm
   pace whatever the scroll speed and always ends at full opacity. The hidden state has no transition
   (the reset happens off-screen); .is-in carries it. Opacity uses a soft sine curve and the short rise a
   slow ease-out, so the element settles rather than slides. An element that left through the top comes
   back from above (.reveal-from-top). .reveal--stay shows as soon as any part is visible (end of page),
   .reveal--fade only fades (the sticky card stack). The schematic and story replays hang off .is-in. */
.js .reveal { opacity: 0; transform: translate3d(0, 1.75rem, 0); }
.js .reveal.reveal-from-top { transform: translate3d(0, -1.25rem, 0); }
.js .reveal--fade, .js .reveal--fade.reveal-from-top { transform: none; }
.js .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity 1.1s var(--ease-fade), transform 1.3s var(--ease-slow);
    transition-delay: var(--reveal-delay, 0ms);
}

/* Hero: calm staggered entrance on load */
.js .rise { opacity: 0; transform: translateY(1.5rem); animation: rise 1.4s var(--ease-slow) forwards; animation-delay: calc(var(--d, 0) * 150ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Workflow: sticky stacking cards */
.wf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; --card-top: calc(var(--nav-h) + 16px); --card-head: 3rem; }
.wf-side .lead { margin-top: 16px; }
.wf-note { margin-top: 28px; padding: 18px 20px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; }
.wf-note h3 { font-size: .95rem; font-weight: 700; }
.wf-note p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.wf-stackwrap { position: relative; min-width: 0; }
.wf-card { position: sticky; top: calc(var(--card-top) + var(--i) * var(--card-head)); padding-bottom: 1.1rem; }
.wf-card:last-child { position: relative; top: auto; padding-bottom: 0; }
.wf-card__inner { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: clamp(10rem, 23vh, 14rem); padding: 0 clamp(1.2rem, 2.6vw, 2rem) clamp(1.3rem, 2.6vw, 2rem); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 26px 55px -32px rgba(15,23,42,.35); }
.wf-card__head { display: flex; align-items: center; gap: clamp(.8rem, 1.8vw, 1.2rem); height: var(--card-head); border-bottom: 1px solid var(--line); margin-bottom: clamp(1rem, 2vw, 1.4rem); }
.wf-num { flex: none; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .68rem; letter-spacing: .2em; color: var(--ink-3); }
.wf-card__head h3 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 500; letter-spacing: -.01em; }
.wf-icon { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wf-card__inner::after { content: var(--n); position: absolute; right: clamp(.9rem, 2vw, 1.7rem); bottom: -1.4rem; font-size: clamp(5rem, 9vw, 8rem); font-weight: 600; line-height: 1; color: var(--ink); opacity: .05; pointer-events: none; user-select: none; }
.wf-card p { position: relative; z-index: 1; font-size: clamp(.95rem, 1.35vw, 1.05rem); line-height: 1.6; color: var(--ink-2); max-width: 44ch; }
@media (min-width: 1000px) {
    .wf { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.75rem, 3vw, 3rem); --card-top: calc(var(--nav-h) + 28px); --card-head: 4rem; }
    .wf-side > .reveal { position: sticky; top: var(--card-top); }
    .wf-stackwrap { padding-left: clamp(1.75rem, 3vw, 3rem); }
    .wf-stackwrap::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: 3rem; width: 1px; background: linear-gradient(180deg, transparent 0%, var(--line-strong) 8%, var(--line-strong) 92%, transparent 100%); }
}
@media (max-width: 639px) {
    .wf-card__inner { min-height: 10rem; }
}

/* Pilot: compact call to action */
#pilot.section { padding: 72px 0; }
.pilot-compact { max-width: 60ch; }

/* Privacy page */
.prose-page { padding: 48px 0 96px; border-top: 0; }
.prose { max-width: 68ch; margin: 0; }
.prose .back { display: inline-block; margin-bottom: 24px; font-size: 14px; color: var(--ink-2); text-underline-offset: 3px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.prose-meta { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.prose h2 { margin-top: 36px; font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; }
.prose p { margin-top: 12px; color: var(--ink-2); }
.prose a { color: var(--ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose-list { margin-top: 12px; }
.prose-list li { position: relative; margin-top: 10px; padding-left: 20px; color: var(--ink-2); }
.prose-list li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }

/* Responsive */
@media (min-width: 900px) {
    .ec-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
}
@media (min-width: 1000px) {
    .story { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 16px; }
    .story li { padding: 0; text-align: center; }
    .story-num { position: relative; margin: 0 auto; }
    .story-fig { margin: 18px auto 12px; }
    .story li p { margin-inline: auto; }
    .story li:not(:last-child)::before { left: 50%; top: 16px; width: calc(100% + 16px); height: 1px; transform-origin: left; }
    .js .story li:not(:last-child)::before { transform: scaleX(0); }
    .js .story.is-in li:not(:last-child)::before { transform: none; }
    .story li:not(:last-child)::after { content: ""; position: absolute; left: calc(100% + 8px); top: 12px; width: 7px; height: 7px; margin-left: -5px; border-top: 1.5px solid var(--ink-3); border-right: 1.5px solid var(--ink-3); transform: rotate(45deg); }
    .js .story li:not(:last-child)::after { opacity: 0; }
    .js .story.is-in li:not(:last-child)::after { opacity: 1; transition: opacity .3s ease-out calc(var(--i) * 180ms + 500ms); }
}
@media (max-width: 999px) {
    .sch-w { display: none; }
    .sch-v { display: block; }
}
@media (max-width: 959px) {
    .hero-content { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hero { padding-top: 40px; }
}
@media (max-width: 820px) {
    .nav-container { gap: 12px; }
    .lang { margin-left: auto; }
    .hamburger { display: block; margin-right: -10px; }
    .nav-menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0; }
    .js .nav-menu { display: none; }
    .js .nav-menu.open { display: flex; }
    .nav-menu li { border-bottom: 1px solid var(--line); }
    .nav-menu li:last-child { border: 0; padding-top: 16px; }
    .nav-link { display: block; padding: 14px 0; font-size: 16px; }
    .btn-nav { display: flex; padding: 12px 16px; font-size: 15px; }
}
@media (max-width: 639px) {
    .container { padding: 0 20px; }
    .section { padding: 64px 0; }
    .ec-out { padding: 20px 16px; }
    .form-row { grid-template-columns: minmax(0, 1fr); }
    .frame { padding: 10px 8px; }
    .chart-wrap { height: 250px; }
    .preview-body { padding: 12px; }
    .preview-dots { display: none; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .meta-key { width: 90px; }
    .nav-menu { padding-inline: 20px; }
    .titleblock { max-width: none; }
}
/* Fingerprint moment in the schematic: dot in tank B, red dash down the signal line, box darkens, then the lamp */
.s-fp-dot { fill: var(--alarm); }
.s-fp-ring { fill: none; stroke: var(--alarm); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.s-fp-dash { fill: none; stroke: var(--alarm); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: .3 1.3; stroke-dashoffset: .3; }
.s-fp-box { fill: none; stroke: var(--ink); stroke-width: 1.75; opacity: 0; }
.js .s-fp-dot { opacity: 0; }
.js .is-in .s-fp-dot { animation: fadein 250ms ease-out 1400ms forwards; }
.js .is-in .s-fp-ring { animation: fpring 700ms ease-out 1400ms forwards; }
.js .is-in .s-fp-dash { animation: fpdash 550ms linear 1650ms forwards; }
.js .is-in .s-fp-box { animation: fpbox 600ms ease-in-out 2150ms forwards; }
@keyframes fpring { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(2.8); } }
@keyframes fpdash { from { stroke-dashoffset: .3; } to { stroke-dashoffset: -1; } }
@keyframes fpbox { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }

/* Fingerprints and flow */
.fp-sub { margin-top: 72px; }
.fp-head h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.2; letter-spacing: -.02em; }
.fp-head .lead { margin-top: 12px; }
.fp-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 32px; }
.fp-card { padding: 22px 22px 26px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 26px 55px -32px rgba(15,23,42,.35); }
.fp-ic { width: 64px; height: 28px; margin-bottom: 14px; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fp-card h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.fp-card p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.fp-sub .story { margin-top: 36px; }
.story--3 li p { max-width: 40ch; }
.story h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
@media (min-width: 640px) {
    .fp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
    .fp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .story--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .fp-sub { margin-top: 56px; }
}
/* Workflow curtain: the section locks once card 05 has landed, pilot and contact slide over it */
@media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
    .wf-curtain { position: relative; }
    #workflow.is-curtain { position: sticky; top: var(--wf-top, 0px); z-index: 1; }
    .wf-curtain #pilot, .wf-curtain #contact { position: relative; z-index: 2; background: var(--bg); }
    .wf-curtain #pilot { box-shadow: 0 -24px 48px -32px rgba(15,23,42,.25); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal, .js .reveal.is-in, .js .reveal.reveal-from-top { opacity: 1; transform: none; transition: none; }
    .js .rise { opacity: 1; transform: none; animation: none; }
    .wf-card, .wf-side > .reveal { position: relative; top: auto; }
    .js .story li, .js .story.is-in li { opacity: 1; transform: none; transition: none; }
    .js .story li::before, .js .story li::after { transform: none; opacity: 1; transition: none; }
    .tl-span, .tl-mk, .tl-lab { transition: none; }
    .js .s-draw { stroke-dashoffset: 0; }
    .js .s-fade, .js .s-lamp { opacity: 1; }
    .js .is-in .s-draw, .js .is-in .s-fade, .js .is-in .s-lamp { animation: none; }
    .js .s-fp-dot { opacity: 1; }
    .js .is-in .s-fp-dot, .js .is-in .s-fp-ring, .js .is-in .s-fp-dash, .js .is-in .s-fp-box { animation: none; }
}
