/* =========================================================
   Nachhaltigkeits-Checker – bytearbeiter-Design
   Vorlage: design/Nachhaltigkeits-Checker.dc.html
   Kein Framework; beide Schriften lokal (OFL):
   Source Sans 3 (Ersatz fuer Freight Sans Pro), Pixelschrift VT323.
   ========================================================= */

@font-face {
    font-family: 'VT323';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/vt323-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;
}
@font-face {
    font-family: 'VT323';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/vt323-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('fonts/source-sans-3-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;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('fonts/source-sans-3-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --red: #E40713;
    --red-hover: #ff1a26;
    --red-text: #ff4a52;
    --bg: #0a0a0a;
    --black: #000;
    --fg: #f2f2f2;
    --muted: #9a9a9a;
    --soft: #cfcfcf;
    --line: #262626;
    --line-soft: #1f1f1f;
    --off: #333;
    --gutter: clamp(16px, 3vw, 44px);
    --pixel: 'VT323', monospace;
    --sans: 'Source Sans 3', Helvetica, Arial, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--red); }

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

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 8px; top: -60px;
    z-index: 10;
    padding: 10px 16px;
    background: var(--red);
    color: #fff;
}
.skip-link:focus { top: 8px; color: #fff; }

.pixel { font-family: var(--pixel); font-weight: 400; }
.square { display: block; width: 14px; height: 14px; background: var(--red); flex: 0 0 auto; }
.wrap { max-width: 1200px; margin: 0 auto; }

/* Rasterhintergrund wie in der Vorlage */
.grid-bg {
    background-color: var(--bg);
    background-image:
        linear-gradient(#161616 1px, transparent 1px),
        linear-gradient(90deg, #161616 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
}

/* ---------- Kopf ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--black);
    border-bottom: 1px solid var(--red);
    padding: 14px var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
}
.site-header__left { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; }
.brand__mark { width: 11px; height: 11px; background: var(--red); display: block; }
.brand__name { font-family: var(--pixel); font-size: 30px; line-height: 1; letter-spacing: .5px; }
.site-header__claim { font-size: 16px; color: #d6d6d6; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 16px; text-transform: uppercase; letter-spacing: .3px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid #4a4a4a;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: .4px;
    cursor: pointer;
}
.btn:hover { border-color: var(--red); color: var(--red); }
.btn--red { background: var(--red); border-color: var(--red); font-weight: 700; }
.btn--red:hover { background: var(--red-hover); border-color: var(--red-hover); color: #fff; }
.btn--big { min-height: 60px; padding: 0 30px; font-size: 19px; }
.btn[disabled] { opacity: .5; cursor: wait; }

/* ---------- Startseite ---------- */
.hero { padding: clamp(64px, 12vh, 140px) var(--gutter) clamp(56px, 10vh, 120px); }
.hero__inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 22px;
}
.kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pixel);
    font-size: 24px;
    color: var(--red);
    letter-spacing: 1px;
}
.kicker::before { content: ''; width: 9px; height: 9px; background: var(--red); display: block; }
.hero h1 {
    margin: 0;
    font-weight: 700;
    font-size: clamp(46px, 8vw, 112px);
    line-height: .98;
    letter-spacing: -1px;
    text-wrap: balance;
}
.hero__lead {
    margin: 0;
    max-width: 640px;
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.4;
    color: var(--soft);
    text-wrap: pretty;
}

.url-form {
    width: 100%;
    max-width: 760px;
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
.url-form label { font-family: var(--pixel); font-size: 20px; color: var(--muted); letter-spacing: 1px; }
.url-form__row { display: flex; flex-wrap: wrap; background: var(--black); border: 1px solid #3a3a3a; }
.url-form__row:focus-within { border-color: var(--red); }
.url-form__field { flex: 1 1 260px; display: flex; align-items: center; gap: 6px; padding: 0 18px; min-height: 68px; }
.url-form__prefix { font-family: var(--pixel); font-size: 26px; color: #6f6f6f; }
.url-form input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: #fff;
    font-family: var(--pixel);
    font-size: 28px;
    padding: 14px 0;
}
.url-form input::placeholder { color: #6f6f6f; }
.url-form button {
    flex: 1 0 auto;
    min-height: 68px;
    padding: 0 34px;
    background: var(--red);
    color: #fff;
    border: 0;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
}
.url-form button:hover { background: var(--red-hover); }
.url-form__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 16px; color: var(--muted); }
.form-error { color: var(--red-text); }

/* Laufband */
.ticker { overflow: hidden; padding: 14px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--black); }
.ticker__track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: pxticker 60s linear infinite; }
.ticker__track li { display: flex; align-items: center; gap: 28px; padding-right: 28px; font-size: 16px; color: #bdbdbd; white-space: nowrap; }
.ticker__track li::after { content: ''; width: 6px; height: 6px; background: var(--red); display: block; }
@keyframes pxticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.criteria { padding: clamp(56px, 9vh, 110px) var(--gutter); scroll-margin-top: 70px; }
.criteria__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 48px 64px;
    align-items: start;
}
.criteria__intro { display: flex; flex-direction: column; gap: 18px; }
.criteria h2, .section-title { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 700; line-height: 1.02; }
.criteria__intro p { margin: 0; font-size: 20px; line-height: 1.45; color: var(--soft); text-wrap: pretty; }
.criteria__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    border-top: 1px solid var(--line);
    counter-reset: crit;
}
.criteria__list li {
    display: flex;
    gap: 16px;
    align-items: baseline;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 19px;
    line-height: 1.3;
    counter-increment: crit;
}
.criteria__list li::before {
    content: counter(crit, decimal-leading-zero);
    font-family: var(--pixel);
    font-size: 22px;
    color: var(--red);
    min-width: 26px;
}

