/* ============================================================================
   paJAK-Kita — Reusable Hero Big KPI Card Component (.pk-hero-card)
   Mendukung varian hijau (.is-green, Belanja 95,5%) & merah (.is-red, Penerimaan 102,8%)
   ============================================================================ */

.pk-hero-card {
  position: relative;
  border-radius: 32px;
  color: #FFF4DC;
  min-height: 360px;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.pk-hero-card.is-green {
  --card-accent: #1F7A57;
  background: var(--card-accent);
}

.pk-hero-card.is-red {
  --card-accent: #B71C1C;
  background: var(--card-accent);
}

.pk-hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -22px rgba(31, 26, 23, 0.42);
}

/* Lapisan dalam yang terpotong radius kartu: tekstur titik, lingkaran emas, strip gigi balang */
.pk-hero-surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Tekstur titik Betawi halus di belakang angka */
.pk-hero-dots {
  position: absolute;
  inset: 0 38% 18% 0;
  background-image: radial-gradient(rgba(255, 244, 220, 0.16) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9) 10%, transparent 92%);
  -webkit-mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9) 10%, transparent 92%);
}

/* Lingkaran emas di belakang Ondi + satu cincin outline tipis */
.pk-hero-orb {
  position: absolute;
  right: clamp(20px, 4vw, 52px);
  bottom: 24px;
  width: clamp(160px, 23vw, 245px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold, #E0A526);
  opacity: 0.96;
}

.pk-hero-orb::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 244, 220, 0.52);
}

/* Strip gigi balang tipis di tepi bawah kartu */
.pk-hero-gigi {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 11px;
  background:
    linear-gradient(135deg, rgba(224, 165, 38, 0.95) 25%, transparent 25%) -5.5px 0,
    linear-gradient(225deg, rgba(224, 165, 38, 0.95) 25%, transparent 25%) -5.5px 0,
    linear-gradient(315deg, rgba(255, 244, 220, 0.35) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 244, 220, 0.35) 25%, transparent 25%);
  background-size: 11px 11px;
  background-repeat: repeat-x;
}

/* Konten teks & progress bar di sisi kiri */
.pk-hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 4vw, 46px) clamp(26px, 4vw, 44px) clamp(32px, 4vw, 42px);
  max-width: 68%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.pk-hero-kicker {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 244, 220, 0.92);
  margin-bottom: 12px;
}

.pk-hero-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(68px, 11vw, 152px);
  line-height: 0.88;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: #FFF4DC;
  white-space: nowrap;
}

.pk-hero-num sup {
  font-size: 0.38em;
  vertical-align: top;
  font-weight: 600;
  margin-left: 3px;
}

.pk-hero-caption {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 244, 220, 0.92);
  margin: 0 0 12px;
  max-width: 36ch;
}

/* Progress track di bagian bawah kartu + penanda titik/segitiga di posisi nilai */
.pk-hero-pb-wrap {
  position: relative;
  padding-top: 8px;
}

.pk-hero-pb {
  position: relative;
  height: 12px;
  border-radius: 99px;
  background: rgba(255, 244, 220, 0.24);
  overflow: hidden;
}

.pk-hero-pb-fill {
  height: 100%;
  border-radius: 99px;
  background: #FFF4DC;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.in .pk-hero-pb-fill,
.pk-hero-card.in .pk-hero-pb-fill {
  transform: scaleX(1);
}

.pk-hero-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--gold, #E0A526);
  opacity: 0;
  transition: opacity 0.4s ease 1.1s;
}

.pk-hero-card.in .pk-hero-marker {
  opacity: 1;
}

/* Maskot Ondi berdiri di kanan, kaki menyentuh tepi bawah, kepala sedikit menonjol di atas lingkaran emas */
.pk-hero-ondi {
  position: absolute;
  right: clamp(20px, 3.6vw, 48px);
  bottom: 0;
  height: clamp(220px, 28vw, 290px);
  width: auto;
  z-index: 3;
  pointer-events: none;
  transform-origin: bottom center;
  opacity: 0;
  transform: translateY(48px);
  transition:
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.65s ease;
}

.pk-hero-card.in .pk-hero-ondi {
  opacity: 1;
  transform: translateY(0);
}

.pk-hero-ondi img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(31, 26, 23, 0.22));
}

@keyframes pkOndiHoverTilt {
  0% { transform: rotate(0deg); }
  45% { transform: rotate(2.8deg); }
  100% { transform: rotate(0deg); }
}

.pk-hero-card.in:hover .pk-hero-ondi {
  animation: pkOndiHoverTilt 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 1;
}

@media (max-width: 900px) {
  .pk-hero-card {
    min-height: 290px;
    border-radius: 26px;
  }

  .pk-hero-content {
    max-width: 100%;
    min-height: 290px;
    padding: 24px 22px 28px;
  }

  .pk-hero-num {
    font-size: clamp(58px, 15vw, 96px);
  }

  .pk-hero-caption {
    max-width: calc(100% - 110px);
  }

  .pk-hero-orb {
    right: 14px;
    bottom: 14px;
    width: 112px;
  }

  .pk-hero-orb::after {
    inset: -8px;
  }

  .pk-hero-ondi {
    right: 12px;
    height: 145px;
  }
}

@media (max-width: 480px) {
  .pk-hero-card {
    min-height: 265px;
  }

  .pk-hero-content {
    min-height: 265px;
    padding: 22px 18px 26px;
    gap: 18px;
  }

  .pk-hero-num {
    font-size: clamp(52px, 15.5vw, 72px);
  }

  .pk-hero-caption {
    font-size: 13px;
    max-width: calc(100% - 94px);
  }

  .pk-hero-orb {
    width: 94px;
    right: 12px;
    bottom: 12px;
  }

  .pk-hero-ondi {
    height: 122px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-hero-card,
  .pk-hero-pb-fill,
  .pk-hero-marker,
  .pk-hero-ondi {
    transition: none !important;
    animation: none !important;
  }

  .pk-hero-ondi,
  .pk-hero-marker {
    opacity: 1 !important;
    transform: none !important;
  }

  .pk-hero-pb-fill {
    transform: scaleX(1) !important;
  }
}
