/* ============ Ile dni do wakacji — styles ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ocean-1: #0b7fab;
  --ocean-2: #0a5f8f;
  --sky-1: #7fd4f5;
  --sky-2: #38b6e3;
  --sand: #ffe9c2;
  --coral: #ff6b57;
  --sun: #ffc94d;
  --aqua: #35d0ba;
  --ink: #0d3b53;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.65);
  --shadow: 0 10px 40px rgba(9, 60, 90, 0.18);
  --radius: 22px;
  font-size: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 38%, var(--ocean-1) 78%, var(--ocean-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- animated sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.sun {
  position: absolute; top: 6vh; right: 8vw;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4, var(--sun) 60%, #ffb02e);
  box-shadow: 0 0 80px 30px rgba(255, 201, 77, 0.55);
  animation: sunPulse 6s ease-in-out infinite;
}
@keyframes sunPulse {
  0%, 100% { box-shadow: 0 0 80px 30px rgba(255, 201, 77, 0.55); }
  50% { box-shadow: 0 0 110px 45px rgba(255, 201, 77, 0.75); }
}
.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 100px;
  filter: blur(1px);
  opacity: 0.85;
}
.cloud::before, .cloud::after {
  content: ''; position: absolute; background: inherit; border-radius: 50%;
}
.cloud-1 { top: 12vh; left: -160px; width: 150px; height: 44px; animation: drift 55s linear infinite; }
.cloud-1::before { width: 60px; height: 60px; top: -28px; left: 26px; }
.cloud-1::after  { width: 42px; height: 42px; top: -18px; left: 78px; }
.cloud-2 { top: 26vh; left: -220px; width: 200px; height: 54px; animation: drift 80s linear infinite 8s; opacity: 0.65; }
.cloud-2::before { width: 76px; height: 76px; top: -34px; left: 34px; }
.cloud-2::after  { width: 52px; height: 52px; top: -22px; left: 106px; }
.cloud-3 { top: 5vh; left: -120px; width: 110px; height: 34px; animation: drift 65s linear infinite 20s; opacity: 0.7; }
.cloud-3::before { width: 46px; height: 46px; top: -20px; left: 20px; }
.cloud-3::after  { width: 32px; height: 32px; top: -13px; left: 58px; }
@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 300px)); }
}
@media (prefers-reduced-motion: reduce) {
  .cloud, .sun { animation: none !important; }
}

/* ---------- layout ---------- */
.wrap {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  padding: clamp(18px, 4vw, 48px);
}

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: clamp(10px, 4vh, 40px); }
.kicker {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  padding: 6px 18px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.8rem;
  backdrop-filter: blur(6px);
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.3rem, 7vw, 4.4rem);
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 4px 24px rgba(9, 60, 90, 0.35);
  letter-spacing: -0.02em;
}
.subtitle {
  margin: 14px auto 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.5;
}
.subtitle strong { color: var(--sand); }

/* ---------- countdown ---------- */
.countdown {
  display: flex; justify-content: center; align-items: stretch;
  gap: clamp(6px, 1.6vw, 16px);
  margin: clamp(26px, 5vh, 46px) auto 8px;
  flex-wrap: nowrap;
}
.count-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: clamp(12px, 2.6vw, 26px) clamp(10px, 2.4vw, 30px);
  min-width: clamp(70px, 18vw, 150px);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.count-num {
  font-size: clamp(2rem, 7.5vw, 4.6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: linear-gradient(180deg, var(--ink), #1272a2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.count-label {
  font-size: clamp(0.66rem, 1.8vw, 0.95rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #33607d;
}
.count-sep {
  align-self: center;
  font-size: clamp(1.4rem, 4vw, 3rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
}
.countdown-alt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  min-height: 1.5em;
}

/* ---------- progress ---------- */
.progress-block {
  max-width: 620px;
  margin: clamp(22px, 4vh, 36px) auto 0;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  padding: 16px 20px;
  backdrop-filter: blur(8px);
}
.progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--white); font-weight: 600; margin-bottom: 10px;
}
.progress-head strong { font-size: 1.3rem; color: var(--sand); }
.progress-bar {
  height: 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua), var(--sun), var(--coral));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- buttons ---------- */
