/* Weihnachts-Deko auf /advent/. Alles hier ist Schmuck: nur transform/opacity bewegen sich,
   "Animationen anhalten" (html[data-calm]) und reduzierte Bewegung stellen alles still. */
body.stg-advent section.adv-hero { --land: clamp(150px, 30vh, 270px); position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; min-height: 100vh; min-height: 100svh; padding-top: clamp(6.5rem, 12vh, 9rem); padding-bottom: calc(var(--land) * .8 + 1rem); }
body.stg-advent section.adv-hero > .wrap { position: relative; z-index: 3; width: 100%; }
/* Der Stil der Website setzt Kinder der Sektion auf "relative" – der Schmuck muss darüber liegen bleiben. */
body.stg-advent section.adv-hero > .adv-deko, body.stg-advent section.adv-hero > .adv-schnee, body.stg-advent section.adv-hero > .adv-runter, body.stg-advent section.adv-hero > .adv-pause,
body.stg-advent section.adv-sec > .adv-deko, body.stg-advent section.adv-ende > .adv-deko { position: absolute; margin: 0; max-width: none; }
.adv-deko { position: absolute; pointer-events: none; }
.adv-himmel { inset: 0; z-index: 0; }
.adv-schnee { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.adv-stern { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .55; animation: adv-funkeln 4s ease-in-out infinite; }
.adv-stern.rot { background: #CC0028; width: 4px; height: 4px; }
.adv-mond { position: absolute; top: 15%; right: 9%; width: clamp(56px, 8vw, 110px); height: auto; overflow: visible; }
.adv-schlitten { position: absolute; top: 13%; left: 0; width: clamp(110px, 16vw, 220px); opacity: 0; transform: translateX(-120%); animation: adv-flug 24s linear 3s infinite; }
@keyframes adv-flug { 0% { transform: translate(-120%, 20px); opacity: 0; } 5% { opacity: .8; } 20% { transform: translate(45vw, -14px); } 40% { transform: translate(105vw, 4px); opacity: .8; } 41%, 100% { transform: translate(105vw, 4px); opacity: 0; } }
@keyframes adv-funkeln { 0%, 100% { opacity: .2; } 50% { opacity: .9; } }

/* Lichterkette */
.adv-kette { left: 0; right: 0; top: 0; height: 74px; z-index: 2; }
.adv-kette svg { display: block; width: 100%; height: 74px; }
.adv-kette .birne { animation: adv-lampe 2.8s ease-in-out infinite; }
.adv-kette .birne:nth-of-type(3n+2) { animation-delay: .9s; }
.adv-kette .birne:nth-of-type(3n) { animation-delay: 1.8s; }
@keyframes adv-lampe { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* Landschaft unten: Nürnberg, Tannen, Schneehügel */
.adv-land { left: 0; right: 0; bottom: -1px; height: var(--land); z-index: 2; }
.adv-land svg { position: absolute; display: block; }
.adv-stadt { left: 0; bottom: 30%; width: 100%; height: 70%; }
.adv-huegel { left: 0; bottom: 0; width: 100%; height: 52%; }
.adv-huegel .vorn { fill: var(--adv-boden, #F2F2F2); }
.adv-wald { overflow: visible; bottom: 16%; height: 88%; width: auto; max-width: 34%; }
.adv-wald.links { left: -1%; }
.adv-wald.rechts { right: -1%; }
.adv-wald .kugel { animation: adv-lampe 3.4s ease-in-out infinite; }
.adv-wald .kugel:nth-of-type(2n) { animation-delay: 1.7s; }
@media (max-width: 40rem) { .adv-wald { height: 62%; bottom: 20%; max-width: 31%; } .adv-mond { top: 8%; right: 6%; } .adv-schlitten { top: 9%; } }

/* Scroll-Hinweis */
.adv-runter { position: fixed !important; z-index: 28; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .3rem; box-sizing: border-box; margin: 0; padding: .8rem 2.6rem .85rem; border: 0; border-radius: 2.4rem; background: rgba(20,12,15,.35); -webkit-backdrop-filter: blur(6px) saturate(1.8) brightness(1.06); backdrop-filter: blur(6px) saturate(1.8) brightness(1.06); box-shadow: 0 10px 28px rgba(0,0,0,.28); cursor: pointer; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); font: 700 .75rem/1.4 var(--font-display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: opacity .4s, visibility .4s, background-color .35s; }
.adv-runter.brechung { -webkit-backdrop-filter: url(#adv-glas) blur(3px) saturate(2.2); backdrop-filter: url(#adv-glas) blur(3px) saturate(2.2); }
/* Glasrand und Schimmer wie bei der Navigation der Website */
.adv-runter::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; box-shadow: inset 1.5px 1.5px 0 rgba(255,255,255,.75), inset -1.5px -1.5px 0 rgba(255,255,255,.4), inset 0 0 22px rgba(255,255,255,.22), inset 0 -10px 18px -10px rgba(255,255,255,.35); background: linear-gradient(115deg, rgba(255,255,255,.28) 0, rgba(255,255,255,0) 28%, rgba(255,255,255,0) 72%, rgba(255,255,255,.16) 100%); }
/* Über hellem Grund dunkleres Glas, damit Weiß lesbar bleibt */
.adv-runter.hell { background: rgba(20,12,15,.64); }
.adv-runter i { position: relative; display: block; width: 22px; height: 34px; border: 2px solid currentColor; border-radius: 14px; }
.adv-runter i::after { content: ''; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 3px; background: #CC0028; animation: adv-rad 1.8s ease-in-out infinite; }
.adv-runter b { display: block; width: 9px; height: 9px; border-right: 2px solid #CC0028; border-bottom: 2px solid #CC0028; transform: rotate(45deg); animation: adv-pfeil 1.8s ease-in-out infinite; }
@keyframes adv-rad { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(11px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes adv-pfeil { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }
.adv-runter.weg { opacity: 0; visibility: hidden; pointer-events: none; }
html[data-calm="1"] .adv-runter { -webkit-backdrop-filter: none; backdrop-filter: none; background: #0F0A0C; }
@media (prefers-reduced-transparency: reduce) { .adv-runter { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #0F0A0C; } }
.adv-pause { position: absolute; z-index: 4; left: .9rem; top: 5.6rem; padding: .35rem .75rem; border-radius: 2rem; border: 1px solid rgba(255,255,255,.35); background: rgba(10,5,6,.55); color: #fff; font: 600 .75rem/1.5 var(--font-body, sans-serif); cursor: pointer; }
.adv-runter:focus-visible, .adv-pause:focus-visible { outline: 3px solid #CC0028; outline-offset: 3px; }

/* Türchen: Schneehauben */
body.stg-advent .stg-adv .tueren { scroll-margin-top: 7rem; }
body.stg-advent .stg-adv .tuer { position: relative; }
body.stg-advent .stg-adv .tuer::before { content: ''; position: absolute; z-index: 4; left: -2px; right: -2px; top: -7px; height: 22px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 22' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M2 12C2 4 8 3 16 4C24 0 34 1 41 4C52 0 64 1 71 4C82 1 98 2 98 12C98 16 94 16 92 12C89 9 85 10 84 13C83 20 77 20 76 13C74 8 66 9 61 11C57 12 55 9 50 9C44 9 42 11 38 10C34 9 32 11 31 15C30 21 25 21 24 15C23 10 18 9 13 11C9 12 8 17 5 17C3 17 2 15 2 12Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 2px 1px rgba(26,18,21,.22)); }
body.stg-advent .stg-adv .tuer:nth-child(even)::before { transform: scaleX(-1); }

/* Kugeln neben der Überschrift, Tannen am Ende */
body.stg-advent section.adv-sec, body.stg-advent section.adv-ende { position: relative; }
.adv-kugeln { color: #1A1215; top: 0; right: 4%; width: clamp(96px, 20vw, 250px); }
.adv-kugeln > span { position: absolute; top: 0; display: block; width: 24%; transform-origin: 50% 0; animation: adv-pendel 6s ease-in-out infinite alternate; }
.adv-kugeln > span:nth-child(2) { animation-delay: -2s; }
.adv-kugeln > span:nth-child(3) { animation-delay: -4s; }
.adv-kugeln svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes adv-pendel { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
body.stg-advent section.adv-ende { overflow: hidden; padding-bottom: clamp(9rem, 14vw, 7rem); }
body.stg-advent section.adv-ende > .wrap { position: relative; z-index: 1; }
html[data-theme=dark] .adv-kugeln, html[data-theme=dark] .adv-ende-wald { color: #fff; }
.adv-ende-wald { color: #1A1215; bottom: 0; height: clamp(110px, 17vw, 240px); width: auto; display: block; }
.adv-ende-wald.links { left: 0; }
.adv-ende-wald.rechts { right: 0; }
@media (max-width: 47.9rem) { .adv-kugeln { right: 2%; width: 92px; } .adv-ende-wald { height: 120px; } }

/* Alles still */
.adv-still .adv-deko, .adv-still .adv-deko *, .adv-still .adv-runter *, html[data-calm="1"] .adv-deko, html[data-calm="1"] .adv-deko *, html[data-calm="1"] .adv-runter * { animation-play-state: paused !important; }
html[data-calm="1"] .adv-schlitten { display: none; }
html[data-calm="1"] .adv-runter *, html[data-calm="1"] .adv-runter i::after { animation: none !important; }
html[data-calm="1"] .adv-pause { display: none; }
@media (prefers-reduced-motion: reduce) {
  .adv-stern, .adv-kette .birne, .adv-wald .kugel, .adv-runter i::after, .adv-runter b, .adv-kugeln > span { animation: none; }
  .adv-schlitten, .adv-pause { display: none; }
  .adv-runter { transition: none; }
}
/* Am Handy liegt unten die Leiste der Website: Scroll-Hinweis darüber setzen. */
@media (max-width: 62rem) { .adv-runter { bottom: 5.4rem; padding: .6rem 2.1rem .65rem; border-radius: 2rem; } .adv-runter i { height: 28px; } }

/* Countdown als Klappkarten */
body.stg-advent section.adv-hero .stg-adv .uhr-felder > span { background: none; border: 0; padding: 0; }
.adv-nur-vorlesen { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.adv-klapp { position: relative; height: 1.7em; margin-bottom: .45rem; font: 800 clamp(1.6rem, 6vw, 2.5rem)/1.7em var(--font-display); font-variant-numeric: tabular-nums; color: #fff; perspective: 260px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.5)); }
.adv-klapp .halb { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; }
.adv-klapp .halb > div { height: 200%; text-align: center; }
.adv-klapp .k-o { top: 0; border-radius: .6rem .6rem 0 0; background: #2A0A12; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); transform-origin: 50% 100%; }
.adv-klapp .k-u { bottom: 0; border-radius: 0 0 .6rem .6rem; background: #1A070C; transform-origin: 50% 0; }
.adv-klapp .k-u > div { transform: translateY(-50%); }
.adv-klapp .blatt { visibility: hidden; }
.adv-klapp .k-o.blatt { z-index: 2; }
.adv-klapp .k-u.blatt { z-index: 2; }
.adv-klapp::after { content: ''; position: absolute; z-index: 3; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: #0A0506; }
.adv-klapp::before { content: ''; position: absolute; z-index: 4; left: -3px; right: -3px; top: calc(50% - 5px); height: 10px; background: linear-gradient(#CC0028, #CC0028) left / 5px 100% no-repeat, linear-gradient(#CC0028, #CC0028) right / 5px 100% no-repeat; }

/* Abschluss: dunkel, mit Foto im Türbogen */
body.stg-advent section.adv-ende { --adv-unten: #111113; position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(90% 70% at 24% 12%, #3A000C 0%, #151012 55%, #151012 100%); color: #fff; padding-top: clamp(6rem, 11vw, 8.5rem); padding-bottom: clamp(2.2rem, 3.4vw, 3.1rem); }
body.stg-advent section.adv-ende > .wrap { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: end; text-align: center; }
.adv-ende-text { min-width: 0; align-self: center; }
body.stg-advent section.adv-ende .eb { color: #fff; margin: 0 0 1rem; }
body.stg-advent section.adv-ende .h2x { color: #fff; font-size: clamp(2.5rem, 7vw, 5.4rem); line-height: .98; margin: 0 auto 1.2rem; text-transform: uppercase; }
body.stg-advent section.adv-ende .adv-ende-text p { color: #D9CDD0; margin: 0; font-size: 1.1rem; }
body.stg-advent section.adv-ende .adv-knoepfe { margin-top: 2rem; align-items: center; }
.adv-ende .adv-knoepfe a.btn-blob { text-decoration: none !important; }
.adv-portrait { position: relative; justify-self: center; width: min(100%, 360px); aspect-ratio: 300 / 316; margin: 0 0 -1.6rem; }
/* Roter Schein wie auf dem Porträt im Menü „Über mich“ (Werte von dort). */
.adv-portrait::before { content: ""; position: absolute; left: -14%; right: -14%; top: 8%; bottom: -2%; background: radial-gradient(closest-side, rgba(204,0,40,.5), rgba(204,0,40,.12) 62%, transparent); filter: blur(6px); pointer-events: none; }
.adv-portrait img { position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: auto; max-width: none; }
.adv-portrait .adv-sterne { position: absolute; inset: 0; z-index: 1; }
.adv-portrait .adv-sterne svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (min-width: 52rem) {
  body.stg-advent section.adv-ende > .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); text-align: left; }
  body.stg-advent section.adv-ende .h2x { margin-left: 0; }
  body.stg-advent section.adv-ende .adv-knoepfe { justify-content: flex-start; }
  .adv-portrait { width: min(100%, 400px); margin-top: 7.7rem; }
}
body.stg-advent section.adv-ende > .adv-ende-himmel { inset: 0; z-index: 0; }
body.stg-advent section.adv-ende > .adv-ende-kette { position: absolute; left: 0; right: 0; top: 0; z-index: 2; }
body.stg-advent section.adv-ende > .adv-ende-huegel { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(46px, 6vw, 70px); z-index: 4; }
.adv-ende-huegel svg { display: block; width: 100%; height: 100%; }
.adv-ende-huegel .vorn { fill: var(--adv-unten); }
body.stg-advent section.adv-ende > .adv-ende-wald { z-index: 2; bottom: clamp(24px, 3.4vw, 40px); color: #fff; opacity: .9; }
@media (max-width: 62rem) { body.stg-advent section.adv-ende > .adv-ende-wald { height: 105px; } }
.adv-still .adv-ende .adv-deko, .adv-still .adv-ende .adv-deko *, html[data-calm="1"] .adv-ende .adv-deko, html[data-calm="1"] .adv-ende .adv-deko * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .adv-ende .adv-stern, .adv-ende .birne { animation: none; } }
/* Niedrige Handys: Hinweis flach, damit er den Countdown nicht verdeckt */
@media (max-width: 62rem) and (max-height: 700px) { .adv-runter { padding: .5rem 1.4rem; } .adv-runter i, .adv-runter b { display: none; } }
