/* ================================================================
   d.vinci Design System 2026 · Foundations
   Tokens aus dem Brand Manual 2026 (Skill "dvinci-brand-design",
   tokens/dvinci-tokens.css), Font-Pfade an diesen Ordner angepasst.
   ================================================================ */

@font-face{font-family:"Parkinsans";src:url("assets/fonts/Parkinsans-VariableFont_wght.ttf") format("truetype");font-weight:300 800;font-style:normal;font-display:swap}
@font-face{font-family:"Reenie Beanie";src:url("assets/fonts/ReenieBeanie-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Overpass";src:url("assets/fonts/Overpass-Light.ttf") format("truetype");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Overpass";src:url("assets/fonts/Overpass-LightItalic.ttf") format("truetype");font-weight:300;font-style:italic;font-display:swap}
@font-face{font-family:"Overpass";src:url("assets/fonts/Overpass-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Overpass";src:url("assets/fonts/Overpass-Italic.ttf") format("truetype");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Overpass";src:url("assets/fonts/Overpass-SemiBold.ttf") format("truetype");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Overpass";src:url("assets/fonts/Overpass-Bold.ttf") format("truetype");font-weight:700;font-style:normal;font-display:swap}

:root {
  /* Palette */
  --dv-denim-900:#003A5D; --dv-denim-700:#095982; --dv-denim-300:#809DAE;
  --dv-yellow-500:#FAFF85; --dv-yellow-200:#FCFFC2;
  --dv-green-500:#45C2B1; --dv-green-300:#8CC9BF; --dv-green-200:#B0DBD4;
  --dv-peach-500:#FBBE9D; --dv-peach-300:#FFD3AF; --dv-peach-200:#FFE7D3;
  --dv-background:#F2F5F7; --dv-white:#FFFFFF;

  /* Semantik */
  --brand-primary:var(--dv-denim-900);
  --brand-primary-hover:var(--dv-denim-700);
  --brand-accent:var(--dv-yellow-500);
  --brand-accent-hover:var(--dv-yellow-200);
  --surface-page:var(--dv-white);
  --surface-muted:var(--dv-background);
  --surface-card:var(--dv-white);
  --surface-dark:var(--dv-denim-900);
  --surface-dark-raised:var(--dv-denim-700);
  --text-primary:var(--dv-denim-900);
  --text-muted:var(--dv-denim-700);
  --text-on-dark:var(--dv-white);
  --text-highlight-on-dark:var(--dv-yellow-500);
  --border-subtle:var(--dv-denim-300);
  --border-divider:var(--dv-green-200);
  --focus-ring:var(--dv-green-500);
  --overlay:rgba(0,58,93,.5);

  /* Typografie */
  --font-heading:"Parkinsans","Overpass",system-ui,sans-serif;
  --font-body:"Overpass",system-ui,sans-serif;
  --font-highlight:"Reenie Beanie",cursive;
  --weight-light:300; --weight-regular:400; --weight-semibold:600; --weight-bold:700;
  --text-lead:20px; --text-body:17px; --text-small:14px; --text-eyebrow:14px; --text-ui:15px;
  --leading-heading:1.15; --leading-body:1.55;
  --tracking-eyebrow:0.1em; --tracking-heading:-0.01em;

  /* Formen */
  --radius-xs:4px; --radius-sm:8px; --radius-md:15px; --radius-lg:24px; --radius-xl:40px; --radius-pill:999px;
  --border-width:1.5px;
  --shadow-card:0 1px 2px rgba(0,58,93,.06),0 4px 16px rgba(0,58,93,.06);
  --shadow-float:0 12px 32px rgba(0,58,93,.14);
  --ease-standard:cubic-bezier(.2,.7,.2,1);
  --duration-fast:150ms; --duration-base:250ms;
}

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-primary);
  background: var(--surface-muted);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  color: var(--text-primary);
  margin: 0 0 0.5em;
  text-align: left;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 2rem + 1.2vw, 48px); }
