/* =========================
   TŁO STRONY
========================= */
html, body { height: 100%; }

body{
  margin: 0;
  color:#fff;
  font-family: Georgia, serif;
  min-height: 100vh;

  background-image: url("img/1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Ramka, żeby było widać tło dookoła kalendarza */
.page{
  max-width: 1100px;
  margin: 0 auto;

  /* PRAWDZIWY ODSTĘP OD KRAWĘDZI */
  padding: clamp(16px, 4vw, 32px);

  box-sizing: border-box;
}

/* =========================
   GRID KALENDARZA
   - tyle okienek w rzędzie ile wejdzie
   - równe odstępy pion/poziom
========================= */
.calendar{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* =========================
   OKIENKO / KAFEL
========================= */
.door{
  position: relative;
  border-radius: 16px;
  perspective: 900px;
  /*overflow: visible;*/

  /* Premium “odcięcie” od tła */
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.35));
}

/* większe okienko (np. 24) */
.door.big{
  grid-column: span 2;
  grid-row: span 2;
}

/* =========================
   WNĘTRZE (po otwarciu)
   - 3/4 obraz
   - 1/4 złoty napis
========================= */
.door .inner{
  position: relative;
  z-index: 1;

  border-radius: 16px;
  overflow: hidden;

  background: rgba(10,14,25,0.55);
  border: 1px solid rgba(255,255,255,0.12);

  display: flex;
  flex-direction: column;
}

.door .inner .imgWrap{
  width: 100%;
  aspect-ratio: 1 / 1;     /* ZAWSZE KWADRAT */
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}

.door .inner img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* zawsze widoczne */
}

/* złoty podpis na dole */
.door .inner .caption{
  height: 72px;              /* ZAWSZE TAKA SAMA WYSOKOŚĆ */
  padding: 8px 12px;
  box-sizing: border-box;

  display: flex;
  align-items: center;       /* pion */
  justify-content: center;   /* poziom */

  text-align: center;

  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;

  color: #ffe7a8;

  background: linear-gradient(
    to top,
    rgba(0,0,0,.88),
    rgba(0,0,0,.4)
  );

  border-top: 1px solid rgba(255,215,120,.25);

  text-shadow:
    0 1px 0 rgba(0,0,0,.8),
    0 0 14px rgba(255, 215, 120, .35);
}

/* =========================
   DRZWICZKI (skrzydło)
   - front: numer
   - back: numer (wewnętrzna strona)
========================= */
.door .leaf{
  position: absolute;
  inset: 0;               /* ← CAŁA WYSOKOŚĆ OKIENKA */
  z-index: 10;

  border-radius: 16px;
  overflow: hidden;

  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 900ms cubic-bezier(.2,.8,.2,1);

  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}

