/* kWise marketing site - shared styles for all languages.
   No build step and no external requests on purpose (fast, privacy-friendly,
   works from a plain static file server). The two typefaces are self-hosted
   WOFF2 subsets in /assets/fonts/ (SIL OFL licensed). */

/* ---------------------------------------------------------------- fonts */

/* Inter — latin */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(/assets/fonts/inter-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter — latin-ext */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(/assets/fonts/inter-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Grotesk — latin */
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url(/assets/fonts/space-grotesk-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Grotesk — latin-ext */
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url(/assets/fonts/space-grotesk-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------- tokens */

:root {
    --color-primary: #17a24d;
    --color-primary-dark: #128a41;
    --color-primary-deep: #0d6b33;
    --color-primary-light: #e5f6ec;
    --color-accent: #00589a;
    --color-accent-dark: #003e72;
    --color-accent-light: #e8f1f9;
    --color-sun: #f7b32b;
    --color-sun-light: #fdf3dd;
    --color-bg: #ffffff;
    --color-bg-alt: #f4f8f6;
    --color-surface: #ffffff;
    --color-ink: #0e1f17;
    --color-text: #16261e;
    --color-text-muted: #52645b;
    --color-border: #e2eae5;
    --color-border-strong: #cddcd4;
    --color-danger: #c0392b;
    --color-footer-bg: #0d1f16;
    --color-footer-text: #b9cdc2;
    --color-footer-head: #8aa697;
    --grid-line: rgba(13, 107, 51, 0.10);
    --glow-primary: rgba(23, 162, 77, 0.16);
    --glow-accent: rgba(0, 88, 154, 0.13);
    --shadow-sm: 0 1px 2px rgba(14, 31, 23, 0.05), 0 1px 1px rgba(14, 31, 23, 0.04);
    --shadow-md: 0 6px 20px rgba(14, 31, 23, 0.08), 0 2px 6px rgba(14, 31, 23, 0.05);
    --shadow-lg: 0 32px 80px rgba(14, 31, 23, 0.16), 0 8px 24px rgba(14, 31, 23, 0.08);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-width: 1200px;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: #34c073;
        --color-primary-dark: #2aa862;
        --color-primary-deep: #7fe0ab;
        --color-primary-light: #12301f;
        --color-accent: #5aa9e6;
        --color-accent-dark: #8cc4f2;
        --color-accent-light: #10263a;
        --color-sun: #f7b32b;
        --color-sun-light: #2e2510;
        --color-bg: #0f1513;
        --color-bg-alt: #131b17;
        --color-surface: #182220;
        --color-ink: #eef4f1;
        --color-text: #e5eee9;
        --color-text-muted: #9db3a8;
        --color-border: #253430;
        --color-border-strong: #34474f;
        --color-footer-bg: #0a110d;
        --color-footer-text: #a4baaf;
        --color-footer-head: #6d8779;
        --grid-line: rgba(52, 192, 115, 0.09);
        --glow-primary: rgba(52, 192, 115, 0.13);
        --glow-accent: rgba(90, 169, 230, 0.10);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);
        color-scheme: dark;
    }
}

/* ----------------------------------------------------------------- base */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16.5px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--color-accent); }

code {
    font-size: 0.88em;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1px 6px;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: color-mix(in srgb, var(--color-primary) 25%, transparent); }

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

section { padding: 104px 0; }
section.tight { padding: 72px 0; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.12;
    font-weight: 700;
    margin: 0 0 18px;
    letter-spacing: -0.015em;
    color: var(--color-ink);
    text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.3; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 16px; color: var(--color-text-muted); }