h4 { font-size: 22px; }

p { margin: 0 0 1em; line-height: var(--leading-body); text-wrap: pretty; text-align: left; }

a {
  color: var(--dv-denim-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-standard);
}
a:hover { color: var(--dv-denim-900); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
::selection { background: var(--dv-yellow-500); color: var(--dv-denim-900); }

/* Hervorhebung auf Hell: gelber Marker-Hintergrund, Text Denim */
mark {
  background: var(--brand-accent);
  color: var(--text-primary);
  padding: 0.05em 0.25em;
  border-radius: var(--radius-xs);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.dv-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-block;
}
.dv-lead { font-size: var(--text-lead); line-height: 1.5; font-weight: var(--weight-light); }

.dv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  border: var(--border-width) solid transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: var(--weight-bold);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}
.dv-btn:active { transform: scale(.98); }
.dv-btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--dv-white); }
.dv-btn-primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); color: var(--dv-white); }
.dv-btn-secondary { background: var(--surface-card); border-color: var(--brand-primary); color: var(--text-primary); }
.dv-btn-secondary:hover { background: var(--surface-muted); color: var(--text-primary); }

/* ================================================================
   Adventskalender — seitenspezifische Styles
   ================================================================ */

/* Ruhiges Pulsieren für das heutige Türchen (kein Glow laut Brand Manual) */
@keyframes dvPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@keyframes dvPopIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.site-header {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-page);
  border-bottom: var(--border-width) solid var(--border-divider);
}
.site-header img { height: 30px; display: block; }

.intro {
  max-width: 900px;
  text-align: center;
  margin: 48px 24px 36px;
}
.intro h1 { margin-top: 10px; }
.intro .dv-lead { color: var(--text-muted); margin-top: 14px; }

/* Neukunden-Version: Karte aus Denim-Balken (Headline + Logo) und Kalenderbild */
.calendar-card {
  width: calc(100% - 48px);
  max-width: 1400px;
  margin: 0 24px 64px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-dark);
}
.calendar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 40px;
  background: var(--surface-dark);
}
.calendar-bar-logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
.calendar-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.calendar-frame img.calendar-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  /* Neukunden-Version: Foto weichzeichnen, damit die Türchen im Vordergrund
     stehen. scale() verdeckt die durch den Blur ausgefransten Bildränder. */
  filter: blur(2px);
  transform: scale(1.02);
}
/* Headline im Denim-Balken: Parkinsans Bold, Weiß auf Denim (erlaubtes Kontrastpaar) */
.calendar-title {
  margin: 0;
  color: var(--text-on-dark);
  font-size: clamp(20px, 2.6vw, 40px);
}

.door {
  position: absolute;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
  box-sizing: border-box;
}
.door:hover:not(:disabled) { transform: scale(1.06); }
.door:active:not(:disabled) { transform: scale(.98); }
.door:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.door--locked {
  background: rgba(0,58,93,.62);
  border: var(--border-width) solid rgba(255,255,255,.35);
  cursor: default;
}
.door--today {
  background: var(--brand-accent);
  border: var(--border-width) solid var(--brand-primary);
  cursor: pointer;
  animation: dvPulse 2s var(--ease-standard) infinite;
}
.door--today:hover { animation-play-state: paused; }
.door--past {
  background: rgba(69,194,177,.16);
  border: var(--border-width) solid rgba(255,255,255,.55);
  opacity: 0.9;
  cursor: pointer;
}

.door-number {
  color: var(--text-on-dark);
  font-weight: var(--weight-bold);
  font-size: clamp(11px, 1.6vw, 20px);
  font-family: var(--font-body);
}
.door--today .door-number { color: var(--text-primary); }
.door--past .door-number { display: none; }

