/* =========================================================================
   CampFest 2026 PWA — dizajn podľa oficiálneho programového bulletinu:
   gradient pozadie (jantárová → červená → slivková → indigo, navzorkované
   z bulletinu) a jednoduchý biely text. Žiadne farebné karty.
   Písmo: Aspekta (variabilné, OFL 1.1) — font webu campfest.sk.
   Logo CAMPFEST = extrahovaný originálny wordmark (assets/).
   ========================================================================= */

@font-face {
  font-family: 'Aspekta';
  src: url('../fonts/AspektaVF.woff2') format('woff2-variations');
  font-weight: 50 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --white-dim: rgba(255, 255, 255, 0.74);
  --white-faint: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.32);
  --hairline: rgba(255, 255, 255, 0.22);
  --fill: rgba(255, 255, 255, 0.10);
  --fill-strong: rgba(255, 255, 255, 0.16);
  --deep: #2b2664;            /* spodok gradientu — sheety, navigácia */
  --deep-ink: #322b6b;        /* text na bielych výplniach */
  --radius: 16px;
  --font: "Aspekta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html { height: 100%; background: #323d8b; overscroll-behavior: none; }

body {
  font-family: var(--font);
  color: var(--white);
  min-height: 100dvh;
  background: transparent; /* gradient kreslí body::before; základ je na html */
  overscroll-behavior-y: none;
}

/* Gradient z bulletinu ako fixná vrstva pod obsahom — iOS nepodporuje
   background-attachment: fixed, pri overscrolle by pozadie prekrývalo
   plávajúce tlačidlá. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-color: #3a3b89;
  background-image:
    radial-gradient(90% 34% at 82% 2%, rgba(231, 154, 14, 0.85) 0%, rgba(231, 154, 14, 0) 70%),
    radial-gradient(80% 30% at 10% 34%, rgba(196, 88, 41, 0.55) 0%, rgba(196, 88, 41, 0) 70%),
    radial-gradient(90% 36% at 88% 60%, rgba(118, 58, 96, 0.55) 0%, rgba(118, 58, 96, 0) 72%),
    linear-gradient(180deg,
      #e08c12 0%, #c45907 16%, #b04b4a 30%, #9f405a 42%,
      #763a60 56%, #583d78 70%, #433f85 84%, #323d8b 100%);
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ============================= HLAVIČKA ============================= */
.app-header {
  position: sticky; top: 0; z-index: 40;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: linear-gradient(180deg, rgba(20, 14, 40, 0.30), rgba(20, 14, 40, 0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-row { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; }

.logo-btn { flex: none; padding: 2px 0; }
.logo-wordmark { display: block; height: 32px; width: auto; }

.promo-chip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.5); border-radius: 999px; padding: 8px 13px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--white); background: rgba(255, 255, 255, 0.08);
}
.promo-chip .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #7be0a3;
  animation: promo-pulse 2.2s ease-in-out infinite;
}
@keyframes promo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123, 224, 163, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(123, 224, 163, 0); }
}
@media (prefers-reduced-motion: reduce) { .promo-chip .dot { animation: none; } }

.offline-pill {
  margin-left: 8px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--white-dim); background: rgba(28, 23, 64, 0.5);
}
.promo-chip[hidden] + .offline-pill { margin-left: auto; }

.count-badge {
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--white); color: var(--deep-ink);
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

.header-program-controls { max-width: 560px; margin: 12px auto 0; }

.seg {
  display: flex; border-radius: 999px; padding: 4px;
  border: 2px solid var(--white);
}
.seg-btn {
  flex: 1; padding: 10px 6px; border-radius: 999px;
  color: var(--white); font-weight: 800; font-size: 14.5px; text-transform: uppercase; letter-spacing: 0.02em;
}
.seg-btn.is-active { background: var(--white); color: var(--deep-ink); }

