/* ==========================================================================
   Performandes – Techno / Retro
   Dunkel, Raster, Monospace-Details, Akzent in Säuregrün
   ========================================================================== */

/* Schriften (lokal gehostet, kein externer Abruf) ------------------------- */

@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk.woff2") format("woff2");
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Space Mono";
    src: url("../fonts/space-mono-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Space Mono";
    src: url("../fonts/space-mono-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --grund: #0b0b0c;
    --flaeche: #141416;
    --text: #ecece6;
    --grau: #7d7d78;
    --linie: rgba(236, 236, 230, 0.14);
    --raster: rgba(236, 236, 230, 0.035);
    --akzent: #c8ff2e;
    --akzent-text: #0b0b0c;

    --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
    --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --rand: clamp(1.25rem, 4vw, 3.5rem);
    --abstand: clamp(4rem, 12vw, 10rem);
    --kopf: 4.5rem;

    --gross: clamp(3rem, 9vw, 9.5rem);
    --mittel: clamp(1.15rem, 2vw, 1.6rem);
    --klein: 0.75rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--grund);
}

html.snap {
    scroll-snap-type: y mandatory;
}

body {
    margin: 0;
    background-color: var(--grund);
    /* Feines Raster im Hintergrund */
    background-image:
        linear-gradient(var(--raster) 1px, transparent 1px),
        linear-gradient(90deg, var(--raster) 1px, transparent 1px);
    background-size: 96px 96px;
    background-position: var(--rand) 0;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--display);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* CRT-Scanlines über allem */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.22) 0,
        rgba(0, 0, 0, 0.22) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.35;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 1px dashed var(--akzent);
    outline-offset: 4px;
}

h1, h2, h3, p, ul, ol, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

/* Hilfsklassen ------------------------------------------------------------ */

.display {
    font-family: var(--display);
    font-size: var(--gross);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    hyphens: auto;
    overflow-wrap: break-word;
}

.lead {
    font-size: var(--mittel);
    line-height: 1.35;
    letter-spacing: -0.01em;
    max-width: 34ch;
    color: var(--text);
}

.mono,
.label {
    font-family: var(--mono);
    font-size: var(--klein);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.label {
    color: var(--grau);
}

.label::before {
    content: "// ";
    color: var(--akzent);
}

.link-arrow {
    display: inline-flex;
    gap: 0.6em;
    padding: 0.7em 1em;
    border: 1px solid var(--linie);
    font-family: var(--mono);
    font-size: var(--klein);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.link-arrow::after {
    content: "→";
    color: var(--akzent);
    transition: transform 0.2s ease, color 0.2s ease;
}

.link-arrow:hover {
    background: var(--akzent);
    border-color: var(--akzent);
    color: var(--akzent-text);
}

.link-arrow:hover::after {
    color: var(--akzent-text);
    transform: translateX(0.25em);
}

/* Blinkender Block-Cursor wie im Terminal */
.blinker {
    display: inline-block;
    width: 0.45em;
    height: 0.75em;
    margin-left: 0.08em;
    background: var(--akzent);
    vertical-align: baseline;
    animation: blinken 1.1s steps(1) infinite;
}

@keyframes blinken {
    50% {
        opacity: 0;
    }
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--rand);
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--akzent);
    color: var(--akzent-text);
    font-family: var(--mono);
    font-size: var(--klein);
}

.skip-link:focus {
    top: 1rem;
}

/* Bildrahmen: Duoton Schwarz/Grün, in Farbe beim Hover --------------------- */

.bild-rahmen {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--linie);
    background: var(--flaeche);
}

.bild-rahmen img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.2) brightness(0.95);
    transition: filter 0.5s ease, transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.bild-rahmen::before,
.bild-rahmen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.bild-rahmen::before {
    background: var(--akzent);
    mix-blend-mode: multiply;
}

.bild-rahmen::after {
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0,
        rgba(0, 0, 0, 0.35) 1px,
        transparent 1px,
        transparent 4px
    );
}

.bild-rahmen:hover img,
.bereich-teaser:hover .bild-rahmen img {
    filter: none;
    transform: scale(1.04);
}