/* Neukunden-Version: Türchen in der Hintergrundfarbe ihrer Grafik */
.door--colored,
.door--colored.door--locked,
.door--colored.door--today,
.door--colored.door--past {
  background: var(--door-color);
  border: var(--border-width) solid rgba(255,255,255,.7);
}
.door--colored.door--today { box-shadow: 0 0 0 3px var(--brand-accent); }
.door--colored.door--past { opacity: .8; }
/* Geschlossen: abgelaufene Verlosung bzw. ab 25.12. – wie vergangen, aber nicht klickbar */
.door--closed { cursor: default; opacity: .8; }
.door--closed:not(.door--colored) {
  background: rgba(0,58,93,.62);
  border: var(--border-width) solid rgba(255,255,255,.35);
}
.door--colored.door--past .door-number { display: inline; }
.door--on-dark .door-number,
.door--on-dark.door--today .door-number { color: var(--brand-accent); }
.door--on-light .door-number,
.door--on-light.door--today .door-number { color: var(--text-primary); }

.popover {
  position: absolute;
  width: 280px;
  max-width: 80vw;
  background: var(--surface-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 24px;
  box-sizing: border-box;
  z-index: 20;
  animation: dvPopIn var(--duration-base) var(--ease-standard);
}
.popover-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 22px;
  line-height: 1;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.popover-close:hover { background: var(--surface-muted); }
.popover-kicker { padding-right: 36px; }
.popover h4 { margin-top: 8px; margin-bottom: 10px; }
.popover p { font-size: 15px; color: var(--text-muted); margin-bottom: 18px; }
.popover-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.popover-actions .dv-btn { flex: 1 1 200px; box-sizing: border-box; }
/* Pop-up mit Grafik: groß und zentriert im Viewport (Modal), damit die Schrift
   auf der Grafik gut lesbar ist. Höhe ≈ Breite + ~110px (Datum, Button, Abstände). */
.popover.popover--with-image {
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px), calc(100vh - 150px));
  max-width: none;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  z-index: 50;
  box-shadow: 0 0 0 100vmax var(--overlay), var(--shadow-float);
  animation: dvPopInCentered var(--duration-base) var(--ease-standard);
}
@keyframes dvPopInCentered {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 6px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
.popover-image-link,
.popover-image {
  display: block;
  margin: 12px 0 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.popover-image:last-child { margin-bottom: 0; }
.popover-image-link {
  transition: opacity var(--duration-fast) var(--ease-standard);
}
.popover-image-link:hover { opacity: .92; }
.popover-image-link img,
.popover-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Neukunden-Version: Medium im Pop-up (Bild, GIF, Video, HTML) mit Klickflächen */
.popover-media {
  position: relative;
  margin: 12px 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface-muted);
}
.popover-media > img,
.popover-media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popover-media--iframe > img { position: absolute; inset: 0; }
.popover-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
}
.popover-media iframe.is-loaded { opacity: 1; }
.popover-hotspot {
  position: absolute;
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.popover-hotspot:hover { background: rgba(255,255,255,.14); }
.popover-hotspot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.site-footer {
  width: 100%;
  box-sizing: border-box;
  padding: 28px 32px;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  font-size: var(--text-small);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--text-highlight-on-dark); }
.site-footer-links { display: flex; gap: 24px; }
.site-footer a:hover { color: var(--text-on-dark); }

@media (max-width: 640px) {
  .site-header { min-height: 64px; padding: 14px 18px; }
  .site-header img { height: 26px; }
  .intro { margin: 32px 16px 24px; }
  .calendar-card { width: calc(100% - 24px); margin: 0 12px 40px; border-radius: var(--radius-md); }
  .calendar-bar { padding: 16px 18px; gap: 16px; }
  .calendar-bar-logo { height: 22px; }
  /* Kalenderbild ist auf Mobile zu niedrig für das Pop-up → im Viewport zentrieren. */
  .popover {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%);
    width: min(340px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .door--today, .popover, .popover.popover--with-image { animation: none; }
  .door, .dv-btn, .popover-image-link { transition: none; }
}