.statement { padding: clamp(56px, 9vh, 110px) var(--gutter); background: var(--black); border-top: 1px solid var(--line-soft); }
.statement__inner { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.statement p { margin: 0; font-size: clamp(28px, 3.6vw, 48px); font-weight: 700; line-height: 1.15; text-wrap: balance; }

/* ---------- Ladeanzeige ---------- */
.loader-screen { display: flex; align-items: center; padding: clamp(48px, 10vh, 120px) var(--gutter); }
.loader-screen[hidden] { display: none; }
.loader { width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px; }
.loader__head { display: flex; flex-direction: column; gap: 10px; }
.loader__label { font-family: var(--pixel); font-size: 22px; color: var(--muted); letter-spacing: 1px; }
.loader__url { margin: 0; font-size: clamp(36px, 6vw, 72px); font-weight: 700; line-height: 1; word-break: break-word; }
.loader__bar { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 4px; }
.loader__bar span { aspect-ratio: 1; background: #1c1c1c; display: block; }
.loader__bar span.on { background: var(--red); }
.loader__status { display: flex; justify-content: space-between; gap: 16px; font-family: var(--pixel); font-size: 26px; margin-top: 12px; }
.loader__pct { color: var(--red); }
.cursor { color: var(--red); animation: pxblink 1s steps(1) infinite; }
@keyframes pxblink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.loader__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 0 40px;
    border-top: 1px solid var(--line);
}
.loader__steps li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 18px; color: #5a5a5a; }
.loader__steps li .pixel { font-size: 20px; }
.loader__steps li.done { color: var(--fg); }
.loader__steps li.active { color: var(--red); }

/* ---------- Ergebnis ---------- */
.result-head { padding: clamp(40px, 7vh, 80px) var(--gutter) 40px; border-bottom: 1px solid var(--line-soft); }
.result-head__inner { display: flex; flex-direction: column; gap: 36px; }
.result-head__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.result-head__title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.result-head h1 { margin: 0; font-size: clamp(36px, 5.5vw, 68px); font-weight: 700; line-height: 1; word-break: break-word; }

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.kpi { background: var(--bg); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.kpi__label { font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.kpi__value { font-family: var(--pixel); font-size: 76px; line-height: .8; word-break: break-word; }
.kpi__value small { font-size: 34px; color: var(--muted); }
.kpi__value--text { font-size: 52px; line-height: .9; }
.kpi__value.is-bad { color: var(--red-text); }
.kpi__note { font-size: 16px; color: #bdbdbd; line-height: 1.35; }
.kpi--grade { background: var(--red); flex-direction: row; align-items: center; justify-content: flex-start; gap: 22px; min-height: 200px; }
.kpi--grade .kpi__grade { font-family: var(--pixel); font-size: 150px; line-height: .75; color: #fff; }
.kpi--grade .kpi__score { font-family: var(--pixel); font-size: 40px; line-height: 1; color: #fff; }
.kpi--grade .kpi__text { font-size: 17px; line-height: 1.3; color: #fff; }
.kpi__stack { display: flex; flex-direction: column; gap: 6px; }

.scan-hint { font-size: 16px; color: var(--muted); line-height: 1.4; margin: 0; max-width: 820px; }

/* Tiefen-Scan-Box */
.deep { padding: 40px var(--gutter) 0; }
.deep__box {
    border: 1px solid var(--line);
    background: var(--black);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 40px;
}
.deep__text { display: flex; flex-direction: column; gap: 6px; max-width: 720px; }
.deep__text .pixel { font-size: 22px; color: var(--red); letter-spacing: 1px; }
.deep__text p { margin: 0; font-size: 18px; line-height: 1.4; color: var(--soft); }
.deep__progress { width: 100%; display: flex; flex-direction: column; gap: 0; }
.deep__progress[hidden] { display: none; }
.deep__msg { width: 100%; margin: 0; font-size: 17px; }
.deep__msg:empty { display: none; }
.deep__msg.is-error { color: var(--red-text); }

/* Einzelpruefungen */
.checks { padding: 40px var(--gutter) clamp(56px, 9vh, 100px); }
.checks__inner { display: flex; flex-direction: column; gap: 22px; }
.checks__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.checks__head h2 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
    min-height: 44px;
    padding: 0 16px;
    background: transparent;
    color: var(--fg);
    border: 1px solid #3a3a3a;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filters button:hover { border-color: var(--fg); }
.filters button[aria-pressed="true"] { background: var(--fg); color: #000; border-color: var(--fg); }
.filters .pixel { font-size: 20px; }

.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 15px; color: var(--muted); margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend .cells i { width: 8px; height: 8px; }

.cells { display: flex; gap: 3px; flex: 0 0 auto; }
.cells i { width: 12px; height: 12px; display: block; background: var(--off); }
.status-ok .cells i { background: var(--fg); }
.status-warn .cells i:nth-child(-n+2) { background: var(--fg); }
.status-bad .cells i:first-child { background: var(--red); }
.status-na .cells i { background: transparent; border: 1px solid #4a4a4a; }

.check-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.check-list > li { border-bottom: 1px solid var(--line); }
.check-list > li[hidden] { display: none; }
.check > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
}
.check > summary::-webkit-details-marker { display: none; }
.check > summary:hover { background: #111; }
.check__name { flex: 1 1 220px; font-size: 20px; font-weight: 700; }
.check__value { flex: 0 1 auto; font-family: var(--pixel); font-size: 23px; }
.status-bad .check__value { color: var(--red-text); }
.status-na .check__value { color: var(--muted); }
.check__sign { flex: 0 0 20px; font-family: var(--pixel); font-size: 26px; color: #6f6f6f; text-align: right; }
.check__sign::before { content: '+'; }
.check[open] .check__sign::before { content: '−'; }
.check__body { padding: 0 40px 20px 51px; max-width: 880px; font-size: 18px; line-height: 1.45; color: var(--soft); text-wrap: pretty; }
.check__body p { margin: 0 0 10px; }
.check__body strong { color: var(--fg); }
.image-list summary { cursor: pointer; color: var(--muted); font-size: 16px; }
.image-list ul { margin: 8px 0 0; padding-left: 18px; font-size: 16px; word-break: break-all; }
.image-list .saving { color: var(--fg); font-weight: 700; }
.text-muted { color: var(--muted); }

.method { padding: clamp(48px, 8vh, 80px) var(--gutter); border-top: 1px solid var(--line-soft); }
.method__inner { display: flex; flex-direction: column; gap: 14px; }
.method h2 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.method p { margin: 0; max-width: 880px; font-size: 17px; line-height: 1.5; color: #bdbdbd; }
.method strong { color: var(--fg); }

/* Kontakt-CTA */
.cta { padding: clamp(48px, 8vh, 90px) var(--gutter); background: var(--black); border-top: 1px solid var(--red); }
.cta__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 28px 64px;
    align-items: end;
}
.cta__text { display: flex; flex-direction: column; gap: 14px; }
.cta h2 { margin: 0; font-size: clamp(32px, 4vw, 52px); font-weight: 700; line-height: 1.02; text-wrap: balance; }
.cta p { margin: 0; font-size: 19px; line-height: 1.45; color: var(--soft); max-width: 560px; }
.cta__actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta__contact { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 18px; }
.cta__contact .sep { color: #4a4a4a; }

/* ---------- Fuss ---------- */
.site-footer {
    padding: 22px var(--gutter);
    background: var(--black);
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 32px;
    font-size: 15px;
    color: var(--muted);
}
.site-footer p { margin: 0; max-width: 720px; line-height: 1.4; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--red); }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 700px) {
    .site-header { position: static; }
    .site-header__claim { font-size: 14px; }
    .site-nav { font-size: 14px; gap: 6px 18px; }
    .check > summary {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "cells name sign" ". value .";
        gap: 4px 14px;
        align-items: start;
    }
    .check > summary .cells { grid-area: cells; padding-top: 5px; }
    .check__name { grid-area: name; font-size: 18px; }
    .check__value { grid-area: value; font-size: 20px; }
    .check__sign { grid-area: sign; }
    .check__body { padding: 0 4px 20px 4px; font-size: 17px; }
    .kpi--grade .kpi__grade { font-size: 120px; }
    .kpi__value { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .ticker__track, .cursor { animation: none; }
    html { scroll-behavior: auto; }
}

.kpi--grade .kpi__eyebrow { font-size: 14px; color: #fff; opacity: .85; text-transform: uppercase; letter-spacing: .4px; }
