/* ==========================================================
   EnCo Service · Startseite
   Aufbau: Gebäude im Vollbild, darunter Prüfpflichten, Arbeitsweise,
   Außenanlagen und Winterdienst, Kontakt.
   Typografie: IBM Plex Sans 400/500, Daten in IBM Plex Mono.
   ========================================================== */

.page-home { background: var(--bg); }
.page-home [data-reveal] { opacity: 1; transform: none; }
html.js .page-home [data-reveal]:not(.in) { opacity: 0; transform: translateY(18px); }
.page-home [data-reveal].in { transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* Wartezustand, bis das Intro läuft (Klasse wird im Head gesetzt) */
html.intro-pending .page-home .header,
html.intro-pending .page-home .hero-copy > *,
html.intro-pending .page-home .hero-tools { opacity: 0; }
.stage-cover { position: absolute; inset: 0; z-index: 6; background: #0c1016; opacity: 0; pointer-events: none; }
html.intro-pending .stage-cover { opacity: 1; }

/* ---------- Hero ---------- */
.page-home .hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; background: #121a26; }
.page-home #scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.page-home #scene.is-dragging { cursor: grabbing; }
.page-home .hero-shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,11,15,.5) 0%, rgba(8,11,15,0) 15%),
    linear-gradient(0deg, var(--bg) 0%, rgba(16,20,24,.72) 16%, rgba(16,20,24,0) 44%),
    radial-gradient(90% 70% at 0% 100%, rgba(8,11,15,.62) 0%, rgba(8,11,15,0) 60%);
}
.page-home.no-webgl .hero { background: linear-gradient(180deg, #0b1427 0%, #2c3752 42%, #9a7462 80%, #3a3a33 100%); }
.page-home.no-webgl .hero-tools,
.page-home.no-webgl .duty-show { display: none; }

.page-home .hero-inner {
  position: relative; z-index: 4; height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px;
  padding-top: 96px; padding-bottom: clamp(28px, 5.5vh, 60px);
  pointer-events: none;
}
.hero-copy { grid-area: 1 / 1; max-width: 920px; transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s; }
.hero-copy a, .hero-copy button { pointer-events: auto; }
.hero-kicker { font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(238,241,244,.7); margin-bottom: 24px; }
.page-home .hero h1 { font-weight: 500; line-height: 1; letter-spacing: 0; }
.h1-main { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; font-size: clamp(46px, 6.2vw, 104px); letter-spacing: -.04em; line-height: .96; }
.h1-main > span { display: block; }
.h1-sub { display: block; margin-top: 14px; font-size: clamp(20px, 2.1vw, 32px); font-weight: 400; letter-spacing: -.015em; line-height: 1.2; color: var(--text-2); }
.hero-sub { margin-top: 22px; max-width: 44ch; font-size: clamp(15px, 1.15vw, 17.5px); line-height: 1.55; color: rgba(238,241,244,.78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.page-home .btn-quiet { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Abstand nach unten, damit WhatsApp- und Assistent-Knopf frei bleiben */
.hero-tools { grid-area: 1 / 2; display: flex; align-items: center; gap: 18px; margin-bottom: 68px; padding-right: 76px; pointer-events: auto; }
.hero-hint { font: 400 12px/1.4 var(--font-mono); color: rgba(238,241,244,.58); }
.tool-btn { min-height: 44px; padding: 0 14px; white-space: nowrap; font: 500 12px/1 var(--font-mono); letter-spacing: .03em; color: var(--text-2); border: 1px solid rgba(255,255,255,.2); border-radius: 3px; background: rgba(10,13,16,.38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: color .25s, border-color .25s; }
.tool-btn:hover { color: var(--text); border-color: rgba(255,255,255,.5); }

/* Detailansicht eines Gewerks: ersetzt den Hero-Text */
.hero-panel {
  grid-area: 1 / 1; align-self: end; width: min(420px, 100%); pointer-events: auto;
  padding: 20px 22px 18px; border-radius: 4px;
  background: rgba(12,15,19,.84); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s;
}
.hero.is-focus .hero-copy { opacity: 0; visibility: hidden; transform: translateY(12px); }
.hero.is-focus .hero-panel { opacity: 1; visibility: visible; transform: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-group { font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.panel-close { width: 44px; height: 44px; margin: -12px -12px -12px 0; display: grid; place-items: center; color: var(--text-dim); border-radius: 3px; }
.panel-close svg { width: 14px; height: 14px; }
.panel-close:hover { color: var(--text); }
.panel-title { margin-top: 8px; font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.panel-meta { margin: 16px 0 0; border-top: 1px solid var(--line-strong); }
.panel-meta div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.panel-meta dt { font: 400 11px/1.6 var(--font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.panel-meta dd { margin: 0; font: 500 13px/1.5 var(--font-mono); color: var(--text); }
.panel-text { margin-top: 14px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.panel-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.panel-btn { min-height: 42px; padding: 0 16px; font-size: 14px; font-weight: 500; border-radius: 3px; background: var(--accent); color: var(--accent-ink); transition: background .25s, border-color .25s; }
.panel-btn:hover { background: var(--accent-hover); }
.panel-btn.is-quiet { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.panel-btn.is-quiet:hover { border-color: rgba(255,255,255,.5); }

/* Beschriftungen am Gebäude */
.anno-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.anno-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.anno-line { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 1; opacity: 0; transition: opacity .5s var(--ease), stroke .3s; }
.anno-dot { fill: #fff; opacity: 0; transition: opacity .5s var(--ease), fill .3s; }
.anno-line.is-on, .anno-dot.is-on { opacity: 1; }
.anno-line.is-active { stroke: var(--accent); }
.anno-dot.is-active { fill: var(--accent); }
.anno {
  position: absolute; left: 0; top: 0; height: 26px; padding: 0 9px; pointer-events: auto;
  font: 500 12.5px/24px var(--font); letter-spacing: .005em; color: #fff; white-space: nowrap;
  background: rgba(10,13,16,.56); border: 1px solid rgba(255,255,255,.16); border-radius: 2px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; will-change: transform;
  transition: opacity .45s var(--ease), visibility .45s, background .25s, border-color .25s, color .25s;
}
.anno::after { content: ""; position: absolute; inset: -9px -4px; }
.anno.is-on { opacity: 1; visibility: visible; }
.anno:hover, .anno:focus-visible { background: rgba(10,13,16,.86); border-color: rgba(255,255,255,.55); outline: none; }
.anno.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.anno.is-on.is-dim { opacity: .55; }

/* ---------- Überschriften der Abschnitte ---------- */
.duties h2, .approach h2, .contact-home h2, .more-title { font-size: clamp(34px, 4.6vw, 68px); font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }

/* ---------- Prüfpflichten ---------- */
.duties { padding: clamp(96px, 12vw, 176px) 0 clamp(88px, 10vw, 150px); scroll-margin-top: 40px; }
.duties-head h2 { max-width: 15ch; }
.duties-intro { margin-top: clamp(28px, 3vw, 48px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3.5vw, 56px); max-width: 1040px; }
.duties-intro p { font-size: clamp(16px, 1.2vw, 18px); line-height: 1.65; color: var(--text-2); }

.duty-group { display: grid; grid-template-columns: minmax(200px, 3fr) 9fr; gap: clamp(24px, 4.5vw, 80px); margin-top: clamp(72px, 8vw, 128px); padding-top: 28px; border-top: 1px solid var(--line-strong); scroll-margin-top: 90px; }
.duty-group-head { position: sticky; top: 104px; align-self: start; }
.duty-group-head h3 { font-size: clamp(22px, 1.9vw, 28px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.duty-group-head p { margin-top: 12px; max-width: 30ch; font-size: 14.5px; line-height: 1.6; color: var(--text-dim); }
.duty { display: grid; grid-template-columns: minmax(0, 1fr) 260px; grid-template-rows: auto 1fr; column-gap: clamp(24px, 3.5vw, 64px); padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.duty:first-child { padding-top: 2px; }
.duty-main { grid-column: 1; grid-row: 1 / span 2; }
.duty h4 { font-size: clamp(19px, 1.5vw, 22px); font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.duty-text { margin-top: 10px; max-width: 62ch; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.duty-link { display: inline-block; margin-top: 12px; font-size: 14.5px; font-weight: 500; color: var(--accent); border-bottom: 1px solid rgba(217,164,65,.35); padding-bottom: 1px; transition: border-color .25s; }
.duty-link:hover { border-color: var(--accent); }
.duty-meta { grid-column: 2; grid-row: 1; margin: 0; padding-top: 5px; display: grid; gap: 14px; align-content: start; }
.duty-meta div { display: grid; gap: 4px; }
.duty-meta dt { font: 400 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.duty-meta dd { margin: 0; font: 500 14px/1.45 var(--font-mono); color: var(--text); }
.duty-meta .duty-basis { font-weight: 400; font-size: 13px; color: var(--text-2); }
.duty-show { grid-column: 2; grid-row: 2; justify-self: start; align-self: end; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: color .25s; }
.duty-show::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M8 1.5l5.5 3.1v6.8L8 14.5l-5.5-3.1V4.6z'/%3E%3Cpath d='M2.5 4.6L8 7.7l5.5-3.1M8 7.7v6.8'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M8 1.5l5.5 3.1v6.8L8 14.5l-5.5-3.1V4.6z'/%3E%3Cpath d='M2.5 4.6L8 7.7l5.5-3.1M8 7.7v6.8'/%3E%3C/svg%3E") center/contain no-repeat; }
.duty-show:hover { color: var(--accent); }
.duties-note { width: calc(75% - 20px); margin: clamp(56px, 6vw, 88px) 0 0 auto; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.7; color: var(--text-dim); }

/* ---------- Arbeitsweise ---------- */
.approach { padding: clamp(96px, 11vw, 160px) 0; background: var(--bg-2); border-top: 1px solid var(--line); scroll-margin-top: 40px; }
.approach-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 128px); align-items: start; }
.approach-copy { position: sticky; top: 120px; }
.approach-copy p { margin-top: 20px; max-width: 46ch; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.65; color: var(--text-2); }
.approach-copy p + p { margin-top: 14px; }
.approach-copy .btn { margin-top: 34px; }
.approach-steps li { display: grid; grid-template-columns: 14.5rem 1fr; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line-strong); }
.approach-steps li:last-child { border-bottom: 1px solid var(--line-strong); }
.approach-steps h3 { font-size: 20px; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }
.approach-steps p { font-size: 15.5px; line-height: 1.65; color: var(--text-2); }

/* ---------- Außenanlagen und Winterdienst ---------- */
.more { padding: clamp(88px, 10vw, 150px) 0; }
.more-list { margin-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line-strong); }
.more-item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 24px; padding: clamp(26px, 3vw, 40px) 0; border-bottom: 1px solid var(--line-strong); transition: color .3s; }
.more-name { display: flex; align-items: center; gap: 18px; font-size: clamp(30px, 3.6vw, 52px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
.more-item:hover .more-name { color: var(--accent); }
.more-name::after { content: ""; width: 28px; height: 28px; flex: none; background: currentColor; transition: transform .4s var(--ease); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 11h15M12 5l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 11h15M12 5l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; }
.more-text { max-width: 46ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; color: var(--text-2); }
.more-item:hover .more-name::after { transform: translateX(6px); }

/* ---------- Häufige Fragen ---------- */
.faq { padding: clamp(72px, 9vw, 130px) 0; border-top: 1px solid var(--line); }
.faq-title { font-size: clamp(30px, 3.4vw, 48px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
.faq-list { margin-top: clamp(28px, 3.5vw, 48px); border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; gap: 20px; justify-content: space-between; padding: 22px 0; min-height: 56px; font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; letter-spacing: -.015em; line-height: 1.35; cursor: pointer; list-style: none; transition: color .25s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; transition: transform .3s var(--ease); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 4v12M4 10h12'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 4v12M4 10h12'/%3E%3C/svg%3E") center/contain no-repeat; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-antwort { padding: 0 0 24px; max-width: 70ch; }
.faq-antwort p { font-size: 15.5px; line-height: 1.7; color: var(--text-2); }

/* ---------- Kontakt ---------- */
.contact-home { padding: clamp(96px, 11vw, 160px) 0; border-top: 1px solid var(--line); scroll-margin-top: 40px; }
.page-home .contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 128px); align-items: start; }
.contact-copy p { margin-top: 20px; max-width: 44ch; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.65; color: var(--text-2); }
.contact-list { margin: 36px 0 0; border-top: 1px solid var(--line-strong); }
.contact-list div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font: 400 11px/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 16px; color: var(--text); }
.contact-list a { display: inline-block; padding: 6px 0; margin: -6px 0; transition: color .25s; }
.contact-list a:hover { color: var(--accent); }
.page-home .form { border: 1px solid var(--line); }
.page-home .radio-row label { font-weight: 500; }
.page-home .footer p { max-width: 36ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .duty { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 900px) {
  .page-home .hero-inner { grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 74px; }
  .page-home .hero-shade {
    background:
      linear-gradient(180deg, rgba(8,11,15,.55) 0%, rgba(8,11,15,0) 14%),
      linear-gradient(0deg, var(--bg) 0%, rgba(16,20,24,.9) 26%, rgba(16,20,24,0) 56%);
  }
  .hero-tools { position: absolute; top: 80px; right: var(--gutter); margin-bottom: 0; padding-right: 0; }
  .hero-hint { display: none; }
  .tool-btn { min-height: 40px; padding: 0 12px; font-size: 11.5px; }
  .hero-kicker { margin-bottom: 16px; font-size: 11px; }
  .h1-main { font-size: clamp(40px, 11.5vw, 72px); }
  .h1-sub { margin-top: 10px; font-size: clamp(18px, 4.8vw, 24px); }
  .hero-sub { margin-top: 14px; font-size: 15px; }
  .hero-actions { margin-top: 20px; }
  .hero-panel { width: 100%; padding: 16px 18px 14px; }
  .panel-title { font-size: 20px; }
  .panel-text { font-size: 14px; }
  .panel-meta div { grid-template-columns: 80px 1fr; padding: 7px 0; }

  .duties-intro { grid-template-columns: 1fr; gap: 16px; }
  .duty-group { grid-template-columns: 1fr; gap: 20px; }
  .duty-group-head { position: static; }
  .duty { grid-template-columns: 1fr; grid-template-rows: none; padding: 24px 0; }
  .duty-main, .duty-meta, .duty-show { grid-column: 1; grid-row: auto; }
  .duty-meta { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-top: 0; }
  .duty-show { margin-top: 6px; }
  .duties-note { width: 100%; }

  .faq-item summary { padding: 18px 0; gap: 14px; }
  .approach-grid, .page-home .contact-grid { grid-template-columns: 1fr; }
  .approach-copy { position: static; }
  .approach-steps li { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .more-item { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 600px) {
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-sub { font-size: 14.5px; }
  .duty-meta { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .page-home [data-reveal]:not(.in) { opacity: 1; transform: none; }
}