p strong { color: var(--color-text); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 300;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}
.skip-link:focus-visible { left: 12px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary-deep);
    background: var(--color-primary-light);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    padding: 7px 15px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.section-head { max-width: 720px; margin: 0 0 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.08rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.two-col.middle { align-items: center; }

.band {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

/* -------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 16px color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.btn-primary:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 88%, #fff), var(--color-primary-dark));
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 24px color-mix(in srgb, var(--color-primary) 42%, transparent);
}
.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary-deep); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; border-radius: 14px; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* --------------------------------------------------------------- header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--color-bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--color-border); box-shadow: 0 4px 20px rgba(14, 31, 23, 0.06); }
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
    gap: 20px;
}
/* Fixed brand blue, matching logo.svg exactly — the wordmark's own colour,
   not a UI accent, so it doesn't shift in dark mode. */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #00589a;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}
@media (prefers-color-scheme: dark) { .brand { color: #7db8e8; } }
.brand img { height: 32px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 13px;
    border-radius: 9px;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--color-bg-alt); color: var(--color-primary-deep); }
.main-nav a[aria-current="page"] { color: var(--color-primary-deep); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { position: relative; }
.lang-switch summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-surface);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { border-color: var(--color-border-strong); }
.lang-switch[open] summary { border-color: var(--color-primary); }
.lang-switch ul {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 170px;
}
.lang-switch li a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.92rem;
}
.lang-switch li a:hover { background: var(--color-primary-light); color: var(--color-primary-deep); }
.lang-switch li a[aria-current="true"] { font-weight: 700; color: var(--color-primary-deep); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
}
.icon-btn:hover { border-color: var(--color-primary); color: var(--color-primary-deep); }
.icon-btn svg { width: 20px; height: 20px; }

.btn-login { padding: 10px 20px 10px 16px; }
.btn-login svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }

/* ----------------------------------------------------------------- hero */

.hero {
    position: relative;
    padding: 88px 0 72px;
    overflow: hidden;
}
.hero::before {
    /* grid pattern = the electricity network, fading out downwards */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 30%, transparent 78%);
    mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 30%, transparent 78%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(760px 420px at 12% -6%, var(--glow-primary), transparent 68%),
        radial-gradient(720px 400px at 94% 4%, var(--glow-accent), transparent 66%),
        radial-gradient(480px 300px at 78% 88%, color-mix(in srgb, var(--color-sun) 9%, transparent), transparent 70%);
    pointer-events: none;
}
.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent {
    background: linear-gradient(92deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead { font-size: 1.16rem; max-width: 50ch; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.hero .cta-row { margin-top: 30px; }

.hero .trust-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 36px;
    max-width: 440px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
}
.hero .trust-row .stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-ink);
}
.hero .trust-row .stat span { font-size: 0.83rem; color: var(--color-text-muted); }

.browser-frame {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.hero .browser-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 14%, transparent) inset;
    pointer-events: none;
}
.browser-frame .bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 16px;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}
.browser-frame .bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--color-border-strong); }
.browser-frame .bar span:nth-child(1) { background: #f28b82; }
.browser-frame .bar span:nth-child(2) { background: #fdd663; }
.browser-frame .bar span:nth-child(3) { background: #81c995; }
.browser-frame .shot-wrap { aspect-ratio: 16/20; }

/* Clickable, zoomable product shots — used by the hero browser-frame and
   every feature card. The wrapper clips the hover zoom to its own frame. */
.shot-wrap { aspect-ratio: 16/10; background: var(--color-bg-alt); overflow: hidden; cursor: zoom-in; }
.shot-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; transition: transform 0.35s ease; }
.shot-wrap:hover img { transform: scale(1.05); }

/* ------------------------------------------------------- process / steps */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.step {
    position: relative;
    counter-increment: step;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 26px 24px 24px;
    box-shadow: var(--shadow-sm);
}
.step::before {
    content: counter(step, decimal-leading-zero);
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-primary-deep);
    background: var(--color-primary-light);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    border-radius: 10px;
    padding: 5px 11px;
    margin-bottom: 16px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { font-size: 0.94rem; margin: 0; }
.step:not(:last-child)::after {
    /* connector arrow between the cards */
    content: "";
    position: absolute;
    top: 50%;
    right: -20px;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--color-border-strong);
    border-right: 2px solid var(--color-border-strong);
    transform: translateY(-50%) rotate(45deg);
}

/* --------------------------------------------------------- feature grid */

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
}
.feature-card .body { padding: 24px 24px 28px; }
.feature-card .icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--color-primary-light); color: var(--color-primary-deep);
    display: flex; align-items: center; justify-content: center; margin-bottom: 15px;
}
.feature-card .icon svg { width: 21px; height: 21px; }
.feature-card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.feature-card p { margin-bottom: 0; font-size: 0.95rem; }

/* compact cards without screenshot (secondary features) */
.feature-card.compact { flex-direction: row; align-items: flex-start; gap: 0; }
.feature-card.compact .icon { flex: none; margin: 24px 0 0 24px; }
.feature-card.compact .body { padding: 22px 22px 24px 18px; }
.feature-card.compact h3 { font-size: 1.05rem; }
.feature-card.compact p { font-size: 0.92rem; }

.more-features { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.section-cta { margin-top: 48px; text-align: center; }

/* --------------------------------------------------------- vZEV teaser */

.vzev {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.vzev .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.req-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 14px; }
.req-list li { display: flex; gap: 13px; align-items: flex-start; font-size: 0.98rem; color: var(--color-text); }
.req-list li .check {
    flex: none; width: 25px; height: 25px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary) 40%, transparent);
}
.req-list li .check svg { width: 13px; height: 13px; }
.source-links { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; }

/* animated energy-flow illustration (vZEV explainer) */
.vzev-figure {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 26px;
}
.vzev-figure svg { width: 100%; height: auto; display: block; }
.vzev-figure .flow {
    stroke-dasharray: 7 8;
    animation: flow-dash 1.4s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -15; } }
