/* Ecoholz — Sprossenkreuz as page frame. Putty, forest, linseed. */
:root {
  --wald: #143024;
  --waldhell: #1e3d2f;
  --kitthell: #efe4d0;
  --kitt: #d4c4a8;
  --leinol: #c4a35a;
  --holz: #8a5a2b;
  --tinte: #1b1712;
  --scheibe: #8fb3be;
  --dichtung: #2a2a28;
  --fehl: #8f1d18;
  --gut: #2f5d3a;
  --stiel: 1.15rem;
  --sprosse: 0.7rem;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--wald);
  color: var(--tinte);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}

body.laibungssperre { overflow: hidden; }

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

a { color: var(--waldhell); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--leinol);
  outline-offset: 3px;
}

.sprunglicht {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 90;
  background: var(--leinol);
  color: var(--wald);
  padding: 0.4rem 0.7rem;
  font-weight: 600;
  text-decoration: none;
}
.sprunglicht:focus { top: 0.7rem; }

/* Outer window: stiles and rails are the grid tracks */
.sprossenwerk {
  display: grid;
  grid-template-columns: var(--stiel) minmax(0, 1fr) var(--stiel);
  grid-template-rows: var(--stiel) auto var(--sprosse) minmax(0, auto) var(--sprosse) auto var(--stiel);
  min-height: calc(100vh - 1.4rem);
  margin: 0.7rem;
  background-color: var(--kitt);
  background-image:
    repeating-linear-gradient(90deg, rgba(90, 50, 16, 0.09) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(0deg, rgba(255, 236, 200, 0.14) 0 1px, transparent 1px 6px);
  box-shadow:
    0 0 0 3px #6e4e24,
    0 18px 48px rgba(0, 0, 0, 0.38);
}

.blendholm {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--kitthell);
}

.lichtnut {
  grid-column: 2;
  grid-row: 4;
  background: var(--kitthell);
  min-width: 0;
}

.waldkante {
  grid-column: 2;
  grid-row: 6;
  background: var(--waldhell);
  color: var(--kitthell);
}

.blendholm-lage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 4vw 0.85rem;
  border-bottom: 3px solid var(--leinol);
}

.tischlermarke {
  display: grid;
  grid-template-columns: 2rem auto;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  text-decoration: none;
  color: var(--wald);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.05;
}
.tischlermarke svg {
  grid-row: 1 / 3;
  width: 2rem;
  height: 2rem;
  align-self: center;
}
.tischlermarke small {
  grid-column: 2;
  font-family: Outfit, sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--holz);
}

.olivenknopf {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 2px solid var(--wald);
  background: var(--leinol);
  cursor: pointer;
}
.olivenknopf span {
  display: block;
  height: 2px;
  margin: 0 0.45rem;
  background: var(--wald);
}

.fluegelleiste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}
.fluegelleiste a {
  color: var(--tinte);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.fluegelleiste a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--leinol);
}
.fluegelleiste a[href^="tel:"] {
  color: var(--waldhell);
  font-weight: 600;
}

/* Hero: architectural window section */
.schnittlage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) var(--sprosse) minmax(0, 1fr);
  min-height: 22rem;
}
.querschnittbank {
  grid-column: 1;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 20rem;
  padding: 1.2rem 4vw 1.4rem;
  background:
    linear-gradient(180deg, rgba(20, 48, 36, 0.06), transparent 40%),
    var(--kitthell);
}
.glastext {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.6rem 5vw 1.8rem 1.4rem;
  background: #f6efe0;
}
.meisterzeile {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--holz);
  font-weight: 600;
}
.glastext h1,
.aufmassblatt h1,
.schnittlage h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.glastext p { margin: 0; max-width: 38rem; }

