/* zimnoch.de – schlicht, System-Schriften, hell und dunkel.
   Kategorie-Farben aus dem GZCreations-Logo: Blau = Software & Web, Rot = 3D-Druck, Orange = Holz & DIY */

:root {
    --hg: #faf8f4;
    --flaeche: #ffffff;
    --text: #22201c;
    --leise: #67625a;
    --linie: #e6e1d8;
    --akzent: #3a3fc4;
    --akzent-text: #ffffff;
    --software: #3a3fc4;  --software-hg: #e9eafb;
    --druck: #c81f26;     --druck-hg: #fbe8e8;
    --diy: #b55b0c;       --diy-hg: #fcefdf;
    --backen: #b0306a;    --backen-hg: #fbe7f0;
    --aktiv: #1f7a3d;     --aktiv-hg: #e3f4e8;
    --fertig: #4a5568;    --fertig-hg: #e9ecf1;
    --idee: #7a3fb0;      --idee-hg: #f1e8fa;
    --todo-hg: #fff4c2;   --todo-linie: #e0b400;
    --radius: 14px;
    --schatten: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 20px rgb(0 0 0 / 0.06);
    --breite: 72rem;
    --text-breite: 42rem;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --hg: #17161b;
        --flaeche: #211f26;
        --text: #ecebe8;
        --leise: #a7a39b;
        --linie: #35333c;
        --akzent: #9ba1ff;
        --akzent-text: #14131a;
        --software: #a5aaff;  --software-hg: #272a55;
        --druck: #ff8f92;     --druck-hg: #4b2326;
        --diy: #ffb36b;       --diy-hg: #46301a;
        --backen: #ff8fc0;    --backen-hg: #4a2034;
        --aktiv: #7fd69a;     --aktiv-hg: #1d3a26;
        --fertig: #c3cad6;    --fertig-hg: #2f3440;
        --idee: #d2a8ff;      --idee-hg: #3a2850;
        --todo-hg: #3d3410;   --todo-linie: #b58f00;
        --schatten: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 20px rgb(0 0 0 / 0.25);
    }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--hg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }

