/* ==========================================================================
   ferto.de — revamp preview (/new)
   SELF-CONTAINED. This file does not depend on /style.css and must never be
   loaded alongside it. The live site keeps /style.css untouched.

   Direction — "the optical bench record".
   The page is RULED, not BOXED. A microscope's world is a ruled one: the
   graticule in the eyepiece, the grid of a counting chamber, the margin of a
   lab notebook. So structure is carried by hairlines, hanging labels and
   uneven whitespace — enclosure is reserved for the two things that have
   earned it. Two voices: Inter for the human, mono for the instrument.
   Signature: focus-reticle corner ticks, lifted from the product's own
   annotated-cell overlay, used on the three statement lines and nowhere else.
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 88px; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; border: none; background: none; }

/* ---------- Tokens ---------- */
:root {
    --paper: #FFFFFF;
    /* must stay in sync with VANTA backgroundColor 0xF5F7F8 in main.js */
    --tint: #F5F7F8;
    /* --tint at alpha 0, for the hero scrim's fade ends. Keep in lockstep with
       --tint. Fading to `transparent` instead would interpolate through
       rgba(0,0,0,0) and grey the ramp. */
    --tint-0: rgba(245, 247, 248, 0);
    --ink: #0B1B1A;

    --rule: #E3E7EA;
    --rule-strong: #C9D1D4;
    /* hero strip rules: they sit over the scrim, so they can be firm */
    --rule-ink: rgba(17, 24, 39, 0.26);
    --rule-ink-soft: rgba(17, 24, 39, 0.15);

    --text: #111827;
    --text-2: #3C4650;
    /* --text-3 carries 10.5px mono labels on --tint; #697580 measured 4.38:1
       there, so it is pulled down to clear AA on tint (4.77) and paper (5.12). */
    --text-3: #656F79;

    --accent: #0D9488;          /* rules, marks, large type */
    --accent-text: #0F766E;     /* small text — 5.5:1 on paper, AA */
    --accent-bright: #45E0C8;   /* on ink */
    --accent-wash: #F0FAF8;

    --amber: #D97706;           /* rules */
    --amber-text: #A45309;      /* small text — AA on paper */

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;

    --max-w: 1180px;
    --nav-h: 68px;

    /* One hanging margin, one content edge. Every hanging label — section
       eyebrows, ledger terms, role titles — sits in --gut; everything they
       label starts at --gut + --gut-gap. Keep these two in lockstep. */
    --gut: 216px;
    --gut-gap: 36px;
}

/* ---------- Base ---------- */
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-2);
    background: var(--paper);
    font-feature-settings: 'cv05' 1, 'ss03' 1;
}

::selection { background: #CDEFE9; color: var(--text); }

/* ==========================================================================
   Nav
   ========================================================================== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 250ms, border-color 250ms, backdrop-filter 250ms;
}
.topbar.scrolled {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom-color: var(--rule);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 32px; height: var(--nav-h);
}
.brand {
    font-weight: 700; font-size: 21px; color: var(--text);
    letter-spacing: -0.045em;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
    font-size: 13px; font-weight: 500; color: var(--text-3);
    transition: color 150ms;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
    background: var(--text); color: #fff !important;
    padding: 9px 18px; border-radius: 2px; font-weight: 600 !important;
    transition: background 200ms;
}
.nav-cta:hover { background: #000; }

/* ==========================================================================
   Shared type
   ========================================================================== */
.eyebrow {
    font-family: var(--mono);
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--accent-text);
}

/* ==========================================================================
   Hero — left-aligned over the Vanta NET field, closed by an instrument strip
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; justify-content: center;
    padding: calc(var(--nav-h) + 56px) 32px 72px;
    overflow: hidden;
    background: var(--tint);
}
.hero canvas { opacity: 0.35; }
@media (min-width: 901px) { .hero canvas { opacity: 0.55; } }

.hero-content {
    /* z-index 3, not 2: .hero-stats is a later sibling, so at equal z-index
       its scrim would paint over the buttons and wash them out. */
    position: relative; z-index: 3;
    width: 100%; max-width: var(--max-w); margin: 0 auto;
}
.hero .eyebrow { margin-bottom: 22px; }

.hero h1 {
    font-size: clamp(38px, 6.4vw, 78px);
    font-weight: 700; line-height: 1.02;
    letter-spacing: -0.042em;
    color: var(--text);
    text-wrap: balance;
}
.hero-lead {
    margin-top: 26px;
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.6; color: var(--text-2);
    max-width: 60ch;
}
.hero-actions {
    margin-top: 38px;
    display: flex; gap: 10px; flex-wrap: wrap;
}

/* The trust strip — marks, not prose. The worded detail lives in
   "Partnered, funded, filed"; repeating it here made the hero a thinner
   copy of a section that does the job better.
   Keep this element named .hero-stats: the scrim below is anchored to it. */
