/* ============================================================
   PARTILIBUR CARAVAN 2026 — BRAND LAYER
   Loaded LAST: overrides the token values of partilibur.css /
   carnival-tokens.css with the real palette extracted from
   Visual/ assets (see CLAUDE.md §5.1) and swaps in the brand
   fonts (Zebrawood display / Rosewood accent).
   ============================================================ */

/* ---------- Brand fonts ---------- */
@font-face {
  font-family: "Zebrawood Fill";
  src: url("../fonts/zebrawood-fill.woff2") format("woff2"),
       url("../fonts/zebrawood-fill.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rosewood Std Fill";
  src: url("../fonts/rosewood-std-fill.woff2") format("woff2"),
       url("../fonts/rosewood-std-fill.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Canonical brand palette (extracted hexes) ---------- */
  --pl-orange-1: #F04830;   /* sunset gradient start */
  --pl-orange-2: #F07818;   /* sunset gradient end   */
  --pl-red:      #D83030;
  --pl-magenta:  #F048A8;
  --pl-pink:     #FF3060;
  --pl-teal:     #48C0C0;
  --pl-emerald:  #009078;
  --pl-violet:   #601890;
  --pl-purple:   #483078;
  --pl-indigo:   #303060;
  --pl-gold:     #F0D878;
  --pl-sun:      #FFF090;
  --pl-cream:    #FFF0D8;
  --pl-ink:      #304848;   /* outline ink used on all brand lettering */
  /* Day accents (user decision: accents only, shared warm base) */
  --pl-d1:      #78D8D8;    /* Day 1 mint  */
  --pl-d1-lime: #D8F0A8;
  --pl-d2:      #483060;    /* Day 2 indigo/purple */
  --pl-d2-soft: #8E6FC4;

  /* ---------- Re-point partilibur.css tokens ---------- */
  --grape:   var(--pl-purple);
  --royal:   var(--pl-violet);
  --orange:  var(--pl-orange-2);
  --magenta: var(--pl-magenta);
  --teal:    var(--pl-teal);
  --sky:     var(--pl-d1);
  --gold:    var(--pl-gold);
  --red:     var(--pl-red);
  --cream:   var(--pl-cream);
  /* Dark base shifted to brand deep-indigo (Day-2 poster family) */
  --ink:     #221A3C;
  --ink-l:   #2E2450;
  /* Muted body copy lifted for WCAG AA on the dark ground */
  --muted:   #B9A4D8;

  /* ---------- Re-point carnival-tokens.css tokens ---------- */
  --carnival-red:        var(--pl-red);
  --carnival-gold:       var(--pl-gold);
  --carnival-teal:       var(--pl-teal);
  --carnival-purple:     var(--pl-violet);
  --carnival-cream:      var(--pl-cream);
  --carnival-dark:       #221A3C;
  --carnival-light-gold: var(--pl-sun);

  /* ---------- Typography ---------- */
  --f-display: "Zebrawood Fill", "Bagel Fat One", "Fredoka", cursive;
  --f-badge:   "Rosewood Std Fill", "Bungee", "Fredoka", cursive;
  --f-script:  "Caveat", "Bradley Hand", cursive;
}

/* Zebrawood is a tuscan face: all-caps, needs air */
h1, h2, h3, .hero-display, .section-title, .welcome-headline {
  text-transform: uppercase;
  letter-spacing: .035em;
}
/* Rosewood = accent-only doses */
.eyebrow, .ribbon, .stamp, .rosette, .hstar {
  font-family: var(--f-badge);
  letter-spacing: .06em;
}

/* ---------- Nav brand lockup ---------- */
.nav-logo { height: 52px; width: auto; display: block; }
.nav.scrolled .nav-logo { height: 44px; }
@media (max-width: 720px) { .nav-logo { height: 42px; } }

/* ---------- Day accent chips (badges, filter pills) ---------- */
.dbadge.d1, .pill[data-filter="1"].active { background: var(--pl-d1); color: var(--pl-ink); }
.dbadge.d2, .pill[data-filter="2"].active { background: var(--pl-d2); color: var(--pl-cream); }
.dbadge.dtba { background: var(--pl-gold); color: var(--pl-ink); }

/* ---------- Reveal-video lightbox ---------- */
.poster.has-video { cursor: pointer; }
.vbadge {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--pl-gold); color: var(--pl-ink); border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85); font-size: .8rem;
  box-shadow: 0 4px 14px rgba(34,26,60,.45);
}
.poster.has-video:hover .vbadge { background: var(--pl-sun); transform: scale(1.08); }
.lb-video .lb-vid {
  max-width: min(420px, 92vw); max-height: 82vh;
  border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

/* Photos in tentang/disco frames keep their crop instead of squashing to the
   frame's fixed aspect-ratio */
.disco-art img { object-fit: cover; }

/* ---------- Bug fixes ----------
   1) partilibur.css only defines .reveal-stagger.in delays for :nth-child(1..12),
      so children 13+ stayed at opacity:0 forever (line-up page showed 12 cards).
      Generic rule below reveals the rest; nth-child rules keep their own delays. */
.reveal-stagger.in > * { opacity: 1; transform: none; transition-delay: .8s; }

/* 2) auto-fill keeps empty tracks, so rows with fewer cards than columns hug the
      left (kontak "Info Praktis" etc). auto-fit collapses empty tracks instead. */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (max-width: 600px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ---------- Sponsor text chips (replaces external placeholder logos) ---------- */
.logo-chip .logo-text {
  font-family: var(--f-badge);
  font-size: .82rem; letter-spacing: .05em; text-transform: uppercase;
  padding: 26px 30px; display: inline-block; white-space: nowrap;
}

/* ---------- Sponsor logo chips (real logos cropped from rundown headers) ---------- */
.logo-chip-img {
  background: #fff; padding: 14px 26px;
  display: flex; align-items: center; justify-content: center;
  min-width: 128px; height: 66px;
}
.logo-chip-img img { height: 36px; width: auto; max-width: 160px; object-fit: contain; display: block; }

/* ---------- Rundown (homepage schedule, Day 1/Day 2 toggle) ---------- */
.rundown-panel.is-hidden { display: none; }
.rundown-grid, .dodont-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
.rundown-card, .dodont-card {
  position: relative; border-radius: 16px; overflow: hidden; cursor: zoom-in;
  background: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.28); border: 3px solid var(--pl-gold, #F0D878);
}
.dodont-card { border-color: var(--pl-magenta, #F048A8); }
.rundown-card img, .dodont-card img { display: block; width: 100%; height: auto; }
.rundown-zoom {
  position: absolute; right: 10px; bottom: 10px; pointer-events: none;
  background: rgba(26,10,46,.82); color: #fff; font-family: var(--f-badge);
  font-size: .68rem; letter-spacing: .04em; padding: 6px 11px; border-radius: 999px;
}
@media (max-width: 720px) { .rundown-grid, .dodont-grid { grid-template-columns: 1fr; } }

/* ---------- Line-up "And Many More" (extra roster, no covers) ---------- */
.lineup-more { margin-top: 38px; }
.lineup-more-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 900px; margin: 0 auto; }
.lmore-col { text-align: center; }
.lmore-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lmore-list li {
  font-family: var(--f-body); font-size: .82rem; color: var(--text);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 5px 12px;
}
.lineup-more-tag {
  text-align: center; font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(1.9rem, 6vw, 3.4rem); letter-spacing: .02em; margin: 28px 0 0;
  background: linear-gradient(95deg, var(--pl-gold, #F0D878), var(--pl-magenta, #F048A8), var(--pl-teal, #48C0C0));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 600px) { .lineup-more-cols { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER GLOW-UP — bunting topper, harlequin glow, marquee band
   (the stats/partners/CTA bands live in carnival-recap.css)
   ============================================================ */
.footer { position: relative; overflow: hidden; padding-top: 74px;
  background: linear-gradient(180deg, #1b1136 0%, #120a24 100%); }
.footer-bunting { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.footer-bg { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(240,72,168,.12), transparent 60%),
    url("../assets/svg/harlequin-pattern.svg");
  background-size: auto, 360px; background-position: center; }
.footer-orn { position: absolute; right: -100px; top: 30px; width: 360px; height: auto; z-index: 0;
  opacity: .06; pointer-events: none; animation: footer-orn-spin 46s linear infinite; }
.footer > .container { position: relative; z-index: 2; }
.footer-marquee { position: relative; z-index: 2; margin: 24px 0 34px;
  background: transparent; border: 0; transform: none; padding: 0; opacity: .55; }
.footer-marquee::before { display: none; }
.footer-marquee .marquee-inner span { font-family: var(--f-badge); font-size: .82rem;
  letter-spacing: .06em; color: var(--pl-gold, #F0D878); }
@keyframes footer-orn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .footer-orn { animation: none; } }

/* ============================================================
   FLOATING SHARE RAIL (left, vertically centered)
   ============================================================ */
.share-rail {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 2px; padding: 9px 8px;
  background: rgba(24,15,42,.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1); border-left: 0; border-radius: 0 16px 16px 0;
  box-shadow: 0 14px 36px rgba(0,0,0,.42);
}
.share-rail-label {
  font-family: var(--f-badge); font-size: .5rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pl-gold, #F0D878); text-align: center; margin-bottom: 3px;
}
.share-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; cursor: pointer;
  background: transparent; color: #fff; border-radius: 11px;
  transition: transform .18s var(--ease-bounce, ease), background .18s, color .18s;
}
.share-btn svg { width: 19px; height: 19px; }
.share-btn:hover { transform: scale(1.15); }
.sb-fb:hover   { background: #1877f2; }
.sb-x:hover    { background: #000; }
.sb-th:hover   { background: #000; }
.sb-ig:hover   { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.sb-wa:hover   { background: #25d366; }
.sb-link:hover { background: var(--pl-gold, #F0D878); color: var(--pl-ink, #304848); }
/* Mobile: the rail collapses into a small left tab so it never sits on top
   of the copy. Tap the tab to reveal the buttons. */
.share-tab { display: none; }
@media (max-width: 1000px) {
  .share-tab { display: grid; place-items: center; position: fixed; left: 0; top: 50%; z-index: 61; width: 30px; height: 48px;
    transform: translateY(-50%); background: rgba(24,15,42,.92); color: #fff; border: 1px solid rgba(255,255,255,.12);
    border-left: 0; border-radius: 0 12px 12px 0; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.35); }
  .share-tab svg { width: 15px; height: 15px; }
  .share-rail { transform: translateY(-50%) translateX(calc(-100% - 4px)); transition: transform .25s ease; }
  .share-rail.open { transform: translateY(-50%) translateX(30px); }
}
@media (prefers-reduced-motion: reduce) { .share-rail { transition: none; } }
/* Mobile: keep the rail vertical, smaller & more compact (label hidden). */
@media (max-width: 1000px) {
  .share-rail { padding: 6px 5px; gap: 1px; border-radius: 0 12px 12px 0; }
  .share-rail-label { display: none; }
  .share-btn { width: 34px; height: 34px; border-radius: 9px; }
  .share-btn svg { width: 16px; height: 16px; }
}
@media (max-width: 360px) {
  .share-btn { width: 30px; height: 30px; border-radius: 8px; }
  .share-btn svg { width: 15px; height: 15px; }
}

/* ============================================================
   FLOATING WHATSAPP CHAT WIDGET (bottom-right)
   ============================================================ */
.wa-widget { position: fixed; right: 20px; bottom: clamp(80px, 11vh, 130px); z-index: 70; }
.wa-fab {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(37,211,102,.5); transition: transform .2s;
  animation: wa-pulse 2.6s ease-out infinite;
}
.wa-fab svg { width: 32px; height: 32px; }
.wa-fab:hover { transform: scale(1.08); }
.wa-fab-badge {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--pl-red, #D83030); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}
.wa-widget.open .wa-fab-badge { display: none; }
@keyframes wa-pulse {
  0%   { box-shadow: 0 10px 28px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,.45); }
  70%  { box-shadow: 0 10px 28px rgba(37,211,102,.5), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 10px 28px rgba(37,211,102,.5), 0 0 0 0 rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: reduce) { .wa-fab { animation: none; } }

.wa-box {
  position: absolute; right: 0; bottom: 74px; width: min(340px, calc(100vw - 40px));
  background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.42);
  transform: translateY(16px) scale(.85); transform-origin: bottom right;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .3s cubic-bezier(.2,1.25,.35,1), opacity .22s ease, visibility .22s;
}
.wa-widget.open .wa-box { transform: translateY(0) scale(1); opacity: 1; visibility: visible; pointer-events: auto; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #075e54; color: #fff; }
.wa-avatar { width: 40px; height: 40px; border-radius: 50%; background: #25d366; display: grid; place-items: center; flex: 0 0 auto; }
.wa-avatar svg { width: 24px; height: 24px; }
.wa-head-txt { line-height: 1.25; }
.wa-head-txt b { font-family: var(--f-body); font-size: .92rem; display: block; text-transform: none; letter-spacing: 0; }
.wa-head-txt span { font-size: .68rem; opacity: .9; display: flex; align-items: center; gap: 5px; }
.wa-dot { width: 7px; height: 7px; border-radius: 50%; background: #6ff08a; display: inline-block; }
.wa-close { margin-left: auto; background: transparent; border: 0; color: #fff; cursor: pointer; opacity: .85; width: 30px; height: 30px; display: grid; place-items: center; }
.wa-close svg { width: 20px; height: 20px; }
.wa-body { padding: 18px 14px; background: #efeae2; min-height: 92px; }
.wa-bubble {
  background: #fff; color: #111; font-size: .84rem; line-height: 1.45; padding: 10px 12px;
  border-radius: 4px 12px 12px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.12); max-width: 90%;
  animation: wa-bubble-in .35s ease both;
}
@keyframes wa-bubble-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wa-input { display: flex; gap: 8px; padding: 10px; background: #f0f0f0; }
.wa-input input {
  flex: 1; border: 1px solid #ddd; border-radius: 22px; padding: 9px 14px; font-size: .85rem;
  outline: none; color: #111; background: #fff; font-family: var(--f-body);
}
.wa-input input:focus { border-color: #25d366; }
.wa-send { width: 42px; height: 42px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #25d366; color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.wa-send:hover { transform: scale(1.08); }
.wa-send svg { width: 20px; height: 20px; }

/* ---- Toast ---- */
.pl-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 16px); z-index: 90;
  background: var(--pl-ink, #304848); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: .84rem; box-shadow: 0 12px 30px rgba(0,0,0,.42); max-width: 90vw; text-align: center;
  opacity: 0; visibility: hidden; pointer-events: none; transition: .3s;
}
.pl-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Safety net: never let the page scroll sideways on small screens. */
@media (max-width: 620px) { html, body { overflow-x: hidden; } }

/* ---------- Touch targets + focus (global a11y) ---------- */
.gpill, .nav-btn, .nav-toggle { min-height: 44px; }
.nav-toggle { min-width: 44px; }
.btn:focus-visible, .btn-ticket:focus-visible, .gpill:focus-visible, .nav-toggle:focus-visible,
.mm a:focus-visible, .lb button:focus-visible, .wa-widget button:focus-visible, .field :focus-visible,
.share-btn:focus-visible, .pill:focus-visible {
  outline: 3px solid var(--pl-sun); outline-offset: 3px;
}
@media (max-width: 866px) { .nav-btn span.lbl { display: inline; } }
