/* ==========================================================================
   KOMPONENTEN  ·  Michael Koch Bedachungen
   Header/Navigation · Hero · Trust · Slider · Karten · Sektionen · Footer · Formulare
   ========================================================================== */

/* ---------- Reveal on scroll (nur ohne reduced-motion aktiv) ------------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; min-height: 84px; padding-block: .6rem;
}
.site-brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--c-primary); }
.site-brand img { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 900; font-size: 1.28rem; color: var(--c-primary); letter-spacing: -.01em; }
.brand-sub  { font-family: var(--font-body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent-strong); font-weight: 600; }

/* Primaernavigation */
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(.6rem, 1.4vw, 1.35rem); }
.primary-nav a {
  display: inline-flex; align-items: center; min-height: var(--touch);
  padding: .5rem .5rem; text-decoration: none; color: var(--c-primary);
  font-weight: 600; font-size: 1.02rem; position: relative;
  transition: color var(--dur) var(--ease);
}
.primary-nav a::after {
  content:""; position: absolute; left: .5rem; right: .5rem; bottom: .35rem; height: 3px;
  background: var(--c-accent); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.primary-nav a:hover { color: var(--c-accent-strong); }
.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after { transform: scaleX(1); }
.primary-nav .current-menu-item > a { color: var(--c-accent-strong); }

.header-cta { display: inline-flex; align-items: center; gap: 1rem; }
.header-phone {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  color: var(--c-primary); font-weight: 700; min-height: var(--touch); white-space: nowrap;
}
.header-phone svg { width: 1.2em; height: 1.2em; color: var(--c-accent); }
.header-phone:hover { color: var(--c-accent-strong); }

/* Burger */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: var(--touch); height: var(--touch); background: transparent;
  border: 2px solid var(--c-border); border-radius: var(--radius-sm); color: var(--c-primary);
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile Drawer */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
  .primary-nav {
    position: fixed; inset: 84px 0 auto 0; z-index: 999;
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 84px); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.5rem; }
  .primary-nav li { border-bottom: 1px solid var(--c-border); }
  .primary-nav a { min-height: 52px; font-size: 1.15rem; padding-inline: .25rem; }
  .primary-nav a::after { display: none; }
  .mobile-only-cta { display: flex; margin-top: 1rem; }
}
.mobile-only-cta { display: none; }

/* ==========================================================================
   HERO  ·  editorial, High-Contrast, dezente 3D-Tiefe
   ========================================================================== */
