/* Amateurfunk-Adventskalender · © 2026 Erik Schauer, do1ffe@darc.de */

body.adventsseite {
  --kalender-gold: #f3d18a;
  --kalender-papier: #fff3d4;
  --kalender-nacht: #071827;
}

body.adventsseite .adventsinhalt {
  max-width: 1520px;
  margin-inline: auto;
  padding-top: 30px;
}

body.adventsseite .adventsinhalt > h1 {
  margin: 6px auto 8px;
  color: #fff3d7;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.15;
  font-weight: 700;
  text-wrap: balance;
}

body.adventsseite p.kalender-einleitung {
  max-width: 760px;
  margin: 0 auto 28px;
  padding: 0 12px;
  background: none;
  box-shadow: none;
  color: #c4d4dd;
  font-size: 0.98rem;
  line-height: 1.7;
  text-wrap: balance;
}

body.adventsseite .funkkalender {
  position: relative;
  max-width: 1320px;
  margin: 0 auto 42px;
  padding: 16px;
  border: 1px solid #a48954;
  border-radius: 14px;
  background: #0b2335;
  box-shadow:
    0 26px 70px rgb(0 0 0 / 32%),
    inset 0 0 0 5px #081b2b,
    inset 0 0 0 6px rgb(243 209 138 / 22%);
}

body.adventsseite .funkkalender__kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 4px 8px 15px;
}

body.adventsseite .funkkalender__kopf h2 {
  margin: 0;
  color: var(--kalender-gold);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body.adventsseite p.funkkalender__hinweis {
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #b6c7d1;
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: left;
}

body.adventsseite .funkkalender__szene {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 4px;
  background-color: #153248;
  background-image: url('/static/amateurfunk-kalender.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  box-shadow: 0 0 0 1px rgb(245 214 158 / 42%), 0 8px 20px rgb(0 0 0 / 24%);
  isolation: isolate;
}

body.adventsseite .funk-türchen {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--breite);
  height: var(--höhe);
  margin: 0;
  perspective: 850px;
  perspective-origin: 50% 50%;
}

body.adventsseite .funk-türchen:has(.funk-türchen__knopf:focus-visible),
body.adventsseite .funk-türchen:has(.funk-türchen__knopf:hover),
body.adventsseite .funk-türchen--öffnet {
  z-index: 4;
}

body.adventsseite .funk-türchen--geöffnet {
  z-index: 2;
}

body.adventsseite .funk-türchen__fach {
  position: absolute;
  inset: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border-radius: 2px;
  color: #fbe8b2;
  background:
    radial-gradient(ellipse at 50% 110%, rgb(249 186 73 / 46%), transparent 72%),
    linear-gradient(145deg, #07111b, #244052);
  box-shadow: inset 3px 4px 12px rgb(0 0 0 / 85%);
}

body.adventsseite .funk-türchen__fach svg {
  width: 39%;
  max-width: 62px;
  height: auto;
  max-height: 46%;
  filter: drop-shadow(0 0 7px rgb(255 195 92 / 30%));
}

body.adventsseite .funk-türchen__fach span {
  max-width: 85%;
  color: inherit;
  font-size: clamp(0.58rem, 1.2vw, 1rem);
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 4px #000;
}

body.adventsseite .funk-türchen__formular {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
}

body.adventsseite .funk-türchen__knopf,
body.adventsseite .funk-türchen__knopf:hover,
body.adventsseite .funk-türchen__knopf:disabled {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--kalender-papier);
  box-shadow: none;
  font-family: inherit;
  text-decoration: none;
  text-transform: none;
  transform: none;
  opacity: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  perspective: 850px;
  cursor: pointer;
}

body.adventsseite .funk-türchen__knopf:disabled {
  cursor: default;
}

body.adventsseite .funk-türchen__knopf:focus-visible {
  outline: 3px solid #b6f2ff;
  outline-offset: 5px;
}

body.adventsseite .funk-türchen__blatt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(4 16 25 / 76%);
  border-left: 1px dashed rgb(243 231 196 / 55%);
  border-radius: 2px;
  background-color: #1b394b;
  background-image: url('/static/amateurfunk-kalender.webp');
  background-repeat: no-repeat;
  background-size: var(--bild-breite) var(--bild-höhe);
  background-position: var(--bild-x) var(--bild-y);
  background-origin: border-box;
  box-shadow:
    1px 1px 1px rgb(255 240 206 / 55%),
    inset 1px 1px 0 rgb(255 238 204 / 30%),
    2px 3px 4px rgb(0 0 0 / 25%);
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  pointer-events: none;
  transition: transform 780ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 360ms ease;
}

