/* =====================================================================
   Jahreszeiten-Designs (Admin → Design): html[data-theme] + html[data-mode]
   normal | fruehling (+ ostern) | sommer | herbst | winter (+ xmas)
   Farben laufen nur ueber CSS-Variablen, Deko-Elemente setzt season.js ein.
   ===================================================================== */
:root { --bg-rgb: 248, 250, 252; }

/* ------------------------------ Fruehling ------------------------------ */
html[data-theme="fruehling"] {
  --em-50: #fdf2f8; --em-100: #fce7f3; --em-200: #fbcfe8; --em-400: #f472b6;
  --em-500: #e8509a; --em-600: #cf2f7f; --em-700: #a61f63;
  --teal-400: #a3e635; --teal-500: #65a30d; --teal-600: #4d7c0f; --teal-deep: #3b1830;
  --em-rgb: 232, 80, 154; --teal-rgb: 132, 204, 22; --tint-rgb: 253, 242, 248; --bg-rgb: 255, 250, 252;
  --accent-light: #f9a8d4; --accent-light2: #bef264;
  --grad: linear-gradient(135deg, #f472b6 0%, #cf2f7f 100%);
  --glow: 0 12px 30px -10px rgba(232, 80, 154, .5);
  --shadow-lg: 0 30px 60px -20px rgba(59, 24, 48, .28);
  --bg: #fffafc;
}
html[data-theme="fruehling"] .bonus, html[data-theme="fruehling"] .success-hero { background: linear-gradient(135deg, #a61f63 0%, #db2777 50%, #f472b6 100%); }
/* Ostern: Pastell Rosa, Flieder, Gelb */
html[data-mode="ostern"] {
  --grad: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
  --accent-light: #fde68a; --accent-light2: #c4b5fd;
  --glow: 0 12px 30px -10px rgba(167, 139, 250, .55);
}
html[data-mode="ostern"] .bonus, html[data-mode="ostern"] .success-hero { background: linear-gradient(135deg, #be185d 0%, #a855f7 55%, #f9a8d4 100%); }

/* ------------------------------ Sommer ------------------------------ */
html[data-theme="sommer"] {
  --em-50: #ecfeff; --em-100: #cffafe; --em-200: #a5f3fc; --em-400: #22d3ee;
  --em-500: #0891b2; --em-600: #0e7490; --em-700: #155e75;
  --teal-400: #fcd34d; --teal-500: #f59e0b; --teal-600: #d97706; --teal-deep: #0b2f3f;
  --em-rgb: 8, 145, 178; --teal-rgb: 245, 158, 11; --tint-rgb: 236, 254, 255; --bg-rgb: 251, 254, 255;
  --accent-light: #67e8f9; --accent-light2: #fde68a;
  --grad: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%);
  --glow: 0 12px 30px -10px rgba(8, 145, 178, .55);
  --shadow-lg: 0 30px 60px -20px rgba(11, 47, 63, .3);
  --bg: #fbfeff;
}
html[data-theme="sommer"] .bonus, html[data-theme="sommer"] .success-hero { background: linear-gradient(135deg, #0b4f6c 0%, #0891b2 55%, #f59e0b 130%); }

/* ------------------------------ Herbst ------------------------------ */
html[data-theme="herbst"] {
  --em-50: #fff7ed; --em-100: #ffedd5; --em-200: #fed7aa; --em-400: #fb923c;
  --em-500: #ea7317; --em-600: #c2560c; --em-700: #9a3f0a;
  --teal-400: #f59e0b; --teal-500: #d97706; --teal-600: #b45309; --teal-deep: #3a2115;
  --em-rgb: 234, 115, 23; --teal-rgb: 217, 119, 6; --tint-rgb: 255, 244, 230; --bg-rgb: 255, 250, 243;
  --accent-light: #fdba74; --accent-light2: #fcd34d;
  --grad: linear-gradient(135deg, #ea7317 0%, #b45309 100%);
  --glow: 0 12px 30px -10px rgba(234, 115, 23, .55);
  --shadow-lg: 0 30px 60px -20px rgba(58, 33, 21, .3);
  --bg: #fffaf3;
}
html[data-theme="herbst"] .bonus, html[data-theme="herbst"] .success-hero { background: linear-gradient(135deg, #7c2d12 0%, #b45309 55%, #d97706 100%); }

/* ------------------------------ Winter ------------------------------ */
html[data-theme="winter"] {
  --em-50: #f0f7ff; --em-100: #dbeafe; --em-200: #bfdbfe; --em-400: #60a5fa;
  --em-500: #2f6fb5; --em-600: #245a96; --em-700: #1c4677;
  --teal-400: #7dd3fc; --teal-500: #38bdf8; --teal-600: #0284c7; --teal-deep: #0f2a44;
  --em-rgb: 47, 111, 181; --teal-rgb: 56, 189, 248; --tint-rgb: 240, 247, 255; --bg-rgb: 247, 251, 255;
  --accent-light: #bae6fd; --accent-light2: #e0f2fe;
  --grad: linear-gradient(135deg, #3b82c4 0%, #1e4f8a 100%);
  --glow: 0 12px 30px -10px rgba(47, 111, 181, .5);
  --shadow-lg: 0 30px 60px -20px rgba(15, 42, 68, .3);
  --bg: #f7fbff;
}
html[data-theme="winter"] .bonus, html[data-theme="winter"] .success-hero { background: linear-gradient(135deg, #0f2a44 0%, #1e4f8a 55%, #60a5fa 120%); }
/* Weihnachten: Rot, Tannengruen, Gold */
html[data-mode="xmas"] {
  --em-50: #fef2f2; --em-100: #fee2e2; --em-200: #fecaca; --em-400: #f87171;
  --em-500: #d62828; --em-600: #b91c1c; --em-700: #8f1414;
  --teal-400: #4ade80; --teal-500: #15803d; --teal-600: #166534; --teal-deep: #0e2f22;
  --em-rgb: 214, 40, 40; --teal-rgb: 21, 128, 61; --tint-rgb: 254, 243, 243; --bg-rgb: 255, 250, 250;
  --accent-light: #fcd34d; --accent-light2: #fde68a;
  --grad: linear-gradient(135deg, #e03131 0%, #a51111 100%);
  --glow: 0 12px 30px -10px rgba(214, 40, 40, .55);
  --shadow-lg: 0 30px 60px -20px rgba(14, 47, 34, .32);
  --bg: #fffafa;
}
html[data-mode="xmas"] .bonus, html[data-mode="xmas"] .success-hero { background: linear-gradient(135deg, #0e2f22 0%, #166534 55%, #15803d 100%); }
html[data-mode="xmas"] .bonus .btn-white { color: #b91c1c; }
html[data-mode="xmas"] .footer { background: linear-gradient(180deg, #0e2f22, #0a2219); }

/* =====================================================================
   Gemeinsame Saison-Ebenen
   ===================================================================== */
/* Fortschrittsbalken beim Scrollen */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 120; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); box-shadow: 0 0 10px rgba(var(--em-rgb), .6); pointer-events: none; }
[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* Fotohintergrund im Kopfbereich */
html[data-theme]:not([data-theme="normal"]) .hero { position: relative; isolation: isolate; overflow: hidden; }
.season-hero-bg { position: absolute; inset: -60px 0 -40px 0; z-index: -2; background-size: cover; background-position: right center; transform: translate3d(0, var(--py, 0px), 0) scale(1.06); will-change: transform; animation: bg-in 1.6s ease both; }
.season-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), .95) 0%, rgba(var(--bg-rgb), .82) 32%, rgba(var(--bg-rgb), .22) 58%, rgba(var(--bg-rgb), 0) 80%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0) 55%, rgba(var(--bg-rgb), 1) 100%);
}
[dir="rtl"] .season-hero-bg { transform: translate3d(0, var(--py, 0px), 0) scale(1.06) scaleX(-1); }
@keyframes bg-in { from { opacity: 0; filter: blur(8px); } }

/* Zweig oben in der Ecke, wiegt sich im Wind */
.season-branch { position: absolute; top: -14px; inset-inline-end: -30px; z-index: 3; width: min(40vw, 500px); pointer-events: none; transform-origin: 100% 0; transform: translate3d(0, var(--by, 0px), 0); animation: branch-in 1.4s cubic-bezier(.2, .8, .2, 1) both; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .14)); }
.season-branch img { width: 100%; height: auto; transform: scaleX(-1); transform-origin: 50% 0; animation: branch-sway 7s ease-in-out infinite; }
[dir="rtl"] .season-branch img { transform: none; }
@keyframes branch-in { from { opacity: 0; transform: translate3d(40px, -60px, 0) rotate(8deg); } }
@keyframes branch-sway { 0%, 100% { rotate: 0deg; } 50% { rotate: -2.2deg; } }

/* Teilchen-Leinwand (Blaetter, Blueten, Schnee, Lichtreflexe) */
.season-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* Sommer: warmes Sonnenlicht oben rechts */
html[data-theme="sommer"] .hero::before { content: ""; position: absolute; z-index: -1; width: 560px; height: 560px; top: -260px; inset-inline-end: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 170, .75), rgba(255, 214, 102, .25) 40%, transparent 70%); animation: sun-pulse 6s ease-in-out infinite; pointer-events: none; }
@keyframes sun-pulse { 50% { transform: scale(1.08); opacity: .85; } }

/* Winter: Schneehauben auf Karten */
.snowcap { position: absolute; left: -3px; right: -3px; top: -9px; height: 20px; z-index: 4; pointer-events: none; border-radius: 14px 14px 50% 50% / 14px 14px 10px 10px;
  background:
    radial-gradient(ellipse 22% 85% at 12% 60%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 18% 75% at 38% 55%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 25% 95% at 64% 60%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 18% 70% at 88% 55%, #fff 60%, transparent 62%),
    linear-gradient(#fff, #fff) 0 0 / 100% 55% no-repeat;
  filter: drop-shadow(0 3px 2px rgba(120, 150, 190, .35)); }
.snowcap::after { content: ""; position: absolute; left: 18%; top: 92%; width: 6px; height: 12px; border-radius: 0 0 6px 6px; background: linear-gradient(#fff, rgba(220, 235, 255, .7)); box-shadow: 120px 2px 0 -1px #fff, 210px -1px 0 0 rgba(255, 255, 255, .9); }
.plan, .hstat, .payout-card, .agent-card, .clients-card, .rv-summary { overflow: visible; }

/* ------------------------------ Weihnachten ------------------------------ */
.xmas-garland { position: absolute; left: 0; right: 0; bottom: -30px; height: 50px; pointer-events: none; z-index: 2;
  background-repeat: repeat-x; background-size: auto 50px; background-position: center top; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); }
.xmas-garland::after { content: ""; position: absolute; inset: 0; background: inherit; mix-blend-mode: screen; opacity: 0; animation: garland-glow 2.8s ease-in-out infinite; filter: brightness(1.6) saturate(1.3); }
@keyframes garland-glow { 50% { opacity: .55; } }
html[data-mode="xmas"] .topbar { position: sticky; }
.xmas-hat { position: absolute; pointer-events: none; z-index: 6; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }
.agent-photo img.xmas-hat, .agent-photo img.xmas-hat.on-photo { width: 62%; height: auto; object-fit: contain; border-radius: 0; border: 0; box-shadow: none; position: absolute; top: -21%; left: -20%; transform: rotate(-22deg); animation: hat-wiggle 5s ease-in-out infinite; transform-origin: 70% 90%; }
.xmas-hat.on-logo { width: 30px; top: -15px; left: -9px; transform: rotate(-22deg); }
.xmas-hat.on-plan { width: 78px; top: -40px; inset-inline-end: -16px; transform: rotate(16deg); }
@keyframes hat-wiggle { 0%, 100% { rotate: 0deg; } 50% { rotate: 4deg; } }
.brand { position: relative; }
.xmas-baubles { position: absolute; top: -10px; width: 120px; pointer-events: none; z-index: 2; transform-origin: 50% 0; animation: bauble-swing 4.5s ease-in-out infinite; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .18)); }
.xmas-baubles.left { left: 2%; }
.xmas-baubles.right { right: 2%; animation-delay: -2s; width: 100px; }
@keyframes bauble-swing { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }
.xmas-gifts { position: absolute; width: 190px; bottom: 4px; inset-inline-end: 24px; z-index: 2; pointer-events: none; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .3)); }
.section-head { position: relative; }
#packages .wrap { position: relative; }
/* Fliegendes Rentier mit Glitzerspur */
.reindeer-fly { position: fixed; top: 18vh; left: 0; width: clamp(150px, 20vw, 260px); z-index: 60; pointer-events: none; opacity: 0; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .22)); }
.reindeer-fly img { width: 100%; display: block; animation: deer-bob .6s ease-in-out infinite alternate; }
.reindeer-fly::before { content: ""; position: absolute; top: 45%; right: 92%; width: 220px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, rgba(255, 215, 90, .9)); filter: blur(1px); box-shadow: 0 0 12px 3px rgba(255, 215, 90, .55); }
.reindeer-fly.go { animation: deer-fly 7.5s linear forwards; }
@keyframes deer-fly {
  0% { opacity: 0; transform: translate3d(-30vw, 6vh, 0) rotate(-6deg); }
  8% { opacity: 1; }
  50% { transform: translate3d(45vw, -4vh, 0) rotate(-2deg); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(120vw, 4vh, 0) rotate(-6deg); }
}
@keyframes deer-bob { from { transform: translateY(-4px) rotate(-1deg); } to { transform: translateY(5px) rotate(1.5deg); } }
[dir="rtl"] .reindeer-fly img { transform: scaleX(-1); }

/* ------------------------------ Ostern ------------------------------ */
.easter-bunny { position: absolute; z-index: 3; pointer-events: none; width: 150px; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .22)); transform-origin: 50% 100%; }
.easter-bunny.in-packages { top: -118px; inset-inline-end: 3%; }
.easter-bunny.in-hero { width: 118px; bottom: -22px; inset-inline-end: -34px; z-index: 4; }
.easter-bunny.hop { animation: bunny-hop 1.1s cubic-bezier(.3, .7, .4, 1) 2; }
@keyframes bunny-hop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0) scale(1.06, .9); }
  45% { transform: translateY(-46px) scale(.96, 1.05); }
  75% { transform: translateY(0) scale(1.05, .92); }
}
.easter-nest { position: absolute; width: 150px; bottom: -34px; inset-inline-start: -26px; z-index: 4; pointer-events: none; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .2)); }
.agent-card { position: relative; }
.easter-egg { position: absolute; width: 44px; bottom: -14px; inset-inline-start: -12px; z-index: 4; pointer-events: none; transform: rotate(-16deg); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .22)); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.plan:hover .easter-egg { transform: rotate(-4deg) translateY(-6px) scale(1.08); }

