/* ==========================================================================
   Wirth & Söhne — Bad- und Heizungsbau
   Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter+Tight:wght@300;400;500;600&display=swap');

:root {
  /* Neutrals — viel Weiß, warmes Off-White */
  --paper: #fafaf7;
  --paper-warm: #f4f1ea;
  --ink: #1a1a18;
  --ink-soft: #3a3a36;
  --ink-muted: #6b6b65;
  --line: #e6e3dc;
  --line-strong: #cfcbc1;

  /* Akzente */
  --copper: #b6552c;            /* Heizung — warm */
  --copper-dark: #8c3f1f;
  --copper-tint: #f5e8de;
  --sage: #5c6b5a;              /* Bad — frisch, ruhig */
  --sage-dark: #3f4a3e;
  --sage-tint: #e6ebe3;

  /* Themen-Variablen — werden pro Seite überschrieben */
  --accent: var(--ink);
  --accent-dark: var(--ink);
  --accent-tint: var(--paper-warm);

  /* Typo */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;

  /* Layout */
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 9vw, 7.5rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Theme Modifier */
.theme-bad      { --accent: var(--sage);   --accent-dark: var(--sage-dark);   --accent-tint: var(--sage-tint); }
.theme-heizung  { --accent: var(--copper); --accent-dark: var(--copper-dark); --accent-tint: var(--copper-tint); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
html, body { overflow-x: hidden; }

/* ---------- Typo ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 500; }

h1 em, h2 em { font-style: normal; color: var(--accent); font-weight: 300; }

p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-mark {
  width: 28px; height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  position: relative;
  display: inline-block;
  margin-right: 0.15rem;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px;
  border-radius: 50%;
  background: var(--accent, var(--ink));
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links { display: flex; gap: 1.85rem; }
.nav__links a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}

/* CTA Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.45rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--lg { padding: 1.05rem 1.85rem; font-size: 1rem; }

.btn-arrow {
  width: 18px; height: 18px;
  display: inline-block;
  position: relative;
}
.btn-arrow::before, .btn-arrow::after {
  content: ""; position: absolute;
  background: currentColor;
}
.btn-arrow::before {
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  transform: translateY(-50%);
}
.btn-arrow::after {
  right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  background: transparent;
  transform: translateY(-50%) rotate(45deg);
}

/* Mobile menu (sehr schlicht) */
.nav-toggle {
  display: none;
  background: none; border: none;
  width: 28px; height: 22px;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink);
}
.nav-toggle span:nth-child(1) { top: 4px; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 4px; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section) 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c8c6c0;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem;
  margin-top: 0;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: #fff;
  margin: 0 0 0.5rem;
  line-height: 1.1;
}
.footer__tagline {
  font-size: 0.95rem;
  color: #9a978f;
  max-width: 28ch;
  line-height: 1.55;
}
.footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.footer__list a {
  font-size: 0.95rem;
  color: #c8c6c0;
  transition: color 0.2s;
}
.footer__list a:hover { color: #fff; }
.footer__contact { font-size: 0.95rem; line-height: 1.7; color: #c8c6c0; }
.footer__contact strong { color: #fff; font-weight: 500; }

.footer__bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: #8a877f;
  flex-wrap: wrap;
}
.footer__legal { display: flex; gap: 1.5rem; }

/* ---------- Reusable: Hero (Service pages) ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 78vh, 780px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--paper-warm);
}
.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(180deg,
    rgba(20,20,18,0.15) 0%,
    rgba(20,20,18,0) 35%,
    rgba(20,20,18,0.55) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem var(--gutter);
  width: 100%;
  color: #fff;
}
.hero__inner h1 { color: #fff; max-width: 18ch; }
.hero__inner h1 em { color: var(--accent-tint); }
.hero__inner .eyebrow { color: rgba(255,255,255,0.85); }
.hero__inner .eyebrow::before { background: rgba(255,255,255,0.6); }
.hero__lead {
  color: rgba(255,255,255,0.88);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  max-width: 52ch;
  margin: 1.5rem 0 2rem;
  line-height: 1.55;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.hero .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.hero .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Vorteile (Benefits) ---------- */
.benefits {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.benefit {
  padding: clamp(2.5rem, 4vw, 3.5rem) clamp(1.5rem, 2.5vw, 2.25rem);
  border-right: 1px solid var(--line);
  position: relative;
}
.benefit:last-child { border-right: none; }
.benefit__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: block;
}
.benefit h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.benefit p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.55;
}

/* ---------- Section header (intro für Sektionen) ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
  align-items: end;
}
.section-head__title h2 { max-width: 14ch; }
.section-head__body { padding-bottom: 0.5rem; }

/* ---------- Alternierende Bild-Text-Reihen ---------- */
.feature-row {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  align-items: flex-start;
  margin-bottom: 4rem;
  text-decoration: none;
  color: inherit;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row--reverse { flex-direction: row-reverse; }

.feature-row__media {
  flex: 0 0 460px;
  width: 460px;
  height: 460px;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}
.feature-row__media img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.feature-row:hover .feature-row__media img { transform: scale(1.03); }

.feature-row__media-tag {
  position: absolute;
  top: 1rem; left: 1rem;
  background: rgba(255,255,255,0.92);
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  border-radius: 3px;
}

.feature-row__body {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0;
}
.feature-row__num {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.feature-row__num::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.feature-row__body h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}
.feature-row__body p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--ink-muted);
  line-height: 1.65;
}
.feature-row__link-text {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--line-strong);
  transition: gap 0.25s var(--ease), border-color 0.25s;
  text-decoration: none;
}
.feature-row:hover .feature-row__link-text { gap: 0.9rem; border-color: var(--ink); }