.schnittspan {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.7rem 0.15rem 1rem;
  min-width: 0;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(27, 23, 18, 0.18);
}
.schnittspan span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.schnittspan--aussen,
.schnittspan--innen {
  flex: 0.55;
  background: var(--wald);
  color: var(--kitthell);
  writing-mode: vertical-rl;
  transform: none;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  justify-content: center;
  align-items: center;
  font-weight: 600;
}
.schnittspan--blend {
  flex: 1.35;
  background: var(--waldhell);
  color: var(--kitt);
}
.schnittspan--dicht {
  flex: 0.38;
  background: var(--dichtung);
  color: #ece6d8;
}
.schnittspan--fluegel {
  flex: 1.15;
  background: linear-gradient(90deg, #a56b32, #c48948 55%, #8d5726);
  color: #fff8ea;
}
.schnittspan--kitt {
  flex: 0.42;
  background: #e6d3ae;
  color: var(--holz);
}
.schnittspan--glas {
  flex: 2.1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(90deg, #9ec4ce, #c5dce3 45%, #7aa8b4);
  color: var(--wald);
}

.leinolmarke {
  display: inline-block;
  align-self: flex-start;
  padding: 0.55rem 1.05rem;
  border: 3px double var(--wald);
  background: var(--leinol);
  color: var(--wald);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  cursor: pointer;
  font-family: Outfit, sans-serif;
  font-size: 0.98rem;
}
.leinolmarke:hover { filter: brightness(1.05); }
button.leinolmarke { appearance: none; }

.werkfoto {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr var(--sprosse) minmax(12rem, 0.42fr);
  background: var(--leinol);
}
.werkfoto img {
  grid-column: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 28rem;
}
.werkfoto figcaption {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem 1.2rem;
  background: var(--kitthell);
  font-size: 0.92rem;
}

.vierlichter {
  display: grid;
  grid-template-columns: 1fr var(--sprosse) 1fr;
  grid-template-rows: auto var(--sprosse) auto;
  background: var(--leinol);
}
.vierlichter > article:nth-child(1) { grid-column: 1; grid-row: 1; }
.vierlichter > article:nth-child(2) { grid-column: 3; grid-row: 1; }
.vierlichter > article:nth-child(3) { grid-column: 1; grid-row: 3; }
.vierlichter > article:nth-child(4) { grid-column: 3; grid-row: 3; }
.vierlichter article {
  margin: 0;
  padding: 1.35rem 4vw;
  background: var(--kitthell);
}
.vierlichter h2 {
  margin: 0 0 0.45rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}
.vierlichter p { margin: 0; }
.vierlichter strong { color: var(--waldhell); }

.preiszettel {
  display: grid;
  grid-template-columns: 1fr var(--sprosse) minmax(14rem, 0.7fr);
  background: var(--leinol);
}
.fluegelmass,
.ortstafel {
  background: var(--kitthell);
  padding: 1.5rem 4vw 1.7rem;
}
.fluegelmass h2,
.ortstafel h2,
.stimmenholz h2,
.aufmassblatt h2 {
  margin: 0 0 0.7rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
}
.fluegelmass dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 1rem;
  margin: 0;
}
.fluegelmass dt { margin: 0; }
.fluegelmass dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ortstafel p { margin: 0 0 0.6rem; }
.ortstafel p:last-child { margin-bottom: 0; }

.stimmenholz {
  padding: 1.5rem 4vw 1.8rem;
  background: #f6efe0;
}
.stimmenholz blockquote {
  margin: 0 0 1rem;
  padding: 0 0 0 0.9rem;
  border-left: 4px solid var(--leinol);
}
.stimmenholz blockquote p { margin: 0 0 0.35rem; }
.stimmenholz .ortshinweis {
  font-size: 0.88rem;
  color: var(--holz);
}

.aufmassruf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 4vw;
  background: var(--waldhell);
  color: var(--kitthell);
}
.aufmassruf p { margin: 0; max-width: 40rem; }
.aufmassruf .leinolmarke { color: var(--wald); }