.hero-stats {
    position: relative; z-index: 2;
    width: 100%; max-width: var(--max-w); margin: 0 auto;
    margin-top: clamp(56px, 9vh, 108px);
    display: flex; flex-wrap: wrap; gap: 30px 72px; align-items: flex-start;
    border-top: 1px solid var(--rule-ink);
    padding-top: 22px;
}

/* ------------------------------------------------------------------
   Scrim — the credentials must be read, not decoded.
   These three lines are the only proof points above the fold, and they
   sat directly on the animated NET field: lines and dots ran straight
   through the text and the hairlines. A contrast ratio against a moving
   backdrop is meaningless, so this gives the text a KNOWN one.

   It is anchored to the strip, not to the hero's foot: the block is
   vertically centred, so on a tall viewport the strip sits ~490px above
   the hero bottom and a bottom-anchored scrim would flood 400px of empty
   hero. This fades in above the strip, is FULLY OPAQUE --tint across it,
   and fades back out below — so the animation stays prominent where the
   headline lives and re-emerges underneath.

   Geometry (px offsets, so it holds at any strip height):
     top: -184  ->  solid begins at 160px = 24px ABOVE the top rule
     bottom: -160 -> solid ends 120px before the foot = 40px BELOW the strip
   Clipped by .hero{overflow:hidden}, so 100vw cannot cause page scroll.
   ------------------------------------------------------------------ */
.hero-stats::before {
    content: '';
    position: absolute; z-index: -1;   /* behind the text, above the canvas */
    left: 50%; transform: translateX(-50%);
    width: 100vw; top: -184px; bottom: -160px;
    pointer-events: none;
    background: linear-gradient(to bottom,
        var(--tint-0) 0,
        var(--tint) 160px,
        var(--tint) calc(100% - 120px),
        var(--tint-0) 100%);
}

/* Charité is a clinical PARTNER, IBB/EFRE are FUNDERS — two labelled groups,
   never one row, or the site implies Charité funds Ferto. */
.trust-group { display: flex; flex-direction: column; gap: 13px; }
.trust-label {
    font-family: var(--mono); font-size: 10.5px; font-weight: 500;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3);
}
/* The institutions are set as TYPE, not logos — third-party marks need usage
   clearance we don't have. The weight comes from the scale jump against the
   mono label above, not from borrowed artwork. */
.trust-name {
    font-size: 21px; font-weight: 600; line-height: 1.2;
    letter-spacing: -0.022em; color: var(--text);
}
.trust-name span {
    display: block; margin-top: 5px;
    font-size: 13.5px; font-weight: 400; letter-spacing: 0;
    color: var(--text-2);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 26px; font-size: 13px; font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 2px; cursor: pointer;
    transition: background 200ms, color 200ms, border-color 200ms;
}
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-outline {
    box-shadow: inset 0 0 0 1px var(--rule-strong);
    color: var(--text-2); background: transparent;
}
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--text); color: var(--text); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ==========================================================================
   Section frame
   ========================================================================== */
.section {
    padding: 108px 32px;
    max-width: var(--max-w); margin: 0 auto;
}
.section-tinted { max-width: none; background: var(--tint); }
/* A tinted section bleeds full-width, so its .wrap must be the *content* box of
   a normal section — --max-w minus that section's 2x32px padding — or the page
   spine jumps 32px every time the background changes. Verified equal at every
   width: below ~1180px both resolve to (viewport - 2x padding). */
.wrap { max-width: calc(var(--max-w) - 64px); margin: 0 auto; }

/* the section boundary is a hairline, and the label hangs off it */
.section-head {
    position: relative;
    padding-top: 26px;
    margin-bottom: 60px;
    display: grid;
    grid-template-columns: var(--gut) minmax(0, 1fr);
    column-gap: var(--gut-gap);
}
.section-head::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 1px; background: var(--rule);
}
/* padding-top aligns the eyebrow's cap-top with the h2's — measured, not guessed */
.section-head .eyebrow { grid-column: 1; grid-row: 1; padding-top: 5px; line-height: 1.5; padding-right: 24px; }
.section-head h2 {
    grid-column: 2; grid-row: 1;
    font-size: clamp(27px, 4.1vw, 52px);
    font-weight: 700; line-height: 1.06;
    letter-spacing: -0.038em; color: var(--text);
    /* balances each <br>-delimited run on its own — stops "are" and "on"
       stranding alone on a second line at phone widths */
    text-wrap: balance;
}
.section-sub {
    grid-column: 2; grid-row: 2;
    margin-top: 22px; font-size: 17.5px; line-height: 1.6;
    color: var(--text-2); max-width: 58ch;
}

/* ==========================================================================
   Statement — the signature. Focus-reticle corner ticks, nothing else.
   ========================================================================== */
