/* ==========================================================================
   Lautenschlager Stein – Stylesheet
   Grundidee: alles schwarz-weiß, Farbe erst beim Darüberfahren (bzw. auf dem
   Handy, wenn ein Bild in der Bildschirmmitte steht). Logo, Inhalt und
   Fußzeile schließen links und rechts an derselben Kante ab (.rahmen).
   ========================================================================== */

@font-face {
  font-family: "Azeret Mono";
  src: url("../fonts/azeret-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "Azeret Mono";
  src: url("../fonts/azeret-mono-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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 {
  --text: #353535;
  --dunkel: #140b06;
  --akzent: #ff6210;
  --karte: #dddddd;
  --hell: #ffffff;
  --breite: 1140px;                       /* maximale Inhaltsbreite */
  --rand: clamp(16px, 4vw, 40px);         /* Seitenabstand links/rechts */
  --abstand: clamp(20px, 3vw, 40px);      /* Abstand zwischen Kacheln/Bildern */
  --uebergang: filter .4s ease;
  --sw: grayscale(100%) contrast(115%);   /* Schwarz-Weiß-Look für Projektbilder (vorher 140 %) */
  --grau: #8a8a8a;                        /* Bezeichnungen wie „Material:“ */
  --lesen: 14px;                          /* Fließtext auf Projekt-, Vita- und Textseiten */
  --cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='10' cy='10' r='5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 8 8, auto;
  --cursor-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='8' cy='8' r='4' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 10 10, pointer;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hell);
  color: var(--text);
  font: 400 12px/1.7 "Azeret Mono", ui-monospace, monospace;
  cursor: var(--cursor);
}
a, button, [data-voll] { cursor: var(--cursor-link); }

a { color: inherit; text-decoration: none; transition: color .2s linear; }
a:hover, a:focus-visible { color: var(--akzent); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; margin: 0; }
p { margin: 0 0 1.4em; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--hell); padding: 8px 12px; z-index: 100; }
.skip:focus { left: var(--rand); }

/* Gemeinsame Kante für Kopf, Inhalt, Fuß */
.rahmen {
  width: min(var(--breite), 100% - 2 * var(--rand));
  margin-inline: auto;
}

/* --------------------------------------------------------------- Kopf */
.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 34px;
}
.logo { display: block; line-height: 0; flex: none; }
.logo svg { width: 50px; height: 50px; }

.hauptmenue ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0 24px; flex-wrap: wrap; justify-content: flex-end; }
.hauptmenue a { color: var(--dunkel); display: block; padding-block: 6px; }
.hauptmenue a:hover, .hauptmenue a[aria-current="page"] { color: var(--akzent); }

.menue-knopf { display: none; }

/* --------------------------------------------------------------- Inhalt */
main { flex: 1; padding-block: clamp(24px, 6vw, 60px) clamp(40px, 8vw, 90px); }

/* Schwarz-weiß -> Farbe */
.sw img { filter: var(--sw); transition: var(--uebergang); }
.sw:hover img, .sw.farbig img, .sw:focus-visible img { filter: none; }

/* Startseite: Vorstellungszeile + drei Kacheln */
.intro { font-size: var(--lesen); max-width: 60ch; margin: 0 0 clamp(24px, 4vw, 44px); color: var(--dunkel); }
.kacheln {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--abstand);
}
.kachel { position: relative; display: block; overflow: hidden; color: var(--hell); }
.kachel img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(100%); }
.kachel h2 {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  font-size: clamp(16px, 1.8vw, 20px); font-weight: 600; letter-spacing: 4px; line-height: 1.05;
  hyphens: manual;
  text-shadow: 0 0 12px rgba(0, 0, 0, .35);
}
.kachel:hover, .kachel:focus-visible { color: var(--hell); }

/* Kategorie: Projektkarten */
.karten {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--abstand);
}
.karte { display: flex; flex-direction: column; color: var(--dunkel); }
.karte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.karte h2 { padding: 12px 0 0; font-weight: 400; }

/* Projektseite */
.projekt-kopf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--abstand);
  align-items: start;
}
/* sehr hohe Bilder werden auf Bildschirmhöhe begrenzt, bleiben aber links bündig */
.projekt figure img { width: 100%; max-height: 85vh; object-fit: contain; object-position: left top; }
.projekt-text { font-size: var(--lesen); }
.projekt-text h1 { font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--dunkel); margin-bottom: 1em; }
.projekt-text p { margin-bottom: 1.6em; }
.bez { color: var(--grau); }
.hinweis { color: var(--grau); font-size: 12px; }
.zurueck a { color: var(--text); }
.zurueck a:hover { color: var(--akzent); }

