/* ==========================================================
   Zimmerei Markus Siegl — style.css
   Palette: Graphit #121412 · Waldgrün #24362A · Holz #B77A3B
            Beige #E8DFD1 · Off-White #F4F1EA · Weiß #FFF
   ========================================================== */

:root {
  --graphit: #121412;
  --gruen: #24362A;
  --holz: #B77A3B;
  --beige: #E8DFD1;
  --offwhite: #F4F1EA;
  --weiss: #FFFFFF;
  --text-muted: rgba(18, 20, 18, 0.68);
  --line: rgba(18, 20, 18, 0.14);
  --line-light: rgba(244, 241, 234, 0.18);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --radius: 4px;
  --shadow: 0 18px 40px rgba(18, 20, 18, 0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--graphit);
  background: var(--offwhite);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 92%); margin-inline: auto; }

h1, h2, h3 { line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  font-weight: 600; font-size: 0.98rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--holz); color: var(--weiss); }
.btn-primary:hover { background: #a06a30; }
.btn-ghost { border-color: rgba(244,241,234,0.6); color: var(--offwhite); }
.btn-ghost:hover { background: rgba(244,241,234,0.12); border-color: var(--offwhite); }
.btn-ghost-light { border-color: rgba(244,241,234,0.6); color: var(--offwhite); }
.btn-ghost-light:hover { background: rgba(244,241,234,0.12); border-color: var(--offwhite); }
.btn-outline { border-color: var(--graphit); color: var(--graphit); }
.btn-outline:hover { background: var(--graphit); color: var(--offwhite); }
.btn-small { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 20, 18, 0.92);
  backdrop-filter: blur(10px);
  color: var(--offwhite);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,0.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  background: var(--holz); color: var(--weiss);
  font-family: var(--font-serif); font-size: 1.5rem;
  border-radius: var(--radius);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.1rem; letter-spacing: 0.12em; }
