/* ================================================================
   HOLZWERKSTATT · STILVORLAGE
   Ein einziges Stylesheet. Aufbau:
     1. Design-Variablen (Farben, Abstände, Schrift)
     2. Grundlagen (Reset, Typografie)
     3. Bausteine (Feld, Knopf, Augenbraue …)
     4. Kopfzeile / Navigation
     5. Start / Hero
     6. Abschnitte (Über mich, Werkstatt, Referenzen, Kontakt)
     7. Fußzeile
     8. Lightbox
     9. Formular-Stile (auf Vorrat für später)
    10. Responsiv (Handy / Tablet)
   Farben und Abstände ändert man am besten nur oben unter (1).
   ================================================================ */

/* ---- 1. DESIGN-VARIABLEN -------------------------------------- */
:root {
  /* Farbwelt: warme Eiche & Honig – gemütlich, nicht klinisch.
     Flächen in cremig-warmem Eichenton, Text in warmem Nussbraun,
     als Akzent honiggoldene Eiche. Nirgends kaltes Reinweiß. */
  --papier:        #f4e9d4;   /* heller Eichenton, Grundfläche          */
  --papier-tief:   #ecdcbf;   /* getönte Abschnitte, honigwarm          */
  --creme:         #fbf4e6;   /* warmes Off-White für Karten/Felder     */
  --anthrazit:     #33271a;   /* warmes Dunkelbraun statt Schwarz       */
  --anthrazit-weich:#6b5842;  /* weicheres Nussbraun für Fließtext      */
  --holz:          #b5813f;   /* Honig-Eiche, Akzentfarbe               */
  --holz-dunkel:   #935e28;   /* dunklere Eiche für Hover/Links         */
  --espresso:      #2a1e12;   /* tiefes Röstbraun für die Fußzeile      */
  --linie:         #dcc7a0;   /* warme Trennlinie                        */
  --weiss:         #fbf4e6;   /* „Weiß" ist hier warmes Creme            */

  /* Schrift */
  --serif: Georgia, "Times New Roman", serif;
  --grotesk: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Maße */
  --feld-breite: 1140px;
  --rand: clamp(1.25rem, 5vw, 4rem);
  --luft: clamp(4rem, 9vw, 7.5rem);   /* vertikaler Abstand zwischen Abschnitten */
  --radius: 7px;                       /* etwas weicher = wohnlicher      */
  --schatten: 0 16px 44px rgba(74, 52, 28, 0.16);  /* warm getönt        */
}

/* ---- 2. GRUNDLAGEN -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  /* Grundfläche mit ganz dezenter, warmer Maserungs-Andeutung:
     zwei sehr weiche Lichtwolken auf dem Eichenton – nicht als Muster
     erkennbar, aber es nimmt der Fläche das Sterile. */
  background-color: var(--papier);
  background-image:
    radial-gradient(60rem 40rem at 15% -5%, rgba(255, 246, 227, 0.55), transparent 60%),
    radial-gradient(50rem 40rem at 100% 10%, rgba(181, 129, 63, 0.10), transparent 55%);
  background-attachment: fixed;
  color: var(--anthrazit);
  font-family: var(--grotesk);
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--anthrazit);
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.25rem); margin: 0; }
h2 { font-size: clamp(1.9rem, 3vw + 0.8rem, 2.9rem); margin: 0 0 1rem; }
h3 { font-size: clamp(1.25rem, 1.4vw + 0.8rem, 1.6rem); margin: 0 0 0.6rem; }

p { margin: 0 0 1.1rem; max-width: 62ch; }

a { color: var(--holz-dunkel); text-decoration-thickness: 1px; text-underline-offset: 3px; }

strong { font-weight: 600; }

/* ---- 3. BAUSTEINE --------------------------------------------- */