/* ============================= DOCK S DŇAMI ============================= */
.day-dock {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 49; display: flex; gap: 6px;
  background: rgba(28, 23, 64, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px;
  box-shadow: 0 8px 22px rgba(10, 8, 30, 0.4);
}
.day-pill {
  color: var(--white); border-radius: 999px; padding: 9px 18px;
  font-weight: 800; font-size: 13px; text-transform: uppercase; line-height: 1.2;
  text-align: center;
}
.day-pill small { display: block; font-size: 10px; font-weight: 700; opacity: 0.7; }
.day-pill.is-active { background: var(--white); color: var(--deep-ink); }
.day-pill.is-active small { opacity: 0.8; }

/* ============================= OBSAH ============================= */
main { max-width: 560px; margin: 0 auto; padding: 6px 14px calc(180px + env(safe-area-inset-bottom, 0px)); }

/* ============================= PLÁVAJÚCE TLAČIDLÁ ============================= */
.fabs {
  position: fixed; right: 14px; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 50; display: flex; flex-direction: column; gap: 10px;
}
.fab {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid var(--white); color: var(--white);
  background: rgba(28, 23, 64, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(10, 8, 30, 0.4);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.fab .ic { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; }
.fab[aria-pressed="true"], .fab.is-on { background: var(--white); color: var(--deep-ink); }
.fab[aria-pressed="true"] .ic { fill: var(--deep-ink); }
.fab-badge { position: absolute; top: -4px; right: -4px; border: 1.5px solid var(--deep); }

.screen { display: none; }
.screen.is-active { display: block; animation: fadein 0.18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* --------- Splash „Pridať na plochu“ --------- */
.splash {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(24, 20, 56, 0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 26px; color: var(--white);
  animation: fadein 0.2s ease;
}
.splash-wordmark { width: min(240px, 64%); }
.splash-title {
  margin-top: 26px; font-size: 34px; font-weight: 1000; line-height: 1.05; text-transform: uppercase;
}
.splash-text {
  margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--white-dim); max-width: 320px;
}
.splash-steps {
  margin-top: 22px; font-size: 13.5px; line-height: 1.7; color: var(--white);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 18px;
  text-align: left; max-width: 320px;
}
.splash .splash-btn { flex: none; width: min(300px, 100%); margin-top: 10px; }
.splash #installBtn { margin-top: 24px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(-8px);
  top: calc(14px + env(safe-area-inset-top, 0px));
  z-index: 70; background: var(--white); color: var(--deep-ink);
  border-radius: 999px; padding: 10px 18px;
  font-weight: 800; font-size: 13px;
  box-shadow: 0 8px 22px rgba(10, 8, 30, 0.35);
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.favbar {
  border: 1.5px solid var(--line); background: var(--fill); border-radius: 12px;
  padding: 10px 12px; font-size: 13.5px; margin: 10px 0; color: var(--white-dim);
}
.favbar b { color: var(--white); text-transform: uppercase; }
.linklike { text-decoration: underline; color: var(--white); font-weight: 700; }

.event-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 0.15s;
}
.event-card:active { background: var(--fill); }

/* časová koľajnica vľavo (lineup) */
.event-time {
  flex: none; width: 52px; padding-top: 2px;
  font-weight: 900; font-size: 13px; font-variant-numeric: tabular-nums;
}
.event-time small { display: block; font-weight: 600; font-size: 10.5px; color: var(--white-faint); }

.event-main { flex: 1; min-width: 0; }
.event-title { font-weight: 800; font-size: 15px; line-height: 1.25; }
.event-meta { margin-top: 2px; font-size: 11.5px; color: var(--white-dim); display: flex; flex-wrap: wrap; gap: 3px 10px; }
.event-meta .stage-name { color: var(--white); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
.event-sub { margin-top: 3px; font-size: 11px; color: var(--white-faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* roster hlavných programov priamo v riadku (štýl bulletinu) */
.event-lines {
  margin-top: 6px; display: grid; grid-template-columns: max-content 1fr;
  gap: 2px 10px; font-size: 12px;
}
.event-lines .k {
  color: var(--white-dim); font-weight: 800; text-transform: uppercase;
  font-size: 10.5px; letter-spacing: 0.06em; padding-top: 1.5px;
}
.event-lines .v { color: var(--white); font-weight: 600; line-height: 1.35; }

.conflict-tag {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 5px;
  font-size: 11px; font-weight: 800; color: var(--white);
}

.heart-btn { flex: none; padding: 5px; color: var(--white); align-self: center; }
.heart-btn .ic { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; }
.heart-btn.is-fav .ic { fill: var(--white); }

.type-tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--white);
  border: 1.5px solid var(--white); border-radius: 999px; padding: 3px 10px;
}

.empty-note { text-align: center; color: var(--white-dim); padding: 40px 20px; font-size: 14.5px; line-height: 1.5; }
.empty-note .big { font-size: 40px; display: block; margin-bottom: 10px; }

/* --------- Timeline --------- */
.timeline-wrap {
  overflow-x: auto; margin: 12px -14px 0; padding: 0 14px 8px;
  -webkit-overflow-scrolling: touch;
}
.timeline-grid { position: relative; }

.tl-hours { display: flex; margin-left: 86px; }
.tl-hour { flex: none; font-size: 12px; font-weight: 800; color: var(--white-dim); border-left: 1px solid var(--line); padding-left: 5px; }

.tl-row { display: flex; align-items: stretch; margin-top: 8px; }
.tl-stage {
  flex: none; width: 80px; margin-right: 6px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--white); display: flex; align-items: center;
  position: sticky; left: 0; z-index: 2;
  padding: 4px 6px 4px 0; border-radius: 6px;
}
.tl-track { position: relative; flex: none; height: 64px; background: rgba(255, 255, 255, 0.07); border-radius: 10px; }

.tl-block {
  position: absolute; top: 4px; bottom: 4px;
  background: var(--fill-strong); border: 1.5px solid var(--white); color: var(--white);
  border-radius: 10px; padding: 6px 8px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.tl-block b { font-size: 12px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-block span { font-size: 10px; font-weight: 700; color: var(--white-dim); }
.tl-block.is-fav::after {
  content: "♥"; position: absolute; top: 3px; right: 6px; font-size: 11px; color: var(--white);
}

.tl-nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--white); z-index: 3; box-shadow: 0 0 8px rgba(255,255,255,0.8); }

/* --------- Zoznam --------- */
.search-wrap {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--white); border-radius: 999px; padding: 12px 16px; margin: 12px 0 6px;
  color: var(--white);
}
.search-wrap input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--white);
  font: inherit; font-size: 16px;
}
.search-wrap input::placeholder { color: var(--white-faint); }

