/*
Theme Name: ST-Bauelemente Wuppertal
Theme URI: https://st-bauelemente-wuppertal.lead.bummeltech.com/
Author: ST-Bauelemente Wuppertal
Description: Individuelles Theme für ST-Bauelemente Wuppertal – Hersteller von Fenstern, Türen, Rollläden und Terrassenlösungen.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: st-bauelemente
*/

/* ============ DESIGN TOKENS ============ */
:root{
  /* Farben – gedämpfte, natürliche Palette: warmes Off-White + Anthrazit + EIN Bronze-Akzent */
  --color-bg: oklch(97.3% 0.006 80);
  --color-bg-soft: oklch(93.5% 0.012 75);
  --color-surface: oklch(100% 0 0);
  --color-fg: oklch(23% 0.018 262);
  --color-fg-muted: oklch(44% 0.02 262);
  --color-border: oklch(87% 0.012 75);
  --color-accent: oklch(57% 0.115 48);
  --color-accent-dark: oklch(45% 0.105 46);
  --color-accent-contrast: oklch(99% 0.004 80);
  --color-band: oklch(20.5% 0.019 258);
  --color-band-fg: oklch(95.5% 0.008 75);
  --color-band-fg-muted: oklch(78% 0.015 75);

  /* Typografie-Skala – Verhältnis 1.333 (perfect fourth) */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --text-body: 1.125rem;      /* 18px */
  --text-small: 0.9rem;       /* ~14.4px */
  --text-h3: clamp(1.4rem, 1.1rem + 1vw, 1.7rem);
  --text-h2: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --text-h1: clamp(2.75rem, 1.9rem + 3.6vw, 4.5rem);

  /* Radien – max 8px, EINE Ausnahme bewusst größer (Hero-Bildmaske) */
  --radius-sm: 6px;
  --radius-feature: 28px;

  /* Schatten – max zweistufig */
  --shadow-soft: 0 1px 2px oklch(20% 0.02 260 / 0.06), 0 8px 24px oklch(20% 0.02 260 / 0.07);
  --shadow-lift: 0 2px 4px oklch(20% 0.02 260 / 0.08), 0 20px 48px oklch(20% 0.02 260 / 0.14);

  /* Abstände – variieren sichtbar (64px – 160px) */
  --space-tight: clamp(2.5rem, 2rem + 2vw, 4rem);
  --space-wide: clamp(4.5rem, 2.5rem + 9vw, 10rem);

  --max-content: 1280px;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: 220ms;
}

/* ============ RESET ============ */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;overflow-x:hidden}
body{margin:0;overflow-x:hidden}
img,picture,video,iframe{max-width:100%;height:auto;display:block}
svg{max-width:100%;height:auto}
.icon{width:1.4em;height:1.4em;flex:0 0 auto;vertical-align:middle;max-width:32px;max-height:32px}
h1,h2,h3,h4{font-family:var(--font-display);line-height:1.12;margin:0 0 .5em;color:var(--color-fg);text-wrap:pretty;font-weight:600}
p{margin:0 0 1.1em;text-wrap:pretty}
a{color:inherit;text-decoration:none}
ul{margin:0;padding:0}
button{font-family:inherit;cursor:pointer}

body{
  font-family:var(--font-body);
  font-size:var(--text-body);
  line-height:1.6;
  color:var(--color-fg);
  background:var(--color-bg);
}

h1{font-size:var(--text-h1)}
h2{font-size:var(--text-h2)}
h3{font-size:var(--text-h3)}

a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:3px solid var(--color-accent);
  outline-offset:3px;
  border-radius:4px;
}

.container{max-width:var(--max-content);margin-inline:auto;padding-inline:clamp(1.25rem,4vw,2.5rem)}
.prose{max-width:62ch}
.prose-wide{max-width:72ch}

