/* ============================================================
   Novawerk – Website (mobil-first, modern, Coding-Look)
   Baut auf /ui/tokens.css + /ui/components.css auf.
   ============================================================ */

/* ---- Hintergrund: Mesh + feines Grid ---------------------- */
body {
  background:
    radial-gradient(48% 40% at 82% -8%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 60%),
    radial-gradient(42% 36% at 2% 4%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 58%),
    var(--bg);
  background-attachment: scroll;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 78%);
}

/* ---- Header ---------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 74%, transparent); border-bottom: 1px solid var(--border); }
.hdr { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; }
.brand img { height: 22px; width: auto; display: block; }
[data-theme="light"] .brand img.logo-white { display: none; }
[data-theme="dark"]  .brand img.logo-dark  { display: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--glow); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: .92rem; padding: 8px 12px; border-radius: 9px; position: relative; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav a.active { color: var(--text); }
.nav a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.hamburger { display: none; }

@media (max-width: 900px) {
  .nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; gap: 2px; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 12px 16px 18px; transform: translateY(-130%);
    transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility .28s; box-shadow: var(--shadow); visibility: hidden; }
  .nav.open { transform: none; visibility: visible; }
  .nav a { padding: 12px 12px; font-size: 1rem; border-radius: 10px; }
  .hamburger { display: inline-flex; }
  .hdr-actions .btn.primary.sm { display: none; }   /* Kundenlogin wandert ins Menue */
}

/* ---- Container / Sektionen -------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }
.section { padding: clamp(48px, 8vw, 96px) 0; position: relative; }
.section > .wrap > .kicker { margin-bottom: 6px; }
.section h2 { font-size: clamp(1.55rem, 3.2vw, 2.3rem); }
.lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.16rem); }

/* Flex-Karten: unvollstaendige Reihen werden mittig zentriert */
.cards { display: flex; flex-wrap: wrap; gap: var(--gap); justify-content: center; }
.cards > * { flex: 1 1 300px; max-width: 380px; }
.cards.wide > * { flex-basis: 340px; max-width: 420px; }
@media (max-width: 560px) { .cards > * { flex-basis: 100%; max-width: 100%; } }

/* ---- Hero ------------------------------------------------- */
.hero { padding: clamp(36px, 7vw, 84px) 0 clamp(28px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 52px); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); white-space: pre-line;
  background: linear-gradient(115deg, var(--text) 34%, var(--accent) 66%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 48ch; margin-top: 14px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero .codewin { animation: bob 6s ease-in-out infinite; box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 940px) { .hero .codewin { animation: none; } }
@media (max-width: 560px) { .hero-cta { flex-direction: column; } .hero-cta .btn { width: 100%; justify-content: center; } }

/* ---- Vertrauensleiste / Partner (Karussell) --------------- */
.trust { padding: 8px 0 4px; }
.trust .t-label { text-align: center; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 46px; width: max-content; animation: scroll 32s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee .p-item { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--font-mono);
  font-size: 1rem; white-space: nowrap; opacity: .82; transition: opacity .2s, color .2s; }
.marquee .p-item:hover { opacity: 1; color: var(--text); }
.marquee .p-item::before { content: none; }
/* Statisch & zentriert, wenn wenige */
.trust .static-row { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; }

/* ---- Karten allgemein (Website) --------------------------- */
.section .card { transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease; }
.section .card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--glow); }
.svc-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-2)); border: 1px solid var(--border);
  font-family: var(--font-mono); margin-bottom: 14px; transition: transform .25s; }
.section .card:hover .svc-icon { transform: rotate(-6deg) scale(1.06); }

/* ---- Prozess --------------------------------------------- */
.proc-step { font-family: var(--font-mono); }
.proc-step .cmd { color: var(--accent); } .proc-step .cmd::before { content: '$ '; color: var(--faint); }

/* ---- Preise ---------------------------------------------- */
.price-card { display: flex; flex-direction: column; }
.price-card.hl { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: var(--glow); position: relative; }
.price-card .amount { font-family: var(--font-display); font-size: 2.1rem; margin: 6px 0 12px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.price-card li { padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.price-card li::before { content: '✓'; color: var(--ok); margin-right: 8px; }
.price-badge { position: absolute; top: -11px; right: 16px; }

/* ---- Kennzahlen ------------------------------------------ */
.stat { text-align: center; } .stat .num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.6rem); color: var(--accent); }