.bild-rahmen:hover::before,
.bild-rahmen:hover::after,
.bereich-teaser:hover .bild-rahmen::before,
.bereich-teaser:hover .bild-rahmen::after {
    opacity: 0;
}

/* Kopfzeile --------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--kopf);
    padding: 0 var(--rand);
    color: var(--weiss, #fff);
    mix-blend-mode: difference;
}

.site-header__logo {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.site-nav ul {
    display: flex;
    gap: clamp(1rem, 2.5vw, 2.5rem);
}

.site-nav a {
    font-family: var(--mono);
    font-size: var(--klein);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 0.15em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    border-bottom-color: currentColor;
}

.site-nav a[aria-current="page"]::before {
    content: "■ ";
}

.site-nav__toggle {
    display: none;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: var(--mono);
    font-size: var(--klein);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

@media (max-width: 760px) {
    .site-nav__toggle {
        display: block;
    }

    .site-nav {
        display: none;
    }

    /* Geöffnetes Menü: Vollbild, ohne Blend-Modus */
    .site-header.is-open {
        mix-blend-mode: normal;
        color: var(--text);
        background: var(--grund);
        height: 100vh;
        height: 100dvh;
        flex-wrap: wrap;
        align-content: flex-start;
    }

    .site-header.is-open .site-header__logo,
    .site-header.is-open .site-nav__toggle {
        height: var(--kopf);
        display: flex;
        align-items: center;
    }

    .site-header.is-open .site-nav {
        display: block;
        flex-basis: 100%;
        padding-top: 2rem;
    }

    .site-header.is-open .site-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .site-header.is-open .site-nav a {
        font-family: var(--display);
        font-size: clamp(2rem, 10vw, 3rem);
        letter-spacing: -0.03em;
    }
}

/* Startseite -------------------------------------------------------------- */

.snap-item {
    scroll-snap-align: start;
}

.intro {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 2rem;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--kopf) + 1rem) var(--rand) var(--rand);
}

.intro__kopf,
.bereich-teaser__meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--linie);
    color: var(--grau);
}

.intro__kopf span:first-child,
.bereich-teaser__meta span:first-child {
    color: var(--akzent);
}

.intro__haupt {
    display: grid;
    align-content: end;
    gap: 2rem;
}

.intro__scroll {
    justify-self: start;
    color: var(--grau);
    transition: color 0.2s ease;
}

.intro__scroll:hover {
    color: var(--akzent);
}

.bereich-teaser {
    display: grid;
    grid-template-areas:
        "meta"
        "bild"
        "text";
    grid-template-rows: auto 1fr auto;
    gap: 2rem;
    height: 100vh;
    height: 100svh;
    padding: calc(var(--kopf) + 1rem) var(--rand) var(--rand);
}

.bereich-teaser:not(.hat-bild) {
    grid-template-areas:
        "meta"
        "text";
    grid-template-rows: auto 1fr;
}

.bereich-teaser__meta {
    grid-area: meta;
}

.bereich-teaser__text {
    grid-area: text;
    align-self: end;
    display: grid;
    gap: 1.5rem;
    justify-items: start;
}

.bereich-teaser .display {
    font-size: clamp(2.5rem, 8vw, 8.5rem);
}

/* Ganzer Titel leuchtet, auch wenn SplitText ihn auf mehrere Zeilen verteilt */
.bereich-teaser .display:hover,
.bereich-teaser .display:hover * {
    color: var(--akzent);
}

.bereich-teaser__bild {
    grid-area: bild;
    align-self: center;
    justify-self: start;
    width: min(55vw, 220px);
    display: grid;
    gap: 0.6rem;
}

.bereich-teaser__bild figcaption {
    color: var(--grau);
}

.bereich-teaser__bild figcaption::before {
    content: "■ ";
    color: var(--akzent);
}

@media (min-width: 900px) {
    .bereich-teaser.hat-bild {
        grid-template-areas:
            "meta meta"
            "text bild";
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr;
        column-gap: clamp(2rem, 6vw, 6rem);
    }

    .bereich-teaser__bild {
        align-self: end;
        width: clamp(220px, 22vw, 340px);
    }
}

/* Unterseiten ------------------------------------------------------------- */