.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex;align-items:center;gap:.6rem;
  padding:.85rem 1.7rem;
  border-radius:var(--radius-sm);
  font-weight:600;font-size:1rem;
  border:2px solid transparent;
  transition:transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  white-space:nowrap;
  min-height:44px;
}
.btn--primary{background:var(--color-accent);color:var(--color-accent-contrast);box-shadow:var(--shadow-soft)}
.btn--primary:hover{background:var(--color-accent-dark);transform:translateY(-2px) scale(1.03);box-shadow:var(--shadow-lift)}
.btn--primary:active{transform:scale(.98)}
.btn--ghost{background:transparent;border-color:currentColor;color:var(--color-band-fg)}
.btn--ghost:hover{background:oklch(100% 0 0 / 0.08);transform:translateY(-2px)}
.btn--ghost:active{transform:scale(.98)}
.btn--on-light{color:var(--color-fg);border-color:var(--color-border)}
.btn--on-light:hover{background:var(--color-bg-soft)}

/* ============ HEADER ============ */
.site-header{
  position:sticky;top:0;z-index:100;
  background:oklch(97.3% 0.006 80 / 0.92);
  border-bottom:1px solid var(--color-border);
  transition:padding var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
@media (min-width:901px){
  .site-header{backdrop-filter:blur(10px);saturate(140%)}
}
.site-header.is-condensed{box-shadow:var(--shadow-soft)}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;gap:1.5rem;
  padding-block:1rem;
  transition:padding var(--dur) var(--ease-out);
}
.site-header.is-condensed .header-inner{padding-block:.6rem}

.brand{display:flex;align-items:center;gap:.7rem;min-width:0}
.brand svg{height:48px;width:auto;max-width:200px;flex-shrink:0}
.site-header.is-condensed .brand svg{height:40px}
.brand-name{
  font-family:var(--font-display);font-weight:600;
  font-size:1.15rem;line-height:1.15;
  color:var(--color-fg);
  max-width:14em;
}
.logo-bg{fill:var(--color-accent)}

.primary-nav{display:flex;align-items:center;gap:2.1rem}
.primary-nav ul{display:flex;align-items:center;gap:2.1rem;list-style:none}
.primary-nav a{
  font-weight:500;font-size:1rem;
  padding:.3rem 0;position:relative;
  transition:color var(--dur) var(--ease-out);
}
.primary-nav a::after{
  content:"";position:absolute;left:0;right:100%;bottom:-2px;height:2px;background:var(--color-accent);
  transition:right var(--dur) var(--ease-out);
}
.primary-nav a:hover::after,.primary-nav a:focus-visible::after{right:0}

.primary-nav .sub-menu{
  list-style:none;position:absolute;top:100%;left:0;min-width:220px;
  background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-sm);
  box-shadow:var(--shadow-lift);padding:.5rem;
  opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
  flex-direction:column;gap:.1rem;
  z-index:50;
}
.primary-nav li{position:relative}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
.primary-nav .sub-menu a{display:block;padding:.55rem .7rem;border-radius:4px}
.primary-nav .sub-menu a:hover{background:var(--color-bg-soft)}
.primary-nav .sub-menu a::after{display:none}

.header-cta{flex-shrink:0}

.burger{
  display:none;
  flex-shrink:0;
  width:44px;height:44px;align-items:center;justify-content:center;
  background:transparent;border:none;padding:0;position:relative;z-index:60;
}
.burger-box{position:relative;display:inline-block;width:24px;height:18px}
.burger-box span{
  position:absolute;left:0;width:100%;height:2px;background:var(--color-fg);border-radius:2px;
  transition:transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), top var(--dur) var(--ease-out);
}
.burger-box span:nth-child(1){top:0}
.burger-box span:nth-child(2){top:8px}
.burger-box span:nth-child(3){top:16px}
.burger[aria-expanded="true"] .burger-box span:nth-child(1){top:8px;transform:rotate(45deg)}
.burger[aria-expanded="true"] .burger-box span:nth-child(2){opacity:0}
.burger[aria-expanded="true"] .burger-box span:nth-child(3){top:8px;transform:rotate(-45deg)}