body.adventsseite .funk-türchen__blatt::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px dashed rgb(255 239 202 / 44%);
  border-left: 0;
  border-radius: 1px;
  pointer-events: none;
}

body.adventsseite .funk-türchen__blatt::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, rgb(255 245 214 / 5%), transparent 40%, rgb(4 13 19 / 12%));
  pointer-events: none;
}

body.adventsseite .funk-türchen__nummer {
  position: relative;
  z-index: 1;
  color: #fff0c7;
  font-family: 'Mountains of Christmas', Georgia, serif;
  font-size: clamp(1.6rem, 3.8vw, 3.7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 3px #091724, 0 0 9px #091724, 1px 0 1px #091724, -1px 0 1px #091724;
  transform: translateZ(1px);
}

body.adventsseite .funk-türchen__griff {
  position: absolute;
  z-index: 2;
  right: -1px;
  top: calc(50% - 7px);
  width: 7px;
  height: 14px;
  border: 1px solid rgb(245 226 187 / 58%);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background: #102433;
  box-shadow: inset 2px 0 3px #020a0f;
  pointer-events: none;
}

body.adventsseite .funk-türchen--heute .funk-türchen__blatt {
  box-shadow: 0 0 0 2px #f9d994, 0 0 16px rgb(255 205 108 / 50%), 2px 4px 8px rgb(0 0 0 / 38%);
}

body.adventsseite .funk-türchen--weihnachten .funk-türchen__nummer {
  color: #ffe09b;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
}

body.adventsseite .funk-türchen--geöffnet .funk-türchen__blatt,
body.adventsseite .funk-türchen--öffnet .funk-türchen__blatt {
  transform: rotateY(-108deg);
  box-shadow: 3px 2px 0 #c5ae80, 9px 6px 15px rgb(0 0 0 / 35%);
}

body.adventsseite .funk-türchen--geöffnet .funk-türchen__blatt::after,
body.adventsseite .funk-türchen--öffnet .funk-türchen__blatt::after {
  background: rgb(226 209 165 / 42%);
}

body.adventsseite .funk-türchen--geöffnet .funk-türchen__nummer,
body.adventsseite .funk-türchen--öffnet .funk-türchen__nummer {
  transform: rotateY(180deg) translateZ(1px);
}

body.adventsseite .funk-türchen--geöffnet[data-tag]::after,
body.adventsseite .funk-türchen--öffnet[data-tag]::after {
  content: attr(data-tag);
  position: absolute;
  top: 4px;
  right: 5px;
  color: #ffeac0;
  font-size: clamp(0.58rem, 0.9vw, 0.78rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}

body.adventsseite p.funkkalender__status {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  max-width: none;
  margin: 16px 0 0;
  padding: 0 8px 3px;
  border-radius: 0;
  color: #c3d0d8;
  background: none;
  box-shadow: none;
  font-size: 0.77rem;
  line-height: 1.65;
}

body.adventsseite .funkkalender__status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

body.adventsseite .funkkalender__status span::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--kalender-gold);
}

body.adventsseite p.kalender-rückmeldung {
  min-height: 1.65em;
  max-width: 900px;
  margin: -25px auto 26px;
  padding: 0 12px;
  border-radius: 0;
  color: #f5dbab;
  background: none;
  box-shadow: none;
  font-size: 0.85rem;
  line-height: 1.65;
  text-align: center;
}

body.adventsseite .welcome {
  max-width: 850px;
  margin: 0 auto 32px;
  padding: 0 10px;
  color: #d8e1e6;
  font-size: 1rem;
  line-height: 1.85;
  text-align: center;
  text-wrap: balance;
}

