/* =========================================
   Świąteczna strona – prezent dla Mamy
   Plik: style.css
   Kolory: czerwień, złoto, biel, zieleń
   ========================================= */

:root{
  --bg-1: #0b1a12;       /* głęboka zieleń */
  --bg-2: #1a0d10;       /* ciemna, ciepła czerwień */
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #f7f3ee;
  --muted: rgba(247, 243, 238, 0.75);
  --gold: #d7b56d;
  --gold-soft: rgba(215, 181, 109, 0.35);
  --red: #b51f2e;
  --green: #1f7a4f;
  --shadow: 0 18px 50px rgba(0,0,0,0.35);
  --radius: 18px;

  --font-title: "Playfair Display", serif;
  --font-body: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html, body { min-height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;

  /* Ciepły gradient tła */
  background:
    radial-gradient(1200px 800px at 15% 10%, rgba(215,181,109,0.16), transparent 60%),
    radial-gradient(1000px 700px at 85% 15%, rgba(181,31,46,0.22), transparent 55%),
    radial-gradient(900px 650px at 55% 95%, rgba(31,122,79,0.20), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
}

/* Canvas śniegu (w tle) */
#snow{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

/* Główna kolumna */
.wrap{
  position: relative;
  z-index: 1;
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 48px 0 42px;
}

/* HERO */
.hero{
  text-align: center;
  padding: 26px 18px 18px;
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(215,181,109,0.28);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold));
  box-shadow: 0 0 0 6px rgba(215,181,109,0.14);
}

.title{
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.08;
  margin: 16px auto 10px;
  font-size: clamp(30px, 3.6vw, 54px);
  text-shadow: 0 14px 42px rgba(0,0,0,0.35);
}

.subtitle{
  margin: 0 auto;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.6;
}

/* ozdoby pod tytułem */
.ornaments{
  margin-top: 18px;
  display: inline-flex;
  gap: 10px;
  opacity: 0.85;
}
.ornament{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold));
  box-shadow: 0 0 0 6px rgba(215,181,109,0.10);
  animation: floaty 3.6s ease-in-out infinite;
}
.ornament:nth-child(2){ animation-delay: 0.4s; }
.ornament:nth-child(3){ animation-delay: 0.8s; }

@keyframes floaty{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

/* KARTY */
.card{
  margin: 18px 0;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card-head{
  margin-bottom: 14px;
}

.section-title{
  font-family: var(--font-title);
  font-size: clamp(20px, 2.2vw, 28px);
  margin: 0 0 6px;
}

.section-desc{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* LIST - KOPERTA */
.envelope-area{
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 8px 0 2px;
}

.envelope{
  position: relative;
  width: min(520px, 92%);
  height: 132px;
  border: 0;
  cursor: pointer;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(215,181,109,0.28);
  box-shadow: 0 14px 46px rgba(0,0,0,0.28);
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
  overflow: hidden;
}

.envelope:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.36);
  border-color: rgba(215,181,109,0.45);
}

.envelope:active{
  transform: translateY(0px) scale(0.99);
}

.envelope-top{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 49%, rgba(215,181,109,0.22) 50%, transparent 51%),
    linear-gradient(225deg, transparent 49%, rgba(215,181,109,0.22) 50%, transparent 51%);
  opacity: 0.75;
}

.envelope-body{
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(181,31,46,0.20), rgba(31,122,79,0.18));
  border: 1px solid rgba(255,255,255,0.10);
}

.envelope-stamp{
  position: absolute;
  right: 20px;
  top: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(215,181,109,0.65));
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  color: #5c1020;
  font-weight: 900;
}