.share-row {
  display: flex; justify-content: center; gap: 12px;
  margin-top: clamp(20px, 3.5vh, 32px);
  flex-wrap: wrap;
}
.btn {
  font-family: inherit;
  font-size: 1rem; font-weight: 700;
  border: none; cursor: pointer;
  padding: 13px 26px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.96); }
.btn.share {
  background: linear-gradient(135deg, var(--coral), #ff8a5c);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(255, 107, 87, 0.45);
}
.btn.share:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 107, 87, 0.55); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
  backdrop-filter: blur(6px);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.32); }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: clamp(36px, 6vh, 60px);
}
.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 24px 20px;
  text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-emoji { font-size: 1.9rem; }
.stat-num { font-size: 2.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-desc { color: #33607d; font-weight: 600; font-size: 0.95rem; }
.stats-note {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  margin-top: 10px;
  text-align: center;
}

/* ---------- region select ---------- */
.region {
  margin-top: clamp(30px, 5vh, 48px);
  text-align: center;
  color: var(--white);
}
.region label { font-weight: 600; display: block; margin-bottom: 12px; font-size: 1.05rem; }
.region select {
  font-family: inherit; font-size: 1rem; font-weight: 600;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px 18px;
  min-width: min(360px, 90vw);
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ---------- mini countdowns ---------- */
.minis { margin-top: clamp(40px, 7vh, 70px); }
.minis h2, .calendar h2, .faq h2 {
  color: var(--white);
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 24px;
  text-shadow: 0 3px 16px rgba(9, 60, 90, 0.3);
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.mini-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
  display: flex; flex-direction: column; gap: 4px;
}
.mini-title { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.mini-date { color: #33607d; font-size: 0.88rem; font-weight: 600; }
.mini-days {
  margin-top: 8px;
  font-size: 1.9rem; font-weight: 900; font-variant-numeric: tabular-nums;
  color: var(--ocean-1);
}
.mini-days small { font-size: 1rem; font-weight: 700; color: #33607d; }
.mini-card.hint { justify-content: center; align-items: center; text-align: center; color: #33607d; font-weight: 600; }

/* ---------- calendar table ---------- */
.calendar { margin-top: clamp(44px, 7vh, 80px); }
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass);
  backdrop-filter: blur(10px);
  min-width: 560px;
}
th, td { padding: 14px 18px; text-align: left; }
thead th {
  background: rgba(13, 59, 83, 0.92);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem;
}
tbody tr { border-top: 1px solid rgba(13, 59, 83, 0.08); }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.4); }
tbody tr:last-child { background: rgba(255, 201, 77, 0.28); }
td .muted { color: #46708f; font-size: 0.84rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(44px, 7vh, 80px); }
.faq details {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
  position: relative;
  padding-right: 46px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '▾';
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: var(--ocean-1);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq details p {
  padding: 0 22px 20px;
  line-height: 1.65;
  color: #23506b;
}

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(50px, 8vh, 90px);
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  line-height: 1.8;
  padding-bottom: 30px;
}
.footer .muted { color: rgba(255, 255, 255, 0.55); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: var(--white);
  padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 50;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- confetti canvas ---------- */
#confetti {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 40;
}

/* ---------- responsive tweaks ---------- */
@media (max-width: 560px) {
  .count-sep { display: none; }
  .countdown { flex-wrap: wrap; }
  .count-box { flex: 1 1 40%; min-width: 0; }
  .sun { width: 90px; height: 90px; right: 4vw; }
}

/* ==== dodatki SEO/a11y ==== */
.noscript-note { background: #fff3cd; color: #5a4500; padding: 12px 16px; border-radius: 10px; margin: 16px auto; max-width: 720px; font-size: 0.95rem; }
.more-tools { margin-top: 14px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.more-tools a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more-tools a:hover { opacity: 0.75; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto !important; }
}
