/* =========================================================
   Schreinerei Mack – Stylesheet
   Farbwelt: Holz-/Naturtöne kombiniert mit Weiß und Anthrazit
   ========================================================= */

:root {
  /* Farben */
  --color-wood: #a97848;
  --color-wood-dark: #6b4a2b;
  --color-wood-light: #d9b98c;
  --color-anthracite: #2b2b2e;
  --color-anthracite-soft: #40434a;
  --color-white: #ffffff;
  --color-bg: #faf8f5;
  --color-bg-alt: #f1ece4;
  --color-text: #2b2b2e;
  --color-text-muted: #5c5a56;
  --color-border: #e3dcd1;

  /* Typografie */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  /* Layout */
  --container-width: 1140px;
  --header-height: 76px;
  --radius: 10px;
  --transition: 0.25s ease;
  --shadow-soft: 0 10px 30px rgba(43, 43, 46, 0.08);
  --shadow-strong: 0 16px 40px rgba(43, 43, 46, 0.16);
}

/* =========================================================
   Reset & Grundlagen
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-anthracite);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip-Link für Barrierefreiheit */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-anthracite);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  border: 2px solid transparent;
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-wood);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-wood-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-soft);
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-anthracite);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-wood);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.logo-img {
  height: 44px;
  width: auto;
  border-radius: 4px;
}

.logo-text strong {
  color: var(--color-wood-dark);
}

/* Navigation */
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-wood);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--color-wood-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--color-anthracite);
  color: var(--color-white) !important;
  padding: 10px 20px;
  border-radius: 999px;
}
.nav-cta::after {
  display: none;
}
.nav-cta:hover {
  background: var(--color-wood-dark);
}

/* Hamburger-Button (nur mobil sichtbar) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 600;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-anthracite);
  transition: transform var(--transition), opacity var(--transition);
}
.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: 88vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(43, 43, 46, 0.82), rgba(107, 74, 43, 0.65));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.eyebrow,
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-wood-light);
  margin-bottom: 0.8em;
}

.section-eyebrow {
  color: var(--color-wood-dark);
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 0.3em;
}

.hero-slogan {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1.6em;
}

/* =========================================================
   Sections – allgemein
   ========================================================= */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-intro {
  max-width: 640px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* =========================================================
   Über uns
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.about-image img {
  box-shadow: var(--shadow-strong);
}

.about-facts {
  margin-top: 1.5em;
  display: grid;
  gap: 10px;
}

.about-facts li {
  padding-left: 26px;
  position: relative;
  color: var(--color-text-muted);
}

.about-facts li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-wood);
  font-weight: 700;
}

/* =========================================================
   Leistungen – Karten
   ========================================================= */
.cards-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.card img {
  border-radius: 0;
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

.card-body {
  padding: 24px 26px 28px;
}

.card-highlight {
  color: var(--color-wood-dark);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.8em;
}

.card-body p:not(.card-highlight) {
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

/* =========================================================
   Warum Mack – Gründe
   ========================================================= */
.reasons-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px 32px;
}

.reason-number {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-wood-light);
  -webkit-text-stroke: 1px var(--color-wood-dark);
  margin-bottom: 0.2em;
}

.reason p {
  color: var(--color-text-muted);
}

/* =========================================================
   Galerie
   ========================================================= */
.gallery-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.gallery-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--color-white);
  transition: transform var(--transition);
}

.gallery-grid figure:hover {
  transform: translateY(-4px);
}

