/* ================================================================
   Reviplan marketing site (redesign 30.10.2026). One family (Source Sans 3), one
   action colour (navy), one signal colour (Thurgau green).
   ================================================================ */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('fonts/SourceSans3-latin.woff2') format('woff2');
}

:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --tint-navy: #edf2f8;    /* top of every light section (.grad) */
    --bg-footer: #f5f5f7;    /* footer stays neutral grey */
    --ink: #1d1d1f;          /* 16.8:1 on bg */
    --ink-2: #6e6e73;        /* 5.1:1 on bg; darker inside .grad, see there */
    --line: #d2d2d7;
    --action: #143756;       /* Brand Navy (docs/06_design.md), 12.3:1 */
    --action-hover: #0f2747;
    --on-action: #ffffff;
    --check: #1e6e46;        /* Thurgau green: "geprüft / sicher", 6.2:1 */
    --check-soft: rgba(30, 110, 70, 0.10);
    --focus: #2b6cd4;
    --night: #0b1d30;        /* dark section */
    --night-ink: #f5f5f7;    /* 15.7:1 on night */
    --night-ink-2: #a1a1a6;  /* 6.6:1 on night */
    --night-check: #5fc48f;  /* 7.9:1 on night */
    --frame: #1d1d1f;
    --nav-bg: rgba(255, 255, 255, 0.76);
    --shadow: 0 30px 80px -30px rgba(16, 40, 63, 0.35), 0 8px 24px -12px rgba(16, 40, 63, 0.18);

    --font: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --w: 1180px;
    --w-text: 40rem;
    --pad: clamp(1rem, 4vw, 2.5rem);
    --section: clamp(5rem, 11vw, 9.5rem);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --nav-h: 76px;
    --logo-h: 44px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #000000;
        --tint-navy: #0f1a26;
        --bg-footer: #161617;
        --ink: #f5f5f7;
        --ink-2: #a1a1a6;     /* 6.8:1 on the dark tint */
        --line: #3a3a3c;
        --action: #8ab4ff;
        --action-hover: #a9c7ff;
        --on-action: #0b1d30;
        --check: #5fc48f;
        --check-soft: rgba(95, 196, 143, 0.14);
        --focus: #8ab4ff;
        --night: #0b1d30;
        --frame: #2c2c2e;
        --nav-bg: rgba(22, 22, 23, 0.74);
        --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    }
    :root:not([data-theme="light"]) .brand img { filter: brightness(0) invert(1); }
}
:root[data-theme="dark"] {
    --bg: #000000; --tint-navy: #0f1a26; --bg-footer: #161617; --ink: #f5f5f7; --ink-2: #a1a1a6; --line: #3a3a3c;
    --action: #8ab4ff; --action-hover: #a9c7ff; --on-action: #0b1d30; --check: #5fc48f;
    --check-soft: rgba(95, 196, 143, 0.14); --focus: #8ab4ff; --frame: #2c2c2e;
    --nav-bg: rgba(22, 22, 23, 0.74); --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
:root[data-theme="dark"] .brand img { filter: brightness(0) invert(1); }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'kern', 'liga';
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--action); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.container { max-width: var(--w); margin: 0 auto; padding: 0 var(--pad); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Type scale ---- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; color: var(--ink); }
h1, h2 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.03; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); line-height: 1.06; letter-spacing: -0.03em; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; }
.kicker { font-size: 1.0625rem; font-weight: 600; color: var(--check); margin-bottom: 0.75rem; letter-spacing: 0; }
.lead { font-size: clamp(1.1875rem, 1.9vw, 1.5rem); line-height: 1.45; color: var(--ink-2); max-width: var(--w-text); }
.lead strong { color: var(--ink); font-weight: 600; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---- Buttons and links ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    min-height: 50px; padding: 0.85rem 1.7rem; border-radius: 980px;
    font: 600 1.0625rem/1 var(--font); text-decoration: none;
    background: var(--action); color: var(--on-action);
    transition: background 0.2s;
}
.btn:hover { background: var(--action-hover); }
.btn-nav { min-height: 48px; padding: 0.7rem 1.6rem; font-size: 1.0625rem; }
.more { font-size: 1.1875rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.more::after { content: '›'; margin-left: 0.3em; font-size: 1.3em; line-height: 0; transform: translateY(-0.04em); }
.more:hover { text-decoration: underline; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; }
.ctas.center { justify-content: center; }

/* ---- Navigation: the only translucent layer ---- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
@media (prefers-reduced-transparency: reduce) { .nav { background: var(--bg); backdrop-filter: none; } }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: var(--logo-h); width: auto; }
.nav-links { display: flex; align-items: center; gap: 2.25rem; list-style: none; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--action); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); width: 44px; height: 44px; margin-right: -10px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }
@media (max-width: 860px) {
    .nav-toggle { display: grid; }
    .nav-links {
        display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 0.5rem var(--pad) 1.25rem;
    }
    .nav-links.open { display: flex; }
    .nav-links li a:not(.btn) { display: flex; align-items: center; min-height: 48px; font-size: 1.1875rem; border-bottom: 1px solid var(--line); }
    .nav-links .btn { margin-top: 1rem; width: 100%; }
}

/* ---- Sections ---- */
section { padding: var(--section) 0; }
/* Every light section: light navy fading to white over the first 600 px */
.grad { background: linear-gradient(180deg, var(--tint-navy) 0, var(--bg) 600px); }
@media (prefers-color-scheme: light) { .grad { --ink-2: #5e5e64; } }   /* 5.7:1 on the light navy top */
:root[data-theme="light"] .grad { --ink-2: #5e5e64; }
.head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.head .lead { margin-top: 1.25rem; }
.head.center .lead { margin-left: auto; margin-right: auto; }

/* ---- Screen frame (neutral, no device brand) ---- */
.screen {
    position: relative; display: block; width: 100%;
    padding: clamp(5px, 0.8vw, 10px); border-radius: clamp(12px, 1.6vw, 20px);
    background: var(--frame); box-shadow: var(--shadow);
    border: 0; cursor: zoom-in; text-align: left; font: inherit; color: inherit;
}
.screen img { border-radius: clamp(7px, 1vw, 11px); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: #f2f2f2; }
.screen-flat { box-shadow: none; padding: clamp(4px, 0.6vw, 7px); }
.screen-video { cursor: auto; max-width: 1180px; margin: 0 auto; }
.screen-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: clamp(7px, 1vw, 11px); background: #0b1d30; }

/* ---- Hero ---- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; text-align: center; overflow: hidden; }
.hero .kicker { margin-bottom: 1rem; }
.hero h1 { max-width: 13em; margin: 0 auto; text-wrap: balance; }
.hero .lead { margin: 1.5rem auto 2rem; }
.hero-shot { margin-top: clamp(3rem, 7vw, 5rem); padding-bottom: var(--section); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; margin-top: 2rem; list-style: none; color: var(--ink-2); font-size: 1rem; }
.facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.tick { width: 18px; height: 18px; flex: none; color: var(--check); }

/* ---- Comparison ---- */
.compare { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 1.15rem 1rem 1.15rem 0; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); padding-top: 0; }
.compare tbody th { font-weight: 600; width: 24%; }
.compare td:nth-child(2) { color: var(--ink-2); width: 36%; }
.compare td:nth-child(3) { font-weight: 600; }
.compare thead th:nth-child(3) { color: var(--check); }
.compare td:nth-child(3) .tick { display: inline-block; vertical-align: -6px; margin-right: 0.5rem; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--check-soft); }
@media (max-width: 700px) {
    .compare thead { display: none; }
    .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto !important; }
    .compare tr { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
    .compare th, .compare td { border: 0; padding: 0.15rem 0; }
    .compare tbody th { margin-bottom: 0.35rem; }
    .compare td:nth-child(2)::before { content: 'Heute: '; font-weight: 600; }
}

/* ---- Signature: one Prüfhandlung, everything beside it ---- */
.story { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.story-stage { position: sticky; top: calc(var(--nav-h) + 4vh); }
.shot-map { position: relative; }
.hl {
    position: absolute; border-radius: 8px;
    border: 2.5px solid var(--check);
    /* the dimming lives in .dim (one SVG mask), so a step can light several boxes */
    opacity: 0; transition: opacity 0.45s var(--ease);
    pointer-events: none;
}
.hl.on { opacity: 1; }
.dim { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.45s var(--ease); pointer-events: none; }
.dim.on { opacity: 1; }
/* Steps 5 and 8–10 swap in their own screenshot (Ratgeber, Prüfbelege, Feststellungen, Stellungnahme) */
.screen img.shot-alt { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 0.45s var(--ease); }
.screen img.shot-alt.on { opacity: 1; }
.pin { transition: opacity 0.3s; }
.pin.alt-pin { opacity: 0; }
/* Scroll story: each step shows only its own pin */
.shot-map[data-active] .pin { opacity: 0; }
.shot-map[data-active="1"] .pin[data-pin="1"],
.shot-map[data-active="2"] .pin[data-pin="2"],
.shot-map[data-active="3"] .pin[data-pin="3"],
.shot-map[data-active="4"] .pin[data-pin="4"],
.shot-map[data-active="5"] .pin[data-pin="5"],
.shot-map[data-active="6"] .pin[data-pin="6"],
.shot-map[data-active="7"] .pin[data-pin="7"],
.shot-map[data-active="8"] .pin[data-pin="8"],
.shot-map[data-active="9"] .pin[data-pin="9"],
.shot-map[data-active="10"] .pin[data-pin="10"] { opacity: 1; }
.screen-clip { display: block; position: relative; overflow: hidden; border-radius: clamp(7px, 1vw, 11px); }
/* Pins scale with the screenshot, so they stay inside it at every width */
.shot-map { container-type: inline-size; }
.pin {
    --pin: clamp(16px, 2.8cqi, 24px);
    position: absolute; transform: translate(-50%, -50%);
    /* --x/--y place the pin; near an edge it is pulled inside the screenshot */
    left: clamp(calc(var(--pin) / 2 + 3px), var(--x), calc(100% - var(--pin) / 2 - 3px));
    top: clamp(calc(var(--pin) / 2 + 3px), var(--y), calc(100% - var(--pin) / 2 - 3px));
    width: var(--pin); height: var(--pin); border-radius: 50%;
    background: var(--check); color: #fff; font-size: calc(var(--pin) * 0.55); font-weight: 700; line-height: 1;
    display: grid; place-items: center; box-shadow: 0 0 0 2px #fff;
}
.steps { list-style: none; counter-reset: s; }
.step { min-height: 34vh; display: flex; flex-direction: column; justify-content: center; padding: 1rem 0; color: var(--ink-2); transition: color 0.3s; }
.step:first-child { min-height: 30vh; justify-content: flex-start; padding-top: 3rem; }
.step:last-child { min-height: 50vh; }
.step h3 { display: flex; gap: 0.75rem; align-items: baseline; font-size: clamp(1.3rem, 2vw, 1.6rem); color: inherit; transition: color 0.3s; }
.step h3::before {
    counter-increment: s; content: counter(s);
    flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    font-size: 0.9375rem; background: var(--line); color: var(--ink); transform: translateY(-2px);
}
.step p { margin-top: 0.6rem; font-size: 1.1875rem; line-height: 1.5; }
.step-list { margin-top: 0.6rem; padding-left: 1.2rem; font-size: 1.1875rem; line-height: 1.5; }
.step-list li + li { margin-top: 0.3rem; }
.step.on { color: var(--ink); }
.step.on h3::before { background: var(--check); color: #fff; }
/* Without JS or with reduced motion: no sticky, no dimming, pins stay */
html:not(.js) .step, .no-motion .step { min-height: 0; padding: 1.25rem 0; color: var(--ink); }
html:not(.js) .story-stage, .no-motion .story-stage { position: static; }
@media (max-width: 960px) {
    .story { grid-template-columns: 1fr; gap: 0; }
    /* Phones and tablets: the screenshot stays pinned under the nav, the steps scroll beneath it */
    .story-stage { top: var(--nav-h); z-index: 2; margin: 0 calc(-1 * var(--pad)); padding: 12px var(--pad); background: var(--bg); }
    .step, .step:first-child { min-height: 0; justify-content: flex-start; padding: 1.5rem 0 2.5rem; }
    .step:last-child { min-height: 55vh; }
    .step h3 { font-size: 1.3rem; }
    .step p, .step-list { font-size: 1.0625rem; }
    .hl { border-width: 2px; border-radius: 5px; }
    html:not(.js) .step h3::before, .no-motion .step h3::before { background: var(--check); color: #fff; }
}

/* ---- Chapters (image + three lines) ---- */
.chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.chapter + .chapter { margin-top: clamp(4.5rem, 10vw, 8rem); }
.chapter.flip { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.chapter.flip .chapter-text { order: 2; }
.chapter-text p { margin-top: 1rem; font-size: 1.1875rem; color: var(--ink-2); }
.chapter-text p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
    .chapter, .chapter.flip { grid-template-columns: 1fr; }
    .chapter.flip .chapter-text { order: 0; }
}

/* ---- Tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; margin-top: clamp(4rem, 9vw, 7rem); }
.tile { grid-column: span 2; background: var(--bg); border-radius: 22px; padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.6rem; overflow: hidden; }
.grad .tile { background: var(--tint-navy); }
.tile.wide { grid-column: span 3; }
.tile h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
.tile p { color: var(--ink-2); font-size: 1.0625rem; }
.tile .screen { margin-top: auto; padding-top: 1.25rem; background: none; box-shadow: none; padding: 1.25rem 0 0; }
.tile .screen img { box-shadow: 0 0 0 1px var(--line); }
.tile-icon { width: 48px; height: 48px; padding: 11px; border-radius: 50%; background: var(--check-soft); color: var(--check); margin-bottom: 0.4rem; }
@media (max-width: 960px) { .tile, .tile.wide { grid-column: span 3; } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } .tile, .tile.wide { grid-column: auto; } }

/* ---- Catalogues ---- */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card { border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.5rem, 3vw, 2rem); }
.card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-2); }
.card .label { display: inline-block; font-size: 0.875rem; font-weight: 600; color: var(--check); background: var(--check-soft); border-radius: 980px; padding: 0.15rem 0.7rem; margin-bottom: 1rem; }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }

/* ---- Security (the one dark section) ---- */
.night { background: var(--night); color: var(--night-ink); }
.night h2, .night h3 { color: var(--night-ink); }
.night .kicker { color: var(--night-check); }
.night .lead { color: var(--night-ink-2); }
.night a { color: var(--night-check); }
.sec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.sec-grid svg { width: 32px; height: 32px; color: var(--night-check); margin-bottom: 1rem; }
.sec-grid h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.sec-grid p { color: var(--night-ink-2); }
.sec-note { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.5rem; border-top: 1px solid rgba(245, 245, 247, 0.16); color: var(--night-ink-2); font-size: 0.9375rem; }
@media (max-width: 960px) { .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sec-grid { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faq { max-width: 52rem; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer; min-height: 64px; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
    font-size: clamp(1.15rem, 1.8vw, 1.375rem); font-weight: 600; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0.25rem; font-size: 1.75rem; font-weight: 300; color: var(--ink-2); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p + p { margin-top: -0.75rem; }
.faq details p { padding: 0 2.5rem 1.5rem 0; color: var(--ink-2); font-size: 1.125rem; }

/* ---- CTA and footer ---- */
.cta { text-align: center; }
.cta .lead { margin: 1.25rem auto 2.25rem; }
footer { background: var(--bg-footer); color: var(--ink-2); font-size: 0.9375rem; padding: 3rem 0 2.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.6fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
footer h2 { font-size: 0.9375rem; letter-spacing: 0; color: var(--ink); margin-bottom: 0.6rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 0.35rem; }
footer a { color: var(--ink-2); }
footer a:hover { color: var(--ink); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding-top: 1.25rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
footer address { font-style: normal; }
.foot-privacy { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.foot-privacy summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 44px; display: flex; align-items: center; }
.foot-privacy p { max-width: 52rem; margin-top: 0.6rem; }
.foot-privacy summary { list-style: none; gap: 0.5rem; }
.foot-privacy summary::-webkit-details-marker { display: none; }
.foot-privacy summary::after { content: '+'; font-weight: 300; font-size: 1.25rem; color: var(--ink-2); transition: transform 0.25s var(--ease); }
.foot-privacy[open] summary::after { transform: rotate(45deg); }

/* ---- Reveal (only with JS and motion allowed) ---- */
.js:not(.no-motion) .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js:not(.no-motion) .reveal.in { opacity: 1; transform: none; }

/* ---- Lightbox (native dialog) ---- */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lb::backdrop { background: rgba(0, 0, 0, 0.86); }
.lb-inner { width: 100%; height: 100%; display: grid; place-items: center; padding: 3.5rem 1rem 1rem; overflow: auto; }
.lb img { max-width: min(96vw, 2560px); max-height: calc(100vh - 5rem); width: auto; border-radius: 10px; cursor: zoom-in; }
.lb.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-close { position: fixed; top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 1.6rem; cursor: pointer; }
.lb-cap { position: fixed; top: 1.1rem; left: 1rem; right: 4rem; color: #f5f5f7; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
