/* Andaluzja 27–31.12
   Kierunek: azulejo. Kobaltowe płytki jako jedyny mocny akcent (hero i kafle dni),
   reszta to spokojne, chłodne „wapno” z jednym kolorem na dzień.
   Układ: plan dnia po lewej, mapa przyklejona po prawej; na telefonie mapa nad listą. */

@font-face { font-family: "Gloock"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/gloock-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Gloock"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/gloock-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/figtree-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/figtree-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/figtree-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/figtree-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/figtree-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/figtree-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cobalt: #1F3E9C;
  --cobalt-deep: #132a6e;
  --ink: #121A33;
  --wash: #F2F4F8;
  --surface: #FFFFFF;
  --line: #D8DEE9;
  --muted: #586179;
  --albero: #E2C47A;
  --naranja: #E8781A;
  --olive: #5A7838;
  --day: var(--cobalt);

  --display: "Gloock", "Georgia", "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-tile: 4px;      /* płytki: prawie ostre rogi */
  --r-soft: 14px;     /* karty i zdjęcia */
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E9EDF6;
    --wash: #0F1530;
    --surface: #18214A;
    --line: #2B3664;
    --muted: #A3ADC8;
    --cobalt: #3B5FD1;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--wash); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #F4F6FB;
  background-color: var(--cobalt-deep);
  background-image:
    radial-gradient(120% 90% at 85% 10%, rgba(232,120,26,.22), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23F4F6FB' stroke-opacity='.13' stroke-width='1.4'%3E%3Cpath d='M44 10 52 36 78 44 52 52 44 78 36 52 10 44 36 36Z'/%3E%3Ccircle cx='44' cy='44' r='11'/%3E%3Cpath d='M0 0 18 18M88 0 70 18M0 88 18 70M88 88 70 70'/%3E%3Cpath d='M44 0v8M44 80v8M0 44h8M80 44h8'/%3E%3Crect x='.7' y='.7' width='86.6' height='86.6'/%3E%3C/g%3E%3C/svg%3E");
  padding: clamp(48px, 9vw, 112px) clamp(18px, 5vw, 64px) clamp(28px, 5vw, 56px);
  display: grid;
  gap: clamp(28px, 5vw, 56px);
}
.hero-inner { max-width: 1180px; width: 100%; margin: 0 auto; display: grid; gap: 14px; }
.hero-title {
  font-size: clamp(64px, 15vw, 188px);
  line-height: .9;
  letter-spacing: -0.035em;
}
.hero-sub { font-size: clamp(18px, 2.4vw, 24px); max-width: 44ch; opacity: .92; }
.hero-count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--albero); min-height: 1.5em; }

/* Kafle dni – jedyny „głośny” element strony */
.tiles {
  max-width: 1180px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 16px);
}
.tile {
  appearance: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit; font: inherit;
  position: relative; aspect-ratio: 1; border-radius: var(--r-tile); overflow: hidden;
  background: #F4F6FB; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 24px -14px rgba(0,0,0,.6);
  transform-origin: 50% 100%;
  transition: transform .35s var(--ease);
}
.tile svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-label {
  position: absolute; left: 8%; right: 8%; bottom: 8%;
  background: #F4F6FB; color: #121A33; border-radius: 3px; padding: 6px 8px 7px;
  display: grid; gap: 0; line-height: 1.15;
}
.tile-label b { font-family: var(--display); font-weight: 400; font-size: clamp(15px, 2.1vw, 24px); }
.tile-label span { font-size: clamp(11px, 1.2vw, 14px); color: #4a5268; }
.tile:hover { transform: translateY(-4px); }
.tile[aria-current="true"] { outline: 3px solid var(--albero); outline-offset: 3px; }

.tiles.is-loading .tile { opacity: 0; transform: rotateX(-80deg); }
.tiles.is-in .tile { animation: tile-in .7s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms); }
@keyframes tile-in { from { opacity: 0; transform: perspective(600px) rotateX(-80deg); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(5, 30%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .tile { scroll-snap-align: start; }
}

/* ---------- Plan ---------- */
.plan { max-width: 1240px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 32px) 40px; }
.plan-bar {
  position: sticky; top: 0; z-index: 500;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 0; background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; font: inherit; cursor: pointer; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 7px 14px; border-radius: var(--r-tile); font-weight: 600; font-size: 15px;
  transition: background .2s, color .2s, border-color .2s;
}
.tab:hover { border-color: var(--cobalt); }
.tab[aria-selected="true"] { background: var(--day); border-color: var(--day); color: #fff; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 15px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; transition: background .25s; flex: none; }
.switch-dot { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s var(--ease); }
.switch input:checked + .switch-track { background: var(--olive); }
.switch input:checked + .switch-track .switch-dot { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--naranja); outline-offset: 2px; }

.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(20px, 3vw, 40px); padding-top: 24px; align-items: start; }
.map-wrap { position: sticky; top: 76px; display: grid; gap: 8px; }
.map { height: calc(100vh - 130px); min-height: 420px; border-radius: var(--r-soft); overflow: hidden; border: 1px solid var(--line); background: #e8ecf3; }
.map-note { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; }
  .map-wrap { position: relative; top: 0; order: -1; }
  .map { height: 46vh; min-height: 300px; }
}

/* ---------- Dzień ---------- */
.day { display: grid; gap: 22px; view-transition-name: day; }
.day-cover { position: relative; border-radius: var(--r-soft); overflow: hidden; aspect-ratio: 16 / 7; background: var(--day); }
.day-cover img { width: 100%; height: 100%; object-fit: cover; }
.day-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,16,40,.55)); }
.day-cover figcaption { position: absolute; right: 10px; bottom: 8px; z-index: 1; font-size: 11px; color: rgba(255,255,255,.8); }