.vzev-figure figcaption { margin-top: 14px; font-size: 0.85rem; color: var(--color-text-muted); text-align: center; }

/* -------------------------------------------------------------- pillars */

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.pillar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
}
.pillar .icon {
    width: 46px; height: 46px; border-radius: 13px;
    background: var(--color-accent-light); color: var(--color-accent);
    display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.pillar .icon svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 1.12rem; }
.pillar p { font-size: 0.94rem; margin: 0; }

/* --------------------------------------------- open source + support cta */

.support-banner {
    position: relative;
    overflow: hidden;
    /* fixed brand blues on purpose: the dark-mode --color-accent values are
       light and would wash out the white text on this banner */
    background: linear-gradient(135deg, #00589a, #003e72);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 56px;
    display: grid;
    grid-template-columns: 1.4fr auto;
    gap: 36px;
    align-items: center;
    box-shadow: var(--shadow-md);
}
.support-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse 80% 100% at 100% 0%, #000, transparent 70%);
    mask-image: radial-gradient(ellipse 80% 100% at 100% 0%, #000, transparent 70%);
    pointer-events: none;
}
.support-banner > * { position: relative; }
.support-banner h2, .support-banner p { color: #fff; }
.support-banner p { color: rgba(255, 255, 255, 0.85); margin-bottom: 0; }
.support-banner .btn-primary { background: #fff; color: #003e72; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.support-banner .btn-primary:hover { background: #eef5fb; }
.support-banner .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* --------------------------------------------------- subpage page-hero */

.page-hero {
    position: relative;
    padding: 72px 0 56px;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 85% 90% at 50% 0%, #000 25%, transparent 80%);
    mask-image: radial-gradient(ellipse 85% 90% at 50% 0%, #000 25%, transparent 80%);
    pointer-events: none;
}
.page-hero .container { position: relative; max-width: 860px; text-align: center; }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
.page-hero p.lead { font-size: 1.12rem; max-width: 60ch; margin-left: auto; margin-right: auto; }

.breadcrumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.breadcrumbs a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary-deep); }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }

/* ------------------------------------------------ feature detail pages */

.detail-list { display: grid; gap: 88px; }
.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.detail-row:nth-child(even) .detail-media { order: 2; }
.detail-media .browser-frame .shot-wrap { aspect-ratio: 16/11; }
.detail-copy h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.detail-copy .icon {
    width: 46px; height: 46px; border-radius: 13px;
    background: var(--color-primary-light); color: var(--color-primary-deep);
    display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.detail-copy .icon svg { width: 23px; height: 23px; }

.check-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 11px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.96rem; color: var(--color-text); }
.check-list li::before {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background:
        no-repeat center / 11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"),
        var(--color-primary);
}

/* small clickable thumbnail of a generated PDF (e.g. the invoice example),
   inset into a detail-copy column - reuses .shot-wrap for the lightbox
   click-to-zoom behaviour but at document (A4) proportions instead of the
   16/10 default used for app screenshots. */
.doc-preview { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.doc-preview .shot-wrap {
    flex: none;
    width: 84px;
    aspect-ratio: 1/1.4142;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}
.doc-preview span { font-size: 0.88rem; color: var(--color-text-muted); }

/* tech spec strip */
.spec-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px 44px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.spec-box .spec h4 { margin-bottom: 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-text-muted); font-family: var(--font-sans); font-weight: 700; }
.spec-box .spec p { margin: 0; font-size: 0.98rem; color: var(--color-text); font-weight: 500; }

/* --------------------------------------------------------- vZEV page */

.compare-wrap { overflow-x: auto; }
.compare {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    min-width: 640px;
}
.compare th, .compare td { padding: 15px 20px; text-align: left; vertical-align: top; }
.compare thead th {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-ink);
}
.compare tbody tr + tr th, .compare tbody tr + tr td { border-top: 1px solid var(--color-border); }
.compare tbody th { font-weight: 600; color: var(--color-text); width: 26%; font-size: 0.9rem; }
.compare td { color: var(--color-text-muted); }
.compare td.hl { color: var(--color-text); background: color-mix(in srgb, var(--color-primary-light) 45%, transparent); }

.steps-vertical { list-style: none; margin: 0; padding: 0; counter-reset: vstep; display: grid; gap: 0; }
.steps-vertical li {
    position: relative;
    counter-increment: vstep;
    padding: 0 0 36px 66px;
}
.steps-vertical li::before {
    content: counter(vstep);
    position: absolute;
    left: 0;
    top: -2px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary-light);
    border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
    color: var(--color-primary-deep);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps-vertical li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 44px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--color-border-strong), var(--color-border));
}
.steps-vertical h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps-vertical p { font-size: 0.96rem; margin-bottom: 0; }