.letter-label { font-size: 26px; font-weight: 1000; margin: 20px 4px 4px; color: var(--white); }

.disclaimer { text-align: center; font-size: 12px; color: var(--white-faint); padding: 22px 10px 6px; }

/* ============================= SHEETY ============================= */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(12, 9, 32, 0.55); z-index: 60;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 61;
  width: min(560px, 100%);
  background: var(--deep);
  background-image: linear-gradient(200deg, rgba(224, 140, 18, 0.14), rgba(159, 64, 90, 0.10) 40%, rgba(50, 61, 139, 0) 75%);
  border-radius: 22px 22px 0 0; border: 1.5px solid var(--line); border-bottom: 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 82dvh; overflow-y: auto;
}
@keyframes sheetup { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet { animation: sheetup 0.22s ease; }
.sheet-grip { width: 44px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 14px; }
.sheet h3 { font-size: 22px; font-weight: 1000; margin-bottom: 6px; text-transform: uppercase; color: var(--white); }
.sheet-sub { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--white-dim); font-weight: 800; margin: 14px 0 8px; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 700; color: var(--white-dim);
  display: inline-flex; align-items: center; gap: 7px;
}
.filter-chip.is-on { border-color: var(--white); color: var(--deep-ink); background: var(--white); }

.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn { flex: 1; border-radius: 999px; padding: 14px; font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.03em; }
.btn-ghost { border: 2px solid var(--white); color: var(--white); }
.btn-solid { background: var(--white); color: var(--deep-ink); border: 2px solid var(--white); }

/* Detail sheet */
.detail-type { margin-bottom: 10px; }
.detail-title { font-size: 24px; font-weight: 1000; line-height: 1.15; }
.detail-when { margin-top: 10px; font-size: 14.5px; color: var(--white-dim); display: flex; flex-direction: column; gap: 4px; }
.detail-when b { color: var(--white); }
.detail-lines { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.detail-lines .row { display: flex; gap: 10px; padding: 4px 0; font-size: 14px; }
.detail-lines .row .k { color: var(--white-dim); font-weight: 800; flex: none; width: 100px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.detail-sub { margin-top: 10px; color: var(--white-dim); font-size: 14px; line-height: 1.5; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; }