.aufmassblatt {
  padding: 1.6rem 5vw 2.2rem;
  max-width: 46rem;
}
.aufmassblatt .werkfoto,
.aufmassblatt figure {
  margin: 0 0 1.2rem;
  max-width: none;
}
.aufmassblatt figure { background: transparent; display: block; }
.aufmassblatt img { width: 100%; max-height: 22rem; object-fit: cover; }
.aufmassblatt p { margin: 0 0 0.9rem; }
.aufmassblatt ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.aufmassblatt li { margin-bottom: 0.45rem; }

.ivliste {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: var(--sprosse);
  background: var(--leinol);
}
.ivliste li {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 0.8rem;
  margin: 0;
  padding: 0.95rem 1rem;
  background: var(--kitthell);
}
.ivliste i {
  font-style: normal;
  font-weight: 700;
  color: var(--holz);
  font-variant-numeric: tabular-nums;
}

.kitthinweis {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #e5efe6;
  color: var(--gut);
  border: 2px solid var(--gut);
}

.aufmassform {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  max-width: 32rem;
}
.falzfeld {
  display: grid;
  gap: 0.3rem;
}
.falzfeld span { font-weight: 500; font-size: 0.92rem; }
.falzfeld input,
.falzfeld textarea {
  width: 100%;
  background: #fff;
  color: #111;
  border: 1px solid #8a8a8a;
  border-radius: 0;
  padding: 0.55rem 0.65rem;
  font: inherit;
}
.falzfeld textarea { min-height: 8rem; resize: vertical; }
.falzfeld input.is-bad,
.falzfeld textarea.is-bad {
  border-color: var(--fehl);
  box-shadow: 0 0 0 1px var(--fehl);
}
.dichtungsklick {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.92rem;
}
.dichtungsklick input { margin-top: 0.2rem; }
.dichtungsklick.is-bad {
  outline: 2px solid var(--fehl);
  outline-offset: 4px;
}

.waldkante-reihen {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.2rem 2rem;
  padding: 1.4rem 4vw 0.4rem;
}
.waldkante a { color: var(--leinol); }
.waldkante nav { display: grid; gap: 0.3rem; align-content: start; }
.waldkante p { margin: 0.35rem 0 0; }
.waldkante > p {
  margin: 0;
  padding: 0.8rem 4vw 1.1rem;
  font-size: 0.88rem;
  opacity: 0.9;
}

.kittwahl {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  max-width: 22rem;
  padding: 0.95rem 1rem;
  background: var(--kitthell);
  color: var(--tinte);
  border: 3px double var(--wald);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.kittwahl p { margin: 0 0 0.7rem; font-size: 0.92rem; }
.kittwahl-griffe { display: flex; gap: 0.5rem; }
.kittwahl-griffe button {
  font: inherit;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border: 2px solid var(--wald);
  background: var(--leinol);
  color: var(--wald);
  cursor: pointer;
}
.kittwahl-griffe button[data-cookie-reject] {
  background: transparent;
}

@media (max-width: 860px) {
  :root {
    --stiel: 0.7rem;
    --sprosse: 0.5rem;
  }
  .olivenknopf { display: flex; }
  .fluegelleiste {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(20rem, 86vw);
    background: var(--kitthell);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 5rem 1.3rem 1.5rem;
    gap: 0.2rem;
    transform: translateX(110%);
    transition: transform 0.22s ease;
    z-index: 50;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
  }
  .fluegelleiste.sprosse-auf { transform: none; }
  .fluegelleiste a { padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--kitt); }
  .schnittlage,
  .werkfoto,
  .vierlichter,
  .preiszettel,
  .waldkante-reihen {
    display: block;
  }
  .vierlichter article,
  .fluegelmass,
  .ortstafel,
  .glastext,
  .querschnittbank {
    border-bottom: var(--sprosse) solid var(--leinol);
  }
  .werkfoto img { max-height: 16rem; }
  .querschnittbank { min-height: 14rem; }
  .ivliste li { grid-template-columns: 2rem 1fr; }
  .ivliste li span:last-child { grid-column: 2; font-weight: 600; }
}

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