/* =====================================================================
   STAUDINGER · Malermeister in Wien
   "Farbkarte" — a painter's fan-deck. Editorial Plex type; colour drawn
   from Bernhard's own work. Two editions (v1 muted / v2 warm) differ only
   in palette temperament on a shared skeleton; editorial = backup.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* the fan-deck — every wall colour comes from a real photo (EDITORIAL / base) */
  --koralle:    #D8473C;  /* red/pink striped attic   (bild1)  */
  --ocker:      #E0A12B;  /* ochre villa façade       (bild4)  */
  --waldgruen:  #1A6847;  /* ökologische Farben               */
  --terrakotta: #C45D2C;  /* warm decorative accent           */
  --sand:       #E5DAC4;  /* fugenlos coating         (bild10) */

  --ink:    #17181C;
  --ink-80: #3a3c43;
  --ink-60: #62656e;
  --ink-40: #9a9da6;
  --ink-15: #d9d6cf;

  --paper:   #FAF8F3;
  --paper-2: #F2EEE4;  /* recessed panels */

  /* the live accent — the colour selector repaints this */
  --accent:     var(--koralle);
  --accent-ink: #fff;     /* readable text on the accent (set by JS) */

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 72px);

  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --paint: cubic-bezier(.77, 0, .18, 1);  /* roller stroke feel */
}

/* ---------- EDITION · v1 muted (limewashed) ---------- */
html[data-edition="v1"] {
  --koralle:    #C0746B;
  --ocker:      #C7A461;
  --waldgruen:  #5C7C68;
  --terrakotta: #B27A60;
  --sand:       #E6DECB;
}
/* ---------- EDITION · v2 warm (fresh coat) ---------- */
html[data-edition="v2"] {
  --koralle:    #E0402E;
  --ocker:      #EFA513;
  --waldgruen:  #11704A;
  --terrakotta: #D0541E;
  --sand:       #ECE0C4;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

/* paper grain — a faint atmosphere over everything */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* the signature: a fan-deck colour strip pinned to the very top */
.deckline {
  position: fixed; top: 0; left: 0; right: 0;
  height: 5px; z-index: 60;
  display: flex;
  transition: height .4s var(--ease);
}
.deckline span { flex: 1; transition: background .5s var(--ease); }
.deckline span:nth-child(1){ background: var(--koralle); }
.deckline span:nth-child(2){ background: var(--ocker); }
.deckline span:nth-child(3){ background: var(--waldgruen); }
.deckline span:nth-child(4){ background: var(--terrakotta); }
.deckline span:nth-child(5){ background: var(--sand); }

/* ---------- Shared layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { position: relative; padding-block: clamp(72px, 11vw, 168px); z-index: 2; transition: padding .4s var(--ease); }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-60);
  display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent);
  transition: background .5s var(--ease);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; overflow-wrap: break-word; hyphens: auto; }

/* brushed underline — a hand-painted roller stroke under a word */
.brush { position: relative; white-space: nowrap; }
.brush::after {
  content: "";
  position: absolute; left: -.06em; right: -.06em; bottom: .04em;
  height: .26em;
  background: var(--accent);
  z-index: -1;
  border-radius: 40% 60% 55% 45% / 70% 65% 35% 30%;
  transform: rotate(-.6deg) scaleX(0);
  transform-origin: left center;
  transition: transform .9s var(--paint) .4s, background .5s var(--ease);
  opacity: .9;
}
.is-loaded .brush::after { transform: rotate(-.6deg) scaleX(1); }

/* buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--mono);
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .95em 1.5em;
  border-radius: 999px;
  transition: transform .35s var(--ease), background .4s var(--ease),
              color .4s var(--ease), box-shadow .4s var(--ease);
}
.btn--solid {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 26px -12px var(--accent);
}
.btn--solid:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 18px 34px -14px var(--accent); }
.btn--ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-3px); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}

/* skip link */
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6em 1em; border-radius: 6px;
}
.skip:focus { left: 8px; }

/* =====================================================================
   HEADER
   ===================================================================== */
.head {
  position: fixed; top: 5px; left: 0; right: 0; z-index: 50;
  transition: padding .4s var(--ease), background .4s var(--ease),
              box-shadow .4s var(--ease), backdrop-filter .4s var(--ease);
  padding-block: 22px;
}
.head__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.head.scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 var(--ink-15), 0 14px 30px -26px rgba(0,0,0,.5);
  padding-block: 12px;
}
.brandmark { display: flex; align-items: baseline; gap: .6em; }
.brandmark b {
  font-family: var(--serif); font-weight: 600; font-size: 1.32rem;
  letter-spacing: -.01em;
}
.brandmark small {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--ink-60);
}
.nav { display: flex; align-items: center; gap: 2.1rem; }
.nav a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-80);
  position: relative; padding: .3em 0;
}
.nav a.navlink::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--accent); transition: right .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a.navlink:hover::after { right: 0; }
.nav .btn { padding: .6em 1.1em; }