.hero { position: relative; overflow: hidden; background: var(--c-primary); color: #fff; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content:""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(21,27,34,.93) 0%, rgba(21,27,34,.80) 42%, rgba(21,27,34,.42) 100%);
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(4.5rem, 11vw, 8.5rem); }
.hero-content { max-width: 46rem; }
.hero .eyebrow { color: #E8B587; }
.hero h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.hero-sub { font-size: clamp(1.15rem, 2vw, 1.4rem); color: #E7EBEF; max-width: 40rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.2); }
.hero-badge { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: #EEF1F4; }
.hero-badge svg { width: 1.5em; height: 1.5em; color: #E8B587; flex: 0 0 auto; }
.hero-badge strong { display: block; font-family: var(--font-head); font-size: 1.4rem; color: #fff; line-height: 1; }
.hero-badge span { font-size: .92rem; color: #C9D2DA; }

/* ==========================================================================
   TRUST-BAR
   ========================================================================== */
.trust { border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-block: 2rem; }
.trust-item { display: flex; align-items: center; gap: .85rem; }
.trust-item svg { width: 2rem; height: 2rem; color: var(--c-accent); flex: 0 0 auto; }
.trust-item p { margin: 0; font-weight: 600; color: var(--c-primary); line-height: 1.3; }
.trust-item span { display: block; font-weight: 400; font-size: .9rem; color: var(--c-ink-soft); }
@media (max-width: 780px){ .trust-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 440px){ .trust-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   SLIDER  (CPT slide)  ·  barrierefrei mit Buttons, Dots, aria-live
   ========================================================================== */
.slider { position: relative; }
.slider-viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.slider-track { display: flex; transition: transform .6s var(--ease); }
@media (prefers-reduced-motion: reduce){ .slider-track { transition: none; } }
.slide {
  position: relative; flex: 0 0 100%; min-height: clamp(360px, 52vw, 560px);
  display: grid; align-items: end;
}
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content:""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(21,27,34,.86) 0%, rgba(21,27,34,.28) 55%, rgba(21,27,34,.08) 100%); }
.slide-caption { position: relative; z-index: 1; padding: clamp(1.5rem, 4vw, 3rem); max-width: 44rem; color: #fff; }
.slide-caption h3 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: .4rem; }
.slide-caption p { color: #EAEDF0; font-size: 1.1rem; margin: 0; }
.slide-caption .mkb-btn { margin-top: 1.25rem; }

.slider-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; gap: 1rem; }
.slider-dots { display: flex; gap: .6rem; flex-wrap: wrap; }
.slider-dots button {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.slider-dots button::before { content:""; width: 12px; height: 12px; border-radius: 50%; background: var(--c-border); transition: background var(--dur), transform var(--dur); }
.slider-dots button[aria-current="true"]::before { background: var(--c-accent); transform: scale(1.3); }
.slider-arrows { display: flex; gap: .6rem; }
.slider-arrows button {
  width: var(--touch); height: var(--touch); border-radius: 50%;
  border: 2px solid var(--c-border); background: var(--c-surface); color: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
}
.slider-arrows button:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.slider-arrows svg { width: 22px; height: 22px; }

/* ==========================================================================
   LEISTUNGEN  (CPT service)  ·  3D-Tilt-Karten mit weicher Tiefe
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.4vw, 2rem); }
@media (max-width: 900px){ .cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .cards { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transform-style: preserve-3d;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
  will-change: transform;
}
.card:hover, .card:focus-within { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c-accent) 45%, var(--c-border)); }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--c-muted); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .card-index {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  width: 2.6rem; height: 2.6rem; border-radius: 10px;
  background: var(--c-accent); color: #fff; font-family: var(--font-head); font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
}
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; transform: translateZ(30px); }
.card-body h3 { margin-bottom: .5rem; }
.card-body h3 a { color: var(--c-primary); text-decoration: none; }
.card-body h3 a:hover { color: var(--c-accent-strong); }
.card-body p { color: var(--c-ink-soft); margin-bottom: 1rem; }
.card-link { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--c-accent-strong); text-decoration: none; min-height: 32px; }
.card-link svg { width: 1.05em; height: 1.05em; transition: transform var(--dur) var(--ease); }
.card:hover .card-link svg { transform: translateX(4px); }
/* Stretched link fuer ganze Karte klickbar, ohne Semantik zu brechen */
.card-link::after { content:""; position: absolute; inset: 0; }

@media (prefers-reduced-motion: reduce) {
  .card, .card-media img { transition: none !important; transform: none !important; }
  .card:hover .card-media img { transform: none; }
}

/* Kompakte Leistungsliste (Sekundaerliste) */
.svc-list { columns: 2; column-gap: 3rem; margin: 0; padding: 0; list-style: none; }
@media (max-width: 640px){ .svc-list { columns: 1; } }
.svc-list li { break-inside: avoid; display: flex; gap: .7rem; align-items: flex-start; margin: 0 0 .85rem; padding: 0; }
.svc-list svg { width: 1.4em; height: 1.4em; color: var(--c-accent); flex: 0 0 auto; margin-top: .15em; }

/* ==========================================================================
   SPLIT / ABOUT  ·  Text + Bild mit 3D-Layering
   ========================================================================== */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split-media { order: -1; }
@media (max-width: 860px){ .split { grid-template-columns: 1fr; } .split--reverse .split-media { order: 0; } }
.split-media { position: relative; }
.split-media .frame {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.split-media .frame img { width: 100%; height: 100%; object-fit: cover; }
.split-media .badge-float {
  position: absolute; z-index: 2; background: var(--c-surface); border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg); border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: .85rem;
  bottom: -1.25rem; right: -1rem; max-width: 78%;
}
@media (max-width: 480px){ .split-media .badge-float { right: 0; bottom: -1rem; } }
.split-media .badge-float svg { width: 2.4rem; height: 2.4rem; color: var(--c-accent); flex: 0 0 auto; }
.split-media .badge-float strong { display:block; font-family: var(--font-head); font-size: 1.3rem; color: var(--c-primary); line-height: 1.1; }
.split-media .badge-float span { font-size: .9rem; color: var(--c-ink-soft); }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; margin: 0 0 .7rem; }
.check-list svg { width: 1.5em; height: 1.5em; color: var(--c-accent); flex: 0 0 auto; margin-top: .1em; }

/* ==========================================================================
   KONTAKT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px){ .contact-grid { grid-template-columns: 1fr; } }
.contact-cards { display: grid; gap: 1rem; }
.contact-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur), transform var(--dur);
}
.contact-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce){ .contact-card:hover { transform: none; } }
.contact-card svg { width: 1.7rem; height: 1.7rem; color: var(--c-accent); flex: 0 0 auto; margin-top: .15rem; }
.contact-card h3 { font-size: 1.05rem; margin: 0 0 .2rem; font-family: var(--font-body); font-weight: 700; color: var(--c-primary); }
.contact-card a { color: var(--c-accent-strong); text-decoration: none; font-weight: 600; }
.contact-card a:hover { text-decoration: underline; }
.contact-card p { margin: 0; color: var(--c-ink-soft); }

/* Formular (Contact Form 7 / [kontaktformular]) */
.form-wrap { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-md); }
.form-wrap label { display: block; font-weight: 600; color: var(--c-primary); margin: 0 0 .35rem; }
.form-wrap input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.form-wrap textarea, .form-wrap select {
  width: 100%; min-height: var(--touch); padding: .7rem .9rem; margin-bottom: 1.1rem;
  font: inherit; color: var(--c-ink);
  background: var(--c-bg); border: 2px solid var(--c-border); border-radius: var(--radius-sm);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.form-wrap textarea { min-height: 140px; resize: vertical; }
.form-wrap input:focus, .form-wrap textarea:focus, .form-wrap select:focus {
  border-color: var(--c-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-focus) 25%, transparent);
  outline: none;
}
.form-wrap input[type=submit], .wpcf7 input[type=submit] {
  min-height: var(--touch); padding: .8rem 1.8rem; border: 0; border-radius: var(--radius-sm);
  background: var(--c-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  transition: background var(--dur), transform var(--dur);
}
.form-wrap input[type=submit]:hover { background: var(--c-accent-strong); transform: translateY(-2px); }

/* ==========================================================================
   CTA-BANNER
   ========================================================================== */
.cta-banner { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--c-primary); color: #fff; padding: clamp(2.25rem, 5vw, 3.5rem); box-shadow: var(--shadow-lg); }
.cta-banner::before { content:""; position: absolute; inset: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(180,83,9,.35) 0%, transparent 55%); }
.cta-banner > * { position: relative; }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #DDE3E8; font-size: 1.15rem; max-width: 46rem; }
.cta-banner .cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

/* ==========================================================================
   SEITEN-CONTENT (page.php)  ·  Block-Editor-Inhalte
   ========================================================================== */
.page-hero { background: var(--c-primary); color: #fff; padding-block: clamp(3rem, 7vw, 5rem); position: relative; }
.page-hero .eyebrow { color: #E8B587; }
.page-hero h1 { color: #fff; margin: 0; }
.page-hero .breadcrumbs { margin-bottom: 1rem; }
.breadcrumbs { font-size: .92rem; color: #C9D2DA; }
.breadcrumbs a { color: #E8ECF0; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-hero .breadcrumbs a { color: #E8ECF0; }
.page-body { padding-block: var(--section-y); }
.entry-content { max-width: 800px; margin-inline: auto; }
.entry-content > * { margin-inline: auto; }
.entry-content h2 { margin-top: 2.2rem; }
.entry-content h3 { margin-top: 1.6rem; }
.entry-content img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.entry-content .wp-block-columns { gap: 2rem; }
.entry-content .wp-block-group.has-background { padding: clamp(1.25rem,3vw,2rem); border-radius: var(--radius); }
.entry-content ul li::marker { color: var(--c-accent); }
.wp-block-separator { border: 0; border-top: 2px solid var(--c-border); max-width: 120px; margin: 2.5rem auto; }
.wp-block-separator.is-style-wide { max-width: 100%; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #1B222B; color: #C3CCD5; padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
@media (max-width: 900px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2, .site-footer h3 { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #E8B587; }
.footer-brand img { height: 48px; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: .95; }
.footer-col h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: .02em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-col a { color: #C3CCD5; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-contact p { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .7rem; color: #C3CCD5; }
.footer-contact svg { width: 1.25em; height: 1.25em; color: #E8B587; flex: 0 0 auto; margin-top: .2em; }
.footer-contact a { color: #fff; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; font-size: .9rem; }
.footer-bottom nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
.footer-bottom a { color: #C3CCD5; text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }

/* Zurueck-nach-oben */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900;
  width: var(--touch); height: var(--touch); border-radius: 50%;
  background: var(--c-primary); color: #fff; border: 0; box-shadow: var(--shadow-lg);
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur), visibility var(--dur), transform var(--dur), background var(--dur);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-accent); }
.to-top svg { width: 24px; height: 24px; }