.callout {
    position: relative;
    /* the reticle hangs in the margin; the text sits on the content edge */
    margin: 76px 0 0 var(--gut);
    padding: 40px 52px 40px var(--gut-gap);
    font-size: clamp(21px, 2.5vw, 33px);
    font-weight: 500; line-height: 1.24; letter-spacing: -0.028em;
    color: var(--text); text-align: left;
    max-width: 24ch;
}
.callout::before, .callout::after {
    content: ''; position: absolute;
    width: 24px; height: 24px;
    border: 1px solid var(--accent);
}
.callout::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.callout::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.callout strong { color: var(--accent-text); font-weight: 500; }

/* ---------- Proven-vs-proposed note ---------- */
.status-note {
    margin-top: 26px; padding-left: 14px;
    border-left: 2px solid var(--amber);
    font-size: 13px; line-height: 1.6; color: var(--text-3);
    max-width: 76ch;
}
.status-note strong { color: var(--amber-text); font-weight: 600; }

/* ==========================================================================
   Problem — three named failure modes as a ruled ledger, term hanging left
   ========================================================================== */
#problem .tri-grid { display: block; }
#problem .card {
    display: grid;
    grid-template-columns: var(--gut) minmax(0, 1fr);
    column-gap: var(--gut-gap);
    padding: 30px 0 32px;
    border-top: 1px solid var(--rule);
}
#problem .card h3 {
    font-size: clamp(18px, 1.9vw, 23px); font-weight: 600;
    letter-spacing: -0.025em; color: var(--text); line-height: 1.25;
}
#problem .card p { font-size: 16px; line-height: 1.62; color: var(--text-2); max-width: 62ch; }

/* the sub-point pair, label hanging in the margin */
.gap-block {
    margin-top: 68px; padding-top: 26px;
    border-top: 1px solid var(--rule);
    display: grid; grid-template-columns: var(--gut) minmax(0, 1fr);
    column-gap: var(--gut-gap);
}
.gap-label {
    grid-column: 1; grid-row: 1;
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5;
    color: var(--text-3); padding-top: 3px;
    padding-right: 24px;
}
.gap-grid {
    grid-column: 2; grid-row: 1;
    display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px;
}
.gap-grid h4 {
    font-size: 16px; font-weight: 600; color: var(--text);
    letter-spacing: -0.02em; margin-bottom: 6px;
}
.gap-grid p { font-size: 15px; line-height: 1.62; color: var(--text-2); }

/* ==========================================================================
   Approach — the optical path as a rail, then a ruled two-column ledger
   ========================================================================== */
.workflow {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    margin-bottom: 80px;
}
.wf-arrow { display: none; }
.wf-step {
    position: relative;
    padding: 26px 24px 0 0;
    border-top: 1px solid var(--rule-strong);
    min-width: 0;
}
.wf-step::before {
    content: ''; position: absolute; top: -3px; left: 0;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--rule-strong);
}
.wf-accent { border-top-color: var(--accent); }
.wf-accent::before { background: var(--accent); }
.wf-icon {
    display: flex; align-items: center; justify-content: flex-start;
    width: auto; height: 24px; margin: 0 0 16px; color: var(--text-3);
}
.wf-icon svg { width: 22px; height: 22px; }
.wf-accent .wf-icon { color: var(--accent); }
.wf-step h3 {
    font-size: 15px; font-weight: 600; color: var(--text);
    letter-spacing: -0.02em;
}
.wf-accent h3 { color: var(--accent-text); }
.wf-step p { font-size: 12.5px; line-height: 1.45; color: var(--text-3); margin-top: 3px; }

/* the lead point gets scale instead of a box */
.bento {
    display: grid; grid-template-columns: repeat(2, 1fr);
    column-gap: 56px; row-gap: 0;
}
.card-label {
    font-family: var(--mono); font-size: 10.5px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent-text); margin-bottom: 10px;
}
.card-wide {
    grid-column: span 2;
    padding: 0 0 52px;
}
.card-wide h3 {
    font-size: clamp(24px, 2.7vw, 35px); font-weight: 600;
    letter-spacing: -0.032em; line-height: 1.1;
    color: var(--text); margin-bottom: 20px;
}
.card-wide p {
    font-size: clamp(16.5px, 1.4vw, 19px); line-height: 1.58;
    color: var(--text-2); max-width: 68ch;
}
/* :not(.card-wide) is load-bearing — without it these out-specify .card-wide
   above and flatten the lead point back to body scale. */
.bento .card:not(.card-wide) {
    padding: 28px 0 34px;
    border-top: 1px solid var(--rule);
}
.bento .card:not(.card-wide) h3 {
    font-size: 18px; font-weight: 600; color: var(--text);
    letter-spacing: -0.022em; margin-bottom: 9px;
}
.bento .card:not(.card-wide) p { font-size: 15px; line-height: 1.62; color: var(--text-2); }

