/* Schreinerei Holzmann – shared stylesheet */

:root {
  --creme: #f7f1e7;
  --creme-dunkel: #ece2d0;
  --holz: #b07a4a;
  --holz-hell: #d2a679;
  --braun: #43301f;
  --braun-weich: #6b5242;
  --wald: #2f4a3a;
  --wald-dunkel: #223729;
  --weiss: #fffdf9;

  --font-text: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-titel: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;

  --abstand-s: 0.5rem;
  --abstand-m: 1rem;
  --abstand-l: 2rem;
  --abstand-xl: 4rem;
  --breite: 72rem;
  --radius: 0.5rem;
  --schatten: 0 0.5rem 1.5rem rgba(67, 48, 31, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--braun);
  background: var(--creme);
  hyphens: auto;
  overflow-wrap: break-word;
}

img,
svg,
iframe {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-titel);
  font-weight: normal;
  line-height: 1.2;
  color: var(--braun);
  margin: 0 0 var(--abstand-m);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 var(--abstand-m);
}

a {
  color: var(--wald);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--wald-dunkel);
}

:focus-visible {
  outline: 3px solid var(--holz);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: var(--abstand-s) var(--abstand-m);
  background: var(--wald);
  color: var(--weiss);
  z-index: 100;
}

.skip-link:focus {
  left: var(--abstand-m);
}

.container {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--abstand-m);
}

/* Header and navigation */

.site-header {
  background: var(--weiss);
  border-bottom: 1px solid var(--creme-dunkel);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--abstand-s);
  min-height: 4.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--braun);
  font-family: var(--font-titel);
  font-size: 1.35rem;
  line-height: 1.1;
}

.logo:hover {
  color: var(--braun);
}

.logo svg {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.logo small {
  display: block;
  font-family: var(--font-text);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--braun-weich);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--creme-dunkel);
  border-radius: var(--radius);
  background: var(--creme);
  color: var(--braun);
  font: inherit;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.main-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--braun);
}

.main-nav a:hover {
  background: var(--creme);
}

.main-nav a[aria-current="page"] {
  color: var(--wald);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--holz);
}

/* Mobile menu only when JavaScript runs; otherwise links stay visible */
@media (max-width: 47.99rem) {
  .js .menu-button {
    display: inline-flex;
  }

  .js .main-nav {
    display: none;
    width: 100%;
    padding-bottom: var(--abstand-m);
  }

  .js .main-nav.offen {
    display: block;
  }

  .js .main-nav ul {
    flex-direction: column;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid var(--wald);
  background: var(--wald);
  color: var(--weiss);
  text-decoration: none;
  font-weight: 600;
  transition-property: transform, opacity;
  transition-duration: 0.2s;
}

.button:hover {
  color: var(--weiss);
  transform: translateY(-2px);
}

.button-hell {
  background: transparent;
  color: var(--wald);
}

.button-hell:hover {
  color: var(--wald-dunkel);
}

.button-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: var(--abstand-m);
  margin-top: var(--abstand-l);
}

/* Hero: image on top on small screens, behind the text box from tablet up */

.hero {
  position: relative;
  padding: 0 0 var(--abstand-l);
  background-color: var(--creme-dunkel);
  border-bottom: 6px solid var(--holz);
}

.hero .hero-bild {
  width: 100%;
}

.hero .hero-bild img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero .container {
  position: relative;
  z-index: 2;
  margin-top: var(--abstand-l);
}

@media (min-width: 48rem) {
  .hero {
    padding: calc(var(--abstand-xl) * 1.5) 0;
  }

  .hero .hero-bild {
    position: absolute;
    inset: 0;
    width: auto;
  }

  .hero .hero-bild img {
    height: 100%;
    aspect-ratio: auto;
  }

  .hero .container {
    margin-top: 0;
  }
}

.hero-inhalt {
  max-width: 36rem;
  background: rgba(255, 253, 249, 0.92);
  padding: var(--abstand-l);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}

.hero p {
  font-size: 1.15rem;
}

.dachzeile {
  display: block;
  margin-bottom: var(--abstand-s);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wald);
  font-weight: 600;
}

.seitenkopf {
  padding: var(--abstand-xl) 0 var(--abstand-l);
  background: var(--creme-dunkel);
  border-bottom: 6px solid var(--holz);
}

.seitenkopf p {
  max-width: 42rem;
  font-size: 1.15rem;
  margin: 0;
}

/* Holding page "in Bearbeitung": full screen, centred, no header or footer */
.wartung {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--abstand-l) 0;
  background: var(--creme-dunkel);
  text-align: center;
}

.wartung p {
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1.15rem;
}

/* Sections */

.abschnitt {
  padding: var(--abstand-xl) 0;
}

.abschnitt-hell {
  background: var(--weiss);
}

.abschnitt-wald {
  background: var(--wald);
  color: var(--weiss);
}

.abschnitt-wald h2,
.abschnitt-wald a {
  color: var(--weiss);
}

