/* ============================================
   PT Paseban Inti Digital - Design System
   ============================================ */

/* === Skip Link === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 100;
  padding: 12px 24px;
  background: #176BCE;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 12px 0;
  transition: top .2s;
}
.skip-link:focus {
  top: 0;
}

/* === Baduy Patterns === */
.baduy-pattern-overlay {
  background-image: radial-gradient(#D6A84B 0.75px, transparent 0.75px), radial-gradient(#176BCE 0.75px, #071A2F 0.75px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  opacity: 0.05;
}
.baduy-pattern-visi {
  background-image:
    linear-gradient(45deg, rgba(214, 168, 75, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(214, 168, 75, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(23, 107, 206, 0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(23, 107, 206, 0.02) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  opacity: 0.06;
}

/* === Glow Effects === */
.glow-blue {
  background: radial-gradient(circle at center, rgba(23, 107, 206, 0.18) 0%, rgba(7, 26, 47, 0) 70%);
}
.glow-gold {
  background: radial-gradient(circle at center, rgba(214, 168, 75, 0.15) 0%, rgba(7, 26, 47, 0) 70%);
}

/* === Animations === */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}
.animate-pulse-slow {
  animation: pulse-slow 5s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for cards */
.reveal-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.reveal-on-scroll:nth-child(5) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(6) { transition-delay: 0.25s; }

/* === Focus States === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #176BCE;
  outline-offset: 2px;
  border-radius: 4px;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #071A2F;
}
::-webkit-scrollbar-thumb {
  background: #176BCE;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D6A84B;
}

/* Chat scrollbar */
#ai-chat-box::-webkit-scrollbar {
  width: 4px;
}
#ai-chat-box::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Button Micro-interaction === */
a[href="#kontak"],
button[type="submit"] {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Smooth Scroll Offset for Fixed Navbar === */
html {
  scroll-padding-top: 88px;
}

/* === Selection === */
::selection {
  background: #176BCE;
  color: #fff;
}

/* === Line length for readability === */
.max-w-prose { max-width: 65ch; }