/* ==========================================================================
   On the bench — the proof breaks the measure. No chrome on the evidence.
   ==========================================================================
   The two shots have different native ratios (bench 864/1080 = 0.8000,
   phone screen 923/1325 = 0.6966). Rather than crop either one, the COLUMNS
   are sized 0.8000/0.6966 = 1.148 apart, so both images render at exactly the
   same height with nothing cut off. Column gap does not disturb this — fr
   distributes the *remaining* space, so the 1.148:1 ratio is preserved.
   If you swap an image, recompute the two fr values — don't add aspect-ratio
   or object-fit here.

   The fr pair is each image's aspect ratio cross-multiplied, so it is exact
   rather than rounded:  864x1325 = 1144800  and  923x1080 = 996840,
   both /120 -> 9540 : 8307.                                                 */
#demo { padding-top: 92px; padding-bottom: 92px; }
.demo-grid {
    display: grid; grid-template-columns: 9540fr 8307fr; gap: 40px;
    align-items: start;
}
/* The evidence breaks the measure — but the section head stays on the page
   spine, so this reads as emphasis rather than misalignment. Only applied
   where there is room for it either side. */
@media (min-width: 1400px) { .demo-grid { margin-inline: -80px; } }

.demo-fig { display: flex; flex-direction: column; }
.demo-fig img { display: block; width: 100%; height: auto; background: var(--tint); }
.demo-fig figcaption {
    margin-top: 18px; padding-top: 14px;
    padding-right: 28%;                     /* rule spans the image; text does not */
    border-top: 1px solid var(--rule);
    font-size: 13.5px; line-height: 1.55; color: var(--text-3);
}

/* ==========================================================================
   First market — three columns divided, then the comparison as real data
   ========================================================================== */
#market .tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
#market .card { padding: 2px 32px 0 0; }
#market .card + .card { padding-left: 32px; border-left: 1px solid var(--rule-strong); }
#market .card h3 {
    font-size: 18px; font-weight: 600; color: var(--text);
    letter-spacing: -0.022em; margin-bottom: 10px; line-height: 1.28;
}
#market .card p { font-size: 15px; line-height: 1.62; color: var(--text-2); }

/* ---------- Tables — data looks like data ---------- */
.table-card { margin-top: 72px; }

/* Four short values don't need the full measure. Auto layout hands the extra
   width to the widest column, which is the washed one — so this table is
   capped and fixed, keeping the wash proportionate to what it holds.
   The platform matrix below has long cells and keeps the full width. */
#market .table-card { max-width: 820px; }
#market table { table-layout: fixed; }
#market th:nth-child(1) { width: 22%; }
#market th:nth-child(2) { width: 32%; }   /* widest value: "~€1,000 (adapter + phone)" */
#market th:nth-child(3) { width: 24%; }
#market th:nth-child(4) { width: 22%; }
.table-card h3 {
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 18px;
}
.table-scroll { overflow-x: auto; }
table {
    width: 100%; border-collapse: collapse; min-width: 620px;
    font-variant-numeric: tabular-nums;
}
th, td { text-align: left; }
thead th {
    font-family: var(--mono); font-size: 10.5px; font-weight: 500;
    letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--text-3);
    padding: 0 18px 13px; vertical-align: bottom;
    border-bottom: 1px solid var(--rule-strong);
}
tbody td {
    padding: 17px 18px; font-size: 15px; line-height: 1.45;
    color: var(--text-2); border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
thead th:first-child, tbody td:first-child { padding-left: 0; }
tbody td:first-child { color: var(--text); font-weight: 600; letter-spacing: -0.015em; }
tbody tr:last-child td { border-bottom: none; }

/* the Ferto column is washed and underscored, not merely coloured */
th.hl, td.hl { background: var(--accent-wash); }
thead th.hl { color: var(--accent-text); border-bottom: 2px solid var(--accent); padding-bottom: 12px; }
tbody td.hl { color: var(--accent-text); font-weight: 600; }
.table-note {
    margin-top: 16px; font-size: 12px; line-height: 1.6;
    color: var(--text-3); max-width: 76ch;
}

/* ==========================================================================
   Roadmap — the ink band. The page's one full-bleed moment.
   Tokens are re-declared locally, so everything inside inverts on its own.
   ========================================================================== */
#roadmap {
    max-width: none;
    background: var(--ink);
    padding: 132px 32px;

    --paper: #0B1B1A;
    --tint: #12302E;
    --rule: rgba(255, 255, 255, 0.16);
    --rule-strong: rgba(255, 255, 255, 0.30);
    --text: #F2F7F6;
    --text-2: #AFC3C1;
    --text-3: #85999A;
    --accent: var(--accent-bright);
    --accent-text: var(--accent-bright);
    --amber: #F0A438;
    --amber-text: #F5C56B;
}

