/* ============================================================
   AIRBNB-STYLE DESIGN SYSTEM
   White, coral accent, Inter, image-forward listing cards
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== TOKENS ===== */
:root {
  --coral: #FF385C;
  --coral-dark: #E00B41;
  --coral-soft: #FFE3E9;
  --ink: #222222;
  --ink-soft: #3F3F3F;
  --grey: #717171;
  --grey-light: #B0B0B0;
  --line: #DBDBDB;
  --line-soft: rgba(0, 0, 0, 0.08);
  --bg: #FFFFFF;
  --bg-soft: #F7F7F7;
  --white: #FFFFFF;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nav-h: 80px;
  --gutter: 24px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.10);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.16);
  --shadow-pill: 0 6px 20px rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --container: 1280px;
  --hero-gap: 126px;
}
@media (max-width: 47.99rem) {
  :root { --nav-h: 64px; --gutter: 16px; --hero-gap: 40px; }
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.003em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}
p { text-wrap: pretty; }

::selection { background: var(--coral); color: var(--white); }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* Naglowek obecny w drzewie dostepnosci, niewidoczny wizualnie. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.navbar.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-bottom-color: var(--line);
}
.navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.navbar .logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--coral);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar .logo .logo-dot {
  font-size: 0.9rem;
  opacity: 0.85;
}
.navbar ul {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.navbar a.nav-link {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.navbar a.nav-link:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.navbar a.nav-link.active {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
/* burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  /* Stays above the open drawer so it doubles as the close (X) button. */
  position: relative;
  z-index: 120;
  min-width: 44px;
  min-height: 44px;
}
.burger span {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-spring), opacity 0.25s var(--ease);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* drawer backdrop (created by main.js) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 90;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

.navbar a.nav-link:focus-visible,
.burger:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  margin: var(--hero-gap) auto 4px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1552465011-b4e21bf6e79a?auto=format&fit=crop&w=2000&q=75") center / cover no-repeat;
  opacity: 0.18;
  z-index: -1;
}
.hero .hero-kicker {
  margin-top: 32px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--grey);
  margin-bottom: 12px;
  text-transform: none;
  position: relative;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 16px;
  position: relative;
  animation: fadeUp 0.7s 0.05s var(--ease) both;
}
.hero h1 .grad { color: var(--coral); }
.hero p.hero-sub {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  color: var(--grey);
  font-weight: 400;
  position: relative;
  animation: fadeUp 0.7s 0.15s var(--ease) both;
}
.hero-photo {
  max-width: 900px;
  margin: var(--hero-gap) auto 4px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeUp 0.7s 0.25s var(--ease) both;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: auto 8% -24px;
  height: 48px;
  background: radial-gradient(ellipse at center, rgba(255, 56, 92, 0.18), transparent 70%);
  filter: blur(18px);
  z-index: -1;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}
.section-head {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-head .kicker {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey);
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0.01em;
}
.section-head p {
  color: var(--grey);
  font-size: 0.95rem;
  max-width: 480px;
}
/* ============================================================
   CARDS GRID (Airbnb listing cards)
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px 24px;
}
.card {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ececec 0%, #d8d8d8 100%);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card-media img { transform: scale(1.06); }
.card-media .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.01em;
}
.card-body {
  padding: 12px 4px 0;
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-sub {
  font-size: 0.9rem;
  color: var(--grey);
  margin-top: 3px;
  line-height: 1.4;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.5;
}

/* ============================================================
   LINK CARDS (linki.html — no images)
   ============================================================ */
.link-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.link-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.link-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.link-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.link-card-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--coral);
}
.link-card-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ============================================================
   PAGE HERO (subpages)
   ============================================================ */
.page-hero {
  padding: 48px var(--gutter) 8px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
  animation: fadeUp 0.7s 0.05s var(--ease) both;
}
.page-hero h1 .grad { color: var(--coral); }
.page-hero p {
  max-width: 540px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--grey);
  animation: fadeUp 0.7s 0.15s var(--ease) both;
}

/* ============================================================
   TIPS (clean Airbnb-style list)
   ============================================================ */
.tips {
  display: grid;
  gap: 14px;
}
.tip {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.tip:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.tip .tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: 10px;
}
.tip p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.tip strong {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.tip-cat {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 28px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tip-cat::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.tip-cat:first-child { margin-top: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 40px var(--gutter);
  margin-top: 40px;
}
.footer .footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer .footer-logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--coral);
  letter-spacing: -0.03em;
}
.footer .footer-copy {
  font-size: 0.82rem;
  color: var(--grey);
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* ============================================================
   TIMELINE (vertical day-by-day plan)
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 62px;
  display: grid;
  gap: 18px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--line) 0%, var(--line) 88%, transparent 100%);
  border-radius: 1px;
}
.tl-item {
  position: relative;
}
.tl-dot {
  position: absolute;
  left: -62px;
  top: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}
