/* ============================================================
   EMSO Bridge: verbindet WordPress-Markup mit dem Designsystem.
   Regeln hier nur, wenn WordPress anderes HTML erzeugt als die
   Komponenten in design-system/. Werte immer über Tokens.
   ============================================================ */

body.emso-root { margin: 0; min-height: 100vh; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: var(--z-toast); }
.skip-link:focus { left: 16px; background: var(--color-yellow); color: var(--fg-inv); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
/* Unter 600px scrollt die Admin-Leiste mit, der Header bleibt oben. */
@media (max-width: 600px) { body.admin-bar .site-header { top: 0; } }
:focus-visible { outline: 2px solid var(--color-yellow); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* ── Seitenkopf ─────────────────────────────────────────────── */
.page-hero .hero__content { padding-top: 140px; padding-bottom: 64px; }
.page-hero .lead { margin-bottom: 0; }
@container emso (max-width: 640px) { .page-hero .hero__content { padding-top: 112px; padding-bottom: 40px; } }
.section--content { padding-top: 64px; }

/* Hero aus Block-Gruppen: Glows ohne Extra-Markup */
.wp-block-group.hero::before, .wp-block-group.hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.wp-block-group.hero::before { top: -10%; right: -5%; width: 700px; height: 700px; background: radial-gradient(circle, rgba(78,54,163,0.45) 0%, transparent 70%); }
.wp-block-group.hero::after  { bottom: -20%; left: 30%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(71,152,181,0.20) 0%, transparent 70%); }
.wp-block-group.hero > .container { position: relative; z-index: 1; }

/* Landingpages: Sektionen laufen über die volle Breite */
.entry-content--landing > * { margin: 0; }
.entry-content--landing > :first-child:not(.hero) { margin-top: 68px; }
.entry-content--landing > .wp-block-group:not(.section):not(.hero):not(.cta-strip) { max-width: 1280px; margin-inline: auto; padding-inline: var(--space-8); }

/* Gutenberg-Abstände innerhalb der Komponenten neutralisieren */
.hero :where(h1, h2, p, .wp-block-buttons), .section-head :where(h2, p), .card :where(h2, h3, p, ul),
.cta-strip :where(h2, p), .about__content :where(h2, p) { margin-block-start: 0; }
.section-head .wp-block-buttons { justify-content: center; }

/* ── Buttons (core/button → .btn) ───────────────────────────── */
.wp-block-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.wp-block-button__link {
  --btn-bg: var(--color-purple); --btn-bg-hover: var(--color-purple-light);
  --btn-fg: var(--fg-1); --btn-border: transparent;
  --btn-shadow: 0 0 24px rgba(78,54,163,0.5); --btn-shadow-hover: 0 0 36px rgba(107,82,200,0.7);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em;
  font-size: var(--text-sm); line-height: 1.2;
  padding: 11px 24px; border-radius: var(--radius-md);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-border); box-shadow: var(--btn-shadow);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out-smooth), transform var(--duration-fast) var(--ease-out-smooth), box-shadow var(--duration-base) var(--ease-out-smooth);
}
.wp-block-button__link:hover { background: var(--btn-bg-hover); box-shadow: var(--btn-shadow-hover); transform: scale(1.02); color: var(--btn-fg); }
.wp-block-button__link:active { transform: scale(0.97); box-shadow: none; }
.is-style-yellow .wp-block-button__link { --btn-bg: var(--color-yellow); --btn-bg-hover: var(--color-yellow-dark); --btn-fg: var(--fg-inv); --btn-shadow: var(--shadow-glow-yellow); --btn-shadow-hover: 0 0 32px rgba(231,226,71,0.6); font-weight: 700; }
.is-style-ghost .wp-block-button__link { --btn-bg: transparent; --btn-bg-hover: rgba(78,54,163,0.15); --btn-border: rgba(110,86,200,0.45); --btn-shadow: none; --btn-shadow-hover: none; }
.is-style-glass .wp-block-button__link { --btn-bg: rgba(255,255,255,0.07); --btn-bg-hover: rgba(255,255,255,0.13); --btn-border: rgba(255,255,255,0.12); --btn-shadow: none; --btn-shadow-hover: none; font-weight: 500; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero .wp-block-button__link, .cta-strip .wp-block-button__link { font-size: var(--text-base); padding: 14px 32px; }
.wp-block-button__link::after { content: none; }
.wp-block-button.has-arrow .wp-block-button__link::after {
  content: ""; width: 1em; height: 1em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
@container emso (max-width: 640px) {
  .wp-block-buttons { flex-direction: column; }
  .wp-block-buttons .wp-block-button, .wp-block-buttons .wp-block-button__link { width: 100%; }
}

/* ── Typo-Stile ─────────────────────────────────────────────── */
.is-style-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-yellow); margin-bottom: 14px; }
.is-style-lead { font-size: var(--text-lg); font-weight: 300; line-height: var(--leading-relaxed); color: rgba(255,255,255,0.65); max-width: 540px; }
.is-style-muted { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,0.65); }
:is(.is-style-display-xl, .is-style-display-lg, .is-style-display-md) { font-family: var(--font-display); font-weight: 800; letter-spacing: var(--tracking-tight); line-height: 1.1; color: var(--fg-1); }
.is-style-display-xl { font-size: clamp(36px, 5.5cqi, 72px); line-height: 1.05; }
.is-style-display-lg { font-size: clamp(30px, 4cqi, 52px); }
.is-style-display-md { font-size: clamp(26px, 3cqi, 42px); }
:is(h1, h2, h3) em, :is(h1, h2, h3) mark { font-style: normal; color: var(--color-yellow); background: none; }
.is-style-cta-inline { display: block; padding: 18px 20px; border-radius: var(--radius-md); background: rgba(231,226,71,0.06); border-left: 3px solid var(--color-yellow); font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.75); }
.is-style-cta-inline a { color: var(--color-yellow); font-weight: 600; text-decoration: none; }

