/* teusan.de – Ausdruck: Vollbild-Hero, Jahresring-Motiv, Laufband, Split-Screen, Zeitleiste.
   Legt sich ueber site.css. Alles lokal, keine externen Ressourcen. Bewegung entfaellt bei prefers-reduced-motion. */

@property --draw { syntax: "<number>"; inherits: true; initial-value: 1; }

:root {
  --cream: #f4efe2;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
}

/* ---------- Linienzeichnungen (Jahresringe, Hoehenlinien, Blatt) ---------- */
.motif { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--draw)); pointer-events: none; overflow: visible; display: block; }
.motif.load { animation: fade-in 0.4s ease both; }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Kopfzeile ueber dem Hero (Startseite) ---------- */
.page-index .page-header { display: none; }
.page-index #masthead { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; color: var(--cream); transition: background 0.4s, color 0.4s, border-color 0.4s; }
.page-index #masthead:not(.is-scrolled) { background: linear-gradient(rgba(9, 20, 13, 0.7), rgba(9, 20, 13, 0)); }
.page-index #masthead.is-scrolled { background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
.page-index #masthead:not(.is-scrolled) #main-menu .menu-cta a { border-color: var(--cream); color: var(--cream); }
.page-index #masthead:not(.is-scrolled) #main-menu .menu-cta a:hover { background: var(--cream); color: #17261b; }
.page-index #masthead:not(.is-scrolled) #main-menu a::after { background: var(--cream); }
.page-index #masthead:not(.is-scrolled) .menu-toggle { color: var(--cream); }
.page-index .brand-name, .page-index #main-menu a { color: inherit; }

/* ---------- Hero Startseite ---------- */
.home-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--cream); background: #0d1a12; overflow: hidden; isolation: isolate; padding-top: 8rem; padding-bottom: clamp(3rem, 8vh, 6rem); }
.hh-photo { position: absolute; inset: 0; z-index: -3; }
.hh-img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, rgba(9, 20, 13, 0.62) 0%, rgba(9, 20, 13, 0.12) 32%, rgba(9, 20, 13, 0.55) 62%, rgba(9, 20, 13, 0.94) 100%),
    radial-gradient(120% 90% at 0% 100%, rgba(9, 20, 13, 0.75), transparent 60%); }
.hh-rings { position: absolute; z-index: -1; right: -12vw; top: 50%; width: min(78vw, 62rem); transform: translateY(-46%); color: rgba(244, 239, 226, 0.55); stroke-width: 0.9; }
.hh-inner { position: relative; max-width: 66rem; }
.hh-year { display: inline-flex; align-items: center; gap: 0.9rem; margin: 0 0 1.4rem; font: 600 0.85rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream); }
.hh-year::before { content: ""; width: 3rem; height: 1px; background: currentColor; transform-origin: 0 50%; animation: grow-x 0.4s var(--ease) both; }
.hh-year span { font: 600 1.1rem/1 var(--serif); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
@keyframes grow-x { from { transform: scaleX(0); } }
.home-hero h1 { font-size: clamp(3rem, 10.5vw, 9.5rem); line-height: 0.96; letter-spacing: -0.035em; font-weight: 500; color: var(--cream); margin: 0 0 clamp(1.4rem, 3vw, 2.6rem); text-wrap: nowrap; }
.home-hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.home-hero h1 .ln > span { display: block; animation: line-up 0.4s var(--ease) both; }
.home-hero h1 .ln:nth-child(2) > span { animation-delay: 0.08s; font-weight: 700; color: #dfe9c4; }
.home-hero h1 .ln:nth-child(1) > span { animation-delay: 0s; }
@keyframes line-up { from { transform: translateY(108%) rotate(2deg); } }
.hh-lead { max-width: 40rem; font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.6; color: rgba(244, 239, 226, 0.92); margin: 0; animation: rise 0.4s var(--ease) 0.15s both; }
.hh-cue { position: absolute; right: var(--g); bottom: clamp(2rem, 6vh, 4rem); width: 1px; height: 5rem; background: rgba(244, 239, 226, 0.3); overflow: hidden; }
.hh-cue::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--cream);  }

/* ---------- Laufband ---------- */

/* ---------- Einleitung (Startseite) ---------- */
.home-intro { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(4rem, 10vw, 9rem); overflow: clip; }
.hi-leaf { grid-column: 1 / span 4; grid-row: 1; position: sticky; top: calc(var(--head-h) + 3rem); align-self: start; width: min(100%, 17rem); color: var(--forest-2); stroke-width: 1.4; }
.hi-text { grid-column: 6 / -1; grid-row: 1; max-width: 46rem; }
.hi-text > p { color: var(--ink-2); }
.hi-text > p:first-child { font: 400 clamp(1.4rem, 2.4vw, 2rem)/1.4 var(--serif); color: var(--ink); margin-bottom: 1.6em; }
.pull { position: relative; margin: clamp(2rem, 5vw, 3.5rem) 0; padding: 0 0 0 clamp(1.4rem, 3vw, 2.4rem); border: 0;
  font: 600 clamp(1.5rem, 2.9vw, 2.45rem)/1.28 var(--serif); letter-spacing: -0.012em; color: var(--forest); text-wrap: balance; }