.door .leaf .front{
  position: absolute;
  inset: 0;

  background: linear-gradient(145deg,#9b7b3f,#6e4f24);
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  font-weight: 900;
  color: #fff;

  backface-visibility: hidden;
}

.door .leaf .back{
  position: absolute;
  inset: 0;

  background: linear-gradient(145deg,#2b3448,#141a2a);
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;
  font-weight: 900;
  color: #f7e7b0;

  transform: rotateY(180deg);
  backface-visibility: hidden;
}

/* OTWARCIE */
.door.open .leaf{
  transform: rotateY(-120deg);
}

/* =========================
   ŚNIEG (canvas na całą stronę)
========================= */
#snow-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

/* =========================
   MOBILE – dopieszczenie
========================= */
@media (max-width: 420px){
  body{
    padding-top: env(safe-area-inset-top);
  }

  .page{
    padding-top: calc(clamp(16px, 4vw, 32px) + 8px);
  }

  .calendar{
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .door{
    min-height: 150px;
  }

  .door .inner .caption{
    font-size: 12px;
    padding: 10px 8px;
  }
}

.door.big{
  grid-column: 1 / -1;      /* osobny rząd */
  justify-self: center;     /* środek */
  width: min(360px, 92vw);  /* duży, ale nie wylewa się na telefonie */
  aspect-ratio: 1 / 1;
  margin: 18px 0 28px;      /* ODDECH wokół */
}

/* trochę większy odstęp od reszty siatki (opcjonalnie) */
.calendar{
  padding-bottom: 10px;
}

/* kontener gwiazdek w środku okienka */
.door .sparkles{
  position: absolute;
  inset: 0;
  z-index: 4;               /* nad wnętrzem, pod drzwiczkami/overlayem */
  pointer-events: none;
  overflow: hidden;
}

/* pojedyncza gwiazdka */
.door .sparkle{
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;

  /* “gwiazdka” przez clip-path */
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,215,120,1) 35%, rgba(255,255,255,0) 70%);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );

  filter: drop-shadow(0 0 8px rgba(255, 215, 120, .65));
  opacity: 0;
  animation-name: floatSparkle;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes floatSparkle{
  0%   { transform: translateY(12px) scale(0.25) rotate(0deg); opacity: 0; }
  15%  { opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translateY(-120px) scale(1.1) rotate(55deg); opacity: 0; }
}



/* =========================
   TYTUŁ KALENDARZA
========================= */
/* =========================
   TYTUŁ KALENDARZA – PREMIUM
========================= */
/* =========================
   TYTUŁ – POLSKIE ZNAKI OK
========================= */
.calendar-title{
  margin: 12px 0 26px;
  text-align: center;
}

/* górna linia */
.calendar-title .title-top{
  display: block;
  font-family: Georgia, serif;
  font-weight: 600;
  letter-spacing: 1.4px;

  font-size: clamp(16px, 4vw, 20px);
  text-transform: uppercase;

  color: #f2e6c8;
  opacity: 0.9;
}

/* ZOŁZA – główny akcent */
.calendar-title .title-main{
  display: block;
  margin-top: 6px;

  font-family: 'Playfair Display SC', serif;
  font-weight: 700;

  font-size: clamp(36px, 9vw, 54px);
  letter-spacing: 3px;

  color: #ffe7a8;

  text-shadow:
    0 2px 0 rgba(0,0,0,.7),
    0 0 16px rgba(255, 215, 120, .45),
    0 0 30px rgba(255, 215, 120, .25);
}

/* separator */
.calendar-title::after{
  content:"";
  display:block;
  width: 140px;
  height: 2px;
  margin: 14px auto 0;

  background: linear-gradient(
    to right,
    transparent,
    rgba(255,215,120,.9),
    transparent
  );
}


/* =========================
   SHIMMER – ZŁOTY PRZEJAZD
========================= */

.shimmer{
  position: relative;
  display: inline-block;

  /* gradient światła */
  background: linear-gradient(
    110deg,
    #e8c97a 0%,
    #fff2c6 20%,
    #ffe7a8 40%,
    #e8c97a 60%,
    #ffeecf 80%,
    #e8c97a 100%
  );

  background-size: 220% auto;

  /* maskowanie gradientu tekstem */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: shimmerMove 6s ease-in-out infinite;
}

/* delikatna animacja */
@keyframes shimmerMove{
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
/* =========================
   BLOKADA DNIA 24
========================= */
.door.locked{
  pointer-events: none;
  filter: grayscale(0.6) brightness(0.85);
  opacity: 0.75;
}

/* delikatna kłódka */
.door.locked::after{
  content: "🔒";
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 20px;
  opacity: 0.85;
}

/* =========================
   ŻYCZENIA ŚWIĄTECZNE
========================= */
.wishes{
  margin: 32px auto 0;
  max-width: 520px;
  text-align: center;

  padding: 24px 20px;
  border-radius: 18px;

  background: rgba(10,14,25,0.55);
  border: 1px solid rgba(255,215,120,0.28);

  color: #ffe7a8;

  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.wishes h2{
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: 1px;
}

.wishes p{
  margin: 0;
  line-height: 1.45;
  font-size: 14px;
}

/* ukryte domyślnie */
.hidden{
  display: none;
}


/* =========================
   ANIMOWANE ŻYCZENIA
========================= */
.wishes{
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition:
    opacity 900ms ease,
    transform 900ms cubic-bezier(.2,.8,.2,1);
}

/* po pokazaniu */
.wishes.show{
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================
   SERCE – PULSUJĄCE TŁO
========================= */
.wishes-heart{
  position: absolute;
  inset: -30px;
  z-index: -1;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

/* samo serce */
.wishes-heart::before{
  content: "❤";
  font-size: 160px;

  color: rgba(255, 120, 120, 0.18);

  animation: heartPulse 3.5s ease-in-out infinite;
  filter: blur(0.5px);
}

/* puls */
@keyframes heartPulse{
  0%   { transform: scale(0.95); opacity: 0.15; }
  50%  { transform: scale(1.05); opacity: 0.28; }
  100% { transform: scale(0.95); opacity: 0.15; }
}

/* mobile – trochę mniejsze */
@media (max-width: 420px){
  .wishes-heart::before{
    font-size: 120px;
  }
}