/* ---- Aktionen -------------------------------------------- */
.promo-card { position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.promo-card .p-badge { display: inline-block; font-family: var(--font-mono); font-size: .72rem; color: var(--accent-ink);
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.promo-card .p-until { color: var(--faint); font-size: .8rem; font-family: var(--font-mono); margin-top: 6px; }
.promo-bar { position: sticky; top: 66px; z-index: 45; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px clamp(16px,4vw,28px); background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-weight: 600; }
.promo-bar .p-badge { background: rgba(0,0,0,.18); border-radius: 999px; padding: 2px 10px; font-family: var(--font-mono); font-size: .72rem; }
.promo-bar a.p-cta { color: var(--accent-ink); text-decoration: underline; font-size: .9rem; }
/* Schließen-× immer ganz rechts (auch ohne CTA). */
.promo-bar button.p-x { margin-left: auto; background: transparent; border: 0; color: var(--accent-ink); cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 2px 4px; }
/* Aktions-Leiste auf dem Handy: eine Zeile, Text darf umbrechen, das Kreuz
   sitzt oben rechts und rutscht nicht in eine eigene Zeile. */
@media (max-width: 640px) {
  .promo-bar { flex-wrap: nowrap; align-items: flex-start; gap: 10px; padding: 9px 14px; font-size: .92rem; line-height: 1.35; }
  .promo-bar .p-badge { flex: none; margin-top: 2px; }
  .promo-bar > span:not(.p-badge) { flex: 1; min-width: 0; }
  .promo-bar a.p-cta { display: none; }
  .promo-bar button.p-x { flex: none; margin-left: 0; font-size: 1.2rem; padding: 0 2px; margin-top: 1px; }
}

/* ---- FAQ ------------------------------------------------- */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 16px; margin-bottom: 10px;
  background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.faq summary { cursor: pointer; padding: 14px 0; font-family: var(--font-display); font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }

/* ---- Referenzen: Live-Vorschau --------------------------- */
.ref-frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); aspect-ratio: 16/10; position: relative; }
.ref-frame .bar { display: flex; gap: 6px; padding: 9px 11px; background: var(--surface); border-bottom: 1px solid var(--border); }
.ref-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ref-frame .fallback { position: absolute; inset: 34px 0 0; display: grid; place-items: center; color: var(--faint); font-family: var(--font-mono); font-size: .8rem; }

/* ---- Kontaktdaten-Block ---------------------------------- */
.contact-info { display: grid; gap: 12px; }
.contact-info .ci { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-info .ci .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-2)); border: 1px solid var(--border); color: var(--accent); }

/* ---- Footer ---------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: clamp(36px,5vw,52px) 0 26px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.foot-grid img { height: 22px; margin-bottom: 12px; }
.foot-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.foot-grid a { color: var(--muted); text-decoration: none; line-height: 2; font-size: .9rem; }
.foot-grid a:hover { color: var(--text); }
.foot-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .8rem; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---- Cookie-Banner (Bottom-Sheet) ------------------------ */
.cookie-banner { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 560px; margin: 0 auto; z-index: 90;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 560px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-actions { margin-left: 0; } .cookie-actions .btn { flex: 1; } }

/* ---- Chat-Widget ----------------------------------------- */
.chat { position: fixed; bottom: 20px; right: 20px; z-index: 70; }
.chat-toggle { width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.4rem; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--glow); transition: transform .15s; }
.chat-toggle:hover { transform: scale(1.06); }
.chat-panel { position: absolute; bottom: 68px; right: 0; width: min(340px, 90vw); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-body { max-height: 320px; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-body .msg { padding: 8px 11px; border-radius: 12px; font-size: .88rem; max-width: 85%; }
.chat-body .msg.kunde { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.chat-body .msg.bot, .chat-body .msg.team { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--border); }
.chat-start, .chat-input { padding: 12px 14px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.chat-input { grid-template-columns: 1fr auto; }
.to-top { position: fixed; bottom: 88px; right: 20px; z-index: 60; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow); }

/* ---- Rechtstext ------------------------------------------ */
.legal-text { white-space: pre-wrap; line-height: 1.9; }
.legal-text h1 { font-size: 1.6rem; }

@media (prefers-reduced-motion: reduce) {
  .marquee .track, .hero .codewin, .brand-dot { animation: none !important; }
}

/* Mobile-only Elemente (z. B. Kundenlogin in der Nav) */
.mobile-only { display: none; }
@media (max-width: 900px) { .mobile-only { display: block; color: var(--accent) !important; font-weight: 600; margin-top: 6px; border-top: 1px solid var(--border); padding-top: 12px !important; } }
/* Footer-Logos folgen dem Theme */
[data-theme="light"] .foot-grid img.logo-white, [data-theme="light"] .brand img.logo-white { display: none; }
[data-theme="dark"]  .foot-grid img.logo-dark,  [data-theme="dark"]  .brand img.logo-dark  { display: none; }

/* ---- Visueller On-Page-Editor ---- */
.ed-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 95;
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.ed-bar .ed-tag { font-size: .7rem; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
[contenteditable].ed { outline: 1px dashed color-mix(in srgb, var(--accent) 60%, var(--border)); outline-offset: 3px; border-radius: 4px; cursor: text; transition: background .15s; }
[contenteditable].ed:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
[contenteditable].ed:focus { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
body.editing .ed-card, body.editing .ed-item { position: relative; }
.ed-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--danger); color: #fff; cursor: pointer; font-size: .7rem; line-height: 1; z-index: 2; }
.ed-item .ed-del { position: static; width: 18px; height: 18px; margin-left: 4px; display: inline-flex; align-items: center; justify-content: center; }
.ed-addrow { display: flex; justify-content: center; margin-top: 16px; }
.ed-add { border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent); border-radius: 10px; padding: 8px 16px; cursor: pointer; font-family: var(--font-mono); font-size: .85rem; }
.ed-add:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.faq-edit { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; background: var(--surface); }
.faq-edit strong { display: block; margin-bottom: 6px; }

/* Referenz-Screenshot */
.ref-frame .ref-shot { position: absolute; inset: 34px 0 0; width: 100%; height: calc(100% - 34px); object-fit: cover; object-position: top center; }
/* Verlosungs-Formular in Aktions-Karte */
.promo-card.raffle { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border)); }
.raffle-form { margin-top: 12px; }
.raffle-form input { margin-bottom: 0; }

