/* ============ Kiedy ferie? — styles ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --night-1: #151b3d;
  --night-2: #1e2a5e;
  --night-3: #24356f;
  --ice: #bfe3ff;
  --snow: #eef6ff;
  --t1: #ff8f6b;   /* styczeń — ciepły koral */
  --t2: #ffd166;   /* luty I — złoty */
  --t3: #4cc9f0;   /* luty II — lodowy */
  --ink: #10162e;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(255, 255, 255, 0.16);
  --shadow: 0 12px 44px rgba(4, 8, 30, 0.45);
  --radius: 22px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--snow);
  background:
    radial-gradient(1200px 600px at 80% -10%, #3b4d9e55, transparent 60%),
    radial-gradient(900px 500px at -10% 30%, #2c9ec755, transparent 55%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 55%, var(--night-3) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- snow ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.flake {
  position: absolute; top: -3vh;
  color: rgba(255, 255, 255, 0.85);
  user-select: none;
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translateY(106vh) rotate(320deg); }
}
@media (prefers-reduced-motion: reduce) { .flake { display: none; } }

/* ---------- 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: var(--glass);
  border: 1px solid var(--border);
  color: var(--ice);
  padding: 6px 18px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.78rem;
  backdrop-filter: blur(6px);
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff, #a8ccff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(120, 170, 255, 0.25);
}
.subtitle {
  margin: 14px auto 0; max-width: 620px;
  color: #c9d8f5;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.55;
}
.subtitle strong { color: var(--t2); }

.picker { margin-top: 26px; }
.picker select {
  font-family: inherit; font-size: 1.05rem; font-weight: 600;
  color: var(--ink);
  background: var(--glass-strong);
  border: none; border-radius: 14px;
  padding: 14px 20px;
  min-width: min(380px, 92vw);
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ---------- result card ---------- */
.result { margin-top: clamp(24px, 4vh, 40px); display: flex; justify-content: center; }
.result[hidden] { display: none; }
.result-card {
  background: var(--glass-strong);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
  width: min(560px, 100%);
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.22, 1.4, 0.36, 1);
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }
.result-head {
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
}
.result-region { font-size: 1.25rem; font-weight: 800; }
.result-badge {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: 999px; color: var(--ink);
}
.result-badge.b1 { background: var(--t1); }
.result-badge.b2 { background: var(--t2); }
.result-badge.b3 { background: var(--t3); }
.result-date {
  margin-top: 12px;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  font-weight: 900;
}
.result-count { margin-top: 8px; font-size: 1.25rem; font-weight: 700; color: #33508a; }
.result-count .big { font-size: 1.9rem; font-weight: 900; color: #1c3fae; }
.result-extra { margin-top: 10px; font-size: 0.92rem; color: #5b6b94; line-height: 1.5; }

.btn {
  font-family: inherit; font-size: 1rem; font-weight: 700;
  border: none; cursor: pointer;
  padding: 13px 26px; border-radius: 999px;
  margin-top: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.96); }
.btn.share {
  background: linear-gradient(135deg, #4361ee, #4cc9f0);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(67, 97, 238, 0.4);
}
.btn.share:hover { transform: translateY(-2px); }

/* ---------- map ---------- */
.map-section { margin-top: clamp(40px, 6vh, 64px); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.leg { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: #c9d8f5; }
.leg i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.leg.t1 i { background: var(--t1); }
.leg.t2 i { background: var(--t2); }
.leg.t3 i { background: var(--t3); }

.tile-map {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: clamp(4px, 0.8vw, 8px);
  max-width: 680px;
  margin: 0 auto;
}
.tile {
  grid-column: span 2; /* tiles are 2 cols wide to allow half offsets */
  aspect-ratio: 1.25;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(0.6rem, 1.5vw, 0.8rem);
  overflow: hidden;
  line-height: 1.15;
  color: rgba(16, 22, 46, 0.92);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px;
  padding: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.1s ease;
  box-shadow: 0 4px 16px rgba(4, 8, 30, 0.35);
}
.tile small { font-weight: 600; font-size: 0.85em; opacity: 0.9; }
.tile.g1 { background: linear-gradient(160deg, var(--t1), #ffb199); }
.tile.g2 { background: linear-gradient(160deg, var(--t2), #ffe3a3); }
.tile.g3 { background: linear-gradient(160deg, var(--t3), #9ae2ff); }
.tile:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 10px 26px rgba(4, 8, 30, 0.5); z-index: 2; }
.tile.active {
  outline: 3px solid var(--white);
  outline-offset: 2px;
  transform: scale(1.06);
  z-index: 2;
}
.tile:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.map-note { margin-top: 14px; font-size: 0.8rem; color: #8fa3cf; }

/* ---------- term cards ---------- */
.terms { margin-top: clamp(48px, 7vh, 80px); }
.terms h2, .info h2, .faq h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 26px;
  color: var(--white);
}
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.term-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  padding: 24px;
  box-shadow: var(--shadow);
}
.term-card header { margin-bottom: 14px; }
.term-num {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 999px; color: var(--ink);
}
.term-card.t1 .term-num { background: var(--t1); }
.term-card.t2 .term-num { background: var(--t2); }
.term-card.t3 .term-num { background: var(--t3); }
.term-card h3 { margin-top: 10px; font-size: 1.3rem; font-weight: 800; color: var(--white); }
.term-card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.term-card li {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: #d6e2fb;
}

/* ---------- info ---------- */
.info { margin-top: clamp(48px, 7vh, 80px); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.info-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  padding: 24px;
  box-shadow: var(--shadow);
  line-height: 1.6;
  color: #c9d8f5;
}
.info-emoji { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.info-card strong { color: var(--white); }
.info-card a { color: var(--t3); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(48px, 7vh, 80px); }
.faq details {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700; font-size: 1.02rem;
  color: var(--white);
  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(--t3);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq details p { padding: 0 22px 20px; line-height: 1.65; color: #c9d8f5; }
.faq strong { color: var(--t2); }

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(50px, 8vh, 90px);
  text-align: center;
  color: #a9bce4;
  font-size: 0.92rem;
  line-height: 1.8;
  padding-bottom: 30px;
}
.footer .muted { color: #8fa3cf; }
.footer a { color: var(--t3); }

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

@media (max-width: 560px) {
  .tile { border-radius: 10px; }
}

/* ==== 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; }
}