/* Deko darf nie ueber den Seitenrand hinausragen (clip erzeugt keinen Scrollbereich) */
html[data-theme]:not([data-theme="normal"]) main > section, html[data-mode] .topbar { overflow-x: clip; }
html[data-mode="xmas"] .topbar { overflow: visible; overflow-x: clip; overflow-y: visible; }
[dir="rtl"] .xmas-hat.on-plan { inset-inline-end: -4px; }

/* Sanftes Einfliegen der Deko beim Scrollen */
.deco-pop { opacity: 0; transform: translateY(24px) scale(.85); transition: opacity .8s ease, transform .9s cubic-bezier(.2, 1.4, .4, 1); }
.deco-pop.in { opacity: 1; transform: none; }
.xmas-hat.deco-pop.in.on-photo { transform: rotate(-22deg); }
.xmas-hat.deco-pop.in.on-plan { transform: rotate(16deg); }
.easter-egg.deco-pop.in { transform: rotate(-16deg); }

/* ------------------------------ Handy ------------------------------ */
@media (max-width: 920px) {
  .season-branch { width: 58vw; top: -8px; inset-inline-end: -40px; opacity: .92; }
  .season-hero-bg { background-position: 70% center; }
  .season-hero-bg::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), .88) 0%, rgba(var(--bg-rgb), .8) 45%, rgba(var(--bg-rgb), .55) 70%, rgba(var(--bg-rgb), 1) 100%); }
  .xmas-baubles.right, .easter-bunny.in-hero { display: none; }
  .xmas-gifts { width: 120px; bottom: 4px; inset-inline-end: 8px; opacity: .95; }
}
@media (max-width: 600px) {
  .season-branch { width: 64vw; }
  .xmas-garland { height: 36px; background-size: auto 36px; bottom: -22px; }
  .xmas-hat.on-plan { width: 60px; top: -32px; }
  .xmas-baubles.left { width: 74px; }
  .easter-bunny.in-packages { width: 100px; top: -80px; }
  .easter-nest { width: 110px; bottom: -26px; inset-inline-start: -10px; }
  .reindeer-fly { top: 14vh; }
}

/* Weniger Bewegung gewuenscht: nur ruhige Deko */
@media (prefers-reduced-motion: reduce) {
  .season-canvas, .reindeer-fly { display: none; }
  .season-branch img, .xmas-hat, .xmas-baubles, .xmas-garland::after, html[data-theme="sommer"] .hero::before { animation: none !important; }
  .season-hero-bg, .season-branch { animation: none; }
  .deco-pop { opacity: 1; transform: none; transition: none; }
}
html[data-fx="0"] .season-canvas, html[data-fx="0"] .reindeer-fly { display: none; }
html[data-fx="0"] .season-branch img, html[data-fx="0"] .xmas-hat, html[data-fx="0"] .xmas-baubles, html[data-fx="0"] .xmas-garland::after { animation: none !important; }