.phase-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 48px; }
.phase {
    position: relative;
    display: flex; flex-direction: column;
    padding: 30px 0 0;
    border-top: 1px solid var(--rule);
}
.phase::before {
    content: ''; position: absolute; top: -4px; left: 0;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong);
}
.phase:first-child::before { background: var(--accent-bright); box-shadow: none; }
.phase-num {
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 10px;
}
.phase h3 {
    font-size: clamp(20px, 2.1vw, 28px); font-weight: 600;
    letter-spacing: -0.03em; line-height: 1.12;
    color: var(--text); margin-bottom: 12px;
}
.phase-tag {
    align-self: flex-start;
    font-family: var(--mono); font-size: 11.5px; font-weight: 500;
    letter-spacing: 0.02em; color: var(--text-3);
    margin-bottom: 20px;
}
.phase-now { color: var(--accent-bright); }
/* .phase-num and .phase-out are also <p> — excluding them is what keeps the
   three OUTPUT rules on one line. Only the body copy absorbs the slack. */
.phase > p:not(.phase-num):not(.phase-out) {
    font-size: 15px; line-height: 1.65; color: var(--text-2); flex: 1;
}
.phase-out {
    margin-top: 22px; padding-top: 14px;
    border-top: 1px solid var(--rule);
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.phase-out strong { color: var(--text-2); font-weight: 500; }

/* ==========================================================================
   Regulatory & IP — asymmetric split. Head holds one side, points the other.
   ========================================================================== */
#regulatory {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
    column-gap: 72px;
    align-items: start;
}
#regulatory::before {
    content: ''; grid-column: 1 / -1; grid-row: 1;
    align-self: start; height: 1px; background: var(--rule);
}
#regulatory .section-head {
    grid-column: 1; grid-row: 1;
    display: block; padding-top: 30px; margin-bottom: 0;
}
#regulatory .section-head::before { display: none; }
#regulatory .section-head .eyebrow { padding-top: 0; margin-bottom: 16px; }
#regulatory .tri-grid { grid-column: 2; grid-row: 1; display: block; padding-top: 30px; }
#regulatory .card { padding: 0 0 26px; }
#regulatory .card + .card { padding-top: 26px; border-top: 1px solid var(--rule); }
#regulatory .card h3 {
    font-size: 18px; font-weight: 600; color: var(--text);
    letter-spacing: -0.022em; margin-bottom: 8px;
}
#regulatory .card p { font-size: 15px; line-height: 1.62; color: var(--text-2); max-width: 58ch; }
/* Inside the split, the right column is too narrow to also hang a label —
   it would introduce a fourth left edge. The label stacks instead. */
#regulatory .gap-block {
    grid-column: 2; grid-row: 2; margin-top: 34px;
    grid-template-columns: minmax(0, 1fr); row-gap: 20px;
}
#regulatory .gap-label { grid-column: 1; grid-row: 1; padding: 0; }
#regulatory .gap-grid { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; row-gap: 24px; }

/* ==========================================================================
   Pilot — three ruled columns carrying their own mono label
   ========================================================================== */
#pilot .tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
#pilot .card { padding: 22px 0 0; border-top: 1px solid var(--rule-strong); }
#pilot .card h3 {
    font-size: 18px; font-weight: 600; color: var(--text);
    letter-spacing: -0.022em; margin-bottom: 10px; line-height: 1.28;
}
#pilot .card p { font-size: 15px; line-height: 1.62; color: var(--text-2); }

/* the regulatory notice reads as a notice — amber rule, no box */
.ruo-inline {
    margin-top: 64px; padding: 4px 0 4px 22px;
    border-left: 2px solid var(--amber);
    font-size: 14.5px; line-height: 1.68; color: var(--text-2);
    max-width: 82ch;
}
.ruo-inline strong { color: var(--amber-text); font-weight: 600; }

.lane-link {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    margin-top: 56px; padding-top: 24px;
    border-top: 1px solid var(--rule);
}
.lane-link p { font-size: 15.5px; color: var(--text-2); max-width: 56ch; }
.lane-link strong { color: var(--text); font-weight: 600; }
.lane-link .btn { align-self: center; }

/* ==========================================================================
   Traction — a compact readout, deliberately rhyming with the hero strip
   ========================================================================== */
#traction { padding-top: 76px; padding-bottom: 76px; }
#traction .section-head { margin-bottom: 48px; }
.quad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.quad-grid .card {
    padding: 22px 28px 0 0;
    border-top: 1px solid var(--rule-strong);
}
.quad-grid .card + .card { padding-left: 28px; border-left: 1px solid var(--rule); }

/* One fixed label slot. Fixing the height is what keeps the four headings on
   one line; the alternative is arithmetic that breaks the moment a label
   rewraps. (It formerly also held the Charité mark — logos are out pending
   usage clearance, so all four cells are mono kickers now.) */