body.adventsseite .welcome a,
body.adventsseite .welcome a:visited {
  border-radius: 3px;
  color: var(--kalender-gold);
  font-weight: 600;
  text-decoration-color: rgb(243 209 138 / 55%);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

body.adventsseite .welcome a:hover {
  color: #fff3d4;
  text-decoration-color: currentColor;
}

body.adventsseite .welcome a:focus-visible {
  outline: 3px solid #b6f2ff;
  outline-offset: 4px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.adventsseite .funk-türchen:not(.funk-türchen--geöffnet):not(.funk-türchen--öffnet) .funk-türchen__knopf:not(:disabled):hover .funk-türchen__blatt {
    transform: rotateY(-12deg);
    box-shadow: 3px 3px 0 rgb(226 209 165 / 65%), 6px 5px 14px rgb(0 0 0 / 40%);
  }
}

@media (max-width: 900px) {
  body.adventsseite .adventsinhalt {
    padding-inline: 14px;
  }

  body.adventsseite .funkkalender {
    padding: 12px;
  }

  body.adventsseite .funkkalender__kopf {
    padding: 4px 3px 13px;
  }
}

@media (max-width: 700px) {
  body.adventsseite .adventsinhalt {
    padding-top: 22px;
    padding-inline: 12px;
  }

  body.adventsseite .adventsinhalt > h1 {
    max-width: 340px;
    font-size: clamp(2rem, 8.5vw, 2.65rem);
  }

  body.adventsseite p.kalender-einleitung {
    margin-bottom: 20px;
    padding-inline: 4px;
    font-size: 0.85rem;
    line-height: 1.6;
  }

  body.adventsseite .funkkalender {
    margin-bottom: 28px;
    padding: 10px;
    border-radius: 10px;
  }

  body.adventsseite .funkkalender__kopf {
    display: block;
    padding: 2px 3px 12px;
    text-align: center;
  }

  body.adventsseite .funkkalender__kopf h2 {
    font-size: 0.71rem;
    letter-spacing: 0.14em;
  }

  body.adventsseite p.funkkalender__hinweis {
    margin-top: 3px;
    font-size: 0.7rem;
    text-align: center;
  }

  body.adventsseite .funkkalender__szene {
    aspect-ratio: 0.72;
  }

  body.adventsseite .funkkalender__szene,
  body.adventsseite .funk-türchen__blatt {
    background-image: url('/static/amateurfunk-kalender-mobil.webp');
  }

  body.adventsseite .funk-türchen {
    left: var(--mobil-x);
    top: var(--mobil-y);
    width: var(--mobil-breite);
    height: var(--mobil-höhe);
    min-width: 44px;
    min-height: 44px;
  }

  body.adventsseite .funk-türchen__blatt {
    background-size: var(--mobil-bild-breite) var(--mobil-bild-höhe);
    background-position: var(--mobil-bild-x) var(--mobil-bild-y);
  }

  body.adventsseite .funk-türchen__nummer {
    font-size: clamp(1.75rem, 7.5vw, 2.8rem);
  }

  body.adventsseite .funk-türchen--weihnachten .funk-türchen__nummer {
    font-size: clamp(2.2rem, 10vw, 3.6rem);
  }

  body.adventsseite .funk-türchen__fach span {
    font-size: 0.63rem;
  }

  body.adventsseite p.funkkalender__status {
    gap: 5px 15px;
    margin-top: 12px;
    padding-inline: 0;
    font-size: 0.68rem;
  }

  body.adventsseite p.kalender-rückmeldung {
    margin-top: -14px;
    margin-bottom: 20px;
    font-size: 0.78rem;
  }

  body.adventsseite .welcome {
    margin-bottom: 26px;
    padding-inline: 6px;
    font-size: 0.91rem;
  }

  body.adventsseite nav {
    flex-direction: row;
    gap: 8px 12px;
    font-size: 0.78rem;
  }

  body.adventsseite nav > a {
    width: 100%;
  }

  body.adventsseite .preise {
    margin: 0;
  }

  body.adventsseite .nav-user {
    gap: 6px;
    margin: 0;
  }

  body.adventsseite .nav-user > * {
    margin: 0;
  }

  body.adventsseite .nav-user > span {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.adventsseite .funk-türchen__blatt {
    transition: none;
  }
}
