/* ==========================================================================
   Imhof – Child-Template für Cassiopeia
   (C) 2026 Webdesign Imhof · GPL v2+

   Farben/Radius/Schriften kommen als Variablen aus den Template-Parametern.
   Projekt-Anpassungen gehören in user.css oder in "Eigener Code" → CSS.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --imhof-primary: #0891d1;
  --imhof-accent: #ffb703;
  --imhof-dark: #0b2a3c;
  --imhof-light: #eef8fc;
  --imhof-glow: #8be9ff;
  --imhof-radius: 18px;
  --imhof-font-body: "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --imhof-font-headings: "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --imhof-ease: cubic-bezier(.22, 1, .36, 1);
  --imhof-shadow: 0 18px 40px -24px color-mix(in srgb, var(--imhof-dark) 55%, transparent);
  --imhof-shadow-lg: 0 34px 70px -30px color-mix(in srgb, var(--imhof-dark) 70%, transparent);
}

/* Cassiopeia-Variablen auf die eigenen Tokens umbiegen */
html:root {
  --cassiopeia-color-primary: var(--imhof-dark);
  --cassiopeia-color-link: var(--imhof-primary);
  --cassiopeia-color-hover: color-mix(in srgb, var(--imhof-primary) 75%, #000);
  --link-color: var(--imhof-primary);
  --link-hover-color: color-mix(in srgb, var(--imhof-primary) 75%, #000);
  --cassiopeia-font-family-body: var(--imhof-font-body);
  --cassiopeia-font-family-headings: var(--imhof-font-headings);
  --cassiopeia-font-weight-headings: 800;
  --template-bg-light: var(--imhof-light);
  --template-special-color: var(--imhof-dark);
}

/* ---------- 2. Basis ---------- */
body.site {
  font-family: var(--imhof-font-body);
  color: #1d2b33;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

body.site h1, body.site h2, body.site h3, body.site h4 {
  font-family: var(--imhof-font-headings);
  font-weight: 800;
  letter-spacing: -.015em;
  text-wrap: balance;
  color: var(--imhof-dark);
}

body.site h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.05; }
body.site h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.1; }

/* v1.3.0: Überschriften-Stil „Leicht, Versalien“ (Template › Design) */
body.site.headings-light :is(h1, .h1) { font-weight: 200; font-size: clamp(1.75rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: .04em; text-transform: uppercase; }
body.site.headings-light :is(h2, .h2) { font-weight: 300; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: .05em; text-transform: uppercase; }
body.site.headings-light :is(h3, .h3) { font-weight: 400; letter-spacing: .02em; }
body.site.headings-light :is(h4, .h4) { font-weight: 500; }
body.site.headings-light .container-header .brand-logo span { font-weight: 300; font-size: 1.5rem; letter-spacing: .14em; text-transform: uppercase; }

body.site a { color: var(--imhof-primary); text-underline-offset: .2em; }
body.site a:hover { color: var(--link-hover-color); }

:focus-visible { outline: 3px solid var(--imhof-accent); outline-offset: 3px; }

::selection { background: var(--imhof-accent); color: var(--imhof-dark); }

/* ---------- 3. Raster mit eigenen Vollbreiten-Positionen ---------- */
@supports (display: grid) {
  body.site .site-grid {
    grid-template-areas:
      ". banner banner banner banner ."
      ". top-a top-a top-a top-a ."
      ". top-b top-b top-b top-b ."
      ". mym1 mym1 mym1 mym1 ."
      ". comp comp comp comp ."
      ". side-r side-r side-r side-r ."
      ". side-l side-l side-l side-l ."
      ". mym2 mym2 mym2 mym2 ."
      ". bot-a bot-a bot-a bot-a ."
      ". bot-b bot-b bot-b bot-b .";
  }

  @media (min-width: 992px) {
    body.site .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". mym1 mym1 mym1 mym1 ."
        ". comp comp comp comp ."
        ". mym2 mym2 mym2 mym2 ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }
    body.site.has-sidebar-left .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". mym1 mym1 mym1 mym1 ."
        ". side-l comp comp comp ."
        ". mym2 mym2 mym2 mym2 ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }
    body.site.has-sidebar-right .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". mym1 mym1 mym1 mym1 ."
        ". comp comp comp side-r ."
        ". mym2 mym2 mym2 mym2 ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }
    body.site.has-sidebar-left.has-sidebar-right .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". mym1 mym1 mym1 mym1 ."
        ". side-l comp comp side-r ."
        ". mym2 mym2 mym2 mym2 ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }
  }

  .container-mymodul1 { grid-area: mym1; }
  .container-mymodul2 { grid-area: mym2; }
  body.site .site-grid > .full-width { grid-column: full-start / full-end; }
}

.container-mymodul1, .container-mymodul2 { margin-block: clamp(2rem, 5vw, 4rem); }
.container-component { padding-block: clamp(1rem, 3vw, 2.5rem); }

/* ---------- 4. Hinweisleiste (Urlaub, Betriebsferien …) ---------- */
.container-hinweis {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: .65rem 3rem .65rem 1rem;
  color: var(--imhof-dark);
  font-weight: 600;
  text-align: center;
  background: linear-gradient(100deg, var(--imhof-accent), color-mix(in srgb, var(--imhof-accent) 60%, #fff), var(--imhof-accent));
  background-size: 200% 100%;
  animation: imhof-sweep 8s linear infinite;
}
.container-hinweis p { margin: 0; }
.container-hinweis a { color: inherit; font-weight: 800; }
.container-hinweis__close {
  position: absolute; right: .5rem; top: 50%; translate: 0 -50%;
  width: 2rem; height: 2rem; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--imhof-dark) 12%, transparent);
  color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.container-hinweis.is-closed { display: none; }

/* ---------- 5. Kopfzeile ---------- */
body.site .container-header {
  position: relative;
  z-index: 50;
  background-color: var(--imhof-dark);
  background-image:
    radial-gradient(900px circle at var(--gx, 80%) var(--gy, 0%), color-mix(in srgb, var(--imhof-glow) 28%, transparent), transparent 55%),
    linear-gradient(120deg, var(--imhof-dark) 0%, color-mix(in srgb, var(--imhof-primary) 70%, var(--imhof-dark)) 100%);
  box-shadow: none;
  transition: box-shadow .4s, padding .4s;
}

/* glänzende Lichtkante unter der Kopfzeile */
body.site .container-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--imhof-glow), #fff, var(--imhof-accent), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: imhof-edge 7s linear infinite;
  pointer-events: none;
}

body.site .container-header.is-scrolled { box-shadow: var(--imhof-shadow-lg); }

body.site .container-header .navbar-brand { padding-block: .9rem; transition: padding .4s; }
body.site .container-header.is-scrolled .navbar-brand { padding-block: .4rem; }
body.site .container-header .brand-logo img { max-height: 72px; width: auto; transition: max-height .4s; }
body.site .container-header.is-scrolled .brand-logo img { max-height: 52px; }
body.site .container-header .brand-logo span { font-family: var(--imhof-font-headings); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }
/* v1.3.0: Marke ohne Unterstrich, Logo und Titel nebeneinander, optional weißes Schild */
body.site .container-header .brand-logo { display: inline-flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none !important; }
body.site .container-header .brand-logo:hover { color: inherit; }
body.site .container-header .brand-logo img[src$=".svg"] { height: 54px; max-height: none; }
body.site .container-header.is-scrolled .brand-logo img[src$=".svg"] { height: 42px; }
/* v1.4.0: Titel + Unterzeile als Wortmarke neben dem Logo (wie grundreinigung-immobilien.de) */
body.site .container-header .brand-logo .brand-text { display: flex; flex-direction: column; font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.05; }
body.site .container-header .brand-logo .brand-text b { font-family: var(--imhof-font-headings); font-weight: 800; font-size: 1.65rem; letter-spacing: .06em; text-transform: uppercase; }
body.site .container-header .brand-logo .brand-text small { margin-top: .35rem; font-size: .78rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
body.site .container-header .brand-logo img.brand-badge { max-height: 64px; padding: 5px 8px; border-radius: calc(var(--imhof-radius) * .6); background: #fff; box-shadow: var(--imhof-shadow); }
body.site .container-header.is-scrolled .brand-logo img.brand-badge { max-height: 48px; }
body.site .container-header .site-description { opacity: .8; }

/* Menü (v1.4.0, Stil wie ki-gefunden.de): Hover = Akzentfarbe mit Leuchten,
   aktiver Punkt = Akzentfarbe + dünne leuchtende Linie über die ganze Wortbreite.
   Cassiopeias eigene Striche (li::after bzw. a::after) sind aus. */
body.site .container-header .metismenu > li > a::after,
body.site .container-header .metismenu > li > button::before,
body.site .container-header .mod-menu > li::after,
body.site .container-header .mod-menu > li > a::after { display: none; }

body.site .container-header .metismenu > li > a,
body.site .container-header .metismenu > li > button,
body.site .container-header .mod-menu > li > a {
  position: relative;
  display: inline-block;
  padding-block: .35rem;
  font-size: var(--imhof-menu-size, 1.1rem);
  font-weight: 600;
  color: inherit;
  background: none;
  text-decoration: none !important;
  transition: color .25s, text-shadow .25s;
}
body.site .container-header .metismenu > li > a::before,
body.site .container-header .mod-menu > li > a::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px;
  background: var(--imhof-accent);
  box-shadow: 0 0 8px var(--imhof-accent);
  transform: scaleX(0);
  transition: transform .35s var(--imhof-ease);
}
body.site .container-header .metismenu > li > a:is(:hover, :focus-visible),
body.site .container-header .mod-menu > li > a:is(:hover, :focus-visible),
body.site .container-header .metismenu > li.active > a,
body.site .container-header .mod-menu > li.active > a {
  color: var(--imhof-accent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--imhof-accent) 60%, transparent);
}
body.site .container-header .metismenu > li.active > a::before,
body.site .container-header .mod-menu > li.active > a::before,
body.site .container-header .metismenu > li > a:hover::before,
body.site .container-header .mod-menu > li > a:hover::before { transform: scaleX(1); }
body.site.header-glass .container-header .mod-menu > li > a:is(:hover, :focus-visible),
body.site.header-glass .container-header .mod-menu > li.active > a { color: var(--imhof-primary); text-shadow: none; }

/* ---------- 5b. Off-Canvas-Menü (mobil, unter 992 px) ---------- */
.imhof-burger, .imhof-nav-close, .imhof-nav-backdrop { display: none; }

@media (max-width: 991.98px) {
  .imhof-burger {
    position: absolute; right: 1rem; top: 1.1rem; z-index: 2;
    display: inline-grid; place-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 0;
    border: 0; border-radius: 14px;
    background: color-mix(in srgb, #fff 16%, transparent);
    color: #fff; cursor: pointer;
    transition: top .4s;
  }
  .imhof-burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s, opacity .3s; }
  body.site .container-header.is-scrolled .imhof-burger { top: .75rem; }
  body.site .container-header .navbar-brand { padding-right: 4rem; }

  body.site .container-header .container-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100;
    display: flex; flex-direction: column; align-items: stretch; gap: 1rem;
    width: min(86vw, 360px); max-width: none; margin: 0;
    padding: 5rem 1.25rem 2rem;
    overflow-y: auto;
    color: #fff;
    background:
      radial-gradient(520px circle at 100% 0%, color-mix(in srgb, var(--imhof-glow) 30%, transparent), transparent 60%),
      linear-gradient(165deg, var(--imhof-dark), color-mix(in srgb, var(--imhof-primary) 55%, var(--imhof-dark)));
    box-shadow: var(--imhof-shadow-lg);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .45s var(--imhof-ease), visibility 0s linear .45s;
  }
  body.nav-open .container-header .container-nav { transform: none; visibility: visible; transition: transform .45s var(--imhof-ease); }

  body.site .container-header .container-nav .mod-menu,
  body.site .container-header .container-nav .metismenu { display: flex; flex-direction: column !important; gap: .2rem; width: 100%; margin: 0; padding: 0; }
  body.site .container-header .container-nav .mod-menu > li > a,
  body.site .container-header .container-nav .metismenu > li > a {
    display: block; padding: .85rem 1rem;
    border-radius: 12px;
    font-size: 1.15rem;
    color: #fff;
    background: none;
    transition: background-color .25s;
  }
  body.site .container-header .container-nav .mod-menu > li > a::before { display: none; }
  body.site .container-header .container-nav .mod-menu > li > a:hover,
  body.site .container-header .container-nav .mod-menu > li.active > a {
    background: color-mix(in srgb, #fff 14%, transparent);
    box-shadow: inset 4px 0 0 var(--imhof-accent);
  }
  body.site .container-header .container-nav .mod-menu > li {
    opacity: 0; transform: translateX(24px);
    transition: opacity .4s, transform .5s var(--imhof-ease);
  }
  body.nav-open .container-header .container-nav .mod-menu > li { opacity: 1; transform: none; }
  body.nav-open .container-header .container-nav .mod-menu > li:nth-child(2) { transition-delay: .05s; }
  body.nav-open .container-header .container-nav .mod-menu > li:nth-child(3) { transition-delay: .1s; }
  body.nav-open .container-header .container-nav .mod-menu > li:nth-child(4) { transition-delay: .15s; }
  body.nav-open .container-header .container-nav .mod-menu > li:nth-child(5) { transition-delay: .2s; }
  body.nav-open .container-header .container-nav .mod-menu > li:nth-child(n+6) { transition-delay: .25s; }
  body.site .container-header .container-nav .navbar-toggler { display: none; }
  body.site .container-header .container-nav .navbar-collapse { display: block !important; }

  .imhof-nav-close {
    position: absolute; top: 1rem; right: 1rem;
    display: grid; place-items: center;
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    font-size: 1.8rem; line-height: 1;
    color: #fff; background: color-mix(in srgb, #fff 14%, transparent);
    cursor: pointer;
  }
  .imhof-nav-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 1090;
    background: color-mix(in srgb, var(--imhof-dark) 55%, transparent);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity .35s, visibility 0s linear .35s;
  }
  body.nav-open .imhof-nav-backdrop { opacity: 1; visibility: visible; transition: opacity .35s; }
  body.nav-open { overflow: hidden; }
  body.nav-open .imhof-fab, body.nav-open .back-to-top-link { display: none; }
  /* Glas-Kopfzeile: backdrop-filter würde das fixierte Menü einsperren */
  body.nav-open.header-glass .container-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
  body.site.header-glass .container-header .container-nav .mod-menu > li > a { color: #fff; }
  body.site.header-glass .imhof-burger { color: var(--imhof-dark); background: color-mix(in srgb, var(--imhof-dark) 10%, transparent); }
  body.site .container-header .container-nav .mod-menu > li > a { font-size: max(1.15rem, var(--imhof-menu-size, 1.1rem)); }
}

body.site .container-header .metismenu .mm-collapse {
  border: 0;
  border-radius: calc(var(--imhof-radius) * .6);
  box-shadow: var(--imhof-shadow-lg);
  overflow: hidden;
}

/* Glas-Variante (hell) */
body.site.header-glass .container-header {
  background: color-mix(in srgb, #fff 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  color: var(--imhof-dark);
}
body.site.header-glass .container-header .brand-logo,
body.site.header-glass .container-header .site-description,
body.site.header-glass .container-header .mod-menu,
body.site.header-glass .container-header .metismenu > li > a,
body.site.header-glass .container-header .metismenu > li > button,
body.site.header-glass .container-header .mod-menu > li > a,
body.site.header-glass .container-header .navbar-toggler { color: var(--imhof-dark); }
body.site.header-glass .container-header .navbar-toggler { border-color: var(--imhof-dark); }

/* ---------- 6. Buttons ---------- */
body.site .btn {
  border-radius: 999px;
  font-weight: 700;
  padding: .7rem 1.6rem;
  transition: transform .35s var(--imhof-ease), box-shadow .35s, background-color .25s, color .25s, border-color .25s;
}
body.site .btn:hover { transform: translateY(-3px); box-shadow: var(--imhof-shadow); }
body.site .btn:active { transform: translateY(-1px); }

body.site .btn-primary {
  --btn-bg: var(--imhof-primary);
  --btn-border-color: var(--imhof-primary);
  --btn-hover-bg: color-mix(in srgb, var(--imhof-primary) 82%, #000);
  --btn-hover-border-color: color-mix(in srgb, var(--imhof-primary) 82%, #000);
  background-color: var(--imhof-primary);
  border-color: var(--imhof-primary);
  color: #fff;
}
body.site .btn-primary:hover { background-color: color-mix(in srgb, var(--imhof-primary) 82%, #000); color: #fff; }

body.site .btn-accent { background: var(--imhof-accent); border-color: var(--imhof-accent); color: var(--imhof-dark); }
body.site .btn-accent:hover { background: color-mix(in srgb, var(--imhof-accent) 85%, #fff); color: var(--imhof-dark); }

body.site .btn-ghost { background: transparent; border: 2px solid currentColor; color: inherit; }

/* Glanz-Button: Lichtstreifen + pulsierender Schein */
.btn-glow,
body[data-fx-btnglow="1"] .btn-primary,
body[data-fx-btnglow="1"] .btn-accent {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-glow::after,
body[data-fx-btnglow="1"] .btn-primary::after,
body[data-fx-btnglow="1"] .btn-accent::after {
  content: "";
  position: absolute; top: 0; left: -70%; z-index: 1;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: skewX(-20deg);
  animation: imhof-sheen 3.8s ease-in-out infinite;
  pointer-events: none;
}
.btn-glow { animation: imhof-pulse 2.4s ease-out infinite; }
.btn-glow:hover { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--imhof-glow) 45%, transparent), 0 18px 40px -12px var(--imhof-primary); }

/* ---------- 7. Text-Effekte ---------- */
.text-shine {
  background: linear-gradient(100deg, var(--imhof-primary) 0%, var(--imhof-glow) 20%, #fff 30%, var(--imhof-primary) 45%, var(--imhof-primary) 55%, var(--imhof-glow) 70%, #fff 80%, var(--imhof-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: imhof-goldsweep 6s linear infinite;
}
.text-gradient {
  background: linear-gradient(100deg, var(--imhof-primary), var(--imhof-accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.text-glow { text-shadow: 0 0 18px color-mix(in srgb, var(--imhof-glow) 80%, transparent), 0 0 2px #fff; }

/* Marker-Unterstreichung, die beim Einblenden „gemalt" wird */
.text-marker {
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--imhof-accent) 70%, transparent) 60%) 0 0 / 0 100% no-repeat;
  transition: background-size 1.1s var(--imhof-ease) .2s;
}
.text-marker.is-visible, .is-visible .text-marker, html:not(.imhof-ready) .text-marker { background-size: 100% 100%; }

/* ---------- 8. Karten ---------- */
body.site .card {
  border: 0;
  border-radius: var(--imhof-radius);
  box-shadow: var(--imhof-shadow);
}

.card-hover, .card-tilt,
body.site .blog-items .blog-item {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: var(--imhof-radius);
  box-shadow: var(--imhof-shadow);
  transform: perspective(1000px);
  transition: transform .6s var(--imhof-ease), box-shadow .6s;
  will-change: transform;
}
.card-hover:hover, .card-tilt:hover,
body.site .blog-items .blog-item:hover { box-shadow: var(--imhof-shadow-lg); }
.card-hover:hover { transform: translateY(-8px); }
.is-tilting { transition: transform .12s ease-out, box-shadow .6s !important; }

/* Lichtfleck, der der Maus folgt */
.card-hover::after, .card-tilt::after,
body.site .blog-items .blog-item::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--imhof-glow) 35%, transparent), transparent 60%);
}
.card-hover:hover::after, .card-tilt:hover::after,
body.site .blog-items .blog-item:hover::after { opacity: 1; }

.card-hover img, .card-tilt img,
body.site .blog-items .blog-item .item-image img { transition: transform 1.1s var(--imhof-ease); }
.card-hover:hover img, .card-tilt:hover img,
body.site .blog-items .blog-item:hover .item-image img { transform: scale(1.06); }

body.site .blog-items .blog-item .item-image { overflow: hidden; margin: 0; }
body.site .blog-items .blog-item .item-content { padding: 1.25rem 1.5rem 1.5rem; }

/* Kartenraster für eigene Inhalte: <div class="grid-cards"> … </div> */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}
.grid-cards > * { padding: 1.5rem; }

.icon-bubble {
  display: inline-grid; place-items: center;
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--imhof-primary), color-mix(in srgb, var(--imhof-primary) 50%, var(--imhof-glow)));
  box-shadow: 0 10px 24px -10px var(--imhof-primary);
  margin-bottom: 1rem;
}

/* ---------- 9. Einblenden beim Scrollen ---------- */
.imhof-ready .reveal, .imhof-ready .reveal-left, .imhof-ready .reveal-right, .imhof-ready .reveal-zoom {
  opacity: 0;
  transition: opacity .9s var(--imhof-ease), transform .9s var(--imhof-ease);
  transition-delay: var(--delay, 0s);
}
.imhof-ready .reveal { transform: translateY(36px); }
.imhof-ready .reveal-left { transform: translateX(-48px); }
.imhof-ready .reveal-right { transform: translateX(48px); }
.imhof-ready .reveal-zoom { transform: scale(.92); }
.imhof-ready .is-visible.reveal, .imhof-ready .is-visible.reveal-left,
.imhof-ready .is-visible.reveal-right, .imhof-ready .is-visible.reveal-zoom { opacity: 1; transform: none; }

/* ---------- 10. Parallax (fixiertes Bild, auch iOS) ---------- */
.imhof-parallax {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: clamp(3rem, 8vw, 7rem) 1.25rem;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.imhof-parallax.no-image { background: linear-gradient(120deg, var(--imhof-dark), var(--imhof-primary)); }
.imhof-parallax.px-h-40 { min-height: 40vh; }
.imhof-parallax.px-h-60 { min-height: 60vh; }
.imhof-parallax.px-h-80 { min-height: 80vh; }
.imhof-parallax.px-h-100 { min-height: 100vh; min-height: 100svh; }

.imhof-parallax__clip {
  position: absolute;
  inset: 0;
  z-index: -2;
  clip: rect(0, auto, auto, 0);
  clip-path: inset(0);
}
.imhof-parallax__img {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Abdunklung nur, wenn Text darüber liegt */
.imhof-parallax.has-image.has-content::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--imhof-dark) 35%, transparent), color-mix(in srgb, var(--imhof-dark) 65%, transparent));
}
.imhof-parallax.px-light::before { background: color-mix(in srgb, #fff 55%, transparent) !important; }
.imhof-parallax.px-light { color: var(--imhof-dark); }
.imhof-parallax.px-dark::before { background: color-mix(in srgb, var(--imhof-dark) 75%, transparent) !important; }
.imhof-parallax.px-clear::before { display: none; }

/* Mausschein im Parallax-Bereich */
.imhof-parallax::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 40%), color-mix(in srgb, var(--imhof-glow) 22%, transparent), transparent 60%);
}