.quad-grid .card-label {
    height: 26px; margin-bottom: 12px;
    display: flex; align-items: flex-end;
    line-height: 1;
}
.quad-grid .card h3 {
    font-size: 16px; font-weight: 600; color: var(--text);
    letter-spacing: -0.022em; margin-bottom: 7px;
}
.quad-grid .card p { font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* ==========================================================================
   Team
   ========================================================================== */
.team-grid { display: block; }
/* the portrait occupies the hanging-label column, so the bio starts on the
   same content edge as every other section's body copy */
.team-featured {
    display: grid; grid-template-columns: var(--gut) minmax(0, 1fr);
    column-gap: var(--gut-gap); align-items: start;
    padding-top: 4px;
}
.team-featured img {
    width: 100%; aspect-ratio: 1; height: auto;
    object-fit: cover; border-radius: 2px;
}
.team-info h3 {
    font-size: clamp(21px, 2.1vw, 27px); font-weight: 600;
    letter-spacing: -0.03em; color: var(--text);
}
.team-role {
    display: block; margin-top: 6px; margin-bottom: 16px;
    font-family: var(--mono); font-size: 11.5px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text);
}
.team-info p { font-size: 16px; line-height: 1.65; color: var(--text-2); max-width: 62ch; }
.link {
    display: inline-block; margin-top: 18px;
    font-size: 13px; font-weight: 500; color: var(--text-2);
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 2px;
    transition: color 200ms, border-color 200ms;
}
.link:hover { color: var(--accent-text); border-color: var(--accent); }

.roles { margin-top: 76px; padding-top: 28px; border-top: 1px solid var(--rule); }
.roles > h3 {
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 28px;
}
.role-list { display: block; }
.role {
    display: grid; grid-template-columns: var(--gut) minmax(0, 1fr);
    column-gap: var(--gut-gap); align-items: baseline;
    padding: 20px 0 22px;
    border-top: 1px solid var(--rule);
}
.role:first-child { border-top: none; padding-top: 0; }
.role dt {
    font-size: 16px; font-weight: 600; color: var(--text);
    letter-spacing: -0.022em;
}
.role dd { font-size: 15px; line-height: 1.62; color: var(--text-2); max-width: 62ch; }
/* the note belongs to the descriptions, so it sits on the content edge —
   labels live at the spine, everything they label starts here */
.roles-note {
    margin-top: 26px; margin-left: calc(var(--gut) + var(--gut-gap));
    font-size: 13.5px; color: var(--text-3);
}

/* ==========================================================================
   Contact — head on one side, form on the other. Fields are ruled, not boxed.
   ========================================================================== */
#contact { padding-bottom: 124px; }
#contact .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
    column-gap: 80px; row-gap: 34px;
}
#contact .wrap::before {
    content: ''; grid-column: 1 / -1; grid-row: 1;
    height: 1px; background: var(--rule);
}
#contact .section-head {
    grid-column: 1; grid-row: 2;
    display: block; padding-top: 0; margin-bottom: 0;
}
#contact .section-head::before { display: none; }
#contact .section-head .eyebrow { padding-top: 0; margin-bottom: 16px; }
#contact .section-sub { max-width: 46ch; }

.form { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
    font-family: var(--mono); font-size: 10.5px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
    transition: color 200ms;
}
.field input, .field select, .field textarea {
    padding: 9px 0; background: transparent;
    border: none; border-bottom: 1px solid var(--rule-strong);
    border-radius: 0; font-size: 16px; color: var(--text);
    transition: border-color 200ms, box-shadow 200ms;
    -webkit-appearance: none;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field select {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23656F79' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 2px center; padding-right: 28px;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 0 var(--accent);
}
.field:focus-within label { color: var(--accent-text); }
.cf-turnstile { transform: scale(0.85); transform-origin: left; opacity: 0.7; }
.form .btn { align-self: flex-start; }
.form-status { font-size: 13.5px; }
.form-status.success { color: var(--accent-text); }
.form-status.error { color: #C7302B; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--rule); padding: 30px 0; }
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
    font-size: 13px; color: var(--text-3);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-3); transition: color 150ms; }
.footer-links a:hover { color: var(--text); }

/* ==========================================================================
   Reveal (hooks set by main.js)
   ========================================================================== */