.page-head {
    display: grid;
    gap: 2rem;
    padding: calc(var(--kopf) + var(--abstand)) var(--rand) var(--abstand);
}

.page-head .label a:hover {
    color: var(--akzent);
}

.page-bild {
    padding: 0 var(--rand);
}

.page-bild__rahmen {
    width: min(100%, 520px);
}

.page-text,
.leistungen,
.formular {
    display: grid;
    gap: 2rem;
    padding: var(--abstand) var(--rand) 0;
}

@media (min-width: 900px) {
    .page-text,
    .leistungen,
    .formular {
        grid-template-columns: 1fr 2fr;
    }

    /* Bild neben dem Titel statt bildschirmbreit */
    .page-head + .page-bild {
        display: flex;
        justify-content: flex-end;
        margin-top: calc(var(--abstand) * -1);
    }
}

.prose p + p {
    margin-top: 1em;
}

.prose {
    font-size: var(--mittel);
    line-height: 1.45;
    letter-spacing: -0.01em;
    max-width: 38ch;
}

/* Impressum und Datenschutz: längere Texte, kleinere Schrift */
.page-impressum .prose,
.page-datenschutz .prose {
    font-family: var(--mono);
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 75ch;
    color: #c9c9c2;
}

.prose a {
    color: var(--akzent);
    border-bottom: 1px solid currentColor;
}

.prose a:hover {
    border-bottom-color: transparent;
}

/* 404 */
.fehler {
    display: grid;
    align-content: end;
    gap: 2rem;
    justify-items: start;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--kopf) + 2rem) var(--rand) var(--abstand);
}

.fehler .mono {
    color: var(--akzent);
}

.prose h2 {
    margin: 2.5em 0 0.75em;
    font-family: var(--mono);
    font-size: var(--klein);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--akzent);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h2 + p {
    margin-top: 0;
}

.page-impressum .prose p + p,
.page-datenschutz .prose p + p {
    margin-top: 0.6em;
}

.page-impressum .page-head .display,
.page-datenschutz .page-head .display {
    font-size: clamp(2.5rem, 6vw, 6rem);
}

.leistungen__liste {
    border-top: 1px solid var(--text);
}

.leistung {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 0.5rem 1.5rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--linie);
    transition: background 0.2s ease;
}

.leistung:hover {
    background: rgba(200, 255, 46, 0.04);
}

.leistung__nummer {
    font-family: var(--mono);
    font-size: var(--klein);
    color: var(--akzent);
    padding-top: 0.45em;
}

.leistung__titel {
    font-size: var(--mittel);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.leistung__inhalt p {
    color: var(--grau);
    max-width: 55ch;
}

.leistung__preis {
    grid-column: 2;
    font-family: var(--mono);
    color: var(--akzent);
    white-space: nowrap;
}

@media (min-width: 700px) {
    .leistung {
        grid-template-columns: 3rem 1fr auto;
    }

    .leistung__preis {
        grid-column: 3;
        padding-top: 0.2em;
    }
}

.page-weiter {
    display: grid;
    gap: 1rem;
    margin-top: var(--abstand);
    padding: var(--abstand) var(--rand);
    border-top: 1px solid var(--linie);
}

.page-weiter .display {
    font-size: clamp(2.25rem, 6vw, 6rem);
}

.page-weiter a:hover,
.page-weiter a:hover * {
    color: var(--akzent);
}

/* Kontaktformular (Freeform) ---------------------------------------------- */

.formular form {
    display: grid;
    gap: 1.5rem;
    max-width: 40rem;
}

.formular label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--mono);
    font-size: var(--klein);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--grau);
}

.formular input[type="text"],
.formular input[type="email"],
.formular input[type="tel"],
.formular input[type="number"],
.formular select,
.formular textarea {
    width: 100%;
    padding: 0.75rem 0;
    border: 0;
    border-bottom: 1px solid var(--linie);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: var(--mittel);
    caret-color: var(--akzent);
    transition: border-color 0.2s ease;
}

.formular textarea {
    min-height: 8rem;
    resize: vertical;
}

.formular input:focus,
.formular select:focus,
.formular textarea:focus {
    outline: none;
    border-bottom-color: var(--akzent);
}