.day-head { display: grid; gap: 10px; }
.day-date { font-weight: 600; color: var(--day); font-size: 15px; }
.day-title { font-size: clamp(34px, 5vw, 54px); }
.day-lead { font-size: 18px; color: var(--muted); max-width: 58ch; }
.day-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--line); }
.day-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 10px 14px; border-radius: var(--r-tile); background: var(--day); color: #fff; border: 1px solid var(--day);
}
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Oś czasu */
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.stop { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-soft); }
.stop.is-move { background: transparent; border-style: dashed; }
.stop.is-park { border-left: 5px solid var(--day); }
.stop.is-active { border-color: var(--day); box-shadow: 0 0 0 1px var(--day); }

.stop-head {
  appearance: none; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  width: 100%; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px;
}
.stop-head[disabled] { cursor: default; }
.stop-time { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; color: var(--day); }
.is-move .stop-time { color: var(--muted); font-size: 17px; font-family: var(--body); font-weight: 600; }
.stop-main { display: grid; gap: 2px; min-width: 0; }
.stop-name { font-weight: 700; font-size: 17px; }
.stop-meta { font-size: 14px; color: var(--muted); }
.stop-pin {
  width: 28px; height: 28px; border-radius: var(--r-tile); display: grid; place-items: center;
  background: var(--day); color: #fff; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.stop-pin.is-p { background: transparent; color: var(--day); border: 2px solid var(--day); }
.stop-caret { width: 18px; height: 18px; color: var(--muted); transition: transform .3s var(--ease); }
.stop-head[aria-expanded="true"] .stop-caret { transform: rotate(180deg); }
.stop-right { display: flex; align-items: center; gap: 10px; }

.stop-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.stop-head[aria-expanded="true"] + .stop-body { grid-template-rows: 1fr; }
.stop-inner { overflow: hidden; min-height: 0; }
.stop-content { padding: 0 16px 16px 86px; display: grid; gap: 12px; }
.stop-photo { margin: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--wash); position: relative; }
.stop-photo img { width: 100%; height: 100%; object-fit: cover; }
.stop-photo figcaption { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.stop-desc { max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-tile); background: var(--wash); border: 1px solid var(--line); }
.chip.warn { background: #FCEBD8; border-color: #F2C79C; color: #8A3F00; }
.stop-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 15px; font-weight: 700; }
.stop-links a, .stop-links button { color: var(--day); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

@media (max-width: 560px) {
  .stop-head { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .stop-content { padding: 0 12px 14px 12px; }
}

/* Przejście między dniami */
::view-transition-old(day) { animation: day-out .22s ease both; }
::view-transition-new(day) { animation: day-in .38s var(--ease) both; }
@keyframes day-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes day-in { from { opacity: 0; transform: translateY(14px); } }

/* Pinezki na mapie */
.pin {
  width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center;
  background: var(--pin, #1F3E9C); color: #fff; font: 700 14px/1 "Figtree", system-ui, sans-serif;
  border: 2px solid #fff; box-shadow: 0 4px 10px -4px rgba(0,0,0,.6);
  transition: transform .25s var(--ease);
}
.pin.is-p { background: #fff; color: var(--pin, #1F3E9C); border-color: var(--pin, #1F3E9C); }
.pin.is-active { transform: scale(1.25); }
.leaflet-popup-content { font: 600 14px/1.4 "Figtree", system-ui, sans-serif; margin: 10px 14px; }
.leaflet-container { font-family: var(--body); }

/* ---------- Informacje ---------- */
.info {
  max-width: 1240px; margin: 0 auto; padding: 40px clamp(14px, 3vw, 32px) 56px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
  border-top: 1px solid var(--line);
}
.info-block { display: grid; gap: 12px; align-content: start; }
.info-block h2 { font-size: clamp(26px, 3vw, 34px); }
.info-lead { color: var(--muted); max-width: 60ch; }
.info-parking { grid-column: 1 / -1; }
.info-check { grid-column: span 5; }
.info-tips { grid-column: span 7; }
@media (max-width: 900px) { .info-check, .info-tips { grid-column: 1 / -1; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-soft); background: var(--surface); }
.parks { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.parks th, .parks td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.parks thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.parks td small { display: block; color: var(--muted); font-size: 13px; }
.parks td a { font-weight: 700; color: var(--cobalt); }
.parks .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-soft); }
.check label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 12px 14px; cursor: pointer; align-items: start; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--olive); }
.check b { display: block; }
.check small { color: var(--muted); font-size: 14px; }
.check a { color: var(--cobalt); font-weight: 700; font-size: 14px; }
.check input:checked ~ span b { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }

.tips { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 12px 20px; }
.tips dt { font-family: var(--display); font-size: 19px; }
.tips dd { margin: 0; color: var(--ink); max-width: 60ch; }
@media (max-width: 560px) { .tips { grid-template-columns: 1fr; gap: 4px; } .tips dd { margin-bottom: 10px; } }

.foot { max-width: 1240px; margin: 0 auto; padding: 24px clamp(14px, 3vw, 32px) 48px; color: var(--muted); font-size: 14px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.credits summary { cursor: pointer; font-weight: 600; }
.credits ul { margin: 10px 0 0; padding-left: 18px; columns: 2 280px; }
.credits a { color: var(--cobalt); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(day), ::view-transition-new(day) { animation: none; }
}