.abschnitt-wald .button {
  background: var(--weiss);
  border-color: var(--weiss);
  color: var(--wald);
}

.abschnitt-wald .button:hover {
  color: var(--wald-dunkel);
}

.einleitung {
  max-width: 42rem;
  margin-bottom: var(--abstand-l);
}

.raster {
  display: grid;
  gap: var(--abstand-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.karte {
  background: var(--weiss);
  border: 1px solid var(--creme-dunkel);
  border-top: 4px solid var(--holz);
  border-radius: var(--radius);
  padding: var(--abstand-l);
  box-shadow: var(--schatten);
}

.abschnitt-hell .karte {
  background: var(--creme);
}

.karte p:last-child {
  margin-bottom: 0;
}

.karte.mit-bild {
  border-top: 0;
  overflow: hidden;
}

.karte .karte-bild {
  width: auto;
  max-width: none;
  margin: calc(var(--abstand-l) * -1) calc(var(--abstand-l) * -1) var(--abstand-l);
}

.karte .karte-bild img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--abstand-m);
  color: var(--wald);
}

.zwei-spalten {
  display: grid;
  gap: var(--abstand-l);
  align-items: start;
}

@media (min-width: 48rem) {
  .zwei-spalten {
    grid-template-columns: 1fr 1fr;
  }
}

.liste-haken {
  list-style: none;
  padding: 0;
  margin: 0;
}

.liste-haken li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.6rem;
}

.liste-haken li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.55rem;
  height: 0.9rem;
  border: solid var(--wald);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Reference cards with a wood-coloured image area until photos arrive */

.projekt-bild {
  aspect-ratio: 4 / 3;
  margin: calc(var(--abstand-l) * -1) calc(var(--abstand-l) * -1) var(--abstand-m);
  border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--holz-hell);
  background-image: repeating-linear-gradient(95deg, transparent 0 18px, rgba(67, 48, 31, 0.1) 18px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--braun);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--abstand-m);
}

.karte.projekt {
  border-top: 0;
  overflow: hidden;
}

.platzhalter {
  background: #fff3c4;
  color: var(--braun);
  padding: 0 0.25rem;
  border-radius: 0.2rem;
}

/* Contact */

.kontakt-liste {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kontakt-liste li {
  margin-bottom: var(--abstand-m);
}

.kontakt-liste strong {
  display: block;
}

.kontakt-liste a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Legal pages */

.text-seite {
  max-width: 46rem;
}

.text-seite h2 {
  font-size: 1.5rem;
  margin-top: var(--abstand-l);
}

.text-seite h3 {
  font-size: 1.15rem;
  margin-top: var(--abstand-m);
}

/* Footer */

.site-footer {
  background: var(--braun);
  color: var(--creme);
  padding: var(--abstand-l) 0;
  font-size: 0.95rem;
}

.footer-inner {
  display: grid;
  gap: var(--abstand-l);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.site-footer h2 {
  color: var(--creme);
  font-size: 1.2rem;
  margin-bottom: var(--abstand-s);
}

.site-footer p {
  margin: 0 0 var(--abstand-s);
}

.site-footer a {
  color: var(--creme);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-unten {
  margin-top: var(--abstand-l);
  padding-top: var(--abstand-m);
  border-top: 1px solid rgba(247, 241, 231, 0.2);
  font-size: 0.875rem;
}

/* Badge for AI-generated images */
.ai-generated { position: relative; width: fit-content; max-width: 100%; }
.ai-generated > img { display: block; max-width: 100%; height: auto; }
.ai-generated-badge { position: absolute; top: auto; left: auto; right: 10px; bottom: 10px; z-index: 1; margin: 0; padding: 3px 7px; border-radius: 4px; background-color: rgba(23, 25, 29, 0.72); color: #ffffff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; line-height: 1.4; cursor: help; }
.ai-generated-badge::after { content: "KI-generiertes Bild"; position: absolute; top: auto; left: auto; right: 0; bottom: calc(100% + 6px); padding: 4px 8px; border-radius: 4px; background-color: #17191d; color: #ffffff; font-size: 0.75rem; font-weight: 400; letter-spacing: 0; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.ai-generated-badge:hover::after { opacity: 1; }
.ai-generated-top-left .ai-generated-badge { top: 10px; bottom: auto; left: 10px; right: auto; }
.ai-generated-top-left .ai-generated-badge::after { top: calc(100% + 6px); bottom: auto; left: 0; right: auto; }
.ai-generated-top-right .ai-generated-badge { top: 10px; bottom: auto; left: auto; right: 10px; }
.ai-generated-top-right .ai-generated-badge::after { top: calc(100% + 6px); bottom: auto; left: auto; right: 0; }
.ai-generated-bottom-left .ai-generated-badge { top: auto; bottom: 10px; left: 10px; right: auto; }
.ai-generated-bottom-left .ai-generated-badge::after { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }

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

  .button {
    transition: none;
  }
}