/* Editor-Leiste prominenter */
.ed-bar { padding: 10px 14px; gap: 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow); }
.ed-bar .ed-tag { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  border-radius: 8px; padding: 4px 10px; font-weight: 700; }
.ed-hint { color: var(--muted); font-size: .82rem; }
@media (max-width: 620px) { .ed-hint { display: none; } .ed-bar { bottom: 12px; } }
/* Hover-Hinweis fuer editierbare Elemente (auch ausserhalb Fokus) */
body.editing [contenteditable].ed { position: relative; }
body.editing [contenteditable].ed:empty::before { content: 'Text eingeben…'; color: var(--faint); }

/* ============================================================
   Redesign nach Vorlage (Indigo, helle Seite mit dunklen Bloecken)
   ============================================================ */

/* ---- Footer (dunkel, 4 Spalten) ---- */
.site-footer { background: #0d1120; border-top: 1px solid rgba(255,255,255,.06); color: #c7cddb; margin-top: 60px; padding: 64px 0 30px; }
.site-footer .muted { color: #8a93a8 !important; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; font-family: var(--font-display); }
.site-footer a { color: #aeb6c8; text-decoration: none; display: block; line-height: 2.1; font-size: .94rem; }
.site-footer a:hover { color: #fff; }
.foot-social { display: flex; gap: 10px; margin-top: 18px; }
.foot-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); line-height: 1; }
.foot-social a:hover { background: var(--accent); border-color: var(--accent); }
.foot-contact a { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.foot-contact .fic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.foot-cta { display: flex; gap: 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.foot-cta a { display: inline; color: #fff; font-weight: 600; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .86rem; }
.foot-links a { display: inline; color: #aeb6c8; }
.foot-links a:hover { color: #fff; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } .foot-bottom { flex-direction: column; align-items: flex-start; } }

/* ---- Werte-Kacheln (Indigo-Oberkante) ---- */
.section .card.stat { border-top: 3px solid var(--accent); padding-top: 26px; }
.stat .num { color: var(--accent); font-weight: 800; }

/* ---- Preise: hervorgehobene Karte dunkel ---- */
.price-card.hl { background: #10131f; color: #fff; border-color: #10131f; box-shadow: 0 30px 70px -24px rgba(79,70,229,.5); transform: translateY(-6px); }
.price-card.hl .muted, .price-card.hl li { color: #c7cddb; }
.price-card.hl li { border-bottom-color: rgba(255,255,255,.12); }
.price-card.hl .price-badge { left: 50%; right: auto; transform: translateX(-50%); background: var(--accent); color: #fff; border: 0; font-weight: 700; padding: 5px 16px; }
.price-card.hl .btn.primary { background: var(--accent); box-shadow: 0 12px 30px -8px rgba(79,70,229,.7); }
@media (max-width: 860px) { .price-card.hl { transform: none; } }

/* ---- Referenzen: Farbblock oben + Live-Vorschau ---- */
.ref-card { padding: 0 !important; overflow: hidden; display: flex; flex-direction: column; }
.ref-hero { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(150deg, var(--accent), var(--accent-2)); }
.ref-hero .ref-name { position: relative; z-index: 2; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-align: center; padding: 0 16px; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.ref-hero .ref-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .4s; }
.ref-hero.has-shot .ref-shot { opacity: 1; }
.ref-hero.has-shot .ref-name { display: none; }
.ref-body { padding: 22px; }
.ref-tag { display: inline-block; font-size: .74rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }
.ref-body h3 { margin: 0 0 8px; }
.ref-link { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-block; margin-top: 12px; }

/* ---- Kontakt: dunkler Block, weisses Formular ---- */
.contact-block { background: #10131f; border-radius: 22px; padding: clamp(28px, 5vw, 56px); color: #fff; }
.contact-block .grid { align-items: start; }
.contact-block .kicker { color: var(--accent); }
.contact-block h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.contact-block .lead { color: #aeb6c8; }
.contact-block .contact-info .ci { border-bottom-color: rgba(255,255,255,.1); }
.contact-block .contact-info .ci .ic { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #fff; }
.contact-block #leadCard { background: transparent; border: 0; box-shadow: none; padding: 0; }
.contact-block label { color: #c7cddb; }
.contact-block input, .contact-block select, .contact-block textarea { background: #fff; color: #10131f; border: 0; border-radius: 12px; padding: 15px 16px; }
.contact-block input::placeholder, .contact-block textarea::placeholder { color: #98a0b3; }
.contact-block .btn.primary { background: var(--accent); box-shadow: 0 16px 40px -10px rgba(79,70,229,.7); padding: 16px; font-size: 1rem; }

/* ---- Ueber uns: Team-Avatare ---- */
.team-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; margin-top: 30px; }
.team-member { text-align: center; }
.team-avatar { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px;
  background: var(--surface-2); border: 2px dashed var(--border); font-size: 2.4rem; color: var(--accent-2); overflow: hidden; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-member h3 { margin: 0; }
.team-member .role { color: var(--accent); font-weight: 600; font-size: .92rem; }

/* ---- Emoji-Icon-Kacheln (Leistungen, Rundum-Service, Funktionen) ---- */
.svc-icon.emoji { font-size: 1.5rem; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent-2)); color: #fff; border: 0; }

/* ---- Dunkle Feature-Sektion (Showcase/Funktionen) ---- */
.sec-dark { background: #0d1120; color: #fff; border-radius: 0; }
.sec-dark h2, .sec-dark h3 { color: #fff; }
.sec-dark .kicker { color: var(--accent); }
.sec-dark .lead, .sec-dark .muted { color: #aeb6c8 !important; }
.sec-dark .card { background: #141827; border-color: rgba(255,255,255,.07); }
.sec-dark .card:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* Feinschliff Responsiv */
@media (max-width: 700px) { .team-avatar { width: 96px; height: 96px; } }

/* ============================================================
   Feinschliff: Mobil/Tablet, Stats, Bewertungen, Kalender, Partner
   ============================================================ */

/* --- Typo/Abstände: Überschriften kleben nicht mehr am Rand --- */
.wrap { padding-left: clamp(20px, 5vw, 32px); padding-right: clamp(20px, 5vw, 32px); }
h1, h2, h3 { overflow-wrap: anywhere; hyphens: auto; }
.hero h1 { font-size: clamp(1.9rem, 5.2vw, 3.4rem); line-height: 1.12; }
.section h2 { font-size: clamp(1.45rem, 3.4vw, 2.3rem); line-height: 1.18; }
.section h1 { font-size: clamp(1.7rem, 4.4vw, 2.8rem); line-height: 1.15; }
.center { text-align: center; }
@media (max-width: 900px) {
  .wrap { padding-left: 22px; padding-right: 22px; }
  .section { padding: 44px 0; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .wrap { padding-left: 18px; padding-right: 18px; } }

/* --- Kennzahlen: kompakt, 4 nebeneinander --- */
.section .card.stat { padding: 18px 12px; min-width: 0; }
.cards .card.stat { flex: 1 1 150px; max-width: 220px; }
.stat .num { font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.1; }
.stat .muted { font-size: .82rem; }
@media (max-width: 560px) { .cards .card.stat { flex: 1 1 calc(50% - var(--gap)); max-width: none; } }

/* --- Bewertungen --- */
.review-card { display: flex; flex-direction: column; gap: 12px; }
.review-card .stars { font-size: 1rem; letter-spacing: 2px; }
.rev-body { font-size: 1.02rem; line-height: 1.6; flex: 1; margin: 0; }
.rev-person { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rev-ava { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: .9rem; font-family: var(--font-display); }

/* --- Partner-Logos --- */
.marquee .track { gap: 54px; align-items: center; }
.trust .static-row { gap: 44px; align-items: center; }
.p-item { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none;
  opacity: 1; transition: transform .2s, color .2s; }
.p-item:hover { transform: translateY(-2px); color: var(--text); }
/* Reines Logo ohne Kasten/Hintergrund: nur die Höhe ist begrenzt, die Breite
   darf beliebig sein – so passen quer- wie hochformatige PNGs sauber in die Reihe. */
.p-item img { height: 40px; width: auto; max-width: none; display: block;
  object-fit: contain; background: none; border-radius: 0; padding: 0; box-shadow: none; }
.p-item .p-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.p-item::before { content: none; }
@media (max-width: 560px) { .trust .static-row { gap: 26px; } .p-item img { height: 30px; } }

/* --- Prozess (4 Schritte) --- */
.proc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 34px; text-align: left; }
.proc-step .num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.proc-step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.proc-step p { margin: 0; font-size: .92rem; }
@media (max-width: 900px) { .proc-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (max-width: 480px) { .proc-grid { grid-template-columns: 1fr; } }

/* --- Termin: Kalender + Tageszeit --- */
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bcal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.bcal-dow span { text-align: center; font-size: .74rem; color: var(--faint); font-family: var(--font-mono); }
.bcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bc { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; font-size: .9rem; font-family: var(--font-mono); transition: .15s; }
.bc:hover:not(.past):not(.empty) { border-color: var(--accent); color: var(--accent); }
.bc.sel { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.bc.past { opacity: .28; cursor: not-allowed; }
.bc.empty { border: 0; background: transparent; cursor: default; }
.daypart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dp { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: .15s; color: var(--text); }
.dp span { font-size: 1.3rem; }
.dp strong { font-size: .88rem; }
.dp small { color: var(--faint); font-size: .72rem; font-family: var(--font-mono); }
.dp:hover { border-color: var(--accent); }
.dp.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: var(--glow); }
.book-summary { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--bg-2);
  border: 1px dashed var(--border); font-size: .9rem; }

/* --- Kontakt-Infos klickbar --- */
.contact-info a.ci { text-decoration: none; color: inherit; transition: opacity .15s; }
.contact-info a.ci:hover { opacity: .8; }

/* --- Tablet-Feinschliff --- */
@media (min-width: 561px) and (max-width: 1024px) {
  .cards > * { flex: 1 1 calc(50% - var(--gap)); max-width: none; }
  .cards .card.stat { flex: 1 1 calc(25% - var(--gap)); }
  .contact-block { padding: 28px; }
}

/* ============================================================
   Aktions-Detailfenster, Aktions-Status, Navigation, Kontraste
   ============================================================ */

/* --- Modal --- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(6,8,15,.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px; overflow-y: auto; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal { position: relative; width: min(680px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 40px 90px -20px rgba(0,0,0,.6); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head { padding: 28px 28px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border-radius: 20px 20px 0 0; }
.modal-head h2 { margin: 10px 0 8px; font-size: clamp(1.3rem, 3vw, 1.8rem); }
.modal-body { padding: 22px 28px 28px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; z-index: 2;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: .9rem; }
.modal-x:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.promo-details { line-height: 1.75; color: var(--text); background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; }
.promo-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.promo-meta .pm { flex: 1 1 140px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.promo-meta .pm span { display: block; font-size: .72rem; font-family: var(--font-mono); }
@media (max-width: 560px) { .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; } }

/* --- Aktions-Karten: Plätze/ausgebucht --- */
.p-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.p-sold { font-size: .72rem; font-weight: 700; color: #fff; background: var(--danger); border-radius: 999px; padding: 3px 10px; }
.p-left { font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--warn); border-radius: 999px; padding: 3px 10px; }
.promo-card.sold { opacity: .72; }
.p-bar { height: 6px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; margin-top: 12px; }
.p-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* --- Navigation: auf dem Handy rechts ausgerichtet --- */
@media (max-width: 900px) {
  .hdr { justify-content: space-between; }
  .hdr-actions { margin-left: auto; order: 3; }
  .brand { order: 1; }
  .nav { inset: 66px 0 auto auto; width: min(300px, 82vw); border-left: 1px solid var(--border);
    border-radius: 0 0 0 16px; transform: translateX(110%); text-align: right; padding: 16px 18px 22px;
    /* Geschlossen unsichtbar: ein nur verschobenes Menue zaehlt zur Seitenbreite
       und liess die Startseite auf dem Handy waagerecht scrollen. */
    visibility: hidden; }
  .nav.open { transform: none; }
  .nav a { justify-content: flex-end; }
}

/* --- Kontraste: nichts Dunkles auf Dunklem --- */
[data-theme="light"] .site-footer img,
[data-theme="light"] .contact-block img { filter: none; }
.sec-dark .chip, .contact-block .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #e8ecf5; }
.sec-dark .chip.ok, .contact-block .chip.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: #86efac; }
.sec-dark .btn.ghost, .contact-block .btn.ghost { border-color: rgba(255,255,255,.22); color: #e8ecf5; }
.sec-dark .btn.ghost:hover, .contact-block .btn.ghost:hover { background: rgba(255,255,255,.08); }
.sec-dark .svc-icon, .contact-block .svc-icon { border-color: rgba(255,255,255,.12); }
.sec-dark a:not(.btn) { color: var(--accent-2); }
[data-theme="light"] .sec-dark .card, [data-theme="light"] .contact-block .card { background: #141827; border-color: rgba(255,255,255,.08); }
[data-theme="light"] .sec-dark .card h3 { color: #fff; }
[data-theme="light"] .promo-details { background: var(--bg-2); color: var(--text); }
.foot-hl { color: #fff !important; font-weight: 700; }
.foot-hl:hover { color: var(--accent-2) !important; }

/* --- Statistik/Charts: Zahlen sichtbar --- */
.bars .bar-val { font-size: .7rem; font-family: var(--font-mono); color: var(--muted); }

/* ============================================================
   Feinschliff: Header mobil, Wartungs-Banner, Kontrast
   ============================================================ */

/* --- Header mobil: Aktionen rechts ausgerichtet --- */
.hdr { justify-content: space-between; }
.hdr-actions { margin-left: auto; }
@media (max-width: 900px) {
  .hdr { gap: 8px; }
  .hdr-actions { gap: 6px; order: 3; }
  .hamburger { order: 4; margin-left: 2px; }
  .brand { margin-right: auto; }
  .brand img { height: 22px; }
  .nav { text-align: left; }
}

/* --- Wartungs-Hinweis fuer Admins --- */
.maint-bar { position: fixed; left: 14px; bottom: 14px; z-index: 94;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: min(340px, calc(100vw - 28px)); padding: 6px 12px; border-radius: 999px;
  background: #f59e0b; color: #1a1205; font-size: .74rem; box-shadow: var(--shadow); opacity: .95; }
.maint-bar:hover { opacity: 1; }
.maint-bar strong { white-space: nowrap; }
.maint-bar a { color: #1a1205; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* --- Kontrast: nichts Dunkles auf Dunkel --- */
.sec-dark input, .sec-dark select, .sec-dark textarea,
.contact-block input, .contact-block select, .contact-block textarea { color: #10131f; background: #fff; }
.sec-dark .chip, .contact-block .chip { border-color: rgba(255,255,255,.18); color: #e8ebf5; }
.sec-dark .btn.ghost, .contact-block .btn.ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.sec-dark .btn.ghost:hover, .contact-block .btn.ghost:hover { background: rgba(255,255,255,.08); }
.site-footer img[data-logo] { filter: none; }
/* Helles Theme: dunkle Bloecke behalten helle Schrift */
[data-theme="light"] .sec-dark, [data-theme="light"] .contact-block, [data-theme="light"] .site-footer { color: #e8ebf5; }
[data-theme="light"] .sec-dark h2, [data-theme="light"] .sec-dark h3, [data-theme="light"] .contact-block h2 { color: #fff; }
[data-theme="light"] .price-card.hl h3, [data-theme="light"] .price-card.hl .amount { color: #fff; }

/* Bild-Upload per Klick im Editor */
.ed-photo { cursor: pointer; position: relative; transition: .15s; }
.ed-photo:hover { outline: 2px dashed var(--accent); outline-offset: 3px; }
.team-avatar.ed-photo .up-hint { font-size: 1.4rem; line-height: 1.1; color: var(--accent); text-align: center; }
.team-avatar.ed-photo .up-hint small { font-size: .6rem; font-family: var(--font-mono); }
/* Upload-Platzhalter (Editor): in beiden Modi sichtbar grau gefuellt. */
.p-logo-slot { display: inline-grid; place-items: center; min-width: 40px; min-height: 34px; border-radius: 6px;
  border: 1px dashed var(--border); background: var(--surface-2); color: var(--muted); padding: 2px 6px; }
.p-logo-slot img { height: 26px; width: auto; }
/* Namens-Platzhalter (Kunde ohne Logo) auf der Live-Seite: klar sichtbar in beiden Modi. */
.p-item .p-name { color: var(--muted); }

/* Team-Initialen statt Name im Avatar */
.team-avatar .tm-ini { font-family: var(--font-display); font-weight: 800; font-size: 2rem;
  letter-spacing: .04em; color: var(--accent); line-height: 1; }
.team-avatar .up-cam { position: absolute; right: 2px; bottom: 2px; font-size: .9rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%; padding: 3px 4px; line-height: 1; }
.team-avatar { position: relative; }

/* Referenz-Vorschau: ganze Seite sichtbar, oben ausgerichtet */
.ref-hero { aspect-ratio: 16/11; }
.ref-hero .ref-shot { object-fit: contain; object-position: center top; background: #fff; }

/* Footer: Support/Ticket + Kundenlogin nicht gequetscht */
.foot-cta { flex-direction: column; align-items: flex-start; gap: 10px; }
.foot-cta a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }

/* Schnellere, ruhigere Animationen */
.reveal { transition-duration: .32s !important; }
.card { transition: transform .16s, border-color .16s, box-shadow .16s; }
.btn { transition: background .14s, border-color .14s, transform .1s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Aktions-Karten: gleiche Höhe, Inhalt sauber verteilt */
.cards .promo-card { display: flex; flex-direction: column; align-self: stretch; }
.cards .promo-card h3 { margin-top: 10px; }
.cards .promo-card > .muted { flex: 1; }
/* Aktions-Karten auf gleiche Höhe bringen: Badge-Zeile immer gleich hoch, Rest schiebt nach unten */
.promo-card .p-top { min-height: 30px; }
.promo-card > .muted { flex: 1; }
.promo-card .btn { margin-top: auto; }
.cards { align-items: stretch; }

/* Partner-Logos: im Dark Mode hell darstellen (SVG erbt kein currentColor) */
/* Echte, farbige Kundenlogos unveraendert zeigen (kein Weiss-Filter mehr,
   der farbige Logos zerstoert hat). Nur dezente Deckkraft, voll bei Hover. */
/* Logos auf weissem Kaertchen (siehe .p-item img) – kein Filter/Opacity mehr. */

/* Referenz-Vorschau: Feld ausfüllen, Seite von oben zeigen */
.ref-hero { aspect-ratio: 4/3; }
.ref-hero .ref-shot { object-fit: cover; object-position: center top; }

/* Pakete: Rabattpreis (alter Preis durchgestrichen) + Badge */
.price-card { display: flex; flex-direction: column; position: relative; }
.price-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; border-radius: 999px; padding: 5px 16px;
  font-size: .74rem; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.price-card.hl .price-badge { background: var(--accent); }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.amount-old { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--faint);
  text-decoration: line-through; text-decoration-thickness: 2px; }
.amount { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.amount.sale { color: var(--danger); }
.price-card.hl .amount.sale { color: #fca5a5; }
.price-note { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 0; flex: 1; }
.price-card li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 9px; font-size: .92rem; }
.price-card li::before { content: '✓'; color: var(--ok); font-weight: 700; flex-shrink: 0; }
.price-card .btn { margin-top: 20px; }

/* BUGFIX: Karten in einer Reihe standen versetzt.
   Ursache: jede Karte animierte einzeln mit translateY(9px).
   Loesung: in Karten-Reihen nur sanft einblenden, keine Verschiebung. */
.cards > .reveal, .portal-cards > .reveal, .pk-grid > .reveal { transform: none !important; }
.cards > .reveal:not(.in) { opacity: 0; }
.cards > .reveal.in { opacity: 1; }

/* ============================================================
   BUGFIX Aktions-Karten standen versetzt.
   Flex + Umbruch erlaubte minimale Höhenunterschiede.
   Grid erzwingt identische Oberkanten – Versatz ist damit unmöglich.
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap);
  align-items: start; justify-content: initial; }
.cards > * { flex: none; max-width: none; min-width: 0; align-self: stretch; }
.cards.wide > * { max-width: none; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
/* Kennzahlen bleiben schmal, 4 nebeneinander */
.cards:has(.card.stat) { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ============================================================
   BUGFIX Badge-Versatz in Aktions-Karten.
   Ursache: .p-badge trug noch margin-bottom:10px aus der Zeit, als es
   allein über dem Titel stand. In der zentrierten Flex-Zeile (.p-top)
   wird die Margin-Box zentriert – die 10px unten hoben das Badge an.
   ============================================================ */
.promo-card .p-top .p-badge { margin-bottom: 0; }
.p-top > * { margin-top: 0; margin-bottom: 0; }
/* Alle Chips der Zeile exakt gleich hoch */
.p-top .p-badge, .p-top .p-left, .p-top .p-sold {
  display: inline-flex; align-items: center; line-height: 1.35;
  padding: 4px 11px; font-size: .72rem; border-radius: 999px; white-space: nowrap;
}

/* ============================================================
   Optik-Runde: Avatare, Kennzahlen, Referenzen, Footer, Modal
   ============================================================ */

/* Team-Avatar: Initialen liegen darunter, Foto legt sich drüber.
   Lädt das Foto nicht, entfernt es sich selbst -> Initialen bleiben sichtbar
   (vorher zeigte der Browser den alt-Text, also den Namen). */
.team-avatar { position: relative; display: grid; place-items: center; overflow: hidden; }
.team-avatar .tm-ini { grid-area: 1/1; }
.team-avatar img { grid-area: 1/1; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.team-avatar .up-cam { grid-area: 1/1; align-self: end; justify-self: end; z-index: 2; }

/* Kennzahlen: Reihe zentriert, Karten gleich breit */
.cards:has(.card.stat) { justify-content: center; }
.card.stat { text-align: center; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; min-height: 108px; }
.card.stat .num, .card.stat .v { width: 100%; text-align: center; }

/* Referenz-Vorschau: nur der Hero-Bereich, nicht die halbe Seite */
.ref-hero { aspect-ratio: 16/10; overflow: hidden; }
.ref-hero .ref-shot { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Kontaktdaten im Footer: Symbol und Text sauber auf einer Linie */
.foot-contact .ci, .site-footer .ci { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.site-footer .ci .ic { flex: 0 0 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; background: rgba(255,255,255,.06); font-size: .95rem; }
.site-footer .ci > div, .site-footer .ci span:not(.ic) { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }

/* Aktions-Popup: Schließen-Kreuz ganz nach rechts */
.promo-bar, .modal-head { display: flex; align-items: center; gap: 10px; }
.promo-bar .m-x, .modal-head .m-x, .promo-bar [data-close], .modal-head [data-close] { margin-left: auto; }

/* Keine farbige Kante am unteren Seitenrand */
body::after, .page::after { content: none !important; }
.site-footer { border-bottom: 0; }

/* ===========================================================================
   Partnerprogramm: Anmelde-Menue (Kunde/Partner) und Teaser auf der Startseite
   =========================================================================== */
.login-menu { position: relative; }
.login-drop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; }
.login-drop a { display: block; padding: 12px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border); }
.login-drop a:last-child { border-bottom: 0; }
.login-drop a:hover { background: var(--surface-2); }
.login-drop strong { display: block; font-size: .92rem; }
.login-drop span { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) {
  /* Auf dem Handy wandern beide Zugaenge ins Menue (siehe .mobile-only). */
  .hdr-actions .login-menu { display: none; }
}

.partner-teaser { padding-top: 24px; }
.pt-box { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--ok) 7%, transparent));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.pt-text h2 { margin-top: 6px; }
.pt-text .lead { max-width: 54ch; }
.pt-points { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 9px; }
.pt-points li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .94rem; }
.pt-points .tick, .pt-text .tick { color: var(--ok); font-family: var(--font-mono); flex: none; }
.pt-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.pt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.pt-k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.pt-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-top: 1px dashed var(--border); font-size: .9rem; }
.pt-out { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: nowrap; }
.pt-out > span { min-width: 0; }
/* Der Betrag bleibt in einer Zeile – vorher rutschte das € auf die naechste. */
.pt-out strong { font-size: 1.3rem; color: var(--ok); white-space: nowrap; flex: none; }
.pt-row b { white-space: nowrap; }
@media (max-width: 860px) {
  .pt-box { grid-template-columns: 1fr; padding: 24px; }
}

/* ===========================================================================
   Editor-Leiste und Code-Fenster auf dem Handy
   Die Leiste lief seitlich aus dem Bild – „Abbrechen" und „Editor schließen"
   waren nicht erreichbar. Jetzt volle Breite, zwei Knöpfe je Zeile.
   =========================================================================== */
@media (max-width: 640px) {
  .ed-bar { left: 8px; right: 8px; bottom: 8px; transform: none; width: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border-radius: 12px; }
  .ed-bar .ed-tag { grid-column: 1 / -1; text-align: center; }
  .ed-bar .btn { width: 100%; justify-content: center; padding: 10px 8px; font-size: .82rem; }
  .ed-bar .btn:last-child { grid-column: 1 / -1; }
  /* Code-Fenster bricht um, statt seitlich zu scrollen. */
  .codewin pre { white-space: pre-wrap; word-break: break-word; font-size: .76rem; padding: 14px 15px; }
  .codewin .bar { padding: 10px 12px; }
}

/* Leere Felder im Editor: der Platzhaltertext ist nur ein Hinweis, deshalb
   blass und gestrichelt umrandet – und er wird beim Speichern verworfen. */
body.editing .ed-leer { opacity: .45; border-style: dashed !important; }