.imhof-parallax__content {
  width: min(100%, 60rem);
  text-align: center;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}
body.site .imhof-parallax :is(h1, h2, h3, h4) { color: inherit; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
body.site .imhof-parallax.px-light :is(h1, h2, h3, h4) { text-shadow: none; }
.imhof-parallax .mod-custom { background-image: none !important; }

/* ---------- 11. Farbbänder ---------- */
.imhof-band { padding: clamp(3rem, 7vw, 6rem) 1.25rem; background: var(--imhof-light); }
.imhof-band__inner { max-width: 79.5rem; margin-inline: auto; }
.wrapper-fluid .imhof-band__inner { max-width: none; }
.imhof-band.band-dark { background: var(--imhof-dark); color: #fff; }
.imhof-band.band-primary { background: var(--imhof-primary); color: #fff; }
.imhof-band.band-gradient {
  color: #fff;
  background:
    radial-gradient(700px circle at var(--gx, 20%) var(--gy, 20%), color-mix(in srgb, var(--imhof-glow) 30%, transparent), transparent 60%),
    linear-gradient(120deg, var(--imhof-dark), var(--imhof-primary));
}
body.site .imhof-band.band-dark :is(h1, h2, h3, h4),
body.site .imhof-band.band-primary :is(h1, h2, h3, h4),
body.site .imhof-band.band-gradient :is(h1, h2, h3, h4) { color: inherit; }

/* ---------- 12. Funkeln / Sterne ---------- */
.has-sparkles { position: relative; }
.imhof-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.imhof-sparkles span { position: absolute; }
.imhof-star {
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  background: linear-gradient(135deg, #fff, var(--imhof-glow));
  animation: imhof-twinkle 3s ease-in-out infinite;
}
.imhof-dot {
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--imhof-glow) 70%, transparent);
  animation: imhof-spark 3s ease-in-out infinite;
}

/* Glitzerspur am Mauszeiger */
.imhof-trail {
  position: fixed; z-index: 9999;
  width: 14px; height: 14px;
  pointer-events: none;
  translate: -50% -50%;
  animation: imhof-trail .9s ease-out forwards;
}
.imhof-cursor-glow {
  position: fixed; z-index: 9998; top: 0; left: 0;
  width: 380px; height: 380px; border-radius: 50%;
  pointer-events: none;
  translate: -50% -50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--imhof-glow) 26%, transparent), transparent 65%);
  mix-blend-mode: multiply;
  transition: opacity .4s;
}