.pull::before { content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 3px; background: var(--accent); transform-origin: 0 0; transform: scaleY(var(--pq, 1)); transition: transform 1.2s var(--ease); }
.js .pull.reveal:not(.in)::before { --pq: 0; }
.pull-intro { margin-inline: -0.5rem 0; }

/* ---------- Angebot-Band ---------- */
.cta-section { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(4rem, 9vw, 7.5rem); }
.cta-contour { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: var(--band-fg); opacity: 0.28; stroke-width: 1; }
.cta-section h2 { font-size: clamp(2.4rem, 6.4vw, 5.4rem); font-weight: 500; letter-spacing: -0.03em; margin-bottom: 0.3em; }
.cta-section p { font-size: 1.1rem; color: var(--band-muted); }


/* ---------- Leistungen: Split-Screen, farbige Flaechen, uebergrosse Nummern ---------- */
.page-content > .services-grid, .page-index .services-grid { padding-inline: var(--g); }
.service-card { position: relative; isolation: isolate; clip-path: inset(0 -100vmax); border-top: 0; padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.service-card::before { content: ""; position: absolute; inset: 0 -100vmax; z-index: -2; background: var(--paper); }
.service-card:nth-child(2)::before { background: var(--band-bg); }
.service-card:nth-child(3)::before { background: var(--paper-2); }
.service-card:nth-child(2) { color: var(--band-fg); }
.service-card:nth-child(2) h3, .service-card:nth-child(2) .pull { color: var(--band-fg); }
.service-card:nth-child(2) > p { color: var(--band-muted); }
.service-card:nth-child(2) .pull::before { background: #e8926b; }
.service-card > h3 { font-size: clamp(1.45rem, 2.5vw, 2.2rem); overflow-wrap: break-word; hyphens: auto; font-weight: 500; letter-spacing: -0.02em; top: calc(var(--head-h) + 2rem); }
.service-card > h3::before { content: counter(svc, decimal-leading-zero); font: 500 clamp(3.3rem, 7.8vw, 6.6rem)/0.8 var(--serif); letter-spacing: -0.05em; margin: 0 0 0.12em -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.service-card:nth-child(2) > h3::before { -webkit-text-stroke-color: #e8926b; }
.service-card > p { font-size: 1.06rem; }
.service-card:nth-child(2) .service-btn { color: var(--band-fg); border-color: var(--band-fg); }
.service-card:nth-child(2) .service-btn:hover { background: var(--band-fg); color: var(--band-bg); }
.service-card > .pull { grid-column: 2; max-width: 40rem; }
.sc-rings { position: absolute; z-index: -1; right: -10rem; top: 50%; width: 38rem; max-width: 80vw; transform: translateY(-50%); color: var(--forest-2); opacity: 0.18; stroke-width: 1; }
.service-card:nth-child(2) .sc-rings { color: var(--band-fg); opacity: 0.11; }
.service-card:nth-child(2n) .sc-rings { right: auto; left: -14rem; }

/* ---------- Unterseiten: dunkles Kopfband mit Foto und Ringen ---------- */
.hero-section, .header-section, .form-header { background: var(--band-bg) url(/assets/contour.svg?v=3199c91a) center bottom / 140% auto no-repeat; color: var(--band-fg); overflow: hidden; isolation: isolate; }
.hero-section h1, .header-section h1, .form-header h1 { color: var(--band-fg); font-size: clamp(2.3rem, 4.9vw, 4.5rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; hyphens: auto; overflow-wrap: break-word; }
.hero-section > *, .header-section > *, .form-header > * { min-width: 0; overflow-wrap: break-word; }
.hero-section > p, .header-section > p, .form-header > p { color: var(--band-muted); }
.hero-section > p:first-of-type, .hero-section .subtitle, .header-section > p:first-of-type { color: var(--band-fg); }
.hero-section a, .header-section a, .form-header a { color: var(--band-fg) !important; }
.hero-section, .header-section { padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 9vw, 8rem); }
.hero-photo::before { display: none; }
.page-header { padding-bottom: 1rem; }
.page-index .page-header { display: none; }
.hero-photo .ph { inset: 0; border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.hp-rings { position: absolute; z-index: 2; width: 62%; left: -26%; bottom: -22%; color: var(--band-fg); opacity: 0.6; stroke-width: 1; }
@media (prefers-color-scheme: dark) { .hero-section, .header-section, .form-header { background-color: #16241a; } }

/* Seiten ohne Foto-Hero: Titel im Kopfband */
:is(.page-dokumente, .page-impressum) .page-header { position: relative; isolation: isolate; clip-path: inset(0 -100vmax); padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 7vw, 5.5rem); color: var(--band-fg); }
:is(.page-dokumente, .page-impressum) .page-header::before { content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; background: var(--band-bg) url(/assets/contour.svg?v=3199c91a) center bottom / 140% auto no-repeat; }
:is(.page-dokumente, .page-impressum) .eyebrow { color: var(--band-muted); }
:is(.page-dokumente, .page-impressum) .eyebrow::before { background: #e8926b; }
:is(.page-dokumente, .page-impressum) .entry-title { color: var(--band-fg); font-size: clamp(2.8rem, 8vw, 6.4rem); font-weight: 500; letter-spacing: -0.035em; margin-top: 1.4rem; }

/* ---------- Kennzahlen ---------- */
.stat-number { font-weight: 500; font-variant-numeric: tabular-nums; }
.stats-grid .stat-box { transition: background 0.4s; }
.stats-grid .stat-box:hover { background: var(--paper-2); }

/* ---------- Karten: Tiefe und Bild-Enthuellung ---------- */
.doc-card, .benefit-card, .product-card, .info-box { transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s; }
.doc-card:hover, .product-card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px -18px rgba(14, 30, 20, 0.45); }
.product-card { position: relative; isolation: isolate; overflow: hidden; padding-inline: 1.1rem; }
.product-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(15, 35, 22, 0.78), rgba(15, 35, 22, 0.9)), image-set(url(/assets/img/nadel-800.avif?v=dce8fbdc) type("image/avif"), url(/assets/img/nadel-800.webp?v=bec02ecf) type("image/webp")) center / cover;
  clip-path: circle(0 at 88% 12%); transition: clip-path 0.8s var(--ease); }
.product-card:hover::before, .product-card:focus-within::before { clip-path: circle(160% at 88% 12%); }
.product-card:hover .product-title, .product-card:hover .product-desc { color: var(--cream); }
.doc-card { position: relative; overflow: hidden; isolation: isolate; }
.doc-card::after { content: ""; position: absolute; z-index: -1; right: -3rem; top: -3rem; width: 11rem; height: 11rem; background: url(/assets/rings.svg?v=e8401c09) center / contain no-repeat; opacity: 0; transform: scale(0.7) rotate(-20deg); transition: opacity 0.5s, transform 0.8s var(--ease); }
.doc-card:hover::after { opacity: 0.35; transform: none; }

/* ---------- Zeitleiste (Ablauf) ---------- */
.chain-flow::before { transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s var(--ease); height: 2px; }
.chain-flow.in::before { transform: scaleX(1); }
.chain-item::before { width: 1.25rem; height: 1.25rem; top: -0.1rem; }
.chain-label { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 500; }
.chain-item::after { font-family: var(--serif); font-size: 2.6rem; font-weight: 500; right: auto; left: 0; top: 2.2rem; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.chain-item .chain-label { padding-top: 3.2rem; }

:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .process-section { overflow: clip; }
:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .process-steps { display: flex; gap: clamp(1rem, 2vw, 1.6rem); overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--g) * -1); padding: 1rem var(--g) 2rem; scroll-padding-inline: var(--g); scrollbar-width: thin; scrollbar-color: var(--accent) transparent; counter-reset: step; }
:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .process-steps::before { display: none; }
:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .step-card { flex: 0 0 min(80vw, 23rem); scroll-snap-align: start; position: relative; padding: 2.2rem 1.6rem 1.8rem; background: var(--paper-2); border-top: 3px solid var(--accent); }
:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .step-card::before { position: static; display: block; content: counter(step, decimal-leading-zero); width: auto; height: auto; border: 0; background: none;
  font: 500 5rem/0.9 var(--serif); letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.2px var(--accent); margin-bottom: 1rem; }
:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .step-card:hover::before, :is(.page-gruppenzertifizierung, .page-waldzertifizierung) .step-card.in::before { background: none; border-color: transparent; }
:is(.page-gruppenzertifizierung, .page-waldzertifizierung) .step-card:hover { transform: translateY(-4px); }

/* ---------- Seitennavigation (sticky) ---------- */
.subnav { position: sticky; top: calc(var(--head-h) - 1px); z-index: 60; display: flex; align-items: center; gap: 0.3rem; overflow-x: auto; scrollbar-width: none;
  padding: 0.55rem var(--g) !important; background: color-mix(in srgb, var(--paper) 96%, transparent); border-bottom: 1px solid var(--line); }
.subnav::-webkit-scrollbar { display: none; }
.page-content .subnav a, .subnav a { flex: none; color: var(--ink-2) !important; padding: 0.45rem 0.9rem; font: 600 0.88rem/1 var(--sans); color: var(--ink-2); border-radius: 99px; background: none !important; transition: background 0.25s, color 0.25s; }
.subnav a:hover { color: var(--ink); }
.page-content .subnav a.on { background: var(--btn-bg) !important; color: var(--btn-fg) !important; }
.page-content .subnav a:hover { color: var(--ink) !important; }
.subnav-label { flex: none; margin-right: 0.6rem; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
#colophon { position: relative; overflow: hidden; isolation: isolate; margin-top: 0; }
.foot-rings { position: absolute; z-index: -1; right: -10rem; bottom: -14rem; width: 40rem; max-width: 90vw; color: var(--band-fg); opacity: 0.16; }

/* ---------- Magnetische Buttons ---------- */

/* ---------- Einblenden: leicht verstaerkt ---------- */
.js .reveal { transform: translateY(24px); transition-duration: 0.4s; }

/* ---------- Handy ---------- */
@media (max-width: 62rem) {
  .hi-leaf { grid-column: 1 / -1; grid-row: 1; position: static; width: 8rem; margin-bottom: 1.5rem; }
  .hi-text { grid-column: 1 / -1; grid-row: 2; }
  .home-hero h1 { text-wrap: balance; }
  .service-card > h3::before { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .service-card > .pull { grid-column: 1; }
  .hero-section > .hero-photo, .header-section > .hero-photo { margin: 2rem 0 0; }
  .hp-rings { left: auto; right: -18%; bottom: -12%; width: 55%; }
}
@media (max-width: 56rem) {
  #main-menu a, .page-index #masthead:not(.is-scrolled) #main-menu a { color: var(--ink); }
  .page-index #masthead:not(.is-scrolled) #main-menu .menu-cta a { color: var(--ink); border-color: var(--forest); }
}
@media (max-width: 40rem) {
  .home-hero { padding-top: 6.5rem; }
  .home-hero h1 { font-size: clamp(2.6rem, 14.5vw, 4.4rem); }
  .hh-rings { width: 130vw; right: -50vw; top: 38%; }
  .hh-cue { display: none; }
  .chain-item::after { top: 0.3rem; left: 2.2rem; font-size: 1.8rem; }
  .chain-item .chain-label { padding-top: 0; }
  .subnav-label { display: none; }
}

/* ---------- Bewegung reduzieren / Druck ---------- */
@media (prefers-reduced-motion: reduce) {
  .motif, .js .motif.draw:not(.load) { --draw: 1 !important; animation: none !important; }
  .hh-photo { transform: none !important; }
  .chain-flow::before { transform: none; }
  .js .pull.reveal::before { --pq: 1 !important; }
}
@media print {
  .home-hero { min-height: 0; padding-top: 1rem; color: #000; background: none; }
  .home-hero h1, .hh-lead, .hh-year { color: #000; }
  .hh-photo, .hh-rings, .hh-cue, .motif, .subnav { display: none !important; }
  .page-index #masthead { position: static; }
  .hero-section, .header-section, .form-header { background: none; color: #000; }
  .hero-section h1, .header-section h1, .form-header h1, .hero-section a, .hero-section > p { color: #000 !important; }
  .service-card::before { display: none; }
  .service-card:nth-child(2), .service-card:nth-child(2) h3, .service-card:nth-child(2) > p { color: #000; }
}

/* FAQ: Titel und Untertitel liegen als Direktkinder im Seiteninhalt, daher Band aus drei Teilen */
.page-faq .page-header { background: var(--band-bg); color: var(--band-fg); clip-path: inset(0 -100vmax); box-shadow: 0 0 0 100vmax var(--band-bg); padding-bottom: 0.9rem; }
.page-faq .eyebrow { color: var(--band-muted); }
.page-faq .page-wrapper > h1, .page-faq .page-wrapper > .header-subtitle { background: var(--band-bg); box-shadow: 0 0 0 100vmax var(--band-bg); clip-path: inset(0 -100vmax); margin: 0; position: relative; }
.page-faq .page-wrapper > h1 { color: var(--band-fg); font-size: clamp(2.6rem, 7vw, 5.8rem); font-weight: 500; letter-spacing: -0.035em; padding-block: 1.2rem 1rem; }
.page-faq .page-wrapper > .header-subtitle { color: var(--band-muted); padding-bottom: clamp(3rem, 6vw, 5rem); max-width: none; }
.content-section > h2:has(~ .chain-flow), .content-section > h2:has(~ .stats-grid) { position: static; }

.home-hero h1 .reg { font-size: 0.4em; vertical-align: super; line-height: 0; margin-left: 0.05em; margin-right: 0.08em; font-style: normal; }
.services-grid { overflow-x: clip; }
.site-main, .site-footer, footer { overflow-x: clip; }