.section, .cred-section {
    opacity: 0; transform: translateY(16px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.section.visible, .cred-section.visible { opacity: 1; transform: none; }
.hero-content { opacity: 0; animation: up 700ms cubic-bezier(0.16, 1, 0.3, 1) 200ms forwards; }
.hero-stats { opacity: 0; animation: up 700ms cubic-bezier(0.16, 1, 0.3, 1) 480ms forwards; }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
    :root { --gut: 168px; --gut-gap: 32px; }
}

@media (max-width: 1000px) {
    :root { --gut: 0px; --gut-gap: 0px; }

    .section-head { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
    .section-head .eyebrow { grid-column: 1; grid-row: 1; padding-top: 0; margin-bottom: 16px; }
    .section-head h2 { grid-column: 1; grid-row: 2; }
    .section-sub { grid-column: 1; grid-row: 3; }

    .callout { margin-left: 0; padding: 36px 44px; max-width: 30ch; }

    .gap-block { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
    .gap-label { grid-column: 1; grid-row: 1; padding: 0; }
    .gap-grid { grid-column: 1; grid-row: 2; column-gap: 40px; }

    /* the hanging structures stack: label above the thing it labels */
    #problem .card { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 26px 0 28px; }
    .role { grid-template-columns: minmax(0, 1fr); row-gap: 5px; }
    .team-featured { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
    .team-featured img { width: 184px; }

    .bento { column-gap: 40px; }

    #regulatory { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    #regulatory::before { grid-row: 1; }
    #regulatory .section-head { grid-column: 1; grid-row: 1; margin-bottom: 48px; }
    #regulatory .tri-grid { grid-column: 1; grid-row: 2; padding-top: 0; }
    #regulatory .card:first-child { padding-top: 0; }
    #regulatory .card + .card { border-top: 1px solid var(--rule); }
    #regulatory .gap-block { grid-column: 1; grid-row: 3; margin-top: 56px; }
    #regulatory .gap-grid { grid-template-columns: repeat(2, 1fr); row-gap: 0; }

    #contact .wrap { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    #contact .wrap::before { grid-row: 1; }
    #contact .section-head { grid-column: 1; grid-row: 2; padding-top: 26px; margin-bottom: 48px; }
    #contact .section-sub { max-width: 58ch; }
    .form { grid-column: 1; grid-row: 3; max-width: 520px; }
}

@media (max-width: 900px) {
    .nav-links a:not(.nav-cta) { display: none; }
    .nav-links { gap: 0; }

    .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 56px; }
    .hero-stats { gap: 26px 44px; }
    .trust-name { font-size: 19px; }

    /* .wf-arrow siblings are display:none but still count, so children 5-7
       are steps 3 and 4 — the second row. */
    .workflow { grid-template-columns: repeat(2, 1fr); column-gap: 28px; row-gap: 0; margin-bottom: 60px; }
    .wf-step:nth-child(n + 5) { margin-top: 38px; }

    .bento { grid-template-columns: minmax(0, 1fr); }
    .card-wide { grid-column: span 1; padding-bottom: 44px; }

    .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .demo-fig figcaption { padding-right: 0; }

    #market .tri-grid { grid-template-columns: minmax(0, 1fr); }
    #market .card { padding: 26px 0 0; border-top: 1px solid var(--rule); }
    #market .card:first-child { padding-top: 0; border-top: none; }
    #market .card + .card { padding-left: 0; border-left: none; }

    .phase-grid { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }

    #pilot .tri-grid { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }

    .quad-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
    .quad-grid .card:nth-child(odd) { padding-left: 0; border-left: none; }
    .quad-grid .card:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--rule); }

    .team-featured img { width: 168px; }

    .form-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .section { padding: 76px 20px; }
    #roadmap { padding: 88px 20px; }
    #demo { padding: 68px 20px; }
    #traction { padding: 60px 20px; }
    #contact { padding-bottom: 88px; }
    .nav { padding: 0 20px; }
    .footer-inner { padding: 0 20px; }
    .hero { padding-left: 20px; padding-right: 20px; }

    .section-head { margin-bottom: 44px; }

    #problem .card { grid-template-columns: minmax(0, 1fr); row-gap: 7px; padding: 24px 0 26px; }

    .gap-grid { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
    #regulatory .gap-grid { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }

    .workflow { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .wf-step { padding: 20px 0 24px; }   /* stacked: keep each rule off the row above */
    .wf-step:nth-child(n + 5) { margin-top: 0; }
    .wf-icon { height: 22px; margin-bottom: 12px; }

    .callout { margin-top: 56px; padding: 32px 28px; max-width: none; }
    .callout::before, .callout::after { width: 18px; height: 18px; }

    .quad-grid { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
    .quad-grid .card:nth-child(even) { padding-left: 0; border-left: none; }
    .quad-grid .card { padding-right: 0; }

    .lane-link { align-items: flex-start; }

    .ruo-inline { margin-top: 48px; padding-left: 18px; }
    .roles { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
    .section, .cred-section { opacity: 1; transform: none; }
    .hero-content, .hero-stats { opacity: 1; }
}

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

/* ==========================================================================
   Careers — /careers/ is a page about Ferto in the homepage's grammar;
   each role under /careers/<name> is a standalone ad with a sticky aside.
   ========================================================================== */

/* ---- index hero: copy left, the rig right, trust strip below ---- */
.hero-careers { min-height: 0; padding-bottom: 64px; }
.hero-careers .hero-content {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    column-gap: 72px; align-items: center;
}
.hero-careers h1 { font-size: clamp(36px, 5.2vw, 66px); }
.hero-fig { margin: 0; }
.hero-fig img { width: 100%; height: auto; border-radius: 2px; }
.hero-fig figcaption {
    margin-top: 14px; font-family: var(--mono); font-size: 11px;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}
.hero-careers .hero-stats { margin-top: 72px; }
.hero-careers + .section { padding-top: 96px; }
.hero-careers .hero-lead + .hero-lead { margin-top: 14px; }


/* ---- how we work ---- */
.careers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px 40px; }
.careers-grid .card { padding-top: 22px; border-top: 1px solid var(--rule-strong); }
.careers-grid .card h3 {
    margin-top: 12px; font-size: 19px; font-weight: 600;
    letter-spacing: -0.025em; color: var(--text); line-height: 1.3;
}
.careers-grid .card p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* ---- open roles: each row is one link ---- */
.job-list { border-top: 1px solid var(--rule-strong); }
.job-row {
    display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) 48px;
    column-gap: 48px; align-items: start;
    padding: 30px 0 32px; border-bottom: 1px solid var(--rule);
    transition: background 200ms;
}
.job-row:hover { background: var(--accent-wash); box-shadow: 0 0 0 20px var(--accent-wash); }
.job-row h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.028em; color: var(--text); line-height: 1.2; }
.job-row .role-meta { margin-top: 8px; }
.job-row p { font-size: 15.5px; line-height: 1.6; color: var(--text-2); max-width: 56ch; padding-top: 4px; }
.job-row .arrow {
    justify-self: end; margin-top: 2px;
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--rule-strong); color: var(--text-2);
    transition: background 200ms, color 200ms, border-color 200ms, transform 200ms;
}
.job-row:hover .arrow { background: var(--text); color: #fff; border-color: var(--text); transform: translateX(3px); }
.job-row .arrow svg { width: 16px; height: 16px; }
.role-meta {
    display: block; margin-top: 5px;
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.lane-link a[href^="mailto"].btn { white-space: nowrap; }

/* ---- the ad ---- */
.ad { padding-top: calc(var(--nav-h) + 44px); padding-bottom: 120px; }
.back-link {
    display: inline-block;
    font-family: var(--mono); font-size: 12px; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
    border-bottom: 1px solid var(--rule-strong);
    transition: color 200ms, border-color 200ms;
}
.back-link:hover { color: var(--accent-text); border-color: var(--accent); }
.ad-head {
    margin-top: 40px; padding: 28px 0 40px; border-top: 1px solid var(--rule);
}
.ad-head h1 {
    font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; line-height: 1.08;
    letter-spacing: -0.035em; color: var(--text); text-wrap: balance; max-width: 18ch;
}
.ad-head h1 .mfd { font-size: 0.5em; font-weight: 500; color: var(--text-3); letter-spacing: -0.01em; white-space: nowrap; }
.ad-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ad-tags span {
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
    padding: 7px 11px; border: 1px solid var(--rule-strong); border-radius: 2px;
}

.ad-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 80px; align-items: start;
}
.ad-main { max-width: 68ch; }
.ad-section { padding: 36px 0 40px; border-top: 1px solid var(--rule); }
.ad-section:first-child { border-top: none; padding-top: 0; }
.ad-section h2 {
    font-size: 21px; font-weight: 600; letter-spacing: -0.028em; color: var(--text);
    line-height: 1.25; margin-bottom: 18px;
}
.ad-section p { font-size: 16.5px; line-height: 1.68; color: var(--text-2); }
.ad-section p + p { margin-top: 14px; }
.ad-section ul { list-style: none; }
.ad-section li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.ad-section li + li { margin-top: 6px; }
.ad-section li::before {
    content: ''; position: absolute; left: 2px; top: 0.72em;
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.ad-section li strong { color: var(--text); font-weight: 600; }
.ad-section a { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--rule-strong); transition: color 200ms, border-color 200ms; }
.ad-section a:hover { color: var(--accent-text); border-color: var(--accent); }

.ad-aside { position: sticky; top: calc(var(--nav-h) + 28px); }
.glance { padding: 26px 26px 24px; background: var(--tint); border-radius: 3px; }
.glance h2 {
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
    margin-bottom: 18px;
}
.glance dl { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 12px; font-size: 14.5px; }
.glance dt { color: var(--text-3); }
.glance dd { color: var(--text); font-weight: 500; }
.ad .lane-link { margin-top: 72px; }

@media (max-width: 1000px) {
    .hero-careers .hero-content { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
    .hero-fig { max-width: 360px; }
    .job-row { grid-template-columns: minmax(0, 1fr) 44px; row-gap: 12px; }
    .job-row p { grid-column: 1 / -1; padding-top: 0; }
    .ad-grid { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
    .ad-aside { position: static; }
}
@media (max-width: 900px) {
    .careers-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
    .hero-careers .hero-stats { gap: 24px 40px; }
    .job-row:hover { box-shadow: none; background: none; }
    .ad { padding-bottom: 88px; }
}