/* ---------- 13. Foto mit umlaufendem Text ---------- */
.photo-ring {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  margin: 2rem auto;
}
.photo-ring__halo {
  position: absolute; inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--imhof-glow) 70%, transparent), transparent 66%);
  animation: imhof-halo 6s ease-in-out infinite;
}
.photo-ring__ring {
  position: absolute; inset: -9%;
  width: 118%; height: 118%; max-width: none;
  animation: imhof-spin 40s linear infinite;
  overflow: visible;
}
.photo-ring__ring text { fill: var(--imhof-dark); font-weight: 700; text-transform: uppercase; }
.photo-ring > img,
.photo-ring__pic {
  position: relative;
  width: 100% !important; height: 100% !important;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--imhof-shadow-lg);
}
.photo-ring .imhof-star { position: absolute; }

/* v1.2.0: Button im Fotoring, blendet regelmäßig ein und aus (<a class="btn btn-accent ring-cta">) */
body.site .photo-ring .ring-cta {
  /* !important: die Glanz-Regel der Buttons setzt sonst position: relative */
  position: absolute !important; left: 50%; top: 50%; z-index: 3;
  translate: -50% -50%;
  width: max-content; max-width: 78%;
  text-align: center; line-height: 1.25;
  white-space: normal;
  opacity: 0;
  animation: imhof-ringcta var(--cta-cycle, 9s) ease-in-out infinite;
}
.photo-ring .ring-cta small { display: block; font-size: .78em; font-weight: 600; opacity: .85; }
.photo-ring:hover .ring-cta, .photo-ring .ring-cta:focus-visible { animation: none; opacity: 1; }
@keyframes imhof-ringcta {
  0%, 28% { opacity: 0; scale: .9; }
  40%, 86% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: .9; }
}

