/* =========================
   THEME VARIABLES (Default)
   ========================= */
:root{
  --bg:#eef3f7;
  --bg-rad-1:#f7fbfe;
  --bg-rad-2:#dcebf3;

  --card:rgba(255,255,255,.82);
  --card-solid:#ffffff;
  --border:#d4e2ec;

  --accent:#3f7f96;
  --accent2:#7fb6c9;

  --text:#1e2a36;
  --muted:#5f7285;

  --shadow:0 18px 40px rgba(0,0,0,.12);
  --shadow-soft:0 12px 34px rgba(0,0,0,.10);

  --quote-bg-top:#ffffff;
  --quote-bg-bottom:#f6fbfe;
  --quote-bar:var(--accent);

  --hero-grad-a:var(--accent);
  --hero-grad-b:var(--accent2);

  --toggle-bg:rgba(255,255,255,.18);
  --toggle-border:rgba(255,255,255,.28);
  --toggle-knob:#ffffff;

  --union-on:0;
}

/* =========================
   UNION THEME (Premium)
   ========================= */
html[data-union="1"]{
  --union-on:1;

  --bg:#f4f4f5;
  --bg-rad-1:#ffffff;
  --bg-rad-2:#f0e8ea;

  --card:rgba(255,255,255,.90);
  --card-solid:#ffffff;
  --border:#ded5d7;

  --accent:#b11226;
  --accent2:#1f1f23;

  --text:#151519;
  --muted:#6a5e63;

  --shadow:0 22px 60px rgba(20,10,12,.18);
  --shadow-soft:0 14px 44px rgba(20,10,12,.14);

  --quote-bg-top:#ffffff;
  --quote-bg-bottom:#fbf6f7;
  --quote-bar:var(--accent);

  --hero-grad-a:#b11226;
  --hero-grad-b:#141417;

  --toggle-bg:rgba(255,255,255,.16);
  --toggle-border:rgba(255,255,255,.26);
  --toggle-knob:linear-gradient(180deg,#fff,#f6d9dd);
}

/* =========================
   BASE
   ========================= */
*{box-sizing:border-box}

body{
  margin:0;
  min-height:100vh;
  font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 10%, var(--bg-rad-1), transparent 60%),
    radial-gradient(circle at 80% 90%, var(--bg-rad-2), transparent 55%),
    var(--bg);
  color:var(--text);
  display:grid;
  place-items:center;
  padding:32px;
}

/* Premium container spacing */
.wrapper{
  width:min(1040px,100%);
  display:grid;
  gap:18px;
}

/* =========================
   HERO
   ========================= */
.hero{
  width:100%;
  background: linear-gradient(135deg, var(--hero-grad-a), var(--hero-grad-b));
  border-radius:30px;
  padding:52px 38px 82px;
  color:white;
  position:relative;
  box-shadow:var(--shadow);
  overflow:hidden;

  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

/* Soft “spotlight” */
.hero::before{
  content:"";
  position:absolute;
  inset:-30%;
  background:
    radial-gradient(circle at 50% 15%, rgba(255,255,255,.40), transparent 50%),
    radial-gradient(circle at 15% 55%, rgba(255,255,255,.16), transparent 55%);
  pointer-events:none;
}

/* Default: very subtle dots */
.hero::after{
  content:"";
  position:absolute;
  inset:auto -20% -40% -20%;
  height:60%;
  background: radial-gradient(circle, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size:18px 18px;
  opacity:.20;
  pointer-events:none;
}

/* Union-mode: we keep dots subtle, stripes provide the character */
html[data-union="1"] .hero::after{
  opacity:.10;
}

/* Union-mode: premium scarf stripes layer (animated) */
.hero .stripes{ display:none; }
.hero .stripes2{ display:none; }

/* ✅ WICHTIG: Streifen beginnen deutlich UNTER dem Switch/Text */
html[data-union="1"] .hero .stripes{
  display:block;
  position:absolute;

  /* Start unten (kein Streifen direkt unter dem Switch) */
  inset: 72% -28% auto -28%;
  height:34%;

  /* Premium: etwas dezenter */
  opacity:.20;

  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.70) 0px,
      rgba(255,255,255,.70) 9px,
      rgba(255,255,255,0) 9px,
      rgba(255,255,255,0) 22px
    );
  filter: blur(.15px);
  transform: translate3d(0,0,0);
  pointer-events:none;
  animation: scarfMove 12s linear infinite;

  /* Soft Fade nach oben (Premium) */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
}

