/* Czcionka z Canvy — jeśli wrzucisz plik do folderu fonts/, zostanie użyta. */
@font-face {
  font-family: 'Symphony';
  src: local('Symphony'), url('../fonts/Symphony.woff2') format('woff2'), url('../fonts/Symphony.otf'), url('../fonts/Symphony.ttf');
  font-display: swap;
}
:root {
  --orange: #e0673f;
  --gold: #9c8358;
  --text: #8a7650;
  --muted: #a8977a;
  --line: #e6d3c4;
  --btn-bg: #fbf6f0;
  --beige: #f4ece2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, #faf5ee 0, transparent 55%),
    radial-gradient(circle at 85% 90%, #efe2d3 0, transparent 50%),
    var(--beige);
  background-attachment: fixed;
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
}

.card {
  container-type: inline-size;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}
@media (min-width: 560px) {
  body { padding: 32px 16px; }
  .card {
    width: min(100%, 620px);
    min-height: 0;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(140, 110, 80, .18);
  }
}

.page {
  position: relative;
  overflow: hidden;
  padding: 12cqw 9cqw 14cqw;
  border-radius: inherit;
}
.page::before {
  content: "";
  position: absolute;
  inset: 3.5cqw;
  border: 1px solid var(--line);
  border-radius: 4px;
  pointer-events: none;
}

.flower {
  position: absolute;
  top: -1cqw;
  right: -7cqw;
  width: 36cqw;
  pointer-events: none;
  user-select: none;
  animation: sway 7s ease-in-out infinite alternate;
  transform-origin: 80% 10%;
}

.back {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1.5cqw;
  color: var(--muted);
  text-decoration: none;
  font-size: 2.8cqw;
  letter-spacing: .5cqw;
  text-transform: uppercase;
  transition: color .2s;
}
.back .arrow { transition: transform .25s; }
.back:hover { color: var(--orange); }
.back:hover .arrow { transform: translateX(-1cqw); }
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4cqw;
}

.header {
  position: relative;
  width: 62%;
  margin-top: 8cqw;
  text-align: center;
}
h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--orange);
  font-size: 4.4cqw;
  line-height: 1.35;
  letter-spacing: .5cqw;
  text-transform: uppercase;
}
.names {
  font-family: 'Symphony', 'Pinyon Script', cursive;
  color: var(--gold);
  font-size: 10cqw;
  line-height: 1.2;
  margin-top: 3cqw;
  white-space: nowrap;
}
.range {
  margin-top: 2cqw;
  font-size: 2.9cqw;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: .15cqw;
}