/* Zentrierter Inhaltsbereich mit Seitenrand */
.feld {
  width: 100%;
  max-width: var(--feld-breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

/* Augenbraue: kleine Überschrift über der großen */
.augen {
  font-family: var(--grotesk);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--holz);
  margin: 0 0 0.8rem;
  font-weight: 600;
}

/* Knopf */
.knopf {
  display: inline-block;
  font-family: var(--grotesk);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85em 1.9em;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.knopf--gefuellt {
  background: var(--holz);
  color: var(--weiss);
}
.knopf--gefuellt:hover { background: var(--holz-dunkel); transform: translateY(-2px); }

/* Textverweis mit Pfeil */
.verweis {
  display: inline-block;
  font-weight: 600;
  color: var(--holz-dunkel);
  text-decoration: none;
  border-bottom: 1px solid var(--holz);
  padding-bottom: 2px;
}
.verweis:hover { color: var(--anthrazit); }

/* Zweispaltiges Text/Bild-Raster (kehrt sich am Handy um) */
.raster-zwei {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.raster-zwei--eng { margin-top: clamp(3rem, 6vw, 5rem); }
.raster-zwei__bild img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.raster-zwei--eng .raster-zwei__bild img { aspect-ratio: 4 / 3; }
.raster-zwei__text p:last-child { margin-bottom: 0; }

/* ---- 4. KOPFZEILE / NAVIGATION -------------------------------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 233, 212, 0.90);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.kopf.ist-gescrollt {
  border-bottom-color: var(--linie);
  box-shadow: 0 2px 16px rgba(38, 35, 32, 0.05);
}
.kopf__innen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
}
.marke {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--anthrazit);
}
.marke__zeichen { width: 26px; height: 26px; fill: var(--holz); }
.marke__text {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.menue { display: flex; gap: clamp(1.2rem, 3vw, 2.4rem); }
.menue a {
  font-family: var(--grotesk);
  font-size: 0.95rem;
  color: var(--anthrazit-weich);
  text-decoration: none;
  padding: 0.3em 0;
  position: relative;
}
.menue a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--holz);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.menue a:hover { color: var(--anthrazit); }
.menue a:hover::after { transform: scaleX(1); }

/* Menü-Schalter (nur am Handy sichtbar) */
.menue-schalter {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menue-schalter span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--anthrazit);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.menue-schalter[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menue-schalter[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menue-schalter[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- 5. START / HERO ------------------------------------------ */
.start {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(88vh, 780px);
  overflow: hidden;
}
.start__bild {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.start__bild img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Warmer Verlauf, damit die Schrift auf jedem Foto lesbar bleibt */
.start__bild::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 30, 18, 0.86) 0%,
    rgba(52, 36, 20, 0.48) 42%,
    rgba(60, 42, 22, 0.14) 100%
  );
}
.start__inhalt {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  color: var(--papier);
}
.start__ort {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.85);
  margin: 0 0 1rem;
}
.start__titel { color: var(--weiss); max-width: 16ch; }
.start__satz {
  color: rgba(245, 241, 234, 0.92);
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.3rem);
  max-width: 48ch;
  margin: 1.5rem 0 2.2rem;
}

/* ---- 6. ABSCHNITTE -------------------------------------------- */
.abschnitt { padding-block: var(--luft); position: relative; }

/* Plankennaht: schmale Holzleiste am oberen Rand jedes Abschnitts.
   Wirkt wie gestapelte Bretter – gibt Holz, ohne den Inhalt zu stören. */
.abschnitt::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 18px;
  background: url("../img/holz-leiste.svg") center / 100% 100% no-repeat;
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

/* Getönte Abschnitte: warme Grundfarbe + hauchzarte Maserung dahinter */
.abschnitt--getoent { background: var(--papier-tief); overflow: hidden; }
.abschnitt--getoent::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/holzmaserung.svg") center / cover no-repeat;
  opacity: 0.10;               /* sehr dezent – Text bleibt gut lesbar */
  pointer-events: none;
  z-index: 0;
}
/* Inhalt immer über der Textur */
.abschnitt > .feld { position: relative; z-index: 1; }

.abschnitt__kopf { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.abschnitt__intro { color: var(--anthrazit-weich); font-size: 1.1rem; }

/* Werkstatt: Können-Liste */
.koennen {
  list-style: none;
  margin: 0 0 clamp(1rem, 3vw, 2rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
}
.koennen li {
  background: var(--papier);
  padding: 1.4rem 1.5rem;
  text-align: center;
}
.abschnitt--getoent .koennen li { background: var(--papier-tief); }
.koennen__wort {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--anthrazit);
}

/* Referenzen: Galerie */
.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.karte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.karte:hover { transform: translateY(-4px); box-shadow: var(--schatten); }
.karte__bild {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}
.karte__bild img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.karte__bild:hover img { transform: scale(1.04); }
.karte__text { padding: 1.4rem 1.5rem 1.6rem; }
.karte__titel { margin-bottom: 0.4rem; }
.karte__text p { font-size: 0.98rem; color: var(--anthrazit-weich); margin-bottom: 0.6rem; }
.karte__detail {
  font-size: 0.8rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--holz) !important;
  margin-bottom: 0 !important;
}

/* Kontakt */
.kontakt { max-width: 760px; }
.kontakt__satz { font-size: 1.1rem; color: var(--anthrazit-weich); margin-bottom: 2.5rem; }
.kontakt__wege {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
}
.kontakt__weg {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.6rem 1.8rem;
  background: var(--papier);
  text-decoration: none;
  color: var(--anthrazit);
  transition: background-color 0.15s ease;
}
.abschnitt--getoent .kontakt__weg { background: var(--papier-tief); }
.kontakt__weg:not(.kontakt__weg--still):hover { background: var(--weiss); }
.kontakt__weg--still { cursor: default; }
.kontakt__label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--holz);
  font-weight: 600;
}
.kontakt__wert { font-family: var(--serif); font-size: 1.3rem; }