.envelope-label{
  position: absolute;
  left: 20px;
  bottom: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(247,243,238,0.92);
  text-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* LIST – ROZWIJANIE */
.letter{
  width: min(720px, 96%);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 60px rgba(0,0,0,0.30);
  padding: 0 18px; /* padding docelowy po otwarciu */
  overflow: hidden;

  /* zwinięty stan */
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 700ms ease, opacity 450ms ease, transform 450ms ease, padding 700ms ease;
}

/* Klasa dodawana w JS po kliknięciu */
.letter.is-open{
  max-height: 520px; /* wystarczająco na tekst */
  opacity: 1;
  transform: translateY(0);
  padding: 18px;
}

.letter-title{
  font-family: var(--font-title);
  margin: 6px 0 10px;
  font-size: 22px;
}

.letter-paragraph{
  margin: 0 0 12px;
  color: rgba(247,243,238,0.92);
  line-height: 1.75;
  font-size: 16px;
}

.letter-glow{
  height: 1px;
  margin-top: 8px;
  background: linear-gradient(90deg, transparent, rgba(215,181,109,0.65), transparent);
  opacity: 0.9;
}

/* LISTA "ZA CO CIĘ KOCHAM" */
.love-list{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.love-item{
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.10);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 520ms ease, opacity 520ms ease, border-color 300ms ease;
}

.love-item:hover{
  border-color: rgba(215,181,109,0.36);
}

.love-item.is-visible{
  transform: translateY(0);
  opacity: 1;
}

.spark{
  color: var(--gold);
  opacity: 0.95;
  margin-top: 1px;
}

.love-text{
  color: rgba(247,243,238,0.92);
  line-height: 1.6;
}

/* STOPKA */
.footer{
  text-align: center;
  margin-top: 18px;
  padding: 18px 10px 0;
  color: var(--muted);
}

.footer p{
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer small{
  opacity: 0.9;
}

/* Responsywność */
@media (max-width: 520px){
  .card{ padding: 16px; }
  .envelope{ height: 126px; }
  .envelope-stamp{ right: 14px; top: 14px; }
  .envelope-label{ left: 14px; bottom: 14px; }
  .letter-paragraph{ font-size: 15px; }
}

/* Szacunek dla preferencji użytkownika */
@media (prefers-reduced-motion: reduce){
  *{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* ==============================
   PREZENT – UKRYTA WIADOMOŚĆ
============================== */

.gift-box{
  position: relative;
  width: 140px;
  height: 120px;
  margin: 20px auto 10px;
  cursor: pointer;
  transition: transform 300ms ease;
}

.gift-box:hover{
  transform: translateY(-4px) scale(1.03);
}

.gift-body{
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 85px;
  background: linear-gradient(180deg, #b51f2e, #7a121e);
  border-radius: 12px;
}

.gift-lid{
  position: absolute;
  top: 0;
  width: 100%;
  height: 35px;
  background: linear-gradient(180deg, #d7b56d, #bfa052);
  border-radius: 12px 12px 8px 8px;
  transform-origin: bottom;
  transition: transform 500ms ease;
}

.gift-ribbon-vertical,
.gift-ribbon-horizontal{
  position: absolute;
  background: #f7f3ee;
}

.gift-ribbon-vertical{
  width: 14px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.gift-ribbon-horizontal{
  height: 14px;
  width: 100%;
  top: 55%;
}

.gift-label{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  z-index: 2;
}

/* OTWARTY PREZENT */
.gift-box.open .gift-lid{
  transform: rotateX(110deg);
}

/* UKRYTA WIADOMOŚĆ */
.hidden-message{
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 700ms ease, opacity 600ms ease;
}

.hidden-message.show{
  max-height: 500px;
  opacity: 1;
}
/* ==============================
   WIADOMOŚCI Z PREZENTAMI
============================== */

.message-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.gift-message{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: transform 250ms ease, background 250ms ease;
}

.gift-message:hover{
  transform: translateX(4px);
  background: rgba(0,0,0,0.24);
}

/* IKONA PREZENTU */
.gift-icon{
  font-size: 26px;
  transition: transform 400ms ease, opacity 300ms ease;
}

/* TEKST WIADOMOŚCI */
.message-text{
  color: rgba(247,243,238,0.92);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms ease, transform 400ms ease;
}

/* PO ODKRYCIU */
.gift-message.open .gift-icon{
  transform: scale(0) rotate(-20deg);
  opacity: 0;
}

.gift-message.open .message-text{
  opacity: 1;
  transform: translateY(0);
}
/* ==============================
   CHAT – PREZENTY JAK MESSENGER
============================== */

.chat-list{
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}

/* POJEDYNCZA WIADOMOŚĆ */
.chat-gift{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
}

/* PODŁUŻNA KAPSUŁA */
.gift-pill{
  background: linear-gradient(135deg, #ff5f7e, #e63a5a);
  border-radius: 999px;
  padding: 14px 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform 300ms ease, opacity 300ms ease;
}

.gift-pill:hover{
  transform: translateY(-2px);
}

.gift-emoji{
  font-size: 30px;
}

/* STATUS */
.gift-status{
  font-size: 13px;
  color: rgba(180, 200, 255, 0.9);
  margin-right: 6px;
}

/* UKRYTY TEKST */
.gift-text{
  max-width: 80%;
  background: rgba(0,0,0,0.22);
  padding: 12px 16px;
  border-radius: 18px 4px 18px 18px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(247,243,238,0.95);
  line-height: 1.55;
  opacity: 0;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  transition: opacity 400ms ease, transform 400ms ease, max-height 500ms ease;
}

/* PO ODKRYCIU */
.chat-gift.open .gift-pill{
  opacity: 0;
  transform: scale(0.7);
}

.chat-gift.open .gift-text{
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
}