/* ---------- 14. Abzieher-Effekt: Bild wird „sauber gewischt" ---------- */
.fx-squeegee { position: relative; display: inline-block; overflow: hidden; border-radius: var(--imhof-radius); max-width: 100%; vertical-align: top; }
.fx-squeegee img { display: block; max-width: 100%; height: auto; }
.fx-squeegee::before {
  /* Schleier, der weggewischt wird */
  content: "";
  position: absolute; inset: 0;
  background: color-mix(in srgb, #dfe9ee 55%, transparent);
  -webkit-backdrop-filter: blur(6px) grayscale(.6);
  backdrop-filter: blur(6px) grayscale(.6);
  clip-path: inset(0 0 0 0);
}
.fx-squeegee::after {
  /* das Gummi des Abziehers */
  content: "";
  position: absolute; top: -5%; bottom: -5%; left: 0;
  width: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--imhof-dark), color-mix(in srgb, var(--imhof-dark) 70%, var(--imhof-glow)));
  box-shadow: 0 0 24px 6px color-mix(in srgb, var(--imhof-glow) 70%, transparent);
  opacity: 0;
}
.fx-squeegee.is-visible::before { animation: imhof-wipe 1.6s cubic-bezier(.7, 0, .2, 1) .2s forwards; }
.fx-squeegee.is-visible::after { animation: imhof-wiper 1.6s cubic-bezier(.7, 0, .2, 1) .2s forwards; }
html:not(.imhof-ready) .fx-squeegee::before, html:not(.imhof-ready) .fx-squeegee::after { display: none; }
/* v1.2.0: Schleife (data-loop="10" am Bild) – Schleier blendet weich wieder ein, dann wird erneut gewischt */
.fx-squeegee.is-dirty::before { animation: imhof-veil .9s ease both; }
@keyframes imhof-veil { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 14b. Schmutzige Scheibe → sauber gewischt (.fx-window) ---------- */
.fx-window {
  position: relative;
  max-width: 1100px;
  margin: clamp(1.5rem, 4vw, 3rem) auto;
  padding: clamp(10px, 1.6vw, 18px);
  border-radius: calc(var(--imhof-radius) * 1.2);
  background: linear-gradient(145deg, #fff, #e4ebf0);
  box-shadow: var(--imhof-shadow-lg), inset 0 0 0 1px rgba(0, 0, 0, .06);
  color: var(--imhof-dark);
  text-align: center;
}
/* Fenstergriff */
.fx-window.is-ready::after {
  content: "";
  position: absolute;
  top: 50%;
  right: clamp(1px, .3vw, 4px);
  width: clamp(6px, .8vw, 9px);
  height: clamp(40px, 7vw, 70px);
  translate: 0 -50%;
  border-radius: 6px;
  background: linear-gradient(90deg, #9aa7b0, #f4f7f9 45%, #b6c1c8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.fx-window__pane {
  position: relative;
  display: grid;
  min-height: clamp(260px, 38vw, 440px);
  overflow: hidden;
  border-radius: calc(var(--imhof-radius) * .6);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, .18);
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.fx-window.is-clean .fx-window__pane { cursor: default; }
.fx-window__view {
  position: relative;
  display: grid;
  place-content: center;
  gap: .4rem;
  padding: clamp(2rem, 5vw, 4rem) 1.5rem;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(255, 255, 255, .55) 31% 33%, transparent 34% 38%, rgba(255, 255, 255, .4) 39% 40%, transparent 41%),
    linear-gradient(170deg, #d9f1fc 0%, #fff 48%, color-mix(in srgb, var(--imhof-light) 80%, var(--imhof-primary)) 100%);
}
.fx-window__view > * { margin: 0; }
body.site .fx-window__view :is(h1, h2, h3) {
  font-size: clamp(2rem, 6.4vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  text-shadow: none;
  background: linear-gradient(100deg, var(--imhof-dark) 0%, var(--imhof-primary) 50%, var(--imhof-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
body.site .fx-window.is-clean .fx-window__view :is(h1, h2, h3) {
  background-image: linear-gradient(100deg, var(--imhof-dark) 0%, var(--imhof-primary) 25%, #fff 32%, var(--imhof-primary) 40%, var(--imhof-dark) 50%, var(--imhof-primary) 75%, #fff 82%, var(--imhof-primary) 90%, var(--imhof-dark) 100%);
  background-size: 200% auto;
  animation: imhof-goldsweep 6s linear infinite;
}
.fx-window__kicker { font-size: .8rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--imhof-primary); }
.fx-window__view img { max-width: min(100%, 420px); height: auto; margin-inline: auto; }

.fx-window__dirt {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  transition: opacity .9s ease;
}
.fx-window__shine {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .9) 50%, transparent 60%) 150% 0 / 250% 100% no-repeat;
}
.fx-window.is-clean .fx-window__shine { animation: imhof-glint 1.6s ease-out .3s 1 both; }

/* der Abzieher */
.fx-window__squeegee {
  position: absolute; top: 0; left: 0; z-index: 4;
  width: 16px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, #c7d1d8, #f6f9fb 40%, #8f9ca5 70%, #1d2328 70% 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: opacity .25s;
}
.fx-window__squeegee.is-rtl { background: linear-gradient(270deg, #c7d1d8, #f6f9fb 40%, #8f9ca5 70%, #1d2328 70% 100%); }
.fx-window__squeegee.is-on { opacity: 1; }
.fx-window__squeegee::before {
  /* Griff, läuft hinter der Klinge her */
  content: "";
  position: absolute; top: 50%; right: 100%;
  width: clamp(60px, 9vw, 110px); height: 16px;
  translate: 0 -50%;
  border-radius: 9px 3px 3px 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--imhof-primary) 70%, #fff), var(--imhof-primary) 45%, color-mix(in srgb, var(--imhof-primary) 60%, #000));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
.fx-window__squeegee.is-rtl::before { right: auto; left: 100%; border-radius: 3px 9px 9px 3px; }

.fx-window__hint, .fx-window__again {
  position: absolute; z-index: 5; left: 50%; bottom: 14px;
  translate: -50% 0;
  padding: .45rem 1rem;
  border: 0;
  border-radius: 999px;
  font-size: .85rem; font-weight: 700;
  color: #fff;
  background: color-mix(in srgb, var(--imhof-dark) 78%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s;
  white-space: nowrap;
}
.fx-window.is-waiting .fx-window__hint { opacity: 1; animation: imhof-pulse 2.4s ease-out infinite; }
.fx-window__again { left: auto; right: 14px; translate: none; cursor: pointer; }
.fx-window.is-clean .fx-window__again { opacity: .85; pointer-events: auto; transition-delay: 1.5s; }
.fx-window__again:hover { opacity: 1 !important; background: var(--imhof-primary); }
.fx-window__star { position: absolute; z-index: 4; pointer-events: none; animation: imhof-twinkle 2.2s ease-in-out 1 both; }

@keyframes imhof-glint { from { background-position: 150% 0; } to { background-position: -60% 0; } }

/* ---------- 15. Zähler ---------- */
.count-up { font-variant-numeric: tabular-nums; }

/* ---------- 16. Fußzeile ---------- */
body.site .container-footer {
  position: relative;
  overflow: hidden;
  color: #d9e8ef;
  background:
    radial-gradient(700px circle at var(--gx, 85%) var(--gy, 0%), color-mix(in srgb, var(--imhof-primary) 35%, transparent), transparent 60%),
    var(--imhof-dark);
}
body.site .container-footer a { color: #fff; }
body.site .container-footer a:hover { color: var(--imhof-accent); }

/* ---------- 17. Schwebende Buttons & Nach oben ---------- */
.imhof-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1000;
  display: flex; flex-direction: column; gap: .7rem;
}
.imhof-fab__btn {
  display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  color: #fff !important;
  box-shadow: var(--imhof-shadow-lg);
  transition: transform .3s var(--imhof-ease);
}
.imhof-fab__btn:hover { transform: scale(1.1); }
.imhof-fab__btn--call { background: var(--imhof-primary); animation: imhof-pulse 2.4s ease-out infinite; }
.imhof-fab__btn--wa { background: #25d366; }
@media (min-width: 992px) {
  body:not(.fab-desktop) .imhof-fab { display: none; }
}

body.site .back-to-top-link {
  border-radius: 50%;
  background: var(--imhof-dark);
  box-shadow: var(--imhof-shadow);
}
body.has-fab .back-to-top-link { right: auto; left: 1rem; }
@media (min-width: 992px) {
  body.has-fab:not(.fab-desktop) .back-to-top-link { left: auto; right: 1rem; }
}

/* ---------- 18. Schnee (Saison) ---------- */
.imhof-snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.imhof-snow i {
  position: absolute; top: -10px;
  width: var(--s, 6px); height: var(--s, 6px);
  border-radius: 50%;
  background: #fff;
  opacity: .85;
  animation: imhof-snow var(--d, 9s) linear infinite;
  animation-delay: var(--dl, 0s);
}
.fx-snow { position: relative; }

/* ---------- 19. Keyframes ---------- */
@keyframes imhof-sheen { 0%, 62% { left: -70%; } 100% { left: 140%; } }
@keyframes imhof-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--imhof-glow) 70%, transparent); }
  100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--imhof-glow) 0%, transparent); }
}
@keyframes imhof-goldsweep { from { background-position: 0% center; } to { background-position: -200% center; } }
@keyframes imhof-sweep { from { background-position: 0% 0; } to { background-position: -200% 0; } }
@keyframes imhof-edge { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes imhof-twinkle {
  0%, 100% { opacity: 0; transform: scale(.2) rotate(0); }
  45% { opacity: 1; transform: scale(1) rotate(45deg); }
  60% { opacity: .9; transform: scale(.85) rotate(60deg); }
}
@keyframes imhof-spark { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes imhof-trail {
  0% { opacity: 1; transform: scale(1) rotate(0); }
  100% { opacity: 0; transform: scale(.2) rotate(90deg) translateY(14px); }
}
@keyframes imhof-halo { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes imhof-spin { to { transform: rotate(360deg); } }
@keyframes imhof-wipe { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes imhof-wiper {
  0% { left: 0; opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes imhof-snow {
  from { transform: translate3d(0, -10px, 0); }
  to { transform: translate3d(var(--dx, 20px), 110vh, 0); }
}

/* ---------- 20. Weniger Bewegung, wenn gewünscht ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .imhof-ready .reveal, .imhof-ready .reveal-left, .imhof-ready .reveal-right, .imhof-ready .reveal-zoom { opacity: 1; transform: none; }
  .imhof-snow, .imhof-trail, .imhof-cursor-glow { display: none; }
  .photo-ring .ring-cta { animation: none !important; opacity: 1; }
}