/* multi-page nav: Leistungen dropdown + mobile accordion */
.nav__item { position: relative; }
.nav__caret { font-size: .7em; opacity: .65; }
.nav__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 274px;
  background: var(--paper); border: 1px solid var(--ink-15); border-radius: 14px;
  box-shadow: 0 26px 54px -22px rgba(0,0,0,.45); padding: .5rem;
  display: flex; flex-direction: column; gap: .1rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  z-index: 45;
}
.nav__item--drop:hover .nav__menu,
.nav__item--drop:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu a {
  display: block; padding: .55em .7em; border-radius: 9px;
  font-family: var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink-80);
}
.nav__menu a::after { content: none !important; }
.nav__menu a:hover { background: var(--paper-2); color: var(--ink); }
.nav__menu b { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); }
.nav__menu small { display: block; font-size: .73rem; color: var(--ink-60); margin-top: .1em; }
.navlink.active { color: var(--ink); }
.navlink.active::after { right: 0; }
.section__more { margin-top: clamp(28px, 4vw, 48px); }
.section--center { text-align: center; min-height: 56vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.section--center .contact__lead { max-width: 44ch; }
.error__title { font-size: clamp(2.6rem, 8vw, 5.5rem); margin: .25em 0 .35em; }
.error__cta { justify-content: center; }

/* =====================================================================
   INNER PAGES — shared components (themed by every style via tokens)
   ===================================================================== */
.page-hero { padding-top: clamp(128px, 18vh, 200px); padding-bottom: clamp(24px, 4vw, 56px); }
.page-hero h1 { font-size: clamp(2.5rem, 6.2vw, 5rem); margin: .12em 0 .32em; max-width: 18ch; }
.page-hero .lead { font-family: var(--serif); font-weight: 400; font-size: clamp(1.12rem, 1.7vw, 1.45rem); color: var(--ink-80); max-width: 54ch; line-height: 1.45; }
.page-hero .hero__cta { margin-top: 2em; }

.crumbs { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 1.3em; display: flex; gap: .5em; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--ink-60); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); }
.crumbs i { opacity: .5; font-style: normal; }

.prose > * + * { margin-top: 1.1em; }
.prose p { color: var(--ink-60); max-width: 68ch; line-height: 1.7; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.3em; }
.prose ul { padding-left: 1.2em; max-width: 64ch; }
.prose li { margin-top: .4em; color: var(--ink-60); }
.prose strong { color: var(--ink); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split--narrow { grid-template-columns: 1.1fr .9fr; }
.split__media { border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 30px 60px -38px rgba(0,0,0,.5); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) { .split, .split--narrow { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(18px, 2.4vw, 30px); }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--ink-15); border-radius: 18px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -34px rgba(0,0,0,.5); }
.card__media { aspect-ratio: 16/11; overflow: hidden; background: var(--ink-15); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: clamp(18px, 1.8vw, 26px); display: flex; flex-direction: column; gap: .5em; flex: 1; }
.card__body h3 { font-size: 1.35rem; }
.card__body p { color: var(--ink-60); font-size: .95rem; flex: 1; }
.card__link { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 2px; align-self: flex-start; }
.card__link:hover { color: var(--accent); }

/* FAQ — native details/summary (accessible, no JS) */
.faq { display: flex; flex-direction: column; gap: .6rem; max-width: 800px; }
.faq details { border: 1px solid var(--ink-15); border-radius: 14px; background: var(--paper); }
.faq summary { padding: 1.05em 1.3em; cursor: pointer; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 1.4em; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > *:not(summary) { padding: 0 1.3em 1.2em; color: var(--ink-60); margin: 0; max-width: 70ch; }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 14px; }

