/* Pojok Hukum: cinematic welcome overlay. Only enabled on first public homepage visit. */
html.public-splash-pending,
html.public-splash-pending body { overflow: hidden !important; }
.public-splash { display: none; }
html.public-splash-pending .public-splash {
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, .30);
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #0b1226 0%, #050918 55%, #02050f 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 650ms ease-in, visibility 650ms;
}
html.public-splash-pending .public-splash.public-splash-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.public-splash__glow {
  position: absolute;
  left: 50%; top: 46%;
  width: min(75vmin, 750px);
  height: min(75vmin, 750px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(251,191,36,.35), rgba(251,191,36,.13) 34%, transparent 68%);
  filter: blur(28px);
  opacity: 0;
  pointer-events: none;
}
.public-splash--playing .public-splash__glow {
  animation: ph-glow-in 1.3s ease-out .2s forwards, ph-glow-pulse 2.8s ease-in-out 1.5s infinite;
  pointer-events: none;
}
.public-splash__ring {
  position: absolute;
  left: 50%; top: 46%;
  width: min(31vmin, 290px);
  height: min(31vmin, 290px);
  border: 1.5px solid rgba(251,191,36,.82);
  box-shadow: 0 0 10px rgba(251,191,36,.14);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.public-splash--playing .public-splash__ring {
  animation: ph-ring 2.8s ease-out infinite;
}
.public-splash--playing .public-splash__ring--2 { animation-delay: .93s; }
.public-splash--playing .public-splash__ring--3 { animation-delay: 1.86s; }
.public-splash__particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.public-splash__particle {
  position: absolute;
  bottom: -8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 9px rgba(251,191,36,.95);
  opacity: 0;
}
.public-splash--playing .public-splash__particle {
  animation: ph-rise linear infinite;
}
.public-splash__logo-wrap {
  position: relative;
  z-index: 2;
  width: min(90vw, 900px);
  max-width: 100%;
  max-height: 65vh;
  max-height: 65dvh;
  aspect-ratio: 1600 / 571;
  opacity: 0;
  transform: translateY(20px) scale(.7);
  filter: blur(12px);
}
.public-splash--playing .public-splash__logo-wrap {
  animation: ph-logo-in 1.45s cubic-bezier(.2,.9,.25,1.05) .36s forwards,
             ph-logo-float 3.4s ease-in-out 1.9s infinite;
}
.public-splash__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 9px 24px rgba(251,191,36,.2));
}
/* The mask clips the shine to the supplied transparent emblem, not its bounding rectangle. */
.public-splash__shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  -webkit-mask: url('../img/polisi-bersama-masyarakat-splash.webp') center / 100% 100% no-repeat;
  mask: url('../img/polisi-bersama-masyarakat-splash.webp') center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 37%, rgba(255,255,255,.9) 50%, transparent 63%);
  background-size: 260% 100%;
  background-position: 150% 0;
  mix-blend-mode: screen;
}
.public-splash--playing .public-splash__shine {
  animation: ph-shine 1.6s ease-in-out 1.85s 2;
}
.public-splash__loader {
  position: absolute;
  bottom: max(11vh, 80px);
  left: 50%;
  transform: translateX(-50%);
  width: min(58vw, 340px);
  height: 3px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,.13);
  opacity: 0;
}
.public-splash--playing .public-splash__loader {
  animation: ph-fade-in .55s ease 1.05s forwards;
}
.public-splash__loader::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #fde68a);
  box-shadow: 0 0 12px rgba(251,191,36,.8);
}
.public-splash--playing .public-splash__loader::after {
  animation: ph-load 3.1s cubic-bezier(.45,.05,.3,1) 1.05s forwards;
}
.public-splash__loading-text {
  position: absolute;
  bottom: max(7vh, 52px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.68);
  font: 500 12px/1.3 system-ui, sans-serif;
  letter-spacing: .24em;
  white-space: nowrap;
  opacity: 0;
}
.public-splash--playing .public-splash__loading-text {
  animation: ph-fade-in .5s ease 1.25s forwards;
}
.public-splash__skip {
  position: absolute;
  z-index: 3;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px;
  padding: 8px 15px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.06);
  font: 500 12px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
