/* Muster Hausmeisterdienst: Beispielprojekt, Gestaltung "Abendhaus". */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variabel.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* Layout: 3D-Haus fest im Hintergrund, Inhalte scrollen als Karten darüber. Gestaltung: Abendhaus (dunkel, Glas, warmes Fensterlicht). */
:root {
  --bg: #0E1110;
  --fg: #F3F1EC;
  --muted: #A9ADA8;
  --accent: #5CB85C;
  --btn: #1B6F1B;
  --btn-fg: #FFFFFF;
  --roof: #228B22;
  --card: rgba(22, 27, 25, 0.55);
  --card-border: rgba(255, 255, 255, 0.14);
  --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --veil: linear-gradient(90deg, rgba(14,17,16,0.88) 0%, rgba(14,17,16,0.6) 42%, rgba(14,17,16,0.25) 56%, rgba(14,17,16,0) 72%);
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --display-stretch: 72%;
  --display-weight: 800;
  --display-case: uppercase;
  --body: "Archivo", Arial, sans-serif;
  --label: "Archivo", Arial, sans-serif;
  --label-stretch: 100%;
  --radius: 18px;
  --border-style: solid;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Weiches Scrollen erst nach dem Laden (Klasse von seite.js), damit der Browser die alte Position beim Zurückkehren sofort setzt */
html.weich { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  transition: background-color .4s ease, color .4s ease;
}

/* Standbild des Hauses: sofort sichtbar, bis 3D bereit ist, und dauerhaft, wenn das Gerät kein 3D kann */
.standbild { position: fixed; inset: 0; z-index: 0; background: var(--bg) url("../bilder/haus-standbild-1600.webp") center / cover no-repeat; }
#szene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; opacity: 0; transition: opacity .6s ease; }
body.bereit #szene { opacity: 1; }
body.sofort #szene { transition: none; }
body.ohne-3d #szene { display: none; }
.veil { position: fixed; inset: 0; background: var(--veil); pointer-events: none; z-index: 1; }

/* Kopfleiste */
.nav {
  position: fixed; z-index: 10;
  top: calc(env(safe-area-inset-top, 0px) + 16px); left: 16px; right: 16px;
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 16px;
  background: var(--card);
  border: 1px var(--border-style) var(--card-border);
  border-radius: calc(var(--radius) + 8px);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.logo svg { width: 34px; height: 31px; flex: none; }
.logo .wort { display: flex; flex-direction: column; line-height: 1; }
.logo b { font-family: "Archivo", Arial, sans-serif; font-stretch: 80%; font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.logo small { font-family: var(--label); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.logo .amp { font-family: Arial, Helvetica, sans-serif; font-stretch: normal; font-weight: 700; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav ul a:hover { color: var(--fg); }
.tel {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--btn); color: var(--btn-fg);
  font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

main { position: relative; z-index: 2; }
/* Sprunglink: nur bei Tastatur-Fokus sichtbar */
.sprunglink { position: fixed; left: 16px; top: -100px; z-index: 30; padding: 10px 16px; border-radius: 999px; background: var(--btn); color: var(--btn-fg); font-weight: 650; text-decoration: none; }
.sprunglink:focus-visible { top: 16px; }
section { min-height: 100vh; display: flex; align-items: center; padding: 120px 16px 120px; }
.innen { width: 100%; max-width: 1200px; margin: 0 auto; }

/* Hero */
.hero .innen { max-width: 1200px; }
.hero-text { max-width: 680px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.hero h1 { font-size: clamp(40px, 5.6vw, 76px); hyphens: manual; overflow-wrap: break-word; }
.h1-sub { display: block; margin-top: .25em; font-size: .42em; line-height: 1.1; letter-spacing: .01em; color: var(--accent); }
/* Leistungskacheln im Kopfbereich */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.kachel {
  position: relative; display: flex; align-items: stretch; min-height: 58px;
  color: var(--fg);
  font-weight: 650; font-size: 15px; line-height: 1.2;
  background: var(--card); border: 1px var(--border-style) var(--card-border);
  border-radius: calc(var(--radius) * .7); box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: transform .2s ease, border-color .2s ease;
  animation: kachel-rein .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 70ms + 150ms);
}
/* Kachel ist ein Container mit zwei Links (verschachtelte Links sind verboten): Hauptlink springt zum Abschnitt, kleiner Pfeil führt zur Unterseite */
.kachel-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 38px 12px 14px; color: inherit; text-decoration: none; border-radius: inherit; }
.kachel svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kachel span { min-width: 0; hyphens: manual; }
/* Pfeil in der Ecke: 32 px Tippfläche, optisch nur ein kleiner Kreis */
.kachel .kachel-mehr { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: inherit; }
.kachel .kachel-mehr svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); stroke: var(--accent); stroke-width: 2; transition: background-color .2s ease; }
.kachel.haupt .kachel-mehr svg { stroke: var(--btn-fg); background: rgba(255, 255, 255, 0.22); }
.kachel-mehr:hover svg, .kachel-mehr:focus-visible svg { background: rgba(255, 255, 255, 0.28); }
.kachel-link:focus-visible, .kachel-mehr:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.kachel:hover { transform: translateY(-2px); border-color: var(--accent); }
/* Hauptleistung: Entrümpelung hebt sich als grüne Kachel ab */
.kachel.haupt { background: var(--btn); color: var(--btn-fg); border-color: var(--accent); font-weight: 750; box-shadow: 0 10px 30px rgba(27, 111, 27, 0.45); }
.kachel.haupt svg { stroke: var(--btn-fg); }
@keyframes kachel-rein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.eyebrow {
  font-family: var(--label); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0;
}
h1, h2 {
  font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight);
  text-transform: var(--display-case); text-wrap: balance; margin: 0; line-height: .98;
}
h1 { font-size: clamp(44px, 7vw, 88px); letter-spacing: -0.01em; }
h2 { font-size: clamp(32px, 4vw, 48px); }
.lead { font-size: 20px; color: var(--muted); margin: 0; max-width: 34em; }
.lead span { display: block; }
/* Dunkler Schein hinter dem Text, damit er auch vor den hell erleuchteten Fenstern lesbar bleibt */
.hero .lead, .hero .eyebrow, .hero h1 { text-shadow: 0 0 2px var(--bg), 0 1px 14px var(--bg), 0 0 28px rgba(14,17,16,.9); }
.hero .lead { color: #C4C8C2; }
.scroll-info {
  display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0;
  padding: 9px 16px; border-radius: 16px; font-size: 15px; line-height: 1.35; color: var(--fg);
  background: var(--card); border: 1px var(--border-style) var(--card-border);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.scroll-info svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scroll-info span { min-width: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px; font: inherit; font-weight: 650; font-size: 17px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn.primaer { background: var(--btn); color: var(--btn-fg); }
.btn.sekundaer { background: transparent; color: var(--fg); border-color: var(--card-border); }
.btn:focus-visible, .tel:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Stationskarten */
.karte {
  max-width: 460px; display: grid; gap: 16px;
  padding: 28px;
  background: var(--card);
  border: 1px var(--border-style) var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.karte p { margin: 0; }
.karte .text { color: var(--muted); }
.haken { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.haken li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.haken li::before {
  content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.karte { grid-template-columns: minmax(0, 1fr); }
.karte h2 { font-size: clamp(28px, 3.2vw, 40px); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.mehr { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#garten { min-height: 170vh; align-items: flex-start; }
#garten .innen { position: sticky; top: calc(50vh - 240px); }
.mehr .btn { padding: 11px 18px; font-size: 15px; }
/* Dezenter Textlink zur Unterseite neben dem Anfrage-Knopf */
.mehr-link { color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; }
.mehr-link:hover { color: var(--accent); }
.nummer { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nummer b { color: var(--fg); font-weight: 650; }


/* Laufband: Partner und Kunden laufen von rechts nach links durch, endlos */
.partner { position: relative; z-index: 2; display: block; min-height: 0; padding: 120px 0 8px; }
.partner-titel { margin: 0 auto 10px; max-width: 1200px; padding: 0 16px; font-family: var(--label); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.laufband {
  display: flex; overflow: hidden; padding: 12px 0;
  background: var(--card); border-top: 1px var(--border-style) var(--card-border); border-bottom: 1px var(--border-style) var(--card-border);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.laufband-spur { display: flex; flex: none; gap: 12px; margin: 0; padding: 0 6px; list-style: none; animation: laufband 38s linear infinite; }
.laufband-spur li { flex: none; padding: 8px 18px; border-radius: 999px; border: 1px var(--border-style) var(--card-border); font-weight: 650; font-size: 15px; color: var(--fg); white-space: nowrap; }
.laufband:hover .laufband-spur { animation-play-state: paused; }
.laufband-spur li.muster { color: var(--muted); font-weight: 500; }
@keyframes laufband { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .laufband-spur { animation: none; } .laufband { overflow-x: auto; } }
footer { position: relative; z-index: 2; padding: 20px 16px calc(env(safe-area-inset-bottom, 0px) + 22px); text-align: center; font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); }

.kein-3d { position: fixed; inset: auto 16px 90px 16px; z-index: 3; text-align: center; font-size: 14px; color: var(--muted); }

.aktion { display: none; }
/* Handy: Haus oben, Karte unten, feste Leiste mit E-Mail und Nachricht */
@media (max-width: 900px) {
  .standbild { background-image: url("../bilder/haus-standbild-handy.webp"); background-position: center bottom; }
  body { font-size: 16px; }
  .nav { top: calc(env(safe-area-inset-top, 0px) + 10px); left: 10px; right: 10px; padding: 10px 12px; flex-direction: column; justify-content: center; gap: 8px; text-align: center; }
  .logo .wort { flex-direction: row; align-items: baseline; gap: 7px; }
  .logo b, .logo small { font-family: "Archivo", Arial, sans-serif; font-stretch: 90%; font-weight: 800; font-size: 20px; letter-spacing: .01em; text-transform: none; color: var(--fg); margin-top: 0; }
  .nav ul { display: none; }
  .veil { background: linear-gradient(0deg, var(--bg) 0%, transparent 50%); opacity: .85; }
  section { min-height: 100svh; align-items: flex-end; padding: 124px 12px calc(env(safe-area-inset-bottom, 0px) + 92px); }
  .hero { align-items: flex-start; padding-top: 124px; }
  .hero-text { gap: 10px; }
  .hero h1 { font-size: clamp(28px, 8.2vw, 44px); }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kachel { min-height: 48px; font-size: 13.5px; text-shadow: none; }
  .kachel-link { padding: 9px 30px 9px 11px; gap: 8px; }
  .kachel svg { width: 22px; height: 22px; }
  .kachel .kachel-mehr svg { width: 16px; height: 16px; }
  h1 { font-size: clamp(34px, 10vw, 48px); }
  h2 { font-size: 28px; }
  /* Jeder Satz beginnt in einer eigenen Zeile; der längere erste Satz darf umbrechen, damit die Schrift lesbar groß bleibt */
  .lead { font-size: 16px; line-height: 1.45; }
  .lead span { display: block; white-space: normal; }
  .btn { padding: 12px 18px; font-size: 16px; }
  .scroll-info { font-size: 14px; padding: 8px 12px; text-shadow: none; }
  .hero-text { text-shadow: 0 1px 12px var(--bg); }
  .karte { max-width: none; padding: 14px 16px; gap: 8px; background: color-mix(in srgb, var(--card) 70%, transparent); }
  .karte .eyebrow { font-size: 11px; }
  .karte h2 { font-size: 24px; }
  .karte .text { font-size: 14.5px; line-height: 1.45; }
  .karte .haken { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
  .karte .haken li { display: block; padding: 3px 10px; border-radius: 999px; border: 1px var(--border-style) var(--card-border); }
  .karte .haken li::before { display: none; }
  #kontakt .karte { background: var(--card); }
  /* Auf der Startseite sitzt die Anfrage in der festen Leiste; nur im Kontaktblock bleibt der Knopf, der Link "Mehr erfahren" bleibt überall */
  .mehr .btn { display: none; }
  #kontakt .mehr .btn { display: inline-flex; }
  /* Handy: Garten ist ein normaler Abschnitt, nichts bleibt beim Scrollen stehen */
  #garten { min-height: 100svh; align-items: flex-end; }
  #garten .innen { position: static; }
  .aktion {
    display: flex; position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; gap: 10px;
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
    background: var(--card); border-top: 1px var(--border-style) var(--card-border);
    backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  }
  .aktion .btn { flex: 1; justify-content: center; }
  .partner { padding-top: calc(30svh + 40px); }
  footer { padding-top: 12px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); }
  footer p { margin: 0; }
}
@media (max-width: 359px) {
  .lead { font-size: 15px; }
  .lead span { white-space: normal; }
}
@media (max-width: 480px) {
  .tel { padding: 9px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html, html.weich { scroll-behavior: auto; }
  #szene { transition: none; }
  body { transition: none; }
  .kachel { animation: none; transition: none; }
}

/* Einblend-Reihenfolge der Kacheln (statt style-Attribut, wegen CSP) */
.kachel:nth-child(1) { --i: 0; }
.kachel:nth-child(2) { --i: 1; }
.kachel:nth-child(3) { --i: 2; }
.kachel:nth-child(4) { --i: 3; }
.kachel:nth-child(5) { --i: 4; }
.kachel:nth-child(6) { --i: 5; }