.steps { display: grid; gap: clamp(18px, 2.4vw, 30px); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { padding-top: 1rem; border-top: 2px solid var(--ink-15); }
.step__n { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.step h3 { font-size: 1.22rem; margin: .35em 0 .35em; }
.step p { color: var(--ink-60); font-size: .94rem; }

/* CTA band — ink band + accent button (robust contrast in every style) */
.cta { background: var(--ink); color: var(--paper); border-radius: 22px; padding: clamp(34px, 5vw, 68px); text-align: center; }
.cta .eyebrow { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.cta .eyebrow::before { background: var(--accent); }
.cta h2 { color: var(--paper); font-size: clamp(1.9rem, 4vw, 3.1rem); margin: .25em 0 .4em; }
.cta p { color: var(--paper); opacity: .82; max-width: 50ch; margin: 0 auto 1.6em; }
.cta__row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta .btn--ghost { border-color: color-mix(in srgb, var(--paper) 60%, transparent); color: var(--paper); }
.cta .btn--ghost:hover { background: var(--paper); color: var(--ink); }

.section--tint { background: var(--paper-2); }

.pull { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.3; color: var(--ink); border-left: 3px solid var(--accent); padding-left: .8em; margin: 0 0 .9em; }

/* uniform gallery grid (gallery page) — overrides the home mosaic sizing */
.galleria { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(20px, 3vw, 36px); }
.galleria .plate { grid-column: auto !important; aspect-ratio: 4/3 !important; }
.galleria--feature { grid-template-columns: minmax(0, 520px); }   /* single feature image, not lonely */
.galleria-note { font-size: .95rem; opacity: .75; margin: -.2rem 0 .4rem; }

/* portfolio lightbox */
.gallery .plate img, .galleria .plate img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,.93); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: clamp(16px,4vw,52px); }
.lightbox[hidden] { display: none; }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; gap: .7rem; align-items: center; }
.lightbox__fig img { max-width: min(760px, 92vw); max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.lightbox__fig figcaption { color: #e9e6df; font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-align: center; max-width: 60ch; }
.lightbox__close, .lightbox__nav { position: absolute; background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.28); width: 46px; height: 46px; border-radius: 999px; font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: clamp(10px,2vw,22px); right: clamp(10px,2vw,22px); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: clamp(8px,2vw,26px); }
.lightbox__nav--next { right: clamp(8px,2vw,26px); }
body.lb-open { overflow: hidden; }
@media (max-width: 600px) { .lightbox__nav { display: none; } }
.gallery-cat + .gallery-cat { margin-top: clamp(40px, 6vw, 72px); }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

/* styled map placeholder (Anfahrt) — no live embed (privacy) */
.mapblock {
  position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; border: 1px solid var(--ink-15);
  background:
    radial-gradient(circle at 32% 42%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 42%),
    repeating-linear-gradient(0deg, var(--paper-2) 0 22px, transparent 22px 23px),
    repeating-linear-gradient(90deg, var(--paper-2) 0 22px, transparent 22px 23px), var(--paper);
}
.mapblock__pin { position: absolute; left: 32%; top: 42%; width: 20px; height: 20px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: translate(-50%, -100%) rotate(-45deg); box-shadow: 0 10px 20px -6px var(--accent); }
.mapblock__card { position: absolute; left: 18px; bottom: 18px; right: auto; background: var(--paper); border: 1px solid var(--ink-15); border-radius: 12px; padding: 1em 1.2em; box-shadow: 0 18px 36px -18px rgba(0,0,0,.4); max-width: min(86%, 360px); }
.mapblock__card b { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.mapblock__card p { color: var(--ink-60); font-size: .9rem; margin: .25em 0 .8em; }

/* interactive OpenStreetMap (opt-in, lazy-loaded — see assets/js/map.js) */
.mapblock__card { z-index: 2; }
.mapblock__actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.mapblock__note { font-size: .72rem; color: var(--ink-40); line-height: 1.5; margin: .9em 0 0; max-width: 36ch; }
.mapblock__note a { color: var(--accent); text-decoration: underline; }
.mapblock__canvas { position: absolute; inset: 0; z-index: 0; background: var(--paper-2); }
.mapblock.is-live { background: var(--paper-2); }
.mapblock.is-live .mapblock__pin { display: none; }
.mapblock.is-live .mapblock__load,
.mapblock.is-live .mapblock__note { display: none; }
.mapblock.is-live .mapblock__card { max-width: min(76%, 300px); }
/* accent dot marker (Leaflet DivIcon) — echoes the Farbkarte swatches; no marker image */
.map-pin span { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent),
              0 6px 14px -4px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.85); }
/* tint Leaflet's own chrome to fit the design (it lays itself out via CSSOM) */
.leaflet-container { font-family: var(--sans); background: var(--paper-2); }
.leaflet-bar a, .leaflet-bar a:hover { color: var(--ink); background: var(--paper); border-color: var(--ink-15); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { font-family: var(--sans); font-size: .9rem; }
.mapblock .leaflet-control-attribution { font-size: .62rem; }
.mapblock .leaflet-control-attribution a { color: var(--ink-60); }
.legal-doc { max-width: 760px; }
.legal-doc h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-top: 1.8em; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc p, .legal-doc li { color: var(--ink-60); line-height: 1.7; }
.legal-doc a { color: var(--accent); text-decoration: underline; }
.legal-doc ul { padding-left: 1.2em; margin-top: .6em; }
.legal-doc .meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--ink-40); text-transform: uppercase; }
@media (max-width: 760px) {
  .nav__item--drop { width: 100%; }
  .nav__caret { display: none; }
  .nav__menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent; padding: .2rem 0 .5rem .9rem; min-width: 0;
  }
}

.burger { display: none; width: 30px; height: 22px; position: relative; z-index: 56; }
.burger span { position: absolute; left: 0; right: 0; height: 2.5px; background: var(--ink); transition: .3s var(--ease); }
.burger span:nth-child(1){ top: 0; }
.burger span:nth-child(2){ top: 9.5px; }
.burger span:nth-child(3){ top: 19px; }
body.menu-open .burger span:nth-child(1){ top: 9.5px; transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2){ opacity: 0; }
body.menu-open .burger span:nth-child(3){ top: 9.5px; transform: rotate(-45deg); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; padding-top: clamp(140px, 20vh, 220px); padding-bottom: clamp(60px, 9vw, 120px); z-index: 2; }
.hero__grid {
  display: grid; grid-template-columns: 1.55fr .9fr; gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.hero__eyebrow { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) .15s forwards; }
.hero h1 {
  font-size: clamp(3rem, 9vw, 7.2rem);
  margin: .28em 0 .42em;
}
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln > span { display: block; }
.js .hero h1 .ln > span { transform: translateY(105%); }
.is-loaded .hero h1 .ln:nth-child(1) > span { animation: rise .95s var(--paint) .25s forwards; }
.is-loaded .hero h1 .ln:nth-child(2) > span { animation: rise .95s var(--paint) .4s forwards; }

.hero__lead {
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-family: var(--serif); font-weight: 400; color: var(--ink-80);
  max-width: 34ch; line-height: 1.4;
  opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease) .6s forwards;
}
.hero__lead .type {
  color: var(--ink); font-style: italic;
  border-bottom: 3px solid var(--accent); padding-bottom: .04em;
  transition: border-color .5s var(--ease);
}
.hero__lead .caret {
  display: inline-block; width: 2px; height: 1.05em; vertical-align: -.16em;
  background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite;
}
.hero__sub {
  margin-top: 1.6em; color: var(--ink-60); max-width: 42ch; font-size: 1.02rem;
  opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease) .75s forwards;
}
.hero__cta {
  margin-top: 2.3em; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  opacity: 0; transform: translateY(16px); animation: rise .8s var(--ease) .9s forwards;
}

