/* Code & Craft – Werkstatt-Design · mobile-first · 8px-Raster · Systemschriften (keine externen Fonts) */

:root {
  /* Farben: Basis · Kontrast · Akzent */
  --basis: #f5efe4;
  --basis-tief: #ebe2d2;
  --flaeche: #fbf8f2;
  --text: #2b2420;
  --text-leise: #6b5d52;
  --kontrast: #4a2f22;
  --kontrast-text: #f5efe4;
  --kontrast-leise: #e3d6c4;
  --akzent: #9c5530;
  --akzent-hover: #844625;
  --akzent-text: #ffffff;
  --akzent-hell: #c98257;
  --kontakt-knopf: #f5efe4;
  --kontakt-knopf-text: #4a2f22;
  --linie: #ddd0bd;
  --schatten: 0 1px 2px rgba(43, 36, 32, 0.06), 0 8px 24px rgba(43, 36, 32, 0.08);
  --schatten-hoch: 0 2px 4px rgba(43, 36, 32, 0.08), 0 16px 40px rgba(43, 36, 32, 0.14);
  --fokus: #2f6fbe;

  /* Holz der Illustration */
  --holz-1: #c89a6a;
  --holz-2: #a87445;
  --holz-maser: rgba(74, 47, 34, 0.22);
  --brand: #3a2418;
  --glut: #ff8a3d;

  /* Typografie: 2 Schriften */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* 8px-Raster */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s8: 64px;
  --s10: 80px;
  --s12: 96px;

  --radius: 8px;
  --radius-gross: 16px;
  --breite: 1120px;
  --kopf-hoehe: 64px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --basis: #1c1612;
    --basis-tief: #251d18;
    --flaeche: #2a211c;
    --text: #f2ebe0;
    --text-leise: #bfb1a2;
    --kontrast: #120d0a;
    --kontrast-text: #f2ebe0;
    --kontrast-leise: #cdbfae;
    --akzent: #d08a5e;
    --akzent-hover: #e09d72;
    --akzent-text: #1c1612;
    --akzent-hell: #e3a47c;
    --kontakt-knopf: #d08a5e;
    --kontakt-knopf-text: #1c1612;
    --linie: #3a2f28;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --schatten-hoch: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.5);
    --fokus: #8ab4f8;

    --holz-1: #8a6440;
    --holz-2: #6b4a2c;
    --holz-maser: rgba(20, 12, 8, 0.35);
    --brand: #1a0f09;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--kopf-hoehe) + var(--s2));
}

body {
  margin: 0;
  background: var(--basis);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--akzent); text-underline-offset: 3px; }
a:hover { color: var(--akzent-hover); }

:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprung {
  position: absolute;
  left: var(--s2);
  top: -100px;
  z-index: 100;
  padding: var(--s1) var(--s2);
  background: var(--akzent);
  color: var(--akzent-text);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.sprung:focus { top: var(--s1); color: var(--akzent-text); }

.innen {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--s2);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;
  padding: 0 var(--s3);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.knopf svg { flex: none; transition: transform 0.15s ease; }

.knopf-primaer {
  background: var(--akzent);
  color: var(--akzent-text);
  box-shadow: var(--schatten);
}
.knopf-primaer:hover {
  background: var(--akzent-hover);
  color: var(--akzent-text);
  transform: translateY(-2px);
  box-shadow: var(--schatten-hoch);
}
.knopf-primaer:hover svg { transform: translateX(4px); }
.knopf-primaer:active { transform: translateY(0); }

.knopf-sekundaer {
  background: transparent;
  color: var(--text);
  border-color: var(--linie);
}
.knopf-sekundaer:hover { border-color: var(--akzent); color: var(--akzent); }

.knopf-login {
  min-height: 44px;
  padding: 0 var(--s2);
  color: var(--kontrast-text);
  border-color: var(--akzent-hell);
  font-size: 15px;
}
.knopf-login:hover {
  background: var(--akzent-hell);
  border-color: var(--akzent-hell);
  color: #1c1612;
}

/* ---------- Kopfleiste ---------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--kontrast) 94%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 2px solid var(--akzent-hell);
}

.kopf .innen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  height: var(--kopf-hoehe);
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  color: var(--kontrast-text);
  text-decoration: none;
  font: 600 20px/1 var(--serif);
  white-space: nowrap;
}
.marke:hover { color: var(--kontrast-text); }
.marke .und { color: var(--akzent-hell); font-style: italic; }

.navi {
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.navi-link {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s1);
  color: var(--kontrast-leise);
  text-decoration: none;
  font-size: 15px;
  border-radius: var(--radius);
  transition: color 0.15s ease;
}
.navi-link:hover { color: var(--kontrast-text); }

/* ---------- Hero (Variante B: Split) ---------- */
.hero {
  padding: var(--s4) 0 var(--s8);
}

.hero .innen {
  display: grid;
  gap: var(--s4);
}

.hero-bild {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.stempel {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  margin-bottom: var(--s2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--akzent);
}
.stempel::before {
  content: "";
  width: var(--s3);
  height: 2px;
  background: currentColor;
}

.hero h1 {
  font-size: clamp(36px, 9vw, 60px);
  margin-bottom: var(--s2);
}
.hero h1 em { color: var(--akzent); }

.hero-text {
  font-size: 18px;
  color: var(--text-leise);
  max-width: 52ch;
  margin-bottom: var(--s4);
}

.hero-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* Illustration: Holzbrett mit eingebranntem </> */
.brett-maser { stroke: var(--holz-maser); }
.brett-glyphe {
  fill: none;
  stroke: var(--brand);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brett-glut {
  fill: none;
  stroke: var(--glut);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
  filter: blur(2px);
  animation: glimmen 3.2s ease-in-out infinite;
}
.funke { fill: var(--glut); opacity: 0; animation: funke 3.2s ease-out infinite; }
.funke:nth-of-type(2) { animation-delay: 1.1s; }
.funke:nth-of-type(3) { animation-delay: 2.2s; }

@keyframes glimmen {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.75; }
}
@keyframes funke {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(10px, -40px); }
}

/* ---------- Abschnitte ---------- */
.abschnitt { padding: var(--s8) 0; }
.abschnitt-getoent { background: var(--basis-tief); }

.kopfzeile { margin-bottom: var(--s4); max-width: 60ch; }
.kopfzeile h2 { font-size: clamp(28px, 6vw, 40px); margin-bottom: var(--s1); }
.kopfzeile p { color: var(--text-leise); font-size: 17px; }

.raster {
  display: grid;
  gap: var(--s2);
}

.karte {
  position: relative;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gross);
  padding: var(--s3);
  box-shadow: var(--schatten);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.karte:hover {
  transform: translateY(-4px);
  box-shadow: var(--schatten-hoch);
  border-color: color-mix(in srgb, var(--akzent) 40%, var(--linie));
}

.karte-symbol {
  display: grid;
  place-items: center;
  width: var(--s6);
  height: var(--s6);
  margin-bottom: var(--s2);
  border-radius: 12px;
  background: color-mix(in srgb, var(--akzent) 14%, transparent);
  color: var(--akzent);
}

.karte h3 { font-size: 22px; margin-bottom: var(--s1); }
.karte p { color: var(--text-leise); }

/* Projektkarten */
.projekt {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.projekt:hover { color: inherit; }
.projekt-bild {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--linie);
  transition: transform 0.3s ease;
}
.projekt:hover .projekt-bild { transform: scale(1.03); }
.projekt-inhalt { padding: var(--s3); display: grid; gap: var(--s1); }
.projekt-inhalt h3 { margin: 0; }
.projekt-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--akzent);
}
.projekt-mehr {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  font-weight: 600;
  color: var(--akzent);
}
.projekt-mehr svg { transition: transform 0.15s ease; }
.projekt:hover .projekt-mehr svg { transform: translateX(4px); }

/* Kontakt */
.kontakt {
  display: grid;
  gap: var(--s3);
  padding: var(--s4) var(--s3);
  border-radius: var(--radius-gross);
  background: var(--kontrast);
  color: var(--kontrast-text);
  border: 1px solid color-mix(in srgb, var(--akzent-hell) 35%, transparent);
  box-shadow: var(--schatten-hoch);
}
.kontakt h2 { color: var(--kontrast-text); font-size: clamp(26px, 6vw, 36px); margin-bottom: var(--s1); }
.kontakt p { color: var(--kontrast-leise); }

.hinweis-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  padding: 0 var(--s2);
  border: 1px dashed var(--akzent-hell);
  border-radius: 999px;
  color: var(--kontrast-text);
  font-size: 15px;
  justify-self: start;
}

.kontakt .knopf-primaer {
  justify-self: start;
  background: var(--kontakt-knopf);
  color: var(--kontakt-knopf-text);
}
.kontakt .knopf-primaer:hover {
  background: color-mix(in srgb, var(--kontakt-knopf) 88%, #ffffff);
  color: var(--kontakt-knopf-text);
}

/* ---------- Fußzeile ---------- */
.fuss {
  padding: var(--s4) 0 var(--s5);
  border-top: 1px solid var(--linie);
  color: var(--text-leise);
  font-size: 15px;
}
.fuss .innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
}
.fuss a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-leise);
}
.fuss a:hover { color: var(--akzent); }

/* ---------- Textseiten ---------- */
.textseite { padding: var(--s6) 0 var(--s10); }
.textseite h1 { font-size: clamp(32px, 7vw, 48px); margin-bottom: var(--s3); }
.textseite h2 { font-size: 22px; margin: var(--s4) 0 var(--s1); }
.textseite p { max-width: 65ch; margin-bottom: var(--s2); }
.textseite .knopf { margin-top: var(--s3); }

.markierung {
  padding: 0 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--akzent) 18%, transparent);
  color: var(--text);
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .innen { padding: 0 var(--s4); }
  .navi { gap: var(--s2); }
  .navi-link { display: inline-flex; }
  .raster { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .kontakt { padding: var(--s5); }
  .marke { font-size: 22px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .hero { padding: var(--s10) 0 var(--s12); }
  .hero .innen {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: var(--s8);
  }
  .hero-bild { order: 2; max-width: none; }
  .hero-text { font-size: 20px; }
  .abschnitt { padding: var(--s12) 0; }
  .raster { grid-template-columns: repeat(3, 1fr); }
  .kontakt {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: var(--s6);
  }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .brett-glut { opacity: 0.5; }
}