/* ---- 7. FUSSZEILE --------------------------------------------- */
.fuss {
  position: relative;
  background: var(--espresso);
  color: rgba(244, 233, 212, 0.72);
  padding-block: 2.4rem;
  font-size: 0.9rem;
  overflow: hidden;
}
/* Plankennaht auch über der Fußzeile */
.fuss::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 18px;
  background: url("../img/holz-leiste.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}
/* Warme Holztextur in die Fußzeile eingeblendet */
.fuss::after {
  content: "";
  position: absolute;
  inset: 18px 0 0 0;
  background: url("../img/holzmaserung.svg") center / cover no-repeat;
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.fuss__innen { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.fuss__hoch { color: rgba(245, 241, 234, 0.85); text-decoration: none; }
.fuss__hoch:hover { color: var(--weiss); }

/* ---- 8. LIGHTBOX ---------------------------------------------- */
.leuchtkasten {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
  overflow: visible;
}
.leuchtkasten::backdrop { background: rgba(20, 17, 14, 0.9); }
.leuchtkasten img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.leuchtkasten__zu {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 2.5rem; height: 2.5rem;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--papier);
  background: none;
  border: none;
  cursor: pointer;
}

/* ---- 9. FORMULAR-STILE (auf Vorrat – siehe LIESMICH.md) -------- */
.formular { display: grid; gap: 1.1rem; margin-top: 2.5rem; max-width: 560px; }
.formular label { font-weight: 600; font-size: 0.9rem; }
.formular input,
.formular textarea {
  font: inherit;
  width: 100%;
  padding: 0.8em 1em;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--weiss);
  color: var(--anthrazit);
}
.formular input:focus,
.formular textarea:focus { outline: 2px solid var(--holz); border-color: var(--holz); }
.formular .hinweis { font-size: 0.85rem; color: var(--anthrazit-weich); }
.formular .fehler { color: #a3341f; font-size: 0.85rem; }

/* ---- 10. RESPONSIV -------------------------------------------- */
@media (max-width: 760px) {
  .menue-schalter { display: flex; }
  .menue {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--papier);
    border-bottom: 1px solid var(--linie);
    box-shadow: 0 8px 24px rgba(38, 35, 32, 0.10);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .menue.ist-offen { max-height: 320px; }
  .menue a { padding: 1rem var(--rand); border-top: 1px solid var(--linie); }
  .menue a::after { display: none; }

  .raster-zwei { grid-template-columns: 1fr; }
  /* Bild bei „Über mich" über den Text schieben */
  #ueber .raster-zwei__bild { order: -1; max-width: 420px; }
  .raster-zwei__bild img { aspect-ratio: 4 / 3; }
}

/* Sanftes Einblenden respektiert Nutzer-Einstellung */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