/* ============ MOBILE DRAWER (Kind von body, NICHT von header) ============ */
.mobile-drawer{
  position:fixed;inset:0 0 0 auto;width:min(86vw,360px);
  background:var(--color-surface);
  box-shadow:-18px 0 40px oklch(20% 0.02 260 / 0.18);
  transform:translateX(100%);
  transition:transform var(--dur) var(--ease-out);
  z-index:65;
  padding:5.5rem 1.75rem 2rem;
  overflow-y:auto;
}
.mobile-drawer.is-open{transform:translateX(0)}
.mobile-drawer ul{list-style:none;display:flex;flex-direction:column;gap:.2rem}
.mobile-drawer .sub-menu{padding-left:1rem;margin-top:.2rem}
.mobile-drawer a{display:block;padding:.85rem 0;font-size:1.1rem;font-weight:500;border-bottom:1px solid var(--color-border)}
.drawer-overlay{
  position:fixed;inset:0;background:oklch(20% 0.02 260 / 0.45);
  z-index:60;opacity:0;visibility:hidden;transition:opacity var(--dur) var(--ease-out), visibility var(--dur);
}
.drawer-overlay.is-open{opacity:1;visibility:visible}
.drawer-close{
  position:absolute;top:1.4rem;right:1.4rem;width:44px;height:44px;
  display:flex;align-items:center;justify-content:center;background:var(--color-bg-soft);border:none;border-radius:var(--radius-sm);
}

@media (max-width:900px){
  .primary-nav{display:none}
  .header-cta{display:none}
  .burger{display:flex}
  .site-header{backdrop-filter:none}
  .primary-nav li:hover > .sub-menu,
  .primary-nav li:focus-within > .sub-menu{transform:none}
}

/* ============ HERO (split, Bild rechts randabfallend) ============ */
.hero{
  min-height:100vh;
  display:grid;
  grid-template-columns:7fr 5fr;
  align-items:center;
  gap:clamp(1.5rem,4vw,3rem);
  background:var(--color-bg);
  overflow:hidden;
}
.hero-text{padding-left:clamp(1.25rem,6vw,5rem);max-width:560px}
.hero-eyebrow{
  display:inline-flex;align-items:center;gap:.5rem;
  font-size:var(--text-small);font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  color:var(--color-accent-dark);margin-bottom:1.1rem;
}
.hero-eyebrow::before{content:"";width:28px;height:2px;background:var(--color-accent)}
.hero h1{margin-bottom:.6em}
.hero-lede{font-size:1.2rem;color:var(--color-fg-muted);max-width:34ch;margin-bottom:1.8rem}
.hero-ctas{display:flex;gap:1rem;flex-wrap:wrap}
.hero-media{
  position:relative;align-self:stretch;height:100%;min-height:60vh;
  overflow:hidden;
}
.hero-media img{width:100%;height:100%;object-fit:cover;border-radius:var(--radius-feature) 0 0 var(--radius-feature);}
.hero-media::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(135deg, oklch(20% 0.02 260 / 0.18), transparent 55%);
  border-radius:var(--radius-feature) 0 0 var(--radius-feature);
}

@media (max-width:900px){
  .hero{grid-template-columns:1fr;min-height:unset;padding-top:1rem}
  .hero-text{padding-left:0;padding-inline:clamp(1.25rem,5vw,2rem);padding-top:2.5rem;max-width:unset}
  .hero-media{order:-1;min-height:46vh}
  .hero-media img,.hero-media::after{border-radius:0 0 var(--radius-feature) var(--radius-feature)}
  .hero-lede{max-width:unset}
}

/* ============ SECTIONS / RHYTHM ============ */
.section{padding-block:var(--space-wide)}
.section--tight{padding-block:var(--space-tight)}
.section--band{
  background:var(--color-band);color:var(--color-band-fg);
}
.section--band h2,.section--band h3{color:var(--color-band-fg)}
.section--band p{color:var(--color-band-fg-muted)}
.section--soft{background:var(--color-bg-soft)}

.section-head{max-width:40rem;margin-bottom:clamp(2rem,4vw,3.5rem)}
.section-kicker{
  font-size:var(--text-small);font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  color:var(--color-accent-dark);display:block;margin-bottom:.7rem;
}
.section--band .section-kicker{color:var(--color-accent)}
.section-head p{color:var(--color-fg-muted);font-size:1.1rem}
.section--band .section-head p{color:var(--color-band-fg-muted)}