.gallery-grid img {
  border-radius: 0;
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Galerie-Filter */
.gallery-filters {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn:hover,
.filter-btn:focus-visible {
  border-color: var(--color-wood);
  color: var(--color-wood-dark);
}

.filter-btn.is-active {
  background: var(--color-anthracite);
  border-color: var(--color-anthracite);
  color: var(--color-white);
}

.gallery-grid figure.is-hidden {
  display: none;
}

/* Referenzen */
.references {
  margin-top: 70px;
  padding-top: 50px;
  border-top: 1px solid var(--color-border);
}

.references-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 32px;
}

.reference-block h4 {
  margin-bottom: 0.3em;
  font-size: 1.05rem;
  color: var(--color-wood-dark);
}

.reference-block p {
  margin: 0 0 0.3em;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.reference-meta {
  font-style: italic;
}

.references-footnote {
  margin-top: 30px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* =========================================================
   Kontakt
   ========================================================= */
.contact-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-card h3 {
  margin-top: 1.2em;
}
.contact-card h3:first-child {
  margin-top: 0;
}

address {
  font-style: normal;
  color: var(--color-text-muted);
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 10px;
}

.contact-label {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.contact-list a {
  font-weight: 600;
  color: var(--color-wood-dark);
}

.contact-cta {
  margin-top: 24px;
  width: 100%;
  text-align: center;
}

.hours-list {
  display: grid;
  gap: 10px;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-border);
}

.hours-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 12px;
  margin-bottom: 0;
}

.map-embed {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* =========================================================
   Impressum & Datenschutz
   ========================================================= */
.legal-section h2 {
  margin-bottom: 0.4em;
}

.legal-container {
  max-width: 780px;
}

.legal-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.legal-container p,
.legal-container h3 {
  color: var(--color-text);
}

.legal-container h3 {
  margin-top: 1.4em;
  font-size: 1.05rem;
}

.legal-signature {
  margin-top: 2em;
  font-family: var(--font-heading);
  font-style: italic;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--color-anthracite);
  color: rgba(255, 255, 255, 0.85);
  padding: 50px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--color-white);
}

.footer-brand .logo-mark {
  background: var(--color-wood-light);
  color: var(--color-anthracite);
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-nav a:hover {
  color: var(--color-wood-light);
}

.footer-copy {
  width: 100%;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  order: 3;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}

/* =========================================================
   Nach-oben-Button
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--color-anthracite);
  color: var(--color-white);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 400;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-wood-dark);
}

/* =========================================================
   Scroll-Reveal-Animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* =========================================================
   Responsive – Tablet
   ========================================================= */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-image {
    order: -1;
  }
}

/* =========================================================
   Responsive – Mobile
   ========================================================= */
@media (max-width: 720px) {
  .section {
    padding: 70px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 80vw);
    height: 100vh;
    background: var(--color-white);
    box-shadow: var(--shadow-strong);
    transform: translateX(100%);
    transition: transform var(--transition);
    padding: 100px 32px 32px;
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .hero {
    min-height: 100vh;
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   CMS: Hinweis-Banner
   ========================================================= */
.cms-banner {
  background: var(--color-wood-dark);
  color: var(--color-white);
  text-align: center;
  font-size: 0.95rem;
  padding: 10px 16px;
  position: relative;
  z-index: 500;
}

/* =========================================================
   CMS: Admin-Seite (admin.html)
   ========================================================= */
.admin-page {
  min-height: 100vh;
  background: var(--color-bg);
  padding: 40px 16px 80px;
}

.admin-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.admin-wrap h1 {
  font-family: var(--font-heading);
  margin-bottom: 4px;
}

.admin-hint {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.admin-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 24px 24px 28px;
  margin-bottom: 22px;
}

.admin-card h2 {
  font-size: 1.05rem;
  margin: 0 0 16px;
  color: var(--color-wood-dark);
}

.admin-field {
  margin-bottom: 14px;
}

.admin-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

.admin-field input[type="text"],
.admin-field input[type="password"],
.admin-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-base);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
}

.admin-field textarea {
  resize: vertical;
  min-height: 70px;
}

.admin-row {
  display: flex;
  gap: 14px;
}

.admin-row .admin-field {
  flex: 1;
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-checkbox input {
  width: 18px;
  height: 18px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.admin-status {
  font-size: 0.9rem;
}

.admin-status.is-ok { color: #2f7a3f; }
.admin-status.is-error { color: #b5402c; }

.admin-login {
  max-width: 360px;
  margin: 80px auto;
  text-align: center;
}