html[data-union="1"] .hero .stripes2{
  display:block;
  position:absolute;

  inset: 76% -34% auto -34%;
  height:30%;
  opacity:.11;

  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,.70) 0px,
      rgba(255,255,255,.70) 6px,
      rgba(255,255,255,0) 6px,
      rgba(255,255,255,0) 18px
    );
  filter: blur(.25px);
  transform: translate3d(0,0,0);
  pointer-events:none;
  animation: scarfMove2 18s linear infinite;

  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 40%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 40%, #000 100%);
}

@keyframes scarfMove{
  from { background-position: 0 0; }
  to   { background-position: 260px 0; }
}
@keyframes scarfMove2{
  from { background-position: 0 0; }
  to   { background-position: -320px 0; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  html[data-union="1"] .hero .stripes,
  html[data-union="1"] .hero .stripes2{
    animation:none !important;
  }
}

/* Premium “noise” texture (no image file) */
.hero .noise{
  position:absolute;
  inset:0;
  opacity:.10;
  pointer-events:none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035), rgba(255,255,255,.035) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.020), rgba(0,0,0,.020) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: overlay;
}

/* Elegant scarf band */
.hero .scarf-band{ display:none; }
html[data-union="1"] .hero .scarf-band{
  display:block;
  position:absolute;
  left:-22%;
  right:-22%;
  bottom:14px; /* etwas tiefer, weg vom Switch */
  height:10px;
  opacity:.70; /* dezenter */
  background:
    linear-gradient(90deg,
      transparent,
      rgba(255,255,255,.55),
      rgba(255,255,255,.55),
      transparent
    );
  transform: rotate(-2deg);
  border-radius:999px;
  filter: blur(.15px);
  pointer-events:none;
}

.hero h1{
  margin:0 0 14px;
  font-size:clamp(28px,3.2vw,44px);
  max-width:860px;
  line-height:1.10;
  letter-spacing:-0.02em;
  position:relative;
  z-index:2;
}

.hero h1 .hi{
  color: color-mix(in srgb, #ffffff);
  text-shadow: 0 2px 0 rgba(0,0,0,.08);
}

.hero p{
  margin:0;
  max-width:820px;
  font-size:17px;
  line-height:1.60;
  opacity:.95;
  position:relative;
  z-index:2;
}

/* Toggle */
.hero-controls{
  margin-top:18px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
  z-index:3; /* ✅ sicher über allen Deko-Layern */
  position:relative;
}

.toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  backdrop-filter: blur(6px);
  user-select:none;
}

.toggle label{
  font-size:14px;
  opacity:.95;
}

.switch{
  width:46px;
  height:26px;
  border-radius:999px;
  background: rgba(255,255,255,.30);
  border: 1px solid rgba(255,255,255,.35);
  position:relative;
  cursor:pointer;
  outline:none;
}

.switch:focus{
  box-shadow:0 0 0 3px rgba(255,255,255,.22);
}

.knob{
  width:22px; height:22px;
  border-radius:50%;
  background: var(--toggle-knob);
  position:absolute;
  top:1px; left:1px;
  transition: transform .2s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
}

html[data-union="1"] .knob{
  transform: translateX(20px);
}

/* =========================
   CARD
   ========================= */