/* the Farbkarte — wall preview + colour chips */
.deck {
  position: relative;
  opacity: 0; animation: fadein 1s var(--ease) .7s forwards;
}

/* the wall preview — your chosen colour, on a wall */
.wall {
  position: relative; margin: 0 0 1.1rem; border-radius: 16px; overflow: hidden;
  aspect-ratio: 5 / 4;
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.05);
}
.wall__swatch { position: absolute; inset: 0; background: var(--accent); transition: background .5s var(--ease); }
.wall__swatch::after {  /* soft light + corner shadow so it reads as a painted wall */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(125deg, rgba(255,255,255,.18), transparent 42%, rgba(0,0,0,.14));
}
.wall::after {  /* a skirting board at the bottom */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 13%;
  background: var(--paper); border-top: 1px solid rgba(0,0,0,.08);
}
.wall__chip {  /* a little paper sample sticker — always readable */
  position: absolute; left: 14px; bottom: calc(13% + 14px); z-index: 2;
  display: flex; flex-direction: column; gap: .15em;
  background: var(--paper); color: var(--ink);
  padding: .55em .8em; border-radius: 9px;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.5);
}
.wall__name { font-weight: 600; font-size: .95rem; }
.wall__code { font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; color: var(--ink-40); min-height: 1em; }

.deck__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-40); margin-bottom: .8rem;
}
.deck__hint { letter-spacing: .12em; color: var(--accent); transition: color .5s var(--ease); }

.chip {
  position: relative; width: 100%; text-align: left;
  display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: .9rem;
  padding: .7rem .9rem;
  background: var(--paper);
  border: 1px solid var(--ink-15);
  border-radius: 12px;
  margin-bottom: .5rem;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  transform-origin: left center;
}
.chip:hover { transform: translateX(5px); box-shadow: 0 12px 26px -18px rgba(0,0,0,.5); }
.chip__sw { width: 44px; height: 44px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: background .4s var(--ease); }
.chip__name { font-weight: 600; font-size: .98rem; }
.chip.is-active {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--accent), 0 16px 32px -20px var(--accent);
}
.chip.is-active .chip__name { color: var(--accent); }

/* =====================================================================
   LEISTUNGEN  (services that paint themselves in)
   ===================================================================== */
.lead-head { max-width: 52ch; margin-bottom: clamp(40px, 6vw, 84px); }
.lead-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-top: .35em; }

.svc {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 84px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 70px);
  border-top: 1px solid var(--ink-15);
}
.svc:nth-child(even) .svc__media { order: 2; }
.svc__media {
  position: relative; border-radius: 16px; overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 30px 60px -36px rgba(0,0,0,.55);
}
.svc__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: clip-path 1s var(--paint), transform 1.4s var(--ease);
}
.js .svc__media img { transform: scale(1.08); clip-path: inset(0 0 100% 0); }
.svc.in-view .svc__media img { clip-path: inset(0 0 0 0); transform: scale(1); }
.svc__num {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .2em; color: var(--ink-40);
}
.svc__title {
  font-size: clamp(1.7rem, 3.4vw, 2.7rem); margin: .25em 0 .1em;
  position: relative; display: inline-block;
}
/* the roller stroke that sweeps under each service title */
.svc__title::after {
  content: ""; position: absolute; left: -.05em; right: -.05em; bottom: .05em; height: .34em;
  background: var(--svc); z-index: -1; opacity: .85;
  border-radius: 45% 55% 50% 50% / 65% 60% 40% 35%;
  transform: scaleX(0) rotate(-.5deg); transform-origin: left center;
  transition: transform .9s var(--paint) .15s;
}
.svc.in-view .svc__title::after { transform: scaleX(1) rotate(-.5deg); }
.svc__text { color: var(--ink-60); margin: 1.2em 0 1.6em; max-width: 46ch; }
.svc__meta { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.svc__swatch {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-60);
}
.svc__swatch i { width: 18px; height: 18px; border-radius: 5px; background: var(--svc); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.svc__more {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); border-bottom: 2px solid var(--svc); padding-bottom: 2px;
  transition: gap .3s; display: inline-flex; gap: .4em; align-items: center;
}
.svc__more:hover { gap: .9em; }

/* fade-up helper for scrolling content */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(28px); }
.in-view .reveal, .reveal.in-view { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* =====================================================================
   ARBEITEN  (gallery — tilt / parallax plates)
   ===================================================================== */
.gallery-sec { background: var(--paper-2); transition: background .4s var(--ease); }
.gallery {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(12px, 1.6vw, 22px);
  margin-top: clamp(36px, 5vw, 64px);
  perspective: 1200px;
}
.plate {
  position: relative; overflow: hidden; border-radius: 12px;
  background: var(--ink-15);
  box-shadow: 0 22px 50px -34px rgba(0,0,0,.6);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .plate { opacity: 0; transform: translateY(30px); }
.plate.in-view { opacity: 1; transform: translateY(0); }
.plate img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease);
  will-change: transform;
}
.plate:hover img { transform: scale(1.07); }
.plate__tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(20,20,24,.5); backdrop-filter: blur(6px);
  padding: .45em .8em; border-radius: 999px;
  transform: translateY(8px); opacity: 0; transition: .4s var(--ease);
}
.plate:hover .plate__tag { transform: none; opacity: 1; }
/* a deliberately irregular, magazine-style mosaic */
.plate:nth-child(1){ grid-column: span 7; aspect-ratio: 16/10; }
.plate:nth-child(2){ grid-column: span 5; aspect-ratio: 4/5; }
.plate:nth-child(3){ grid-column: span 4; aspect-ratio: 3/4; }
.plate:nth-child(4){ grid-column: span 4; aspect-ratio: 3/4; }
.plate:nth-child(5){ grid-column: span 4; aspect-ratio: 3/4; }
.plate:nth-child(6){ grid-column: span 5; aspect-ratio: 4/5; }
.plate:nth-child(7){ grid-column: span 7; aspect-ratio: 16/10; }
.plate:nth-child(8){ grid-column: span 4; aspect-ratio: 1/1; }
.plate:nth-child(9){ grid-column: span 4; aspect-ratio: 1/1; }
.plate:nth-child(10){ grid-column: span 4; aspect-ratio: 1/1; }

