/* ==========================================================================
   Tischlerei Flaumitsch – Stylesheet
   ========================================================================== */

/* ---------- Schriften (lokal) ---------- */
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/eb-garamond_600.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/roboto_400.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/roboto_700.woff2") format("woff2");
}

/* ---------- Farben & Maße ---------- */
:root {
  --braun: #693c11;
  --braun-dunkel: #4d2b0c;
  --hintergrund: #f3f3f3;
  --hintergrund-hell: #f9f9f9;
  --text: #373737;
  --dunkel: #303030;
  --link: #3273ff;
  --akzent: #ffc955;
  --weiss: #fff;

  --schrift-text: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --schrift-titel: "EB Garamond", Georgia, "Times New Roman", serif;

  --kopf-hoehe: 72px;
  --inhalt-breite: 1000px;
  --breite-max: 1200px;
  --abstand: clamp(2.5rem, 6vw, 4.5rem);
  --radius: 4px;
  --schatten: 0 8px 24px rgba(0, 0, 0, .18);
  --weich: cubic-bezier(.22, .61, .36, 1);
}

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

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

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--schrift-titel);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

a {
  color: var(--link);
  transition: color .3s ease;
}
a:hover { color: var(--akzent); }

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  padding: .6rem 1rem;
  background: var(--weiss);
  color: var(--text);
  transition: top .2s ease;
}
.skip-link:focus { top: 8px; }

.container {
  width: min(100% - 4rem, var(--inhalt-breite));
  margin-inline: auto;
}
.container--breit { width: min(100% - 4rem, var(--breite-max)); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.ist-gescrollt {
  box-shadow: 0 2px 16px rgba(0, 0, 0, .15);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1500px;
  height: var(--kopf-hoehe);
  margin-inline: auto;
  padding: 0 1rem;
  transition: height .3s var(--weich);
}
.site-header__logo img {
  width: auto;
  height: 56px;
  transition: height .3s var(--weich);
}
.site-header.ist-gescrollt .site-header__logo img { height: 44px; }

/* Navigation */
.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.4rem;
  justify-content: flex-end;
}
.nav__link {
  position: relative;
  display: block;
  padding: .35rem 0;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--link);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--weich);
}
.nav__link:hover { color: var(--link); }
.nav__link:hover::after,
.nav__link.ist-aktiv::after { transform: scaleX(1); }
.nav__link.ist-aktiv { color: var(--link); }

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav-toggle__bar {
    display: block;
    height: 2px;
    background: var(--text);
    transition: transform .3s var(--weich), opacity .2s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: var(--kopf-hoehe) 0 0 0;
    padding: 1.5rem 2rem 2rem;
    background: rgba(255, 255, 255, .98);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s ease, transform .3s var(--weich), visibility .3s;
  }
  .nav.ist-offen {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__list { flex-direction: column; gap: .25rem; }
  .nav__link { padding: .8rem 0; font-size: 1.35rem; font-family: var(--schrift-titel); font-weight: 600; }
  .nav__link::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: max(755px, 100svh);
  padding-top: var(--kopf-hoehe);
  overflow: hidden;
  background: #222;
}
.hero__bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 24s ease-in-out infinite alternate;
}
.hero__inhalt {
  position: relative;
  padding: 2rem 1rem;
}
.hero__logo {
  width: min(728px, 92vw);
  animation: hero-ein 1.2s var(--weich) both .2s;
}
.hero__weiter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  color: var(--weiss);
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  animation: huepfen 2.2s ease-in-out infinite;
}
.hero__weiter:hover { color: var(--akzent); border-color: var(--akzent); }