.galerie {
  margin-top: var(--abstand);
  columns: 2;
  column-gap: var(--abstand);
}
.galerie figure { break-inside: avoid; margin-bottom: var(--abstand); }

/* Vita */
.vita {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--abstand);
  align-items: start;
}
.vita figure img { width: 100%; max-width: 360px; }
.vita-kopf { margin-bottom: 2.5em; }
.vita h2 { margin: 2em 0 .6em; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: grid; grid-template-columns: 8.5em 1fr; gap: 0 1em; margin-bottom: .35em; }

.vita-text { font-size: var(--lesen); }

/* Text-Seiten */
.text-seite { max-width: 78ch; font-size: var(--lesen); }
.recht h1 { font-size: 16px; margin-bottom: 1.5em; }
.recht ol { padding-left: 1.6em; }
.recht li { margin-bottom: 1.6em; }
.recht p, .recht li { overflow-wrap: anywhere; }
/* Versionszeile im Impressum (Werte setzt die CI; lokal gebaut = Platzhalter, ausgeblendet) */
.version { color: var(--grau); font-size: 12px; margin-top: 3em; }
.version[data-version="__VERSION__"] { display: none; }

.kontakt-liste { list-style: none; padding: 0; margin: 2em 0 0; }
.kontakt-liste li { display: flex; align-items: center; gap: 14px; margin-bottom: .9em; }
.kontakt-liste svg { width: 16px; height: 16px; fill: var(--dunkel); flex: none; }

/* --------------------------------------------------------------- Fuß */
.fuss {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 40px;
}
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.fuss p { margin: 0; }

/* --------------------------------------------------------------- Lightbox */
.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100vw; height: 100vh; height: 100dvh;
  background: rgba(255, 255, 255, .97);
}
.lightbox::backdrop { background: rgba(255, 255, 255, .97); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 2 * var(--rand)); max-height: calc(100dvh - 120px); width: auto; height: auto; }
.lightbox button {
  position: absolute; background: none; border: 0; font: inherit; font-size: 28px; line-height: 1;
  color: var(--dunkel); padding: 14px;
}
.lightbox button:hover { color: var(--akzent); }
.lb-zu { top: 12px; right: calc(var(--rand) - 14px); }
.lb-zurueck { left: calc(var(--rand) - 14px); top: 50%; transform: translateY(-50%); }
.lb-vor { right: calc(var(--rand) - 14px); top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .karten { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 13px; }
  .kopf { padding-block: 20px; position: relative; flex-wrap: wrap; }
  .logo svg { width: 42px; height: 42px; }

  .menue-knopf {
    display: block; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; padding: 0; position: relative; color: var(--dunkel);
  }
  .menue-knopf span:first-child,
  .menue-knopf span:first-child::before,
  .menue-knopf span:first-child::after {
    position: absolute; left: 11px; width: 22px; height: 2px; background: currentColor; content: "";
    transition: transform .25s ease, top .25s ease, opacity .2s;
  }
  .menue-knopf span:first-child { top: 21px; }
  .menue-knopf span:first-child::before { left: 0; top: -7px; }
  .menue-knopf span:first-child::after { left: 0; top: 7px; }
  .menue-knopf[aria-expanded="true"] span:first-child { background: transparent; }
  .menue-knopf[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
  .menue-knopf[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }

  .hauptmenue { flex-basis: 100%; display: none; }
  .hauptmenue.offen { display: block; }
  .hauptmenue ul { flex-direction: column; align-items: flex-start; padding-top: 10px; }
  .hauptmenue a { font-size: 16px; padding-block: 8px; }

  .kacheln { grid-template-columns: 1fr; }
  .kachel img { aspect-ratio: 4 / 3; }
  .projekt-kopf, .vita { grid-template-columns: 1fr; }
  .projekt figure img { max-height: 90vh; }
  .galerie { columns: 1; }
  .vita figure img { max-width: 60%; }
  .liste li { grid-template-columns: 1fr; }
  .liste li span:first-child { font-weight: 600; }
  .lb-zurueck, .lb-vor { top: auto; bottom: 10px; transform: none; }
}

@media (max-width: 560px) {
  .karten { grid-template-columns: 1fr; }
  .fuss { flex-direction: column; }
}

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