/* =====================================================================
   UNTERNEHMEN  (about + Zahlen strip)
   ===================================================================== */
.about { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about__text p { color: var(--ink-60); max-width: 48ch; margin-bottom: 1.1em; font-size: 1.06rem; }
.about__text strong { color: var(--ink); font-weight: 600; }
.zahlen {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--ink-15); border: 1px solid var(--ink-15);
  border-radius: 16px; overflow: hidden;
}
.zahlen li { background: var(--paper); padding: clamp(18px, 2.6vw, 30px); display: flex; flex-direction: column; gap: .25em; }
.zahlen b {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1; color: var(--accent); transition: color .5s var(--ease);
}
.zahlen span { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-60); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* =====================================================================
   ÖKOLOGIE band
   ===================================================================== */
.eco { background: var(--waldgruen); color: #f4f6f2; overflow: hidden; position: relative; transition: background .4s var(--ease); }
.eco::after {
  content: ""; position: absolute; right: -8%; top: -30%; width: 46vw; height: 160%;
  background: radial-gradient(closest-side, rgba(255,255,255,.1), transparent 70%);
  pointer-events: none;
}
.eco .eyebrow { color: #bcd6c8; }
.eco .eyebrow::before { background: var(--ocker); }
.eco__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.eco h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin: .35em 0 .6em; color: #fff; }
.eco p { color: #d6e2d8; max-width: 46ch; }
.eco__quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.25; color: #fff;
}
.eco__quote span { color: var(--ocker); }
.eco__quote::before { content: "»"; color: var(--ocker); margin-right: .12em; }
.eco__quote::after { content: "«"; color: var(--ocker); margin-left: .12em; }

/* =====================================================================
   ZEITRAFFER — frame-free, full-bleed time-lapse reel
   ===================================================================== */
.reel {
  position: relative; width: 100%; overflow: hidden;
  min-height: clamp(340px, 54vh, 600px);
  background: var(--ink);
  display: flex; align-items: flex-end;
  z-index: 2;
}
.reel__video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.reel::after {   /* legibility scrim — anchored bottom-LEFT where the text sits, so it
                    stays readable over a bright poster (and any frame of the future clip) */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,8,10,.74) 0%, rgba(8,8,10,.40) 40%, rgba(8,8,10,.06) 72%, transparent 100%),
    linear-gradient(0deg, rgba(8,8,10,.66) 0%, rgba(8,8,10,.16) 58%, rgba(8,8,10,.30) 100%);
}
.reel__overlay {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(30px, 6vw, 76px) var(--gut);
  color: #fff;
}
.reel__overlay .eyebrow { color: rgba(255,255,255,.82); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.reel__overlay .eyebrow::before { background: var(--accent); }
.reel__overlay h2 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3.3rem); margin: .18em 0 .3em; max-width: 20ch;
  text-shadow: 0 2px 16px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.55); }
.reel__sub { color: #fff; max-width: 42ch; font-size: 1.05rem; text-shadow: 0 1px 10px rgba(0,0,0,.5); }

/* =====================================================================
   KONTAKT
   ===================================================================== */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: .3em 0 .5em; }
.contact__lead { color: var(--ink-60); max-width: 40ch; margin-bottom: 2em; }
.contact__line {
  display: flex; align-items: center; gap: 1rem; padding: 1.1em 0;
  border-top: 1px solid var(--ink-15);
}
.contact__line:last-of-type { border-bottom: 1px solid var(--ink-15); }
.contact__line .k {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-40); width: 92px; flex: none;
}
.contact__line .v { font-size: 1.15rem; font-weight: 500; }
.contact__line a.v:hover { color: var(--accent); }