a { color: var(--akzent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a.extern::after { content: " ↗"; font-size: 0.85em; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
img, video { max-width: 100%; height: auto; display: block; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; background: var(--linie); padding: 0.1em 0.35em; border-radius: 5px; }

.rahmen { width: 100%; max-width: var(--breite); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .rahmen { padding: 0 1.5rem; } }

.springen { position: absolute; left: -999px; top: 0.5rem; background: var(--flaeche); padding: 0.5rem 1rem; border-radius: 8px; z-index: 10; }
.springen:focus { left: 0.5rem; }

/* Kopf und Fuß */
.kopf { border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.kopf-innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.marke { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.hauptnav { display: flex; gap: 0.25rem; }
.hauptnav a { color: var(--text); text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 999px; }
.hauptnav a:hover { background: var(--hg); }
.hauptnav a[aria-current="page"] { background: var(--text); color: var(--flaeche); }

.fuss { margin-top: 4rem; border-top: 1px solid var(--linie); color: var(--leise); font-size: 0.95rem; }
.fuss-innen { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; padding-top: 1.25rem; padding-bottom: 1.5rem; }
.fuss p { margin: 0; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.fuss a { color: var(--leise); }

/* Knöpfe */
.aktionen { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.knopf {
    display: inline-block;
    padding: 0.65rem 1.2rem;
    border-radius: 999px;
    background: var(--akzent);
    color: var(--akzent-text);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--akzent);
}
.knopf:hover { filter: brightness(1.1); }
.knopf.zweit { background: transparent; color: var(--akzent); }

/* Startseite */
.held { display: grid; gap: 2rem; align-items: center; padding: 3rem 0 1rem; }
@media (min-width: 48rem) { .held { grid-template-columns: 3fr 2fr; gap: 3rem; padding-top: 4.5rem; } }
.vorzeile { margin: 0; color: var(--leise); font-weight: 600; }
.held h1 .zusatz { font-size: 0.5em; font-weight: 600; color: var(--leise); letter-spacing: 0; white-space: nowrap; }
.held-text > p:not(.vorzeile):not(.aktionen) { font-size: 1.2rem; max-width: 36rem; }
.held-bild { order: -1; }
.held-bild img, .monogramm { width: 100%; max-width: 12rem; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
@media (min-width: 48rem) {
    .held-bild { order: 0; }
    .held-bild img, .monogramm { max-width: 22rem; margin: 0 auto; }
}
.monogramm {
    display: grid; place-items: center;
    font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 800; letter-spacing: -0.04em;
    color: var(--flaeche);
    background: linear-gradient(135deg, var(--druck), var(--software) 55%, var(--diy));
}
.ueber { max-width: var(--text-breite); }
.teaser h2 { margin-top: 3.5rem; }
.mehr { margin-top: 1.5rem; font-weight: 600; }

/* Seiten mit Text */
.seitenkopf { padding-top: 3rem; max-width: var(--text-breite); }
.seitenkopf p { font-size: 1.15rem; color: var(--leise); }
.text { max-width: var(--text-breite); }
.seite { padding-top: 3rem; }
.text ul, .text ol { padding-left: 1.3rem; }
.text li + li { margin-top: 0.3rem; }
blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 4px solid var(--linie); color: var(--leise); font-style: italic; }
.todo { background: var(--todo-hg); border-left: 4px solid var(--todo-linie); padding: 0.5rem 0.9rem; border-radius: 6px; font-size: 0.95rem; }

/* Kategorie- und Status-Etiketten */
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.6rem; }
.chip, .status { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; text-decoration: none; }
.kat-software .chip { color: var(--software); background: var(--software-hg); }
.kat-3d-druck .chip { color: var(--druck); background: var(--druck-hg); }
.kat-diy .chip { color: var(--diy); background: var(--diy-hg); }
.kat-backen .chip { color: var(--backen); background: var(--backen-hg); }
.status-aktiv { color: var(--aktiv); background: var(--aktiv-hg); }
.status-fertig { color: var(--fertig); background: var(--fertig-hg); }
.status-idee { color: var(--idee); background: var(--idee-hg); }

/* Filter */
.filter { display: none; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.js .filter { display: flex; }
.filter button {
    font: inherit; font-size: 0.95rem; cursor: pointer;
    padding: 0.4rem 0.95rem; border-radius: 999px;
    border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
}
.filter button:hover { border-color: var(--leise); }
.filter button[aria-pressed="true"] { background: var(--text); color: var(--flaeche); border-color: var(--text); }
.anzahl { color: var(--leise); font-size: 0.9rem; margin: 0 0 1rem; min-height: 1.4em; }

/* Projektkarten */
.karten { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.karte a { display: flex; flex-direction: column; height: 100%; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--schatten); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.karte a:hover { transform: translateY(-3px); }
.karte-bild { aspect-ratio: 3 / 2; overflow: hidden; background: var(--hg); }
.karte-bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
.platzhalter { display: grid; place-items: center; width: 100%; height: 100%; font-size: 3.5rem; }
.kat-software .platzhalter { background: var(--software-hg); }
.kat-3d-druck .platzhalter { background: var(--druck-hg); }
.kat-diy .platzhalter { background: var(--diy-hg); }
.kat-backen .platzhalter { background: var(--backen-hg); }
.karte-text { padding: 1rem 1.15rem 1.25rem; }
.karte h2, .karte h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.karte-text > p:last-child { margin: 0; color: var(--leise); font-size: 0.97rem; }
@media (prefers-reduced-motion: reduce) { .karte a { transition: none; } .karte a:hover { transform: none; } }

/* Projekt-Detailseite */
.projekt-kopf { padding-top: 3rem; max-width: 48rem; }
.lead { font-size: 1.25rem; color: var(--leise); margin: 0; }
.projekt > .medium { margin: 2rem 0 0; }
.projekt > .medium img { width: 100%; max-height: 32rem; object-fit: cover; border-radius: var(--radius); }
.medium { margin: 1.5rem 0; }
.medium img, .medium video { border-radius: 10px; width: 100%; background: var(--linie); }
.text .medium img { width: auto; max-width: 100%; max-height: 34rem; }
figcaption { color: var(--leise); font-size: 0.9rem; margin-top: 0.4rem; }
.text .galerie { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
.text .galerie li { margin: 0; }
.galerie a { display: block; }
.galerie img, .galerie video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--linie); }
.galerie a:hover img { opacity: 0.9; }
/* Fotogalerie im Dialog (Klick aufs Foto auf der Startseite) */
.held-foto { display: block; border-radius: 50%; }
.held-foto img { transition: transform 0.2s ease; }
.held-foto:hover img { transform: scale(1.03); }
.galerie-dialog { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0c0c0e; color: #fff; }
.galerie-dialog::backdrop { background: rgb(0 0 0 / 0.6); }
.galerie-streifen { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none; }
.galerie-streifen::-webkit-scrollbar { display: none; }
.galerie-streifen figure { flex: 0 0 100%; margin: 0; display: grid; place-items: center; padding: 3.5rem 1rem; scroll-snap-align: center; }
.galerie-streifen img { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; border-radius: 8px; }
.galerie-knopf { position: absolute; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.galerie-knopf:hover, .galerie-knopf:focus-visible { background: rgb(255 255 255 / 0.28); }
.galerie-zurueck { left: 1rem; top: 50%; transform: translateY(-50%); }
.galerie-weiter { right: 1rem; top: 50%; transform: translateY(-50%); }
.galerie-schliessen { right: 1rem; top: 1rem; }
.galerie-knopf[disabled] { opacity: 0.3; cursor: default; }
.galerie-zaehler { position: absolute; left: 0; right: 0; bottom: 1rem; margin: 0; text-align: center; font-size: 0.9rem; color: rgb(255 255 255 / 0.75); }
@media (max-width: 40rem) { .galerie-zurueck, .galerie-weiter { display: none; } }

.status-entwurf { color: var(--leise); background: transparent; border: 1px dashed var(--leise); }
.text .galerie.videos { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); align-items: start; }
.galerie.videos video { aspect-ratio: auto; object-fit: contain; max-height: 30rem; background: #000; }
.zurueck { margin-top: 2rem; }

.kontakt-box { margin: 3rem 0 0; padding: 1.5rem; max-width: var(--text-breite); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); }
.kontakt-box h2 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.kontakt-box p { margin: 0; color: var(--leise); }
.kontakt-box .aktionen { margin-top: 1.1rem; }

/* Zeitleiste „Vom Plan zum Objekt“ */
.zeitleiste { list-style: none; padding: 0 0 0 1.75rem; margin: 1.5rem 0; position: relative; counter-reset: schritt; }
.zeitleiste::before { content: ""; position: absolute; left: 0.55rem; top: 0.4rem; bottom: 0.4rem; width: 2px; background: var(--linie); }
.zeitleiste > li { position: relative; counter-increment: schritt; padding-bottom: 1.25rem; }
.zeitleiste > li::before {
    content: counter(schritt);
    position: absolute; left: -1.75rem; top: 0.05rem;
    width: 1.3rem; height: 1.3rem; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 0.75rem; font-weight: 700;
    background: var(--diy); color: var(--flaeche);
}
.zeitleiste h3 { margin: 0 0 0.25rem; }
.zeitleiste p { margin: 0.25rem 0; }