.brand-text small { font-size: 0.72rem; letter-spacing: 0.08em; opacity: 0.75; text-transform: uppercase; }
.main-nav ul { display: flex; gap: 1.6rem; list-style: none; }
.main-nav a { font-size: 0.93rem; font-weight: 500; opacity: 0.85; transition: opacity 0.25s, color 0.25s; }
.main-nav a:hover { opacity: 1; color: var(--holz); }
.header-actions { display: flex; align-items: center; gap: 0.8rem; }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--offwhite); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  color: var(--offwhite);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%; height: 115%;
  object-fit: cover; object-position: center 40%;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,20,18,0.62) 0%, rgba(18,20,18,0.45) 45%, rgba(18,20,18,0.85) 100%),
              linear-gradient(100deg, rgba(18,20,18,0.55) 0%, transparent 60%);
}
.hero-content { padding: 8rem 0 6rem; max-width: 1180px; }
.hero-kicker {
  display: flex; align-items: center; gap: 0.9rem;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--beige);
  margin-bottom: 1.6rem;
}
.line-accent { width: 52px; height: 2px; background: var(--holz); display: inline-block; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  margin-bottom: 1.4rem;
  max-width: 16ch;
}
.hero h1 em { font-family: var(--font-serif); font-weight: 500; font-style: italic; color: var(--holz); }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 46ch; color: rgba(244,241,234,0.9); margin-bottom: 2.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }
.hero-rating { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; color: rgba(244,241,234,0.9); margin-bottom: 0.7rem; }
.stars { color: var(--holz); letter-spacing: 0.12em; font-size: 1.05rem; }
.stars-large { font-size: 1.4rem; }
.hero-location { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; opacity: 0.8; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(244,241,234,0.5); border-radius: 14px;
}
.hero-scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--holz); border-radius: 2px;
  animation: scrollHint 2s infinite;
}
@keyframes scrollHint {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 8px; }
}

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--gruen); color: var(--offwhite); padding: 2rem 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.trust-item {
  display: flex; align-items: center; gap: 0.7rem;
  font-weight: 600; font-size: 0.98rem;
  padding-left: 1.1rem; border-left: 1px solid var(--line-light);
}
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-num { color: var(--holz); font-size: 1.4rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-dark { background: var(--graphit); color: var(--offwhite); }
.section-beige { background: var(--beige); }

.section-head {
  display: flex; align-items: center; gap: 1.6rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-num {
  font-family: var(--font-serif); font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--holz); line-height: 1; flex-shrink: 0;
}
.section-kicker {
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--holz); margin-bottom: 0.35rem;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section-line { flex: 1; height: 1px; background: var(--line); transform-origin: left; }
.section-dark .section-line { background: var(--line-light); }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.service-card {
  background: var(--weiss);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.8rem; margin-bottom: 1.1rem;
}
.card-thumb {
  width: 88px; height: 60px; flex: 0 0 auto;
  object-fit: cover; border-radius: calc(var(--radius) * 0.6);
  display: block;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px; background: var(--holz);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon { width: 40px; height: 40px; color: var(--gruen); }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.55rem; overflow-wrap: break-word; hyphens: auto; }
.service-card p { font-size: 0.95rem; color: var(--text-muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-text p { margin-bottom: 1.2rem; color: rgba(244,241,234,0.88); max-width: 58ch; }
.about-text .btn { margin-top: 0.6rem; }
.about-figure { position: relative; }
.about-figure img {
  border-radius: var(--radius);
  aspect-ratio: 1 / 1; object-fit: cover;
  box-shadow: var(--shadow);
}
.about-figure::after {
  content: ""; position: absolute; inset: -14px 14px 14px -14px;
  border: 1.5px solid var(--holz); border-radius: var(--radius);
  z-index: -1;
}
.about-figure figcaption {
  position: absolute; bottom: 1rem; left: 1rem;
  background: rgba(18,20,18,0.75); color: var(--offwhite);
  font-size: 0.82rem; padding: 0.4rem 0.9rem; border-radius: 2px;
  backdrop-filter: blur(6px);
}

/* ---------- Gallery (masonry) ---------- */
.gallery { columns: 3; column-gap: 1.2rem; }
.gallery-item { break-inside: avoid; margin-bottom: 1.2rem; }
.gallery-btn {
  display: block; width: 100%; position: relative;
  border: 0; padding: 0; cursor: zoom-in; background: none;
  border-radius: var(--radius); overflow: hidden;
}
.gallery-btn img { width: 100%; transition: transform 0.6s var(--ease); }
.gallery-item:nth-child(1) img { aspect-ratio: 1/1; object-fit: cover; }
.gallery-item:nth-child(2) img { aspect-ratio: 4/5; object-fit: cover; }
.gallery-item:nth-child(3) img { aspect-ratio: 1/1; object-fit: cover; }
.gallery-btn:hover img, .gallery-btn:focus-visible img { transform: scale(1.05); }
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(18,20,18,0.8));
  color: var(--offwhite); font-size: 0.85rem; font-weight: 600;
  text-align: left;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.gallery-btn:hover .gallery-caption, .gallery-btn:focus-visible .gallery-caption { opacity: 1; transform: translateY(0); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; list-style: none; counter-reset: step; }
.step {
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  font-family: var(--font-serif); font-size: 2.4rem;
  color: var(--holz); display: block; line-height: 1;
}
.step .card-top { align-items: center; }
.step h3 { font-size: 1.08rem; margin-bottom: 0.5rem; overflow-wrap: break-word; hyphens: auto; }
.step p { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Reviews ---------- */
.rating-summary { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 2.5rem; }
.rating-big { font-family: var(--font-serif); font-size: clamp(3.4rem, 8vw, 5rem); color: var(--holz); line-height: 1; }
.rating-summary p { color: rgba(244,241,234,0.8); }
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-bottom: 2.4rem; }
.review-card {
  background: rgba(244,241,234,0.05);
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--holz);
  border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
}
.review-card .stars { display: block; margin-bottom: 0.8rem; }
.review-card p { font-size: 1.05rem; margin-bottom: 1rem; color: rgba(244,241,234,0.92); }
.review-card footer { font-size: 0.85rem; color: rgba(244,241,234,0.6); }

/* ---------- Location ---------- */
.location-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.location-info address { font-style: normal; font-size: 1.1rem; line-height: 1.9; margin-bottom: 1.8rem; }
.location-region { color: var(--text-muted); font-size: 0.95rem; }
.location-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.map-block {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--gruen), #1b291f);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; place-items: center;
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244,241,234,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,241,234,0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}
.map-pin { position: relative; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4)); animation: pinFloat 3s ease-in-out infinite; }
@keyframes pinFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.map-label {
  position: absolute; bottom: 1rem; left: 1rem;
  background: rgba(18,20,18,0.75); color: var(--offwhite);
  font-size: 0.82rem; padding: 0.4rem 0.9rem; border-radius: 2px;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.contact-item { margin-bottom: 1.6rem; }
.contact-item h3 {
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--holz); margin-bottom: 0.35rem;
}
.contact-phone { font-size: 1.35rem; font-weight: 700; }
.contact-item a:hover { color: var(--holz); }
.contact-sub { display: block; font-size: 0.9rem; color: var(--text-muted); }