/* ── Listen ─────────────────────────────────────────────────── */
ul.is-style-check { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
ul.is-style-check li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.75); }
ul.is-style-check li::before {
  content: ""; flex-shrink: 0; width: 1em; height: 1em; margin-top: 3px; background: var(--accent, var(--color-yellow));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
ul.is-style-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; padding: 0; list-style: none; }
ul.is-style-tags li { font-size: 10px; font-weight: 500; padding: 3px 9px; border-radius: var(--radius-full); background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.1); }

/* ── Karten (core/group → .card) ────────────────────────────── */
:is(.is-style-card, .is-style-card-teal, .is-style-card-yellow, .is-style-card-coral, .is-style-card-plain, .is-style-glow) {
  --accent: var(--color-purple); --accent-eyebrow: #b09ef0; --accent-glow: rgba(78,54,163,0.4);
  border-radius: var(--radius-lg); padding: var(--space-6);
  background: var(--glass-bg); border: var(--glass-border); border-top: 2px solid var(--accent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.is-style-card-teal   { --accent: var(--color-teal);   --accent-eyebrow: #7ecde8; --accent-glow: rgba(71,152,181,0.35); }
.is-style-card-yellow { --accent: var(--color-yellow); --accent-eyebrow: var(--color-yellow); --accent-glow: rgba(231,226,71,0.3); }
.is-style-card-coral  { --accent: var(--color-coral);  --accent-eyebrow: #f4926e; --accent-glow: rgba(238,108,77,0.35); }
.is-style-card-plain  { border-top: var(--glass-border); --accent-eyebrow: var(--color-yellow); }
.is-style-glow { border-color: color-mix(in srgb, var(--accent) 50%, transparent); border-top-color: var(--accent); box-shadow: 0 0 32px var(--accent-glow), var(--glass-shadow); }
:is(.is-style-card, .is-style-card-teal, .is-style-card-yellow, .is-style-card-coral, .is-style-card-plain, .is-style-glow) > .is-style-eyebrow { font-size: 10px; font-weight: 700; color: var(--accent-eyebrow); margin-bottom: 8px; }
:is(.is-style-card, .is-style-card-teal, .is-style-card-yellow, .is-style-card-coral, .is-style-card-plain, .is-style-glow) > :is(h2, h3) { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 6px; }
:is(.is-style-card, .is-style-card-teal, .is-style-card-yellow, .is-style-card-coral, .is-style-card-plain, .is-style-glow) > p { font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.72); }
.is-style-form-panel { background: rgba(255,255,255,0.05); border: 1px solid rgba(110,86,200,0.25); border-radius: 24px; padding: 40px; backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 8px 48px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08); }
@container emso (max-width: 640px) { .is-style-form-panel { padding: 24px 20px; border-radius: var(--radius-lg); } }

/* Raster aus Block-Gruppen */
.wp-block-group.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.wp-block-group.card-grid > * { margin: 0; }

/* Leistungs-Karten aus Block-Gruppen */
.service-card > :is(h2, h3) { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
.service-card > .is-style-eyebrow { font-size: 10px; font-weight: 700; color: var(--accent); }
.service-card > p:not(.is-style-eyebrow) { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0 0 16px; }
.service-card > ul.is-style-check { display: none; margin-top: 16px; }
.service-card.is-expanded > ul.is-style-check { display: flex; }
.service-card > ul.is-style-check li { font-size: 13px; gap: 8px; }

/* ── Fließtext (Beiträge, einfache Seiten) ──────────────────── */
.section--content .entry-content { max-width: 760px; margin: 0 auto; }
.entry-content { font-size: 16px; line-height: 1.7; color: rgba(255,255,255,0.75); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content :is(h2, h3, h4) { color: var(--fg-1); font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; margin-top: 2em; margin-bottom: 0.5em; }
.entry-content h2 { font-size: clamp(24px, 3cqi, 32px); font-weight: 800; }
.entry-content h3 { font-size: 20px; font-weight: 700; }
.entry-content h4 { font-size: 17px; font-weight: 700; }
.entry-content a:not(.wp-block-button__link):not(.btn) { color: var(--purple-200); text-underline-offset: 3px; }
.entry-content a:not(.wp-block-button__link):not(.btn):hover { color: var(--fg-1); }
.entry-content strong { color: var(--fg-1); }
.entry-content :is(ul, ol):not([class*="is-style"]) { padding-left: 1.3em; }
.entry-content li + li { margin-top: 0.35em; }
.entry-content blockquote { margin-inline: 0; padding: 18px 22px; border-left: 3px solid var(--color-purple-light); background: rgba(255,255,255,0.04); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.entry-content img, .entry-content .wp-block-image img { border-radius: var(--radius-md); }
.entry-content figcaption { font-size: 12px; color: var(--fg-3); text-align: center; margin-top: 8px; }
.entry-content code { font-family: var(--font-mono); font-size: 0.9em; background: rgba(255,255,255,0.07); padding: 2px 6px; border-radius: 4px; }
.entry-content pre { background: var(--bg-surface); border: var(--glass-border); border-radius: var(--radius-md); padding: 16px; overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry-content :is(th, td) { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; }
.entry-content th { color: var(--fg-1); }
.entry-content hr { border: 0; border-top: 1px solid rgba(255,255,255,0.08); margin: 2.5em 0; }
.entry-content .alignwide { max-width: 1100px; margin-inline: auto; }
.entry-thumb { max-width: 960px; margin: 0 auto 48px; }
.entry-thumb img { border-radius: var(--radius-lg); width: 100%; box-shadow: var(--shadow-lg); }
.entry-cta { max-width: 760px; margin: 64px auto 0; }

/* ── Blog-Karten ────────────────────────────────────────────── */
.post-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-6); }
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-card > :not(.post-card__img) { margin-left: var(--space-6); margin-right: var(--space-6); }
.post-card__img { aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 20px; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card:not(:has(.post-card__img)) { padding-top: var(--space-6); }
.post-card .card__title { font-size: 19px; margin-bottom: 10px; }
.post-card__more { margin-top: auto; padding: 16px 0 24px; font-size: 12px; font-weight: 600; color: var(--accent-eyebrow); display: inline-flex; gap: 6px; align-items: center; }
.pagination { margin-top: 48px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border-radius: var(--radius-sm); border: var(--glass-border); color: var(--fg-2); text-decoration: none; font-size: 13px; }
.pagination .page-numbers.current { background: var(--color-purple); color: var(--fg-1); }

/* ── Formulare aus emso-core ────────────────────────────────── */
.emso-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Leistungs-Block: Button aus core/button */
.pillar .wp-block-button__link { --btn-bg: transparent; --btn-fg: var(--accent); --btn-border: var(--accent); --btn-bg-hover: color-mix(in srgb, var(--accent) 15%, transparent); --btn-shadow: none; --btn-shadow-hover: 0 0 20px var(--accent-glow); border-radius: 8px; font-size: 13px; padding: 9px 20px; }
.pillar--yellow .wp-block-button__link { --btn-bg: var(--color-yellow); --btn-fg: var(--fg-inv); --btn-bg-hover: var(--color-yellow-dark); }
.pillar > .wp-block-group > * { margin-block-start: 0; }
.wp-block-group.pillar + .wp-block-group.pillar { margin-top: var(--space-6); }
.about__portrait { margin: 0; }