.public-splash__skip:hover { color: #fff; background: rgba(255,255,255,.15); }
.public-splash__skip:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
@keyframes ph-logo-in {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes ph-logo-float {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.012); }
}
@keyframes ph-glow-in { to { opacity: .85; } }
@keyframes ph-glow-pulse {
  0%,100% { opacity: .80; }
  50% { opacity: 1; }
}
@keyframes ph-ring {
  0% { opacity: .66; transform: translate(-50%, -50%) scale(.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.1); }
}
@keyframes ph-rise {
  0% { opacity: 0; transform: translateY(0); }
  15% { opacity: .85; }
  100% { opacity: 0; transform: translateY(-105vh); }
}
@keyframes ph-shine { to { background-position: -55% 0; } }
@keyframes ph-load { to { transform: scaleX(1); } }
@keyframes ph-fade-in { to { opacity: 1; } }
@media (max-width: 600px) {
  html.public-splash-pending .public-splash { padding: 15px; }
  .public-splash__logo-wrap { width: min(94vw, 900px); }
  .public-splash__loader { width: min(62vw, 280px); bottom: max(15vh, 98px); }
  .public-splash__loading-text { bottom: max(11vh, 72px); }
  .public-splash__skip { right: max(14px, env(safe-area-inset-right)); bottom: max(15px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .public-splash__ring, .public-splash__particles, .public-splash__glow, .public-splash__shine, .public-splash__loader,
  .public-splash__loading-text { display: none !important; }
  .public-splash--playing .public-splash__logo-wrap { opacity: 1; filter: none; transform: none; animation: none !important; }
  html.public-splash-pending .public-splash { transition-duration: 200ms; }
}

/* Optional animation playback for visitors using OS "Reduce motion".
   app.css contains * { animation:none!important } under this preference;
   override ONLY the splash animations, and ONLY after explicit opt-in. */
.public-splash__motion-toggle {
  position:absolute; z-index:4; left:max(20px, env(safe-area-inset-left));
  bottom:max(22px, env(safe-area-inset-bottom));
  border:1px solid rgba(251,191,36,.58); border-radius:999px;
  padding:8px 14px; color:#ffe6a4; background:rgba(251,191,36,.12);
  font:500 12px/1.4 system-ui,sans-serif; cursor:pointer;
}
.public-splash__motion-toggle[hidden] { display:none!important; }
.public-splash__motion-toggle:hover { background:rgba(251,191,36,.23); }
.public-splash__motion-toggle:focus-visible { outline:3px solid #fbbf24; outline-offset:3px; }
@media (max-width:600px) {
 .public-splash__motion-toggle { left:14px; bottom:max(15px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html.public-splash-allow-motion .public-splash__ring,
  html.public-splash-allow-motion .public-splash__particles,
  html.public-splash-allow-motion .public-splash__glow,
  html.public-splash-allow-motion .public-splash__shine,
  html.public-splash-allow-motion .public-splash__loader,
  html.public-splash-allow-motion .public-splash__loading-text { display:block!important; }
  html.public-splash-allow-motion .public-splash--playing .public-splash__logo-wrap {
    opacity:0; filter:blur(12px); transform:translateY(20px) scale(.7);
    animation:ph-logo-in 1.45s cubic-bezier(.2,.9,.25,1.05) .36s forwards,
              ph-logo-float 3.4s ease-in-out 1.9s infinite !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__glow {
    animation:ph-glow-in 1.3s ease-out .2s forwards,
              ph-glow-pulse 2.8s ease-in-out 1.5s infinite !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__ring {
    animation:ph-ring 2.8s ease-out infinite !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__ring--2 { animation-delay:.93s !important; }
  html.public-splash-allow-motion .public-splash--playing .public-splash__ring--3 { animation-delay:1.86s !important; }
  html.public-splash-allow-motion .public-splash--playing .public-splash__particle {
    animation:ph-rise linear infinite !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__shine {
    animation:ph-shine 1.6s ease-in-out 1.85s 2 !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__loader {
    animation:ph-fade-in .55s ease 1.05s forwards !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__loader::after {
    animation:ph-load 3.1s cubic-bezier(.45,.05,.3,1) 1.05s forwards !important;
  }
  html.public-splash-allow-motion .public-splash--playing .public-splash__loading-text {
    animation:ph-fade-in .5s ease 1.25s forwards !important;
  }
  html.public-splash-pending.public-splash-allow-motion .public-splash {
    transition:opacity 650ms ease-in, visibility 650ms !important;
  }
}