@media (max-width: 860px) {
  .feature-row,
  .feature-row--reverse {
    flex-direction: column;
    gap: 1.5rem;
  }
  .feature-row__body { order: 0; }
  .feature-row__media {
    order: 1;
    flex: none;
    width: 100%;
    height: 280px;
  }
}

/* ---------- CTA Band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band--accent { background: var(--accent); }
.cta-band__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) var(--gutter);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band h2 em { color: rgba(255,255,255,0.6); font-weight: 300; }
.cta-band p {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  margin: 1.25rem 0 0;
  max-width: 42ch;
}
.cta-band__actions { display: flex; flex-direction: column; gap: 1rem; }
.cta-band .btn {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
  justify-content: center;
}
.cta-band .btn:hover { background: var(--accent-tint); border-color: var(--accent-tint); color: var(--ink); }
.cta-band .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.cta-band .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band__contact {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-top: 0.5rem;
}
.cta-band__contact a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .section-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .cta-band__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* Benefits: ab 920px → 2×2 Kachel */
@media (max-width: 920px) {
  .benefits__grid { grid-template-columns: 1fr 1fr; }
  .benefit { padding: 1.75rem 1.5rem; }
  .benefit:nth-child(2) { border-right: none; }
  .benefit:nth-child(1),
  .benefit:nth-child(2) { border-bottom: 1px solid var(--line); }
  .benefit__icon { width: 36px; height: 36px; margin-bottom: 1rem; }
  .benefit h3 { font-size: 1.1rem; }
  .benefit p { font-size: 0.88rem; }
}

@media (max-width: 680px) {
  .nav__links { display: none; }
  .nav-toggle { display: block; }
  .footer__grid { grid-template-columns: 1fr; }
  /* Benefits: explizit 2 Spalten erzwingen */
  .benefits__grid { grid-template-columns: 1fr 1fr; }
  .benefit { padding: 1.1rem 0.9rem; }
  .benefit h3 { font-size: 0.95rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- SVG Icon Utility ---------- */
.icon {
  width: 24px; height: 24px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon--sm { width: 18px; height: 18px; }
.icon--md { width: 28px; height: 28px; }
.icon--lg { width: 36px; height: 36px; }
.icon--xl { width: 48px; height: 48px; }
.icon svg {
  width: 100%; height: 100%;
  display: block;
  color: inherit;
}

/* Brand logo with SVG */
.brand-logo {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-logo svg { width: 100%; height: 100%; }

/* Benefit Icon */
.benefit__icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent);
  position: relative;
}
.benefit__icon::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 4px;
  background: var(--accent-tint);
  z-index: -1;
}
.benefit__icon svg {
  width: 28px; height: 28px;
  position: relative;
  z-index: 1;
}

/* Contact info icon */
.info-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  margin-bottom: 0.85rem;
  color: var(--ink-muted);
}
.info-icon svg { width: 18px; height: 18px; }

/* CTA band decoration */
.cta-band__deco {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: 200px; height: 200px;
  opacity: 0.06;
  color: #fff;
}
.cta-band__deco svg { width: 100%; height: 100%; }

/* Feature row icon badge */
.feature-row__icon-badge {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
  color: var(--accent-dark);
  margin-bottom: 1rem;
}
.feature-row__icon-badge svg { width: 22px; height: 22px; }

/* Tile decorative icon */
.tile__icon-deco {
  position: absolute;
  right: clamp(2rem, 4vw, 4rem);
  top: clamp(2rem, 4vw, 4rem);
  width: clamp(80px, 12vw, 140px);
  height: clamp(80px, 12vw, 140px);
  opacity: 0.12;
  color: #fff;
  z-index: 1;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.tile:hover .tile__icon-deco {
  opacity: 0.2;
  transform: scale(1.08);
}
.tile__icon-deco svg { width: 100%; height: 100%; }

/* Footer brand logo */
.footer__logo {
  width: 36px; height: 36px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.75rem;
}
.footer__logo svg { width: 100%; height: 100%; }

/* Quote icon */
.quote-icon {
  color: var(--accent);
  opacity: 0.35;
  margin-bottom: 0.75rem;
}
.quote-icon svg { width: 28px; height: 28px; }

/* ---------- Reveal Animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ============================================================
   MOBILE FIXES
   ============================================================ */

/* 5) Header: kompakter, Brand umbruchfähig, Button kleiner */
@media (max-width: 680px) {
  .site-header__inner {
    padding: 0.7rem var(--gutter);
    gap: 0.75rem;
  }
  .brand {
    font-size: 1rem;
    white-space: normal;
    flex-shrink: 1;
    line-height: 1.2;
  }
  .brand small {
    display: block;
    margin-top: 0.1rem;
  }
  .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
  }
  .btn--lg {
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
  }
}

/* 6) Textfarben: voller Kontrast auf hellen/dunklen Hintergründen */
.hero__inner h1 { color: #ffffff; }
.hero__lead      { color: rgba(255,255,255,0.92); }
.hero__inner .eyebrow { color: rgba(255,255,255,0.92); }
.cta-band h2     { color: #ffffff; }
.cta-band p      { color: rgba(255,255,255,0.9); }
.cta-band__contact { color: rgba(255,255,255,0.8); }
.tile__label     { color: rgba(255,255,255,0.8); }
.tile__sub       { color: rgba(255,255,255,0.9); }
.benefit p       { color: #4a4a45; }
.feature-row__body p { color: #4a4a45; }
.lead            { color: #3a3a36; }
.footer__tagline { color: #b0ada6; }
.footer__contact { color: #b0ada6; }
.footer__list a  { color: #b0ada6; }
.nav__links a    { color: #2a2a26; }
