/* ============================================================
   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;

  /* ---------- 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;
}

/* 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;
}

/* ---------- Warm brand surface (sunset gradient + harlequin) ---------- */
.section-warm {
  background:
    url("../assets/svg/harlequin-pattern.svg"),
    linear-gradient(178deg, var(--pl-orange-1) 0%, var(--pl-orange-2) 100%);
  background-blend-mode: soft-light, normal;
  color: var(--pl-cream);
}
.section-warm .section-title,
.section-warm h2, .section-warm h3 { color: #FFF9EC; text-shadow: 0 3px 0 rgba(48, 72, 72, .35); }
.section-warm .section-title .hl { color: var(--pl-sun); }
.section-warm .lead, .section-warm p { color: #FFF3DF; }
.section-warm .eyebrow { color: var(--pl-ink); }
.section-warm a:not(.btn) { color: var(--pl-ink); text-decoration: underline; }
/* Ticket cards: solid dark indigo so they pop on the warm bg (default is translucent) */
.section-warm .ticket {
  background: linear-gradient(180deg, rgba(34, 26, 60, .96), rgba(26, 19, 38, .94));
  border-color: rgba(48, 72, 72, .5);
}
.section-warm .ticket p, .section-warm .ticket li { color: var(--text); }
.section-warm .ticket .note { color: var(--pl-magenta); }

/* ---------- 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); }

/* ---------- Brand ornaments ---------- */
.orn-medallion img, .orn-eye img { filter: drop-shadow(0 6px 18px rgba(34, 26, 60, .35)); }
.hero-arch {
  position: absolute; inset: auto 0 auto 0; top: 8%;
  margin: 0 auto; width: min(760px, 86vw); pointer-events: none;
  opacity: .9; z-index: 1;
}
.special-price-art { display: block; margin: 0 auto 10px; width: min(360px, 72vw); height: auto; }
.nav-logo { height: 52px; width: auto; display: block; }
.nav.scrolled .nav-logo { height: 44px; }
@media (max-width: 720px) { .nav-logo { height: 42px; } }

/* ---------- 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-magenta); color: #fff; 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-pink); 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);
}

/* ---------- Hero artist cutout collage ---------- */
.hero-cut {
  position: absolute; bottom: -4px; z-index: 1; pointer-events: none;
  width: clamp(180px, 22vw, 320px); height: auto;
  filter: drop-shadow(0 10px 26px rgba(10, 6, 20, .55));
  animation: hero-cut-float 7s ease-in-out infinite;
}
.hero-cut-l { left: clamp(-30px, 1vw, 40px); }
.hero-cut-r { right: clamp(-30px, 1vw, 40px); animation-delay: -3.5s; }
@keyframes hero-cut-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (max-width: 720px) { .hero-cut { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-cut { animation: none; } }

/* ---------- Collaborating communities panel ---------- */
.communities-panel { max-width: 900px; margin: 0 auto; }
.communities-panel img {
  width: 100%; height: auto; display: block;
  border-radius: 18px; box-shadow: 0 16px 44px rgba(10, 6, 20, .4);
}

/* Welcome cards: single pure-CSS 3D fan of real reveal covers (no WebGL
   overlay — that double-render was the "blinking" bug). Spinning medallion
   ornament behind, gentle continuous float. */
.welcome-cards-stage { position: relative; perspective: 1200px; }
.fan-orn {
  position: absolute; left: 50%; top: 46%; width: 340px; height: auto;
  transform: translate(-50%, -50%); z-index: 0; opacity: .5;
  animation: fan-orn-spin 26s linear infinite; pointer-events: none;
}
.card-fan { position: relative; z-index: 1; transform-style: preserve-3d; animation: card-fan-float 6s ease-in-out infinite; }
.fan-card {
  padding: 0; border: 3px solid rgba(255,255,255,.9); overflow: hidden;
  background: var(--pl-ink); box-shadow: 0 18px 34px rgba(10,6,20,.5);
}
.fan-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fan-card .fc-stat {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: baseline; gap: 6px;
  padding: 26px 12px 10px; color: #fff;
  font-family: var(--f-badge); font-size: .62rem; letter-spacing: .05em; text-transform: uppercase;
  background: linear-gradient(to top, rgba(26,19,38,.92), transparent);
}
.fan-card .fc-stat b, .fan-card .fc-stat { line-height: 1; }
.fan-card .fc-stat b { font-family: var(--f-display); font-size: 1.5rem; color: var(--pl-gold); }
.fan-card .fc-stat em { font-style: normal; }
@keyframes fan-orn-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes card-fan-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) {
  .fan-orn, .card-fan { animation: none; }
}

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

/* Home gallery is a strict 4-col grid (not the column-masonry the galeri PAGE
   uses). Mixed-orientation photos left rows ragged/uneven, so pin every tile to
   a uniform square and cover-fit the image. */
#homeMasonry .ph { aspect-ratio: 1 / 1; }
#homeMasonry .ph img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { #homeMasonry { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { #homeMasonry { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ---------- 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;
}
