/* =====================================================================
   Dark Hollow Studios – Theme-Stile, die theme.json nicht abdeckt
   (Atmosphäre, Flackern, Buttons, Karten, Rauten-Listen, Formular)
   ===================================================================== */

:root {
  --dh-radius: 2px;
  --dh-hairline: rgba(255,255,255,.15);
  --dh-card-bg: rgba(255,255,255,.04);
  --dh-card-border: rgba(255,255,255,.08);
  --dh-divider: rgba(255,255,255,.10);
  --dh-blood-tint: rgba(196,22,28,.10);
  --dh-blood-soft: rgba(196,22,28,.40);
  --dh-blood-focus: rgba(196,22,28,.70);
  --dh-blood-border: rgba(196,22,28,.88);
  --dh-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #C4161C; color: #DAD4C8; }
:focus-visible { outline: 1px solid #C4161C; outline-offset: 3px; }

/* Ganze Seite: leichte Glut unten links + Filmkorn über allem */
/* overflow: clip (beide Achsen): das wandernde Filmkorn darf die Seitenhöhe nicht verändern – sonst springt die Seite ganz unten */
.wp-site-blocks { position: relative; isolation: isolate; overflow: clip; }
.wp-site-blocks::after {
  content: ""; position: absolute; inset: -160px; z-index: 9999; pointer-events: none;
  background-image: var(--dh-grain); opacity: .05;
  animation: dh-grain .7s steps(10) infinite;
}

/* ============================ Kopfzeile ============================ */
/* Sticky sitzt am Vorlagenteil-Wrapper, sonst klebt die Kopfzeile nur innerhalb ihres eigenen Rahmens */
.wp-site-blocks > .wp-block-template-part:has(> .dh-header) { position: sticky; top: 0; z-index: 100; }
.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .dh-header) { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > .wp-block-template-part:has(> .dh-header) { top: 46px; } }
.dh-header {
  position: relative; z-index: 100;
  background: rgba(7,7,10,.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dh-card-border);
}
.dh-header .wp-block-site-title a { text-shadow: 0 0 18px rgba(196,22,28,.6); }
.dh-header .wp-block-navigation-item__content { padding: 6px 0; position: relative; }
.dh-header .wp-block-navigation-item__content::after {
  content: ""; position: absolute; left: 0; right: .2em; bottom: 0; height: 1px;
  background: #C4161C; transform: scaleX(0); transform-origin: left;
  transition: transform 400ms ease;
}
.dh-header .wp-block-navigation-item__content:hover::after,
.dh-header .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); transition-duration: 250ms; }
.dh-lang { font-size: 13px; letter-spacing: .12em; color: #5E5952; white-space: nowrap; }
.dh-lang a { color: #5E5952; text-decoration: none; }
.dh-lang a:hover { color: #DAD4C8; }
.dh-lang .is-active, .dh-lang strong { color: #C4161C; font-weight: 600; }
.wp-block-navigation__responsive-container.is-menu-open { background: #07070A !important; padding: 32px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 20px; }

/* ===================== Atmosphäre (Hero, Bänder) ===================== */
.is-style-dh-atmosphere { position: relative; isolation: isolate; overflow: hidden; }
.is-style-dh-atmosphere::before { /* Glut + Vignette */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(85% 95% at 38% 45%, transparent 35%, rgba(0,0,0,.7) 85%, rgba(0,0,0,.95) 100%),
    radial-gradient(75% 90% at 18% 105%, rgba(110,6,10,.55) 0%, rgba(60,4,6,.22) 45%, transparent 100%);
  animation: dh-ember 12s var(--dh-ease, cubic-bezier(.37,0,.63,1)) infinite alternate;
}
.is-style-dh-atmosphere::after { /* Nebel */
  content: ""; position: absolute; inset: -10% -30%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 30% 55%, rgba(216,210,200,.085), transparent 70%),
    radial-gradient(900px 420px at 75% 40%, rgba(184,178,168,.07), transparent 70%);
  animation: dh-fog 46s cubic-bezier(.37,0,.63,1) infinite alternate;
}
.is-style-dh-atmosphere > * { position: relative; z-index: 2; }
.is-style-dh-atmosphere.wp-block-cover > .wp-block-cover__inner-container { z-index: 2; }

/* Glut-Band ohne Nebel */
.is-style-dh-ember { position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(70% 140% at 12% 120%, rgba(120,8,12,.55), transparent 70%),
    radial-gradient(60% 120% at 95% -20%, rgba(80,4,8,.30), transparent 70%),
    #0A0A0D;
  border-top: 1px solid var(--dh-card-border); border-bottom: 1px solid var(--dh-card-border);
}

/* ============================ Typografie ============================ */
.is-style-dh-eyebrow, .dh-eyebrow {
  font-family: var(--wp--preset--font-family--ui) !important;
  font-size: 13px !important; font-weight: 600; line-height: 1.4;
  letter-spacing: .35em; text-transform: uppercase;
  color: var(--wp--preset--color--blood-bright) !important;
}
.is-style-dh-display {
  font-family: var(--wp--preset--font-family--title);
  letter-spacing: .3em; text-transform: uppercase; font-weight: 400;
  line-height: 1.05; margin-right: -.3em; /* Sperrung am Ende ausgleichen */
  color: var(--wp--preset--color--bone);
  text-shadow: 0 0 22px rgba(196,22,28,.85), 0 0 60px rgba(196,22,28,.35);
  animation: dh-flicker 13s infinite;
}
.is-style-dh-rule, .wp-block-separator.is-style-dh-rule {
  border: 0 !important; height: 1px !important; width: min(340px, 70%) !important; max-width: none;
  background: linear-gradient(90deg, rgba(196,22,28,.8), rgba(196,22,28,0)) !important; opacity: 1;
  margin-left: 0;
}
.has-text-align-center + .is-style-dh-rule,
.is-style-dh-rule.aligncenter, .is-content-justification-center > .is-style-dh-rule {
  margin-left: auto !important; margin-right: auto !important;
  background: linear-gradient(90deg, rgba(196,22,28,0), rgba(196,22,28,.8), rgba(196,22,28,0)) !important;
}
.dh-lead { color: var(--wp--preset--color--ash); max-width: 60ch; }
.dh-meta { font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: #5E5952; }
.dh-scroll {
  font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: #8E887F;
  animation: dh-bob 3.2s ease-in-out infinite;
}
.dh-scroll a { color: inherit; text-decoration: none; }

/* ============================== Buttons ============================== */
.wp-block-button__link { transition: color 400ms, border-color 400ms, background-color 400ms, box-shadow 400ms, transform 120ms; }
.wp-block-button__link:hover { transition-duration: 250ms; }
.wp-block-button__link:active { transform: scale(.985, .97); }

/* Hauptaktion – wie „SPIELEN“ im Launcher. Standard für alle Buttons. */
.wp-block-button:not(.is-style-dh-ghost):not(.is-style-outline) .wp-block-button__link:not(.has-background) {
  background: linear-gradient(180deg, #A3141A 0%, #5C080B 100%);
  border-color: var(--dh-blood-border);
  box-shadow: 0 0 28px rgba(196,22,28,0);
}
.wp-block-button:not(.is-style-dh-ghost):not(.is-style-outline) .wp-block-button__link:hover {
  border-color: #FF4A40; box-shadow: 0 0 28px rgba(196,22,28,.55);
}
.wp-block-button.is-style-dh-play .wp-block-button__link { font-size: 20px; padding: 21px 48px; min-width: 260px; }

/* Nebenaktion – Ghost-Button */
.wp-block-button.is-style-dh-ghost .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent; border: 1px solid var(--dh-hairline);
  color: var(--wp--preset--color--ash); font-weight: 500;
}
.wp-block-button.is-style-dh-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  color: var(--wp--preset--color--bone); border-color: var(--dh-blood-soft); background: var(--dh-blood-tint);
}

/* =============================== Karten =============================== */
.is-style-dh-card {
  background: var(--dh-card-bg); border: 1px solid var(--dh-card-border); border-radius: 0;
  transition: border-color 400ms, background-color 400ms;
}
.is-style-dh-card:hover { border-color: var(--dh-blood-soft); background: rgba(255,255,255,.055); transition-duration: 250ms; }
.is-style-dh-card .wp-block-post-featured-image, .is-style-dh-card .wp-block-image { overflow: hidden; margin: 0; }
.is-style-dh-card .wp-block-post-featured-image img, .is-style-dh-card .wp-block-image img {
  transition: transform 1.2s cubic-bezier(.2,.6,.2,1), filter 1.2s; filter: saturate(.75) brightness(.85);
}
.is-style-dh-card:hover .wp-block-post-featured-image img, .is-style-dh-card:hover .wp-block-image img { transform: scale(1.04); filter: saturate(1) brightness(1); }

/* Kennzahl-Kachel (wie im Uploader) */
.is-style-dh-stat { background: rgba(255,255,255,.06); border-left: 2px solid #8A0F12; }
.is-style-dh-stat p { margin: 0; }

/* Partner-/Logo-Platzhalter */
.dh-logo-slot {
  min-height: 96px; display: flex !important; align-items: center; justify-content: center;
  border: 1px dashed var(--dh-hairline); color: #5E5952; font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  transition: border-color 400ms, color 400ms;
}
.dh-logo-slot:hover { border-color: var(--dh-blood-soft); color: #8E887F; }
.dh-logos img { filter: grayscale(1) brightness(1.4); opacity: .6; transition: opacity 400ms, filter 400ms; }
.dh-logos img:hover { filter: none; opacity: 1; }

/* Galerie: Screenshots kantig, dezent entsättigt */
.wp-block-gallery.is-style-dh-screens img { filter: saturate(.7) brightness(.85); transition: filter 600ms, transform 1.2s; border: 1px solid var(--dh-card-border); }
.wp-block-gallery.is-style-dh-screens figure:hover img { filter: none; }

/* ============================ Rauten-Liste ============================ */
.is-style-dh-diamond { list-style: none; padding-left: 0 !important; }
.is-style-dh-diamond li { position: relative; padding-left: 22px; margin: 0 0 10px; }
.is-style-dh-diamond li::before {
  content: ""; position: absolute; left: 3px; top: .72em; width: 6px; height: 6px;
  background: #C4161C; transform: rotate(45deg);
}

/* Trennlinie zwischen Sektionen */
.dh-section + .dh-section { border-top: 1px solid var(--dh-card-border); }

/* Team-Porträt */
.dh-portrait img { aspect-ratio: 4/5; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(.8); transition: filter 800ms; }
.dh-portrait:hover img, .is-style-dh-card:hover .dh-portrait img { filter: grayscale(.2) brightness(.95); }

/* ============================ Formular ============================ */
.dh-form { display: grid; gap: 16px; }
.dh-form label { display: block; font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: #8E887F; margin-bottom: 6px; }
.dh-form input[type=text], .dh-form input[type=email], .dh-form textarea, .dh-form select,
.wpcf7 input:not([type=submit]):not([type=checkbox]), .wpcf7 textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.20); border-radius: 2px;
  color: #DAD4C8; font: inherit; font-size: 16px; padding: 12px 14px; caret-color: #C4161C;
  transition: border-color 250ms;
}
.dh-form input:focus, .dh-form textarea:focus, .wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--dh-blood-focus); }
.dh-form textarea { min-height: 160px; resize: vertical; }
.dh-form .dh-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #8E887F; text-transform: none; letter-spacing: 0; cursor: pointer; }
.dh-form .dh-check input { appearance: none; -webkit-appearance: none; flex: 0 0 16px; width: 16px; height: 16px; margin: 3px 0 0;
  border: 1px solid rgba(255,255,255,.33); background: rgba(255,255,255,.08); border-radius: 0; display: grid; place-content: center; cursor: pointer; }
.dh-form .dh-check input::before { content: ""; width: 8px; height: 8px; background: #C4161C; transform: scale(0); transition: transform 120ms; }
.dh-form .dh-check input:checked { border-color: var(--dh-blood-focus); }
.dh-form .dh-check input:checked::before { transform: scale(1); }
.dh-form .dh-check:hover { color: #DAD4C8; }
.dh-form button, .wpcf7 input[type=submit] {
  justify-self: start; cursor: pointer;
  font-family: var(--wp--preset--font-family--ui); font-size: 17px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #DAD4C8; background: linear-gradient(180deg, #A3141A 0%, #5C080B 100%);
  border: 1px solid var(--dh-blood-border); border-radius: 2px; padding: 16px 40px;
  transition: border-color 400ms, box-shadow 400ms;
}
.dh-form button:hover, .wpcf7 input[type=submit]:hover { border-color: #FF4A40; box-shadow: 0 0 28px rgba(196,22,28,.55); transition-duration: 250ms; }
.dh-form .dh-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dh-notice { padding: 14px 18px; border: 1px solid var(--dh-card-border); background: var(--dh-card-bg); font-size: 15px; }
.dh-notice.is-ok { border-color: var(--dh-blood-soft); color: #DAD4C8; }
.dh-notice.is-error { border-color: #FF5A50; color: #FF5A50; }

/* ============================ Scrollbar ============================ */
html { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(196,22,28,.6); }

/* ============================ Animationen ============================ */
@keyframes dh-flicker { /* 13-s-Zyklus, diskrete Sprünge wie im Launcher */
  0%, 31.4% { opacity: 1; }
  31.5% { opacity: .55; } 32% { opacity: 1; } 33.1% { opacity: .25; } 33.5% { opacity: .95; } 34.6% { opacity: 1; }
  70.7% { opacity: 1; } 70.8% { opacity: .7; } 71.2% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes dh-fog { from { transform: translateX(-12%); } to { transform: translateX(10%); } }
@keyframes dh-ember { from { opacity: .7; } to { opacity: 1; } }
@keyframes dh-grain {
  0% { transform: translate(0,0); } 10% { transform: translate(-40px,-90px); } 20% { transform: translate(-130px,20px); }
  30% { transform: translate(30px,-120px); } 40% { transform: translate(-60px,60px); } 50% { transform: translate(-150px,-30px); }
  60% { transform: translate(60px,0); } 70% { transform: translate(0,-60px); } 80% { transform: translate(-90px,120px); }
  90% { transform: translate(-20px,-10px); } 100% { transform: translate(0,0); }
}
@keyframes dh-bob { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(6px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wp-site-blocks::after, .is-style-dh-atmosphere::before, .is-style-dh-atmosphere::after,
  .is-style-dh-display, .dh-scroll { animation: none !important; }
}

/* ============================== Mobil ============================== */
@media (max-width: 781px) {
  .is-style-dh-display { letter-spacing: .18em; margin-right: -.18em; }
  .wp-block-button.is-style-dh-play .wp-block-button__link { min-width: 0; width: 100%; }
}

/* ===================== Sprachblöcke im Editor kennzeichnen ===================== */
.editor-styles-wrapper .dh-only-de, .editor-styles-wrapper .dh-only-en { outline: 1px dashed rgba(196,22,28,.35); outline-offset: 4px; position: relative; }
.editor-styles-wrapper .dh-only-de::before, .editor-styles-wrapper .dh-only-en::before {
  position: absolute; top: -10px; right: 0; z-index: 5; font: 600 10px/1 Barlow, sans-serif; letter-spacing: .2em;
  padding: 3px 6px; background: #8A0F12; color: #DAD4C8; pointer-events: none;
}
.editor-styles-wrapper .dh-only-de::before { content: "DE"; }
.editor-styles-wrapper .dh-only-en::before { content: "EN"; }
.editor-styles-wrapper .wp-block-navigation-item.dh-only-en { opacity: .55; }
.dh-lang .is-active { color: #C4161C; font-weight: 600; }
.wp-block-shortcode:has(.dh-lang), p:has(> .dh-lang) { margin: 0; }
footer .dh-legal a { color: #8E887F; text-decoration: none; }
footer .dh-legal a:hover { color: #DAD4C8; }
/* Rote Linie in schmalen Inhaltsspalten linksbündig zum Text */
.is-layout-constrained > .is-style-dh-rule:not(.aligncenter) {
  margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 760px)) / 2)) !important;
}

/* ===================== Dark Hollow Studios ===================== */
.dh-studios {
  font-family: var(--wp--preset--font-family--ui) !important; font-size: clamp(13px, 1.4vw, 17px); font-weight: 500;
  letter-spacing: .9em; margin-right: -.9em; text-transform: uppercase; color: var(--wp--preset--color--ash);
  margin-top: 4px !important;
}
.dh-game-title {
  letter-spacing: .22em; text-transform: uppercase; margin-right: -.22em;
  text-shadow: 0 0 22px rgba(196,22,28,.7);
}
.dh-tagline { font-family: var(--wp--preset--font-family--title); font-style: italic; color: var(--wp--preset--color--bone); margin-top: 8px !important; }
@media (max-width: 600px) {
  .dh-header .wp-block-site-title { font-size: 14px !important; letter-spacing: .18em !important; white-space: nowrap; }
}
.dh-logos .dh-logo-slot { max-width: 340px; margin-left: 0 !important; margin-right: auto !important; }
.dh-member { display: inline-flex !important; max-width: 100%; } .dh-member .wp-block-image { margin: 0; flex: 0 0 auto; }

/* Kopfzeile: Schriftzug nie umbrechen, bei mittleren Breiten kleiner */
.dh-header .wp-block-site-title { white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 601px) {
  .dh-header .wp-block-site-title { font-size: 17px !important; letter-spacing: .22em !important; }
  .dh-header .wp-block-navigation { gap: 20px !important; }
}
/* Sicherheitsnetz gegen von wpautop eingefügte Leerzeilen im Formular */
.dh-form br, .dh-form > p:empty, .wp-block-group:has(> .dh-form) > p:empty { display: none; }
.dh-form > p { margin: 0; }
/* Sprachumschalter exakt auf Höhe der Navigation */
.dh-header p:has(> .dh-lang), .dh-header .wp-block-shortcode:has(.dh-lang) { margin: 0 !important; display: flex; align-items: center; line-height: 1; }
.dh-lang { display: inline-flex; align-items: center; gap: .45em; font-size: 14px; font-weight: 500; letter-spacing: .2em; line-height: 1; }
.dh-lang > * { line-height: 1; }
.dh-header .wp-block-navigation-item__content { line-height: 1; }
.dh-header .wp-block-navigation-item__label { line-height: 1; }
/* eRecht24-Texte im Seitenstil */
.dh-legal-text h1 { display: none; }
.dh-legal-text h2 { font-size: var(--wp--preset--font-size--subtitle); margin-top: 2.2em; }
.dh-legal-text h3, .dh-legal-text h4 { font-family: var(--wp--preset--font-family--ui); font-size: 13px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--wp--preset--color--blood-bright); margin-top: 2em; }
.dh-legal-text p, .dh-legal-text li { color: var(--wp--preset--color--ash); }
.dh-legal-text a { word-break: break-word; }
/* Wortmarke oben links (fest „Dark Hollow Studios“, unabhängig vom Website-Titel) */
.dh-wordmark { margin: 0; font-family: var(--wp--preset--font-family--title); font-size: 22px; letter-spacing: .3em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.dh-wordmark a { color: var(--wp--preset--color--bone); text-decoration: none; text-shadow: 0 0 18px rgba(196,22,28,.6); }