/* ============ ASYMMETRIC GRID (7/5) ============ */
.split-7-5{display:grid;grid-template-columns:7fr 5fr;gap:clamp(1.5rem,4vw,4rem);align-items:center}
.split-5-7{display:grid;grid-template-columns:5fr 7fr;gap:clamp(1.5rem,4vw,4rem);align-items:center}
@media (max-width:900px){
  .split-7-5,.split-5-7{grid-template-columns:1fr}
}

/* ============ SERVICE CARDS (dichter Block, eigener Rhythmus) ============ */
.service-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;
}
@media (max-width:1100px){.service-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){.service-grid{grid-template-columns:1fr}}

.service-card{
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:var(--radius-sm);
  overflow:hidden;
  display:flex;flex-direction:column;
  transition:transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.service-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lift)}
.service-card-media{aspect-ratio:4/3;overflow:hidden}
.service-card-media img{width:100%;height:100%;object-fit:cover;transition:transform .5s var(--ease-out)}
.service-card:hover .service-card-media img{transform:scale(1.05)}
.service-card-body{padding:1.5rem;display:flex;flex-direction:column;gap:.6rem;flex:1}
.service-card-body h3{font-size:1.25rem;margin-bottom:0}
.service-card-body p{color:var(--color-fg-muted);font-size:1rem;margin-bottom:0;flex:1}
.service-card-link{font-weight:600;color:var(--color-accent-dark);display:inline-flex;align-items:center;gap:.4rem;margin-top:.3rem}
.service-card-link svg{transition:transform var(--dur) var(--ease-out)}
.service-card-link:hover svg{transform:translateX(3px)}

/* ============ SLIDER ============ */
.hero-slider{position:relative}
.slider-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;gap:0;scrollbar-width:none}
.slider-track::-webkit-scrollbar{display:none}
.slide{
  flex:0 0 100%;scroll-snap-align:start;position:relative;min-height:70vh;
  display:flex;align-items:flex-end;
}
.slide img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.slide::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg, oklch(20% 0.02 260 / 0.05) 30%, oklch(18% 0.02 260 / 0.78));z-index:1}
.slide-content{position:relative;z-index:2;padding:clamp(2rem,6vw,4.5rem);color:var(--color-band-fg);max-width:40rem}
.slide-content .section-kicker{color:var(--color-accent)}
.slide-content h2{color:#fff;margin-bottom:.5rem}
.slide-content p{color:oklch(92% 0.01 75);margin-bottom:1.3rem}
.slider-nav{position:absolute;bottom:1.5rem;right:clamp(1.5rem,5vw,3.5rem);z-index:3;display:flex;gap:.6rem}
.slider-dot{width:10px;height:10px;border-radius:50%;background:oklch(100% 0 0 / 0.4);border:none;padding:0;transition:background var(--dur), transform var(--dur)}
.slider-dot.is-active{background:var(--color-accent);transform:scale(1.2)}
.slider-arrows{position:absolute;top:50%;left:0;right:0;display:flex;justify-content:space-between;padding-inline:1rem;transform:translateY(-50%);z-index:3;pointer-events:none}
.slider-arrow{pointer-events:auto;width:48px;height:48px;border-radius:50%;background:oklch(100% 0 0 / 0.85);border:none;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow-soft);transition:transform var(--dur) var(--ease-out), background var(--dur)}
.slider-arrow:hover{background:#fff;transform:scale(1.08)}
@media (max-width:600px){.slide{min-height:60vh}.slider-arrow{width:40px;height:40px}}

/* ============ STATS / COUNTER ============ */
.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(1.5rem,4vw,3rem)}
@media (max-width:700px){.stat-row{grid-template-columns:1fr;gap:2rem}}
.stat{text-align:left}
.stat-number{font-family:var(--font-display);font-size:clamp(2.2rem,4vw,3.2rem);font-weight:600;color:var(--color-accent);display:block;line-height:1}
.stat-label{color:var(--color-band-fg-muted);font-size:1rem;margin-top:.4rem}

/* ============ CONTACT ROWS (Icons dezent) ============ */
.contact-list{list-style:none;display:flex;flex-direction:column;gap:1rem}
.contact-list li{display:flex;align-items:center;gap:.6rem}
.contact-list a{font-weight:500}
.contact-list .icon{color:var(--color-accent)}