.contact-form { background: var(--weiss); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem); }
.form-row { margin-bottom: 1.2rem; }
.form-row label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  font: inherit; background: var(--offwhite); color: var(--graphit);
  transition: border-color 0.25s, background 0.25s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--holz); background: var(--weiss);
}
.form-checkbox { display: flex; gap: 0.7rem; align-items: flex-start; }
.form-checkbox input { width: auto; margin-top: 0.3rem; accent-color: var(--holz); }
.form-checkbox label { font-weight: 400; font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.form-error { color: #a33; font-size: 0.9rem; margin-bottom: 1rem; }
.form-success {
  margin-top: 1.2rem; padding: 1rem 1.2rem;
  background: var(--gruen); color: var(--offwhite);
  border-radius: var(--radius); font-size: 0.95rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--graphit); color: var(--offwhite); padding: 3.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.8rem; }
.footer-brand p { margin-top: 0.9rem; color: rgba(244,241,234,0.65); font-size: 0.92rem; }
.footer-head { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--holz); margin-bottom: 1rem; }
.footer-col { font-size: 0.95rem; line-height: 2; }
.footer-col ul { list-style: none; }
.footer-col a:hover { color: var(--holz); }
.footer-bottom {
  border-top: 1px solid var(--line-light);
  padding: 1.4rem 0;
  font-size: 0.85rem; color: rgba(244,241,234,0.55);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(18,20,18,0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lb-figure { max-width: min(90vw, 1000px); text-align: center; }
.lb-figure img {
  max-width: 100%; max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  margin-inline: auto;
}
.lb-figure figcaption { color: var(--offwhite); margin-top: 1rem; font-size: 0.95rem; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(244,241,234,0.1); color: var(--offwhite);
  border: 1px solid rgba(244,241,234,0.3); border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.6rem; line-height: 1;
  cursor: pointer; transition: background 0.25s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--holz); border-color: var(--holz); }
.lb-close { top: 1.4rem; right: 1.4rem; }
.lb-prev { left: 1.4rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.4rem; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal animations (nur via JS-Klasse) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in-view { opacity: 1; transform: translateY(0); }
.js .section-line { transform: scaleX(0); transition: transform 0.9s var(--ease) 0.2s; }
.js .in-view .section-line, .js .section-head.in-view .section-line { transform: scaleX(1); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed; inset: 64px 0 auto 0;
    background: rgba(18,20,18,0.98);
    padding: 1.5rem 4%;
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
    z-index: 99;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 1.1rem; }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }

  .trust-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .trust-item { border-left: 0; padding-left: 0; font-size: 0.9rem; }
  .about-grid, .location-grid, .contact-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 6.5rem 0 5rem; }
  .js .reveal { transform: translateY(14px); transition-duration: 0.5s; }
}

@media (max-width: 639px) {
  .services-grid, .steps { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .service-card, .step { padding: 1rem 0.85rem; }
  .card-thumb { width: 64px; height: 48px; }
  .card-top { margin-bottom: 0.7rem; gap: 0.5rem; }
  .service-icon { width: 30px; height: 30px; }
  .step-num { font-size: 1.7rem; }
  .service-card h3 { font-size: 0.95rem; }
  .service-card p { font-size: 0.82rem; }
  .step h3 { font-size: 0.9rem; }
  .step p { font-size: 0.8rem; }
}

@media (hover: none) {
  .service-card:hover, .step:hover { transform: none; box-shadow: none; }
  .service-card:hover .card-img, .step:hover .card-img { transform: none; }
}

@media (max-width: 390px) {
  .gallery { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .section-line { transform: scaleX(1); }
}
