/* Pan Peryskop — HERO: single-color + iPhone, w którym działa cała aplikacja
   (mapa, chipy, day pills, segmented, piny, story preview, in-app browser). */

.hero {
  position: relative;
  padding: 132px 0 96px;
  overflow: hidden;
  overflow: clip;
  contain: paint;
  background: #0b0b10;
  color: var(--paper);
}
.hero::before {
  content: ""; position: absolute; top: -24%; right: -12%;
  width: 680px; height: 680px;
  background: radial-gradient(circle, rgba(122, 92, 240, 0.2), rgba(122, 92, 240, 0.06) 45%, transparent 68%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; bottom: -30%; left: -10%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12), transparent 66%);
  pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 72px;
  align-items: center;
}

/* ---------- panel tekstowy ---------- */
.hero-copy { display: flex; flex-direction: column; gap: 22px; max-width: 520px; }
.hero-copy .pill { background: rgba(255, 255, 255, 0.1); color: #fff; }
.hero-copy h1 .grad-text { display: inline-block; }
.hero-copy p.sub { color: rgba(255, 255, 255, 0.72); font-size: 14px; line-height: 1.7; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- iPhone ---------- */
.hero-phone { justify-self: center; }
.iphone {
  position: relative;
  width: 302px;
  aspect-ratio: 9 / 19.5;
  border-radius: 54px;
  padding: 11px;
  background: linear-gradient(160deg, #3a3a3c, #171719 30%, #242426 70%, #0a0a0b);
  box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6), 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.iphone::before {
  content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 98px; height: 28px; border-radius: 999px; background: #000; z-index: 60;
}
.iphone .side-btn { position: absolute; right: -3px; top: 140px; width: 3px; height: 56px; border-radius: 3px; background: #3a3a3c; }
.iphone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 44px; overflow: hidden; overflow: clip; contain: paint;
  background: var(--map-canvas);
}
.story-home { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 106px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.6); z-index: 50; }

/* ---------- aplikacja (wnętrze telefonu) ---------- */
.app { position: absolute; inset: 0; }
#city-map { position: absolute; inset: 0; }

/* top: miasto + tagi + day pills (scroll poziomy) */
.app-top {
  position: absolute; top: 12px; left: 8px; right: 8px; z-index: 22;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.app-top > * { pointer-events: auto; }
.app-top .hscroll {
  display: flex; gap: 6px; align-items: center;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  padding: 2px;
}
.app-top .hscroll::-webkit-scrollbar { display: none; }
.app-top .chips-row { display: flex; gap: 6px; }
.city-chip { cursor: pointer; position: relative; flex-shrink: 0; }
.city-chip .city-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-chip .chev { width: 11px; height: 11px; flex-shrink: 0; }
.city-panel {
  display: none;
  position: absolute; top: 40px; left: 0; z-index: 55;
  width: 190px; max-height: 220px; overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(20, 22, 26, 0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.city-panel.open { display: block; }
.city-panel .city-opt {
  display: block; width: 100%; text-align: left;
  padding: 8px 11px; border-radius: 8px;
  font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.city-panel .city-opt:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.city-panel .city-opt.is-active { color: var(--accent-soft); background: rgba(122, 92, 240, 0.18); }

.day-pills { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.day-pills::-webkit-scrollbar { display: none; }
.day-pill {
  display: inline-flex; flex-direction: column; align-items: center; flex-shrink: 0;
  padding: 5px 10px; border-radius: 11px;
  font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.day-pill small { font-weight: 500; font-size: 8px; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.04em; }
.day-pill:hover { transform: translateY(-1px); }
.day-pill.is-active { background: var(--accent); color: #fff; border-color: transparent; }
.day-pill.is-active small { color: rgba(255, 255, 255, 0.9); }

/* bottom: segmented + licznik */
.app-bottom {
  position: absolute; left: 0; right: 0; bottom: 30px; z-index: 22;
  display: flex; justify-content: center;
  transition: opacity 0.2s ease;
}
.app-corner {
  position: absolute; left: 10px; bottom: 40px; z-index: 21;
  display: flex; align-items: center; gap: 6px;
  transition: opacity 0.2s ease;
}
.app-corner .pill { background: rgba(0, 0, 0, 0.34); color: rgba(255, 255, 255, 0.72); font-size: 9px; letter-spacing: 0.04em; padding: 3px 8px; }
.app-corner .pill b { color: #fff; }
.app-corner.is-hidden, .app-bottom.is-hidden { opacity: 0; pointer-events: none; }
.map-demo-badge {
  position: absolute; top: 8px; right: 8px; z-index: 23;
  font-size: 8px; font-weight: 700; letter-spacing: 0.06em;
  color: #fff; background: rgba(249, 115, 22, 0.24); border: 1px solid rgba(249, 115, 22, 0.5);
  padding: 3px 8px; border-radius: 999px;
}
.map-demo-badge[hidden] { display: none; }

/* chipy (mniejsze, telefon) */
.chip {
  height: 30px; padding: 0 11px; font-size: 11.5px; border-radius: 999px;
  color: var(--ink); background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease), background-color 0.2s ease;
  white-space: nowrap; flex-shrink: 0;
}
.chip:hover { transform: translateY(-1px); }
.chip.is-active { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(122, 92, 240, 0.4); }

.segmented {
  display: inline-flex; gap: 3px; padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.segmented button {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.75);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.segmented button.is-active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }

/* ---------- piny ---------- */
.pins-layer { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.map-pin { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; width: 46px; height: 46px; }
.map-pin .pin-back { position: absolute; inset: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.25); }
.map-pin svg.ring { position: absolute; inset: 0; width: 46px; height: 46px; transform: rotate(-90deg); }
.map-pin svg.ring .ring-track { fill: none; stroke: rgba(255, 255, 255, 0.25); stroke-width: 3; }
.map-pin svg.ring .ring-prog { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; transition: stroke 0.3s ease; }
.map-pin .pin-thumb { position: absolute; left: 3px; top: 3px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.12); }
.map-pin .pin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.map-pin .pin-thumb .pin-ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255, 255, 255, 0.75); font-size: 12px; }
.map-pin.is-cluster .pin-thumb { display: grid; place-items: center; background: var(--accent); border: 1px solid rgba(255, 255, 255, 0.4); }
.map-pin.is-cluster .pin-count { font-size: 12px; font-weight: 700; color: #fff; font-family: var(--font-display); }
.map-pin.ring-yellow .ring-prog { stroke: var(--amber); }
.map-pin.ring-red .ring-prog { stroke: var(--live); }
.map-pin:hover { z-index: 40; }

/* ---------- map states ---------- */
.map-states { position: absolute; inset: 0; z-index: 14; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.map-states[hidden] { display: none; }
.map-loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255, 255, 255, 0.7); font-size: 11px;
  background: rgba(12, 15, 18, 0.55); backdrop-filter: blur(4px);
  padding: 20px 26px; border-radius: 14px;
}
.map-loading .spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent-soft); animation: pp-spin 0.9s linear infinite; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.map-empty {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.85);
  background: rgba(12, 15, 18, 0.7); backdrop-filter: blur(6px);
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--glass-line);
}

/* ---------- story preview (sheet w telefonie) ---------- */
.app-sheet {
  position: absolute; left: 8px; right: 8px; bottom: 34px; z-index: 30;
  border-radius: 16px;
  background: rgba(20, 22, 28, 0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  padding: 12px 12px 10px;
  color: #fff;
  transform: translateY(130%);
  transition: transform 0.35s var(--ease);
  display: flex; flex-direction: column; gap: 8px;
}
.app-sheet.open { transform: translateY(0); }
.sheet-badges { display: flex; gap: 5px; }
.sheet-title { font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.sheet-body { display: flex; gap: 12px; align-items: flex-start; }
.sheet-left { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; width: 108px; }
.sheet-date { font-size: 9px; font-weight: 600; color: rgba(255, 255, 255, 0.65); }
.sheet-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.sheet-venue { display: flex; align-items: flex-start; gap: 5px; font-size: 10px; color: rgba(255, 255, 255, 0.7); line-height: 1.45; }
.sheet-venue svg { flex-shrink: 0; margin-top: 1px; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sheet-tags .tag { font-size: 8.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(122, 92, 240, 0.22); color: var(--accent-soft); }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 8px; }
.sheet-link { font-size: 11px; font-weight: 600; color: var(--link); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sheet-close {
  font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.55);
  padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.15s ease;
}
.sheet-close:hover { background: rgba(255, 255, 255, 0.18); }

/* flip clock (telefon) */
.flip-clock { display: flex; gap: 4px; align-items: center; }
.flip-digit {
  position: relative; width: 20px; height: 32px; border-radius: 5px;
  background: #17181a; display: grid; place-items: center; overflow: hidden;
}
.flip-digit::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.6); }
.flip-digit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0)); pointer-events: none; }
.flip-digit span { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.flip-colon { display: flex; flex-direction: column; gap: 5px; padding: 0 1px; }
.flip-colon i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
.showtimes-dots { display: flex; gap: 4px; justify-content: center; }
.showtimes-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); cursor: pointer; }
.showtimes-dots i.is-active { background: #fff; }

/* ---------- in-app browser (w telefonie) ---------- */
.app-browser {
  position: absolute; inset: 0; z-index: 40;
  background: #fff; color: #333;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}
.app-browser.open { transform: translateY(0); }
.iab-handle { height: 20px; flex-shrink: 0; display: grid; place-items: center; cursor: grab; }
.iab-handle i { width: 34px; height: 4px; border-radius: 2px; background: #c9c9cd; }
.iab-head { display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font-size: 10px; }
.iab-head .iab-domain { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: #333; }
.iab-head a { font-weight: 600; color: var(--accent-deep); font-size: 10px; padding: 5px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.05); transition: background-color 0.15s ease; }
.iab-head a:hover { background: rgba(0, 0, 0, 0.1); }
.iab-close { width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center; font-size: 14px; color: #444; background: rgba(0, 0, 0, 0.06); }
.app-browser iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* MapLibre attribution (małe) */
.maplibregl-ctrl-attrib { font-size: 8px !important; background: rgba(5, 5, 5, 0.5) !important; color: rgba(255, 255, 255, 0.4) !important; border-radius: 6px 0 0 0; }
.maplibregl-ctrl-attrib a { color: rgba(255, 255, 255, 0.5); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-content { gap: 44px; }
  .iphone { width: 262px; }
}

@media (max-width: 860px) {
  .hero { padding: 96px 0 64px; }
  .hero-content { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-copy { max-width: 560px; justify-self: center; align-items: center; }
  .hero-copy p.sub { text-align: center; }
  .hero-phone { order: 2; }
  .hero-copy { order: 1; }
  .iphone { width: 280px; }
}

@media (max-width: 640px) {
  .iphone { width: 252px; }
}