.card{
  width:min(860px,100%);
  margin-top:-60px;
  justify-self:center;

  background:var(--card);
  backdrop-filter: blur(8px);
  border:1px solid var(--border);
  border-radius:28px;
  padding:34px;
  box-shadow:var(--shadow-soft);
}

/* Countdown */
.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin:10px 0 28px;
}

.tile{
  background:var(--card-solid);
  border-radius:20px;
  padding:18px 12px 24px;
  text-align:center;
  border:1px solid var(--border);
  position:relative;
  overflow:hidden;
}

.tile::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:20px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 10%, transparent));
  pointer-events:none;
}

.tile::after{
  content:"";
  position:absolute;
  left:22%;
  right:22%;
  bottom:10px;
  height:3px;
  border-radius:2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 70%, rgba(0,0,0,.2)), transparent);
  opacity:.70;
}
html[data-union="1"] .tile::after{
  opacity:.95;
  background: linear-gradient(90deg, transparent, rgba(177,18,38,.78), transparent);
}

.num{
  font-size:44px;
  font-weight:780;
  color:var(--accent);
}
.lbl{
  font-size:13px;
  color:var(--muted);
  margin-top:4px;
  letter-spacing:.06em;
}

/* Quote */
.quote{
  background: linear-gradient(180deg, var(--quote-bg-top), var(--quote-bg-bottom));
  border-left:6px solid var(--quote-bar);
  border-radius:20px;
  padding:22px 22px 20px;
  font-size:18px;
  line-height:1.60;
  position:relative;
  overflow:hidden;
}

.quote::before{
  content:"“";
  position:absolute;
  top:-18px;
  left:16px;
  font-size:72px;
  opacity:.16;
  color: color-mix(in srgb, var(--accent2) 55%, #ffffff 45%);
}

/* Union-mode: abstract stadium light / ball motif */
html[data-union="1"] .quote::before{
  content:"";
  width:120px;
  height:120px;
  position:absolute;
  top:-52px;
  left:-34px;
  opacity:.26;
  background:
    radial-gradient(circle at 60% 45%, rgba(255,255,255,.98) 0 7px, transparent 8px),
    radial-gradient(circle at 62% 47%, rgba(255,255,255,.55) 0 18px, transparent 19px),
    radial-gradient(circle at 64% 49%, rgba(177,18,38,.45) 0 36px, transparent 37px),
    radial-gradient(circle at 50% 60%, rgba(255,255,255,.22) 0 56px, transparent 57px);
  filter: blur(.12px);
}

/* Light beams */
html[data-union="1"] .quote::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:.10;
  background:
    conic-gradient(
      from 210deg at 22% 10%,
      rgba(255,255,255,.0),
      rgba(255,255,255,.38),
      rgba(255,255,255,.0) 55%
    );
  pointer-events:none;
}

.quote small{
  display:block;
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
}

/* =========================
   CONFETTI (Union + Special Day)
   ========================= */
.confetti{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:999;
}

.confetti i{
  position:absolute;
  top:-10px;
  width:8px;
  height:14px;
  border-radius:2px;
  opacity:.9;
  animation: fall linear forwards;
  transform: translateZ(0);
}

@keyframes fall{
  to{
    transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot));
    opacity:0.95;
  }
}

/* Premium Hover (nur Geräte mit Hover + feiner Zeiger) */
@media (hover: hover) and (pointer: fine){
  .tile{
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    will-change: transform;
  }

  .tile:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,.10);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  }

  .tile:hover .num{
    transform: translateY(-1px);
  }

  .tile .num{
    transition: transform .18s ease;
  }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 900px){
  body{ padding:18px; }
  .hero{ padding:42px 18px 68px; border-radius:24px; }
  .card{ margin-top:-48px; padding:24px; border-radius:24px; }
}
@media (max-width: 760px){
  .grid{ grid-template-columns:repeat(2,1fr); gap:14px; }
  .num{ font-size:36px; }
  .quote{ font-size:16px; padding:18px; }
  .hero p{ font-size:15px; }
}