/* FAQ accordion */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border)); }
.faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
    padding: 19px 22px;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--color-ink);
    font-family: var(--font-display);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--color-primary-deep); }
.faq-item summary .chev {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.faq-item summary .chev svg { width: 14px; height: 14px; }
.faq-item[open] summary .chev { transform: rotate(180deg); background: var(--color-primary-light); color: var(--color-primary-deep); border-color: transparent; }
.faq-item .faq-body { padding: 0 22px 20px; }
.faq-item .faq-body p { font-size: 0.97rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- footer */

.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 72px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 52px; }
.footer-grid h4 {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-footer-head);
    margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-grid a { color: var(--color-footer-text); text-decoration: none; font-size: 0.93rem; }
.footer-grid a:hover { color: #ffffff; }
.footer-brand .brand { color: #ffffff; margin-bottom: 14px; }
.footer-brand p { max-width: 36ch; font-size: 0.92rem; color: var(--color-footer-text); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--color-footer-head);
}
.footer-bottom .legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a { color: var(--color-footer-head); }
.footer-bottom a:hover { color: #ffffff; }

/* ----------------------------------------------------------- auth modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 11, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}
.modal-overlay.open { display: flex; }
.auth-modal {
    width: 100%;
    max-width: 410px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 34px;
    position: relative;
}
.auth-modal .modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.auth-modal .modal-close:hover { color: var(--color-text); }
.auth-modal h3 { margin-bottom: 6px; }
.auth-modal .modal-sub { font-size: 0.9rem; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.field input {
    width: 100%;
    padding: 12px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.98rem;
    font-family: inherit;
}
.field input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
.form-msg { font-size: 0.88rem; margin: -4px 0 14px; min-height: 1.2em; }
.form-msg.error { color: var(--color-danger); }
.form-msg.success { color: var(--color-primary-deep); }
.modal-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 0.88rem; }
button.linklike {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--color-accent); font: inherit; text-decoration: underline;
}
.auth-view { display: none; }
.auth-view.active { display: block; }

/* ------------------------------------------------------------- lightbox */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 14, 11, 0.87);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 300;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 100%; max-height: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); cursor: default; }
.lightbox-close {
    position: fixed;
    top: 20px; right: 20px;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }

/* ---------------------------------------------------------- legal pages */

.legal-page { padding: 56px 0 96px; }
.legal-page .container { max-width: 800px; }
.legal-page h2 { margin-top: 40px; }
.placeholder { background: var(--color-primary-light); color: var(--color-primary-deep); padding: 1px 6px; border-radius: 4px; font-style: italic; }

/* ------------------------------------------------------ scroll reveal */

/* Only hidden when JS is running (html.js is set by an inline script), so
   content stays visible if scripts are blocked or fail to load. */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
html.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
html.js .reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js .reveal { opacity: 1; transform: none; transition: none; }
    .vzev-figure .flow { animation: none; }
    .shot-wrap img, .btn, .feature-card { transition: none; }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1040px) {
    .steps { grid-template-columns: repeat(2, 1fr); }
    .step:not(:last-child)::after { display: none; }
    .feature-grid, .more-features { grid-template-columns: repeat(2, 1fr); }
    .pillars { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
    .spec-box { grid-template-columns: repeat(2, 1fr); }
    .hero .container { grid-template-columns: 1fr; gap: 48px; }
    .hero .browser-frame { order: -1; max-width: 640px; }
    .vzev .container { grid-template-columns: 1fr; gap: 48px; }
    .two-col { grid-template-columns: 1fr; gap: 48px; }
    .detail-row { grid-template-columns: 1fr; gap: 32px; }
    .detail-row:nth-child(even) .detail-media { order: 0; }
    .detail-list { gap: 64px; }
    .support-banner { grid-template-columns: 1fr; padding: 44px; }
    .support-banner .actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
    section { padding: 72px 0; }
    section.tight { padding: 56px 0; }
    .main-nav {
        position: fixed;
        inset: 74px 0 auto 0;
        background: var(--color-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 18px 20px 26px;
        gap: 4px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }
    .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .main-nav a { padding: 13px 14px; font-size: 1.02rem; }
    .nav-toggle { display: inline-flex; }
    .btn-login-text { display: none; }
    .btn-login { padding: 11px; border-radius: 12px; }
    .hero { padding: 56px 0 56px; }
    .hero .trust-row { gap: 24px; }
    .steps { grid-template-columns: 1fr; }
    .feature-grid, .more-features { grid-template-columns: 1fr; }
    .pillars { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .spec-box { grid-template-columns: 1fr; padding: 30px; }
    .support-banner { padding: 34px 26px; }
    .compare th, .compare td { padding: 12px 14px; }
    .steps-vertical li { padding-left: 56px; }
}