.tl-item--flight .tl-dot {
  background: var(--coral-soft);
  border-color: var(--coral);
}
.tl-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.tl-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tl-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.tl-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.tl-desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.6;
}
.tl-list {
  list-style: none;
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.tl-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.tl-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--line);
}
.tl-list li strong {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.tl-card a {
  color: var(--coral);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   HERO COUNTDOWN (index.html)
   ============================================================ */
.hero-countdown {
  margin: var(--hero-gap) auto 4px;
  padding: 0 var(--gutter);
  text-align: center;
}
.hero-countdown-title {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
/* Shrink-wrap wokół pływających <ul> FlipClocka — centrowanie przez text-align rodzica */
.hero-countdown-clock.flip-clock-wrapper {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content !important;
  margin: 0;
  padding-bottom: 34px; /* miejsce na etykiety przeniesione pod tarcze */
  /* --clock-scale / --clock-h are measured and set in index.html; 1 = natural size.
     transform does not shrink the layout box, so claw the removed height back. */
  transform: scale(var(--clock-scale, 1));
  transform-origin: top center;
  margin-bottom: calc((var(--clock-scale, 1) - 1) * var(--clock-h, 130px));
  /* Same for the width, otherwise the un-shrunk layout box breaks the centring. */
  margin-left: calc((var(--clock-scale, 1) - 1) * var(--clock-w, 0px) / 2);
  margin-right: calc((var(--clock-scale, 1) - 1) * var(--clock-w, 0px) / 2);
}
/* Etykiety: z góry-prawo na dół-środek grupy (left/width ustawia JS) */
.hero-countdown-clock .flip-clock-divider .flip-clock-label {
  top: auto;
  right: auto;
  bottom: -26px;
  text-align: center;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
.hero-countdown-note {
  margin: 18px 0 0;
  font-size: 0.95rem;
  color: var(--grey);
}

/* ============================================================
   MAPA (Leaflet)
   ============================================================ */
/* isolation: isolate zamyka wewnetrzne z-indexy Leafletu (400-1000) w tym
   kontenerze — bez tego kontrolki zoomu przykrywalyby navbar (z-index: 100). */
.map-wrap {
  position: relative;
  isolation: isolate;
  z-index: 0;
  margin-bottom: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map {
  height: 420px;
  background: var(--bg-soft);
}

.map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--coral);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-pill);
  transition: transform 0.2s var(--ease-spring);
}
.map-pin-wrap:hover .map-pin,
.map-pin-wrap:focus-visible .map-pin { transform: scale(1.15); }

.map-popup { display: flex; flex-direction: column; gap: 2px; }
.map-popup img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.map-popup strong { font-size: 0.95rem; color: var(--ink); }
.map-popup span { font-size: 0.85rem; color: var(--grey); }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-md); }

/* Przycisk "pokaz na mapie" w naglowku karty. */
.card-map-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease-spring);
}
.card-map-btn:hover { background: var(--coral-soft); transform: scale(1.1); }
.card-map-btn:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* Podswietlenie karty, do ktorej skoczylismy z markera. */
.card.is-active {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 47.99rem) {
  .burger { display: flex; }
  .navbar ul {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    height: 100svh;
    width: min(84vw, 320px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: calc(var(--nav-h) + 20px) 20px 20px;
    background: var(--white);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.12);
    border-radius: 0;
  }
  .navbar ul.open { transform: translateX(0); }
  .navbar a.nav-link {
    font-size: 1rem;
    padding: 14px 16px;
    border-radius: var(--radius);
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 20px 14px;
  }
  .section { padding: 20px var(--gutter) 48px; }
  .map { height: 280px; }
  .hero { padding-top: 32px; }
  .hero-photo { border-radius: var(--radius-md); margin-top: 4px; }

  .timeline { padding-left: 48px; }
  .timeline::before { left: 17px; }
  .tl-dot {
    left: -48px;
    top: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }
  .tl-card { padding: 16px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero h1, .hero p, .hero-photo, .page-hero h1, .page-hero p { animation: none !important; }
  .navbar ul, .nav-backdrop, .burger span { transition: none !important; }
  .link-card, .tip, .tl-card { transition: none; }
  .link-card:hover, .tip:hover, .tl-card:hover { transform: none; }
  .map-pin, .card-map-btn { transition: none; }
}
