/* ========================================
   ATLAS — widok / atlas (lista krajów)
   ======================================== */

/* HERO (skopiowane z pages/list.css — atlas nie ładuje list.css) */
.hero {
  max-width: 1480px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  border-bottom: 1px solid var(--rule);
}
.hero__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero__eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--ink); display: block;
}
.hero__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  color: var(--ink);
}
.hero__title em { font-style: normal; font-weight: 300; color: var(--muted); }
.hero__sub {
  font-size: 16px;
  max-width: 620px;
  color: var(--ink-2);
  line-height: 1.55;
}
.hero__sub .lead { font-family: 'Inter', system-ui, sans-serif; font-weight: 500; color: var(--ink); }

/* Pasek migracji TSL (placeholder etap 5 — etap 6 wypełni dane) */
.hero__migration {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.hero__migration-label { color: var(--muted); }
.hero__migration-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2px;
}
.hero__migration-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.hero__migration-pill--ok { background: rgba(5,150,105,0.10); color: var(--emerald); }
.hero__migration-pill--ok .dot { background: var(--emerald); }
.hero__migration-pill--warn { background: rgba(217,119,6,0.10); color: var(--amber); }
.hero__migration-pill--warn .dot { background: var(--amber); }

/* GRID krajów */
.country-grid {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border-top: 2px solid var(--ink);
  border-left: 1px solid var(--rule);
}

.country {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 26px 22px;
  background: var(--paper);
  transition: background .12s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  cursor: pointer;
  min-height: 200px;
}
.country:hover { background: var(--paper-2); }
.country:hover .country__arrow { transform: translateX(4px); opacity: 1; }
.country::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 2px solid transparent;
  transition: border-color .12s;
}
.country:hover::after { border-color: var(--ink); }

.country__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.country__flag-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.country__flag {
  width: 56px; height: 42px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
  flex: none;
}
.country__iso {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* Badge formatu TSL — placeholder etap 5, etap 6 wypełni */
.country__tsl {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  margin-right: 8px;
}
.country__tsl--v6 { background: rgba(5,150,105,0.10); color: var(--emerald); }
.country__tsl--v5 { background: rgba(217,119,6,0.10); color: var(--amber); }

.country__arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.5;
  transition: all .12s;
}

.country__name {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.country__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  font-size: 11px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule-2);
}
.country__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.country__stat dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.country__stat dd {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.country__stat dd .unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 4px;
}

.country__bar {
  height: 3px;
  background: var(--rule-2);
  margin-top: 8px;
  grid-column: 1 / -1;
  overflow: hidden;
  background-image: linear-gradient(
    to right,
    var(--emerald) 0,
    var(--emerald) var(--active-w, 0%),
    var(--muted-2) var(--active-w, 0%),
    var(--muted-2) calc(var(--active-w, 0%) + var(--expired-w, 0%)),
    transparent calc(var(--active-w, 0%) + var(--expired-w, 0%))
  );
}

/* Feature card — pierwszy kraj (największy) */
.country.feature {
  grid-column: span 2;
  min-height: 260px;
  background: var(--paper);
}
.country.feature::before {
  content: '· najliczniejsza reprezentacja ·';
  position: absolute;
  top: 14px; right: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--paper);
  padding: 0 8px;
}
.country.feature .country__name { font-size: 32px; }
.country.feature .country__flag { width: 80px; height: 60px; }
.country.feature .country__iso { font-size: 30px; }

/* FOOTER */
footer.colophon {
  max-width: 1480px;
  margin: 80px auto 0;
  padding: 60px 32px 48px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--muted);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
footer .colophon__brand {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
footer .colophon__block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
}
footer .colophon__block dt {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
footer .colophon__block dd { color: var(--ink); margin-bottom: 4px; }
footer .colophon__block a:hover { text-decoration: underline; }

/* Animacja wejścia */
.country { opacity: 0; transform: translateY(6px); animation: entry .5s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes entry { to { opacity: 1; transform: translateY(0); } }
.country:nth-child(1) { animation-delay: 0.02s; }
.country:nth-child(2) { animation-delay: 0.04s; }
.country:nth-child(3) { animation-delay: 0.06s; }
.country:nth-child(4) { animation-delay: 0.08s; }
.country:nth-child(5) { animation-delay: 0.1s; }
.country:nth-child(6) { animation-delay: 0.12s; }
.country:nth-child(7) { animation-delay: 0.14s; }
.country:nth-child(8) { animation-delay: 0.16s; }

@media (max-width: 1000px) {
  .country.feature { grid-column: span 1; }
  .country.feature .country__name { font-size: 24px; }
  footer.colophon { grid-template-columns: 1fr; gap: 24px; }
}