.form { display: grid; gap: 1.1rem; background: var(--paper-2); padding: clamp(24px,4vw,40px); border-radius: 18px; }
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-60); }
.field input, .field textarea {
  font: inherit; padding: .85em 1em; border: 1.5px solid var(--ink-15); border-radius: 10px;
  background: var(--paper); color: var(--ink); transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form__note { font-size: .78rem; color: var(--ink-40); }
.form .btn--solid { justify-content: center; padding: 1.05em; border-radius: 12px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.foot { background: var(--ink); color: var(--paper); padding-block: clamp(48px, 7vw, 90px); position: relative; z-index: 2; }
.foot__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.foot__brand b { font-family: var(--serif); font-size: 1.8rem; }
.foot__brand p { color: var(--ink-40); margin-top: .5em; max-width: 30ch; font-size: .92rem; }
.foot__cols { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; }
.foot__col h2 { font-family: var(--mono); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 1em; font-weight: 400; }
.foot__col a, .foot__col span { display: block; color: #cfcdc6; padding: .35em 0; font-size: .94rem; transition: color .3s; }
.foot__col a:hover { color: #fff; }
.foot__deck { display: flex; gap: 6px; margin-top: 3rem; }
.foot__deck i { height: 8px; flex: 1; border-radius: 2px; transition: background .5s var(--ease); }
.foot__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.12);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; color: var(--ink-40);
}

/* =====================================================================
   Keyframes
   ===================================================================== */
@keyframes rise   { to { transform: translateY(0); opacity: 1; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes blink  { 50% { opacity: 0; } }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .deck { max-width: 460px; }
  .eco__grid, .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .burger { display: block; }
  /* mobile drawer */
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem;
    position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 320px);
    background: var(--paper); padding: 6rem var(--gut) 2rem;
    box-shadow: -30px 0 60px -30px rgba(0,0,0,.5); z-index: 55;
    animation: rise .4s var(--ease);
  }
  .nav.open a { font-size: 1rem; }
  .nav.open .btn { margin-top: .5rem; }

  .svc { grid-template-columns: 1fr; gap: 24px; }
  .svc:nth-child(even) .svc__media { order: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .plate { grid-column: span 1 !important; aspect-ratio: 4/5 !important; }
  .plate:nth-child(1), .plate:nth-child(7){ grid-column: span 2 !important; aspect-ratio: 16/10 !important; }
}
@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
  .plate { grid-column: span 1 !important; aspect-ratio: 4/3 !important; }
}

/* =====================================================================
   Reduced motion — keep it calm
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero h1 .ln > span { transform: none; }
  .hero__eyebrow, .hero__lead, .hero__sub, .hero__cta, .deck { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .svc__media img { clip-path: none; transform: none; }
  .brush::after { transform: rotate(-.6deg) scaleX(1); }
  .svc__title::after { transform: scaleX(1) rotate(-.5deg); }
  .hero__lead .caret { display: none; }
}

/* =====================================================================
   EDITION SWITCHER  (design-comparison tool — preview only)
   ===================================================================== */
.edition-switch {
  position: fixed; z-index: 70; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: .25rem;
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  color: var(--paper);
  padding: .4rem .5rem; border-radius: 999px;
  box-shadow: 0 18px 44px -16px rgba(0,0,0,.6);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.edition-switch__lbl { text-transform: uppercase; opacity: .55; padding: 0 .5rem 0 .4rem; }
.edition-switch button {
  color: var(--paper); padding: .55em .95em; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .08em; font-size: .7rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.edition-switch button:hover { background: rgba(255,255,255,.14); }
.edition-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
body.menu-open .edition-switch { display: none; }
@media (max-width: 600px) {
  .edition-switch { bottom: 10px; font-size: .62rem; }
  .edition-switch__lbl { display: none; }
  .edition-switch button { padding: .5em .75em; font-size: .62rem; }
}

/* =====================================================================
   EDITION · v1 muted — quieter, airier (palette already set above)
   ===================================================================== */
html[data-edition="v1"] .section { padding-block: clamp(88px, 12vw, 188px); }
html[data-edition="v1"] .deckline { height: 4px; }
html[data-edition="v1"] .gallery-sec { background: var(--paper); }
/* v1 also dials the playful MOTION down (a quieter edition) */
html[data-edition="v1"] .brush::after {            /* static, quiet underline — no sweep */
  transform: rotate(-.6deg) scaleX(1);
  transition: background .5s var(--ease);
  height: .16em; opacity: .5;
}
html[data-edition="v1"] .svc__title::after { display: none; }                  /* no roller-stroke sweep */
html[data-edition="v1"] .js .svc__media img { clip-path: none; transform: none; }  /* no paint-wipe reveal */
html[data-edition="v1"] .svc__media,
html[data-edition="v1"] .plate { box-shadow: 0 18px 42px -34px rgba(0,0,0,.4); }
/* the Ökologie band relaxes into a pale sage with ink text */
html[data-edition="v1"] .eco { background: color-mix(in srgb, var(--waldgruen) 34%, var(--paper)); color: var(--ink); }
html[data-edition="v1"] .eco::after { display: none; }
html[data-edition="v1"] .eco h2 { color: var(--ink); }
html[data-edition="v1"] .eco p { color: var(--ink-60); }
html[data-edition="v1"] .eco .eyebrow { color: var(--ink-60); }
html[data-edition="v1"] .eco .eyebrow::before { background: var(--waldgruen); }
html[data-edition="v1"] .eco__quote { color: var(--ink); }
html[data-edition="v1"] .eco__quote span,
html[data-edition="v1"] .eco__quote::before,
html[data-edition="v1"] .eco__quote::after { color: var(--waldgruen); }

/* =====================================================================
   EDITION · v2 warm — more colour presence (palette already set above)
   ===================================================================== */
html[data-edition="v2"] .eyebrow { color: var(--accent); transition: color .5s var(--ease); }
html[data-edition="v2"] .hero { overflow: clip; }
html[data-edition="v2"] .hero::before {
  content: ""; position: absolute; inset: -12% -18% auto -18%; height: 128%;
  z-index: -1; pointer-events: none;
  background: radial-gradient(56% 62% at 74% 30%,
              color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  transition: background .5s var(--ease);
}
html[data-edition="v2"] .svc {
  border-top: none;
  background: color-mix(in srgb, var(--svc) 7%, var(--paper));
  border-radius: 20px;
  padding: clamp(22px, 3.5vw, 52px);
  margin-bottom: clamp(14px, 2vw, 22px);
}
html[data-edition="v2"] .svc__more { color: var(--ink); }
html[data-edition="v2"] .deckline { height: 6px; }
html[data-edition="v2"] .gallery-sec { background: color-mix(in srgb, var(--terrakotta) 8%, var(--ink)); }
html[data-edition="v2"] .gallery-sec .eyebrow { color: #e3ded5; }
html[data-edition="v2"] .gallery-sec .eyebrow::before { background: var(--accent); }
html[data-edition="v2"] .gallery-sec h2 { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  html[data-edition="v2"] .hero::before { transition: none; }
}

/* Palette utility classes — replace inline style="" attributes so the CSP needs
   no 'unsafe-inline' for styles. (JS-applied CSSOM styles are unaffected by CSP.) */
.sw--koralle { background: var(--koralle); }
.sw--ocker { background: var(--ocker); }
.sw--waldgruen { background: var(--waldgruen); }
.sw--terrakotta { background: var(--terrakotta); }
.sw--sand { background: var(--sand); }
.svc--koralle { --svc: var(--koralle); }
.svc--sand { --svc: var(--sand); }
.svc--terrakotta { --svc: var(--terrakotta); }
.svc--waldgruen { --svc: var(--waldgruen); }

/* =====================================================================
   EASTER EGG — "Streich es selbst" paint game (assets/js/paint.js)
   ===================================================================== */
.paint-fab {
  position: fixed; right: clamp(14px, 2.5vw, 26px); bottom: clamp(14px, 2.5vw, 26px); z-index: 65;
  display: inline-flex; align-items: center; gap: .55em;
  background: var(--accent); color: var(--accent-ink, #fff);
  padding: .72em 1.05em; border-radius: 999px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .4s var(--ease), opacity .3s var(--ease);
}
.paint-fab:hover { transform: translateY(-3px) rotate(-2deg); box-shadow: 0 20px 40px -12px rgba(0,0,0,.55); }
.paint-fab svg { width: 18px; height: 18px; fill: currentColor; }
.paint-fab__label { white-space: nowrap; }
body.paint-open .paint-fab { display: none; }
/* get out of the way of inputs/lightbox/menu so it never covers a control */
.paint-fab.is-tucked { opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none; }
body.lb-open .paint-fab, body.menu-open .paint-fab { opacity: 0; pointer-events: none; }
@media (max-width: 560px) { .paint-fab__label { display: none; } .paint-fab { padding: .85em; } }

.paintgame { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: clamp(8px, 3vw, 30px); }
.paintgame[hidden] { display: none; }
.paintgame__backdrop { position: absolute; inset: 0; background: rgba(10,10,12,.78); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.paintgame__panel {
  position: relative; z-index: 1; width: min(820px, 100%); max-height: 94vh; overflow: auto;
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: clamp(16px, 2.5vw, 26px);
  box-shadow: 0 40px 90px -28px rgba(0,0,0,.7);
}
.paintgame__head { display: flex; align-items: baseline; gap: .7em; margin-bottom: 1rem; }
.paintgame__title { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.paintgame__sub { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-40); }
.paintgame__close { margin-left: auto; width: 38px; height: 38px; border-radius: 999px; font-size: 1.05rem; color: var(--ink-60); background: var(--paper-2); flex: none; }
.paintgame__close:hover { color: var(--ink); }
.paintgame__stage {
  position: relative; width: 100%; max-width: 760px; margin-inline: auto;
  aspect-ratio: 760 / 480; border-radius: 12px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--ink-15); touch-action: none; background: #cabda6;
}
.paintgame__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.paintgame__paint { cursor: crosshair; transition: opacity .4s linear; }
.paintgame.is-working .paintgame__paint { cursor: progress; }
.paintgame__tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.paintgame__swatches { display: flex; gap: .5rem; }
.paintgame__swatch { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .2s var(--ease), box-shadow .2s; }
.paintgame__swatch:hover { transform: translateY(-2px); }
.paintgame__swatch.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.paintgame__status { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: var(--ink-60); flex: 1; min-width: 150px; }
.paintgame__pro { margin-left: auto; }
.paintgame__pro.is-hidden { display: none; }
.paintgame.is-done .paintgame__pro { display: none; }
.paintgame__pro.nudge { animation: pro-nudge 1.1s var(--ease) infinite; }
@keyframes pro-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.paintgame__done { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--ink-15); display: flex; flex-direction: column; gap: .5rem; }
.paintgame__done.is-hidden { display: none; }
.paintgame__doneswatch { width: 44px; height: 8px; border-radius: 4px; background: var(--accent); }
.paintgame__done b { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.paintgame__done p { color: var(--ink-60); font-size: .95rem; max-width: 54ch; }
.paintgame__donerow { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .4rem; }
body.paint-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .paintgame__pro.nudge { animation: none; } }

/* =====================================================================
   HIDDEN ARCADE — footer mini-games (assets/js/arcade.js)
   ===================================================================== */
.arcade-strip { display: flex; gap: 8px; align-items: center; }
.arcade__dot {
  position: relative; width: 11px; height: 11px; border-radius: 50%;
  background: #cfcdc6; opacity: .1;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.arcade__dot:hover, .arcade__dot:focus-visible { opacity: 1; transform: scale(1.3); }
.arcade__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.arcade__dot::after {
  content: attr(data-label);
  position: absolute; bottom: 180%; left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--paper); color: var(--ink); border: 1px solid var(--ink-15);
  padding: .4em .65em; border-radius: 7px; white-space: nowrap;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .03em; text-transform: none;
  box-shadow: 0 12px 26px -12px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.arcade__dot:hover::after, .arcade__dot:focus-visible::after { opacity: 1; transform: translateX(-50%); }
@media (max-width: 560px) { .arcade-strip { width: 100%; margin-top: .4rem; } }

/* modal shell (mirrors the paint game) */
.arcade { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: clamp(8px,3vw,30px); }
.arcade[hidden] { display: none; }
.arcade__backdrop { position: absolute; inset: 0; background: rgba(10,10,12,.78); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.arcade__panel { position: relative; z-index: 1; width: min(760px, 100%); max-height: 94vh; overflow: auto;
  background: var(--paper); color: var(--ink); border-radius: 18px; padding: clamp(16px,2.5vw,26px); box-shadow: 0 40px 90px -28px rgba(0,0,0,.7); }
.arcade__head { display: flex; align-items: baseline; gap: .7em; margin-bottom: 1rem; }
.arcade__title { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.arcade__sub { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-40); }
.arcade__close { margin-left: auto; width: 38px; height: 38px; border-radius: 999px; font-size: 1.05rem; color: var(--ink-60); background: var(--paper-2); flex: none; }
.arcade__close:hover { color: var(--ink); }
.arcade__stage { display: flex; flex-direction: column; gap: 1rem; }

/* shared widgets */
.arcade__canvas-wrap { position: relative; width: 100%; max-width: 620px; margin-inline: auto; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--ink-15); touch-action: none; background: var(--paper-2); }
.arcade__canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
.arcade__tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.arcade__status { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: var(--ink-60); flex: 1; min-width: 150px; }
.arcade__swatches { display: flex; gap: .5rem; flex-wrap: wrap; }
.arcade__swatch { width: 32px; height: 32px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .2s var(--ease); display: grid; place-items: center; font-family: var(--mono); font-size: .72rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.65); }
.arcade__swatch:hover { transform: translateY(-2px); }
.arcade__swatch.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.arcade__meter { height: 8px; border-radius: 999px; background: var(--ink-15); overflow: hidden; flex: 1; min-width: 120px; }
.arcade__meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }
.arcade__cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .2rem; }
.arcade__done { display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--ink-15); padding-top: 1rem; }
.arcade__done b { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.arcade__done p { color: var(--ink-60); font-size: .95rem; max-width: 54ch; }
body.arcade-open { overflow: hidden; }

/* quiz */
.quiz__prog { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-40); }
.quiz__q { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; line-height: 1.25; }
.quiz__opts { display: grid; gap: .55rem; }
.quiz__opt { text-align: left; padding: .8em 1.1em; border-radius: 12px; border: 1.5px solid var(--ink-15); background: var(--paper); transition: border-color .2s, background .2s, transform .15s; font-size: 1rem; }
.quiz__opt:hover:not(:disabled) { border-color: var(--ink); transform: translateX(3px); }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.correct { border-color: var(--waldgruen); background: color-mix(in srgb, var(--waldgruen) 13%, var(--paper)); }
.quiz__opt.wrong { border-color: var(--koralle); background: color-mix(in srgb, var(--koralle) 10%, var(--paper)); }
.quiz__fb { color: var(--ink-60); font-size: .95rem; min-height: 1.2em; }

/* memory */
.mem__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; max-width: 420px; margin-inline: auto; }
.mem__card { aspect-ratio: 3/4; border-radius: 10px; position: relative; background: var(--paper-2); border: 1px solid var(--ink-15); transition: transform .2s var(--ease); }
.mem__card:hover { transform: translateY(-2px); }
.mem__card::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); color: var(--ink-40); font-size: 1.4rem; transition: opacity .2s; }
.mem__card.flipped::before, .mem__card.matched::before { opacity: 0; }
.mem__card i { position: absolute; inset: 8px; border-radius: 6px; opacity: 0; transition: opacity .2s; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.mem__card.flipped i, .mem__card.matched i { opacity: 1; }
.mem__card.matched { border-color: var(--accent); }

/* spot-the-difference */
.spot__overlay { position: absolute; inset: 0; }
.spot__hit { position: absolute; border-radius: 50%; background: transparent; }
.spot__hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spot__hit.found { box-shadow: 0 0 0 3px var(--waldgruen); }

/* Print / PDF — reveal scroll-gated content (it would otherwise print blank),
   drop interactive/fixed chrome, and make dark bands legible on white. */
@media print {
  .reveal, .svc, .plate { opacity: 1 !important; transform: none !important; }
  .svc__media img { clip-path: none !important; }
  .chooser, .burger, .skip, .deckline, .nav, .paint-fab, .paintgame, .arcade, .arcade-strip { display: none !important; }
  .head { position: static !important; box-shadow: none !important; }
  .cta, .foot { background: none !important; color: #000 !important; }
  .cta *, .foot * { color: #000 !important; }
  .btn { background: none !important; color: #000 !important; border: 1px solid #555 !important; box-shadow: none !important; }
  a { color: #000 !important; }
  img, figure, .card, .svc, .step, .plate { break-inside: avoid; }
  body { background: #fff !important; }
}