@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes hero-ein {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes huepfen {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---------- Abschnitte ---------- */
.abschnitt { padding-block: var(--abstand); }
.abschnitt--braun {
  background: var(--braun);
  color: var(--weiss);
}
.abschnitt--braun h2,
.abschnitt--braun h3 { color: var(--weiss); }
.abschnitt--zentriert { text-align: center; }

.abschnitt__titel {
  margin-bottom: 2.5rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  text-align: center;
}
.abschnitt__titel--braun { color: var(--braun); }

/* Über mich */
.ueber {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.ueber__bild { margin: 0; }
.ueber__bild img {
  width: 100%;
  max-width: 272px;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.ueber__text { font-size: 1rem; }
@media (max-width: 700px) {
  .ueber { grid-template-columns: 1fr; gap: 1.5rem; }
  .ueber__text { text-align: center; }
}

/* Leistungen */
.leistungen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.leistung {
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  transition: transform .35s var(--weich), box-shadow .35s var(--weich), background .35s ease;
}
.leistung:hover {
  background: var(--weiss);
  transform: translateY(-6px);
  box-shadow: var(--schatten);
}
.leistung__icon {
  width: 77px;
  height: 77px;
  margin: 0 auto 1rem;
  object-fit: contain;
  transition: transform .5s var(--weich);
}
.leistung:hover .leistung__icon { transform: scale(1.12) rotate(-4deg); }
.leistung__titel {
  margin-bottom: .75rem;
  font-size: 1.5rem;
  color: var(--braun);
}
@media (max-width: 900px) { .leistungen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .leistungen { grid-template-columns: 1fr; } }

/* Galerie */
.galerie {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.galerie__eintrag {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #ddd;
  border-radius: var(--radius);
}
.galerie__eintrag--gross {
  grid-column: span 2;
  aspect-ratio: 4 / 4.2;
}
.galerie__link { display: block; width: 100%; height: 100%; }
.galerie__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--weich), filter .4s ease;
}
.galerie__link:hover img,
.galerie__link:focus-visible img { transform: scale(1.07); filter: brightness(1.05); }
@media (max-width: 700px) {
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Kontakt */
.kontakt { font-style: normal; font-size: 1rem; }
.kontakt a { color: var(--weiss); }
.kontakt a:hover { color: var(--akzent); }
.kontakt__aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.knopf {
  display: inline-block;
  padding: .7rem 1.6rem;
  background: var(--akzent);
  color: var(--dunkel) !important;
  font-family: var(--schrift-titel);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform .25s var(--weich), background .25s ease, box-shadow .25s ease;
}
.knopf:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); background: #ffd77a; }
.knopf--hell { background: transparent; border: 2px solid var(--weiss); color: var(--weiss) !important; }
.knopf--hell:hover { background: var(--weiss); color: var(--braun) !important; }

/* Partner */
.partner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  align-items: center;
  justify-content: center;
}
.partner img {
  width: auto;
  height: 90px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .8;
  transition: filter .4s ease, opacity .4s ease, transform .4s var(--weich);
}
.partner img:hover { filter: none; opacity: 1; transform: scale(1.06); }
.partner li:nth-child(2) img { height: 120px; }

/* Fußzeile */
.site-footer {
  background: var(--dunkel);
  color: var(--hintergrund);
  font-size: .9rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: center;
  justify-content: space-between;
  max-width: var(--breite-max);
  margin-inline: auto;
  padding: 2rem;
}
.site-footer a { color: var(--hintergrund); }
.site-footer a:hover { color: var(--akzent); }

/* Nach oben */
.nach-oben {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--braun);
  color: var(--weiss);
  border-radius: 50%;
  box-shadow: var(--schatten);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s var(--weich), visibility .3s, background .3s ease;
}
.nach-oben.ist-sichtbar { opacity: 1; visibility: visible; transform: none; }
.nach-oben:hover { background: var(--braun-dunkel); color: var(--akzent); }

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.seite {
  padding: calc(var(--kopf-hoehe) + var(--abstand)) 0 var(--abstand);
  min-height: 70vh;
}
.seite__inhalt { font-size: 1rem; }
.seite__inhalt h1 { margin-bottom: 1.5rem; font-size: clamp(2.25rem, 5vw, 3rem); color: var(--braun); }
.seite__inhalt h2 { margin: 2rem 0 .75rem; font-size: 1.75rem; color: var(--braun); }
.seite__inhalt p { overflow-wrap: anywhere; }

.seite__stand { color: #6b6b6b; font-size: .9rem; }
.seite__inhalt h1 + .seite__stand { margin-top: -.75rem; margin-bottom: 1.5rem; }
.daten { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: .5rem 1.5rem; margin: 0 0 1rem; }
.daten dt { font-weight: 700; }
.daten dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .daten { grid-template-columns: 1fr; gap: 0; } .daten dd { margin-bottom: .75rem; } }
.liste { margin: 0 0 1em; padding-left: 1.4rem; list-style: disc; }
/* Gelbe Markierung: Angaben, die noch ergänzt werden müssen */
.platzhalter { background: #ffe58a; color: #4a3a00; padding: 0 .3em; border-radius: 3px; font-style: normal; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
  background: rgba(20, 12, 4, .92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.lightbox.ist-offen { opacity: 1; visibility: visible; }
.lightbox__bild {
  max-width: min(100%, 1400px);
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 10px 50px rgba(0, 0, 0, .6);
  animation: lightbox-ein .35s var(--weich);
}
@keyframes lightbox-ein { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.lightbox__knopf {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, .12);
  color: var(--weiss);
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background .25s ease;
}
.lightbox__knopf:hover { background: rgba(255, 255, 255, .3); }
.lightbox__schliessen { top: 1rem; right: 1rem; }
.lightbox__zurueck { left: 1rem; top: 50%; margin-top: -24px; }
.lightbox__vor { right: 1rem; top: 50%; margin-top: -24px; }
.lightbox__zaehler {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .8);
  font-size: .9rem;
}

/* ---------- Scroll-Animationen ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--weich), transform .8s var(--weich);
  transition-delay: var(--verzoegerung, 0s);
}
.js .reveal--links { transform: translateX(-32px); }
.js .reveal--rechts { transform: translateX(32px); }
.js .reveal.ist-sichtbar { opacity: 1; transform: none; }

/* Hover-Lift darf die Reveal-Transition nicht ausbremsen */
.js .leistung.ist-sichtbar { transition: transform .35s var(--weich), box-shadow .35s var(--weich), background .35s ease, opacity .8s var(--weich); }

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .nach-oben, .hero__weiter, .lightbox { display: none !important; }
  .hero { min-height: auto; padding: 0; }
  .js .reveal { opacity: 1; transform: none; }
}