.formular button,
.formular [type="submit"] {
    justify-self: start;
    padding: 1rem 2rem;
    border: 1px solid var(--akzent);
    border-radius: 0;
    background: var(--akzent);
    color: var(--akzent-text);
    font-family: var(--mono);
    font-size: var(--klein);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.formular button:hover,
.formular [type="submit"]:hover {
    background: transparent;
    color: var(--akzent);
}

/* Fusszeile --------------------------------------------------------------- */

.site-footer {
    margin-top: var(--abstand);
    padding: var(--abstand) var(--rand) var(--rand);
    border-top: 1px solid var(--linie);
    background: #070708;
    overflow: hidden;
    scroll-snap-align: end;
}

.page-home .site-footer {
    margin-top: 0;
}

.site-footer__inner {
    display: grid;
    gap: 3rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.site-footer__logo {
    font-size: var(--mittel);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.site-footer .label {
    margin-bottom: 1rem;
}

.site-footer li + li {
    margin-top: 0.35rem;
}

.site-footer a:hover {
    color: var(--akzent);
}

.site-footer__wortmarke {
    margin-top: var(--abstand);
    font-size: clamp(3rem, 15.5vw, 16rem);
    font-weight: 600;
    line-height: 0.8;
    letter-spacing: -0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px var(--linie);
}

.site-footer__copy {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    color: var(--grau);
}

/* Animationen ------------------------------------------------------------- */

/* Bis site.js startet (oder spätestens nach 3 s) Inhalt verbergen */
.anim:not(.anim-ready) #inhalt,
.anim:not(.anim-ready) .site-footer {
    opacity: 0;
}

/* Lenis übernimmt das weiche Scrollen */
html.lenis {
    scroll-behavior: auto;
}

/* SplitText-Masken: Unterlängen nicht abschneiden */
.zeile-mask {
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

/* Abschnittsanzeige [01/04] auf der Startseite */
.zaehler {
    position: fixed;
    right: var(--rand);
    bottom: var(--rand);
    z-index: 40;
    display: flex;
    gap: 0.35em;
    padding: 0.45em 0.7em;
    border: 1px solid var(--linie);
    background: var(--grund);
    color: var(--grau);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.zaehler.is-visible {
    opacity: 1;
    visibility: visible;
}

.zaehler__aktuell {
    display: inline-grid;
    overflow: hidden;
    color: var(--akzent);
}

.zaehler__aktuell > span {
    grid-area: 1 / 1;
}

/* Eigener Cursor ---------------------------------------------------------- */

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    display: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.has-cursor .cursor {
    display: block;
}

.cursor.is-sichtbar {
    opacity: 1;
}

.cursor.is-text {
    opacity: 0;
}

.has-cursor,
.has-cursor * {
    cursor: none !important;
}

.has-cursor input,
.has-cursor textarea,
.has-cursor [contenteditable] {
    cursor: text !important;
}

.has-cursor select {
    cursor: default !important;
}

/* Fadenkreuz */
.cursor__kreuz {
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    transform: translate(-50%, -50%);
}

.cursor__kreuz::before,
.cursor__kreuz::after {
    content: "";
    position: absolute;
    background: var(--akzent);
}

.cursor__kreuz::before {
    top: 7px;
    left: 0;
    width: 15px;
    height: 1px;
}

.cursor__kreuz::after {
    top: 0;
    left: 7px;
    width: 1px;
    height: 15px;
}

/* Rahmen, wächst über Links */
.cursor__rahmen {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(200, 255, 46, 0.45);
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cursor.is-aktiv .cursor__rahmen {
    width: 56px;
    height: 56px;
    border-color: var(--akzent);
    background: rgba(200, 255, 46, 0.08);
}

.cursor.is-down .cursor__rahmen {
    width: 20px;
    height: 20px;
}

/* Beschriftung neben dem Cursor */
.cursor__label {
    position: absolute;
    top: 34px;
    left: 34px;
    padding: 0.25em 0.5em;
    background: var(--akzent);
    color: var(--akzent-text);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.cursor.hat-label .cursor__label {
    opacity: 1;
    transform: none;
}

/* Reduzierte Bewegung ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .blinker {
        animation: none;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