.counter {
  position: relative;
  margin: 12cqw auto 0;
  text-align: center;
}
.counter strong {
  display: block;
  font-size: 12cqw;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.counter small {
  display: block;
  margin-top: 2cqw;
  font-size: 2.8cqw;
  letter-spacing: .8cqw;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- oś czasu ---------- */
.timeline {
  --x: 6cqw;               /* pozycja linii */
  position: relative;
  list-style: none;
  margin-top: 12cqw;
  padding-left: 16cqw;
}
.timeline::before,
.timeline .fill {
  content: "";
  position: absolute;
  left: var(--x);
  top: 0;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
}
.timeline::before { bottom: 0; background: var(--line); }
.timeline .fill {
  height: 0;
  background: linear-gradient(var(--gold), var(--orange));
}
.plane {
  position: absolute;
  left: var(--x);
  top: 0;
  transform: translate(-50%, -50%) rotate(90deg);
  font-size: 4.2cqw;
  color: var(--orange);
  line-height: 1;
  background: #fff;
  padding: 1cqw 0;
  z-index: 2;
}

.stop {
  position: relative;
  padding-bottom: 9cqw;
  opacity: 0;
  transform: translateX(6cqw);
  transition: opacity .8s ease-out, transform .8s cubic-bezier(.2,.7,.2,1);
}
.stop:last-child { padding-bottom: 0; }
.stop.visible { opacity: 1; transform: none; }

.dot {
  position: absolute;
  left: calc(var(--x) - 16cqw);
  top: 1.2cqw;
  width: 8.5cqw;
  height: 8.5cqw;
  transform: translateX(-50%) scale(0);
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 4.2cqw;
  transition: transform .6s cubic-bezier(.3,1.6,.5,1) .15s, border-color .4s;
  z-index: 1;
}
.stop.visible .dot { transform: translateX(-50%) scale(1); border-color: var(--orange); }

.stop-card {
  background: var(--btn-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4cqw 5cqw;
  transition: transform .3s, box-shadow .3s;
}
.stop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(140, 110, 80, .15);
}
.date {
  font-size: 2.7cqw;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: .15cqw;
}
.stop h2 {
  margin-top: 1.2cqw;
  font-size: 3.6cqw;
  font-weight: 600;
  letter-spacing: .5cqw;
  text-transform: uppercase;
  color: var(--gold);
}
.stop p {
  margin-top: 1.5cqw;
  font-size: 3.1cqw;
  line-height: 1.6;
  color: var(--text);
}

/* pierwszy i ostatni przystanek wyróżnione */
.stop.special .stop-card {
  background: #fff;
  border-color: var(--orange);
  text-align: center;
}
.stop.special h2 {
  font-family: 'Symphony', 'Pinyon Script', cursive;
  font-size: 9cqw;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

.ending {
  position: relative;
  margin-top: 12cqw;
  text-align: center;
  font-family: 'Symphony', 'Pinyon Script', cursive;
  color: var(--gold);
  font-size: 8cqw;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s, transform 1s;
}
.ending.visible { opacity: 1; transform: none; }
.ending .heart {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 4cqw;
  color: var(--orange);
  animation: beat 1.6s ease-in-out infinite;
}

/* ---------- podsumowanie i mapa ---------- */
.section {
  position: relative;
  margin-top: 16cqw;
  text-align: center;
}
.section-title {
  font-family: 'Symphony', 'Pinyon Script', cursive;
  font-weight: 400;
  color: var(--gold);
  font-size: 10cqw;
  line-height: 1.2;
}
.section-sub {
  margin-top: 1cqw;
  font-size: 2.6cqw;
  letter-spacing: .6cqw;
  text-transform: uppercase;
  color: var(--muted);
}
.stats {
  margin-top: 6cqw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3cqw;
}
.stat {
  background: var(--btn-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4.5cqw 2cqw 4cqw;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .7s ease-out, transform .7s cubic-bezier(.2,.7,.2,1);
}
.stats.visible .stat { opacity: 1; transform: none; }
.stats.visible .stat:nth-child(2) { transition-delay: .08s; }
.stats.visible .stat:nth-child(3) { transition-delay: .16s; }
.stats.visible .stat:nth-child(4) { transition-delay: .24s; }
.stats.visible .stat:nth-child(5) { transition-delay: .32s; }
.stats.visible .stat:nth-child(6) { transition-delay: .40s; }
.stat .icon { font-size: 5cqw; line-height: 1; }
.stat strong {
  display: block;
  margin-top: 2cqw;
  font-size: 6.4cqw;
  font-weight: 500;
  color: var(--orange);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat small {
  display: block;
  margin-top: 1.6cqw;
  font-size: 2.3cqw;
  letter-spacing: .3cqw;
  text-transform: uppercase;
  color: var(--muted);
}

.map {
  margin-top: 6cqw;
  height: 100cqw;
  max-height: 560px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #f7f3ee;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .9s ease-out, transform .9s ease-out;
}
.map.visible { opacity: 1; transform: none; }
.map .leaflet-control-attribution { font-size: 9px; }
/* szara mapa Esri przyciemniona na ciepły beż, żeby pasowała do strony */
.map .leaflet-tile-pane { filter: sepia(.35) saturate(.9) brightness(1.03); }
.map-hint {
  margin-top: 2.5cqw;
  font-size: 2.5cqw;
  color: var(--muted);
}
.pin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--orange);
  box-shadow: 0 3px 10px rgba(140, 110, 80, .3);
  display: grid;
  place-items: center;
  font-size: 15px;
  animation: pop .5s cubic-bezier(.3,1.6,.5,1) both;
}
.pin.home { border-color: var(--gold); background: var(--btn-bg); }
.pin.small { width: 20px; height: 20px; font-size: 10px; border-width: 1px; }
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
}
.leaflet-popup-content { margin: 10px 14px; font-size: 12px; line-height: 1.5; }
.leaflet-popup-content b { color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.leaflet-popup-content span { color: var(--orange); font-weight: 600; }
@keyframes pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* wejście nagłówka */
.back, .header, .counter {
  opacity: 0;
  animation: fadeUp .8s ease-out forwards;
}
.back    { animation-delay: .05s; }
.header  { animation-delay: .15s; }
.counter { animation-delay: .4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes sway {
  from { transform: rotate(-1deg); }
  to   { transform: rotate(1.5deg); }
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.25); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  *, .stop, .ending, .stat, .map { animation: none !important; transition: none !important; opacity: 1 !important; }
  .stop, .ending, .stat, .map { transform: none !important; }
  .dot { transform: translateX(-50%) scale(1) !important; }
}