/* ============ FOOTER ============ */
.site-footer{background:var(--color-band);color:var(--color-band-fg);padding-block:var(--space-tight)}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:clamp(2rem,5vw,4rem)}
@media (max-width:900px){.footer-grid{grid-template-columns:1fr 1fr}}
@media (max-width:600px){.footer-grid{grid-template-columns:1fr;gap:2.2rem}}
.footer-brand{display:flex;align-items:center;gap:.6rem;margin-bottom:1rem}
.footer-brand svg{height:34px;width:auto}
.footer-brand span{font-family:var(--font-display);font-weight:600;font-size:1.05rem;color:var(--color-band-fg)}
.site-footer h4{color:var(--color-band-fg);font-family:var(--font-body);font-size:1rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase;margin-bottom:1rem}
.footer-links{list-style:none;display:flex;flex-direction:column;gap:.65rem}
.footer-links a{color:var(--color-band-fg-muted);transition:color var(--dur)}
.footer-links a:hover{color:var(--color-band-fg)}
.footer-bottom{
  margin-top:var(--space-tight);padding-top:1.5rem;border-top:1px solid oklch(100% 0 0 / 0.12);
  display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;align-items:center;
  font-size:var(--text-small);color:var(--color-band-fg-muted);
}
.footer-bottom nav{display:flex;gap:1.3rem;flex-wrap:wrap}
.footer-bottom a:hover{color:var(--color-band-fg)}

/* ============ SCROLL REVEAL (transform-only, kein opacity:0 Start!) ============ */
.reveal{
  transform:translateY(28px);
  transition:transform .6s var(--ease-out);
  will-change:transform;
}
.reveal.is-visible{transform:translateY(0)}
.reveal-stagger > *{transform:translateY(24px);transition:transform .55s var(--ease-out)}
.reveal-stagger.is-visible > *{transform:translateY(0)}

@media (prefers-reduced-motion:reduce){
  .reveal,.reveal-stagger > *,.service-card,.btn,.slider-arrow,.service-card-media img{transition:none !important}
  .reveal,.reveal-stagger > *{transform:none !important}
}

/* ============ MISC CONTENT BLOCKS ============ */
.wp-block-group.callout{
  background:var(--color-bg-soft);border-radius:var(--radius-sm);padding:clamp(1.5rem,4vw,2.5rem);
  border-left:3px solid var(--color-accent);
}
.entry-content :where(h2,h3){margin-top:1.6em}
.entry-content ul:not(.wp-block-list){list-style:none}
.entry-content ul.wp-block-list{padding-left:1.4rem}
.entry-content ul.wp-block-list li{margin-bottom:.5rem}
.page-hero{
  background:var(--color-band);color:var(--color-band-fg);
  padding-block:clamp(4rem,10vw,6.5rem) clamp(2.5rem,6vw,4rem);
}
.page-hero h1{color:#fff;max-width:34rem}
.page-hero p{color:var(--color-band-fg-muted);max-width:40rem;font-size:1.15rem}
.breadcrumb{font-size:var(--text-small);color:var(--color-band-fg-muted);margin-bottom:1rem}
.breadcrumb a{text-decoration:underline;text-decoration-color:oklch(100% 0 0 / 0.3)}
.entry-wrap{padding-block:var(--space-wide)}
.entry-wrap .container{max-width:860px}

.cta-banner{
  background:var(--color-accent);color:var(--color-accent-contrast);
  border-radius:var(--radius-sm);
  padding:clamp(2rem,5vw,3.5rem);
  display:flex;flex-wrap:wrap;gap:1.5rem;align-items:center;justify-content:space-between;
}
.cta-banner h2,.cta-banner h3{color:var(--color-accent-contrast)}
.cta-banner .btn--primary{background:var(--color-accent-contrast);color:var(--color-accent-dark)}
.cta-banner .btn--primary:hover{background:#fff}

.emergency-bar{
  background:var(--color-fg);color:#fff;
  text-align:center;padding:.7rem 1rem;font-size:.95rem;font-weight:500;
}
.emergency-bar a{text-decoration:underline;color:var(--color-accent)}

@media (max-width:600px){
  .section{padding-block:clamp(3rem,10vw,5rem)}
  h1{line-height:1.08}
  .cta-banner{flex-direction:column;align-items:flex-start}
}
