/* ============================================================
   chari.id — Dock Navigation (3-Column Symmetrical Architecture)
   Presisi Matematis: 3-Column Grid (280px - 1fr - 280px)
   Dock berada di kolom tengah (1fr) yang menjamin DEAD CENTER 50%
   dengan jarak kiri dan kanan selalu simetris di semua halaman.
   Token: Champagne #F5E6AD / Metallic #E5C158 / Ink #0B0E14
   ============================================================ */

:root {
  --dock-gold-light: #F5E6AD;
  --dock-gold-mid: #E5C158;
  --dock-line: rgba(245, 230, 173, 0.18);
  --dock-line-soft: rgba(245, 230, 173, 0.10);
}

/* ---------- 3-Column Header Grid untuk Simetri Sempurna ---------- */
.header-grid-3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
  position: relative;
}

.dock-shelf {
  display: none;
}

@media (min-width: 1024px) {
  .header-grid-3 {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    align-items: center;
    position: relative;
  }

  .header-col-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .header-col-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .header-col-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  /* Kapsul Dock di Kolom Tengah */
  .dock-shelf {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(24, 28, 37, 0.95), rgba(11, 13, 18, 0.95));
    border: 1px solid var(--dock-line);
    box-shadow:
      inset 0 1px 0 rgba(255, 242, 186, 0.10),
      0 12px 28px -12px rgba(0, 0, 0, 0.85),
      0 0 18px -8px rgba(229, 193, 88, 0.12);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    backdrop-filter: blur(20px) saturate(130%);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .header-grid-3 {
    grid-template-columns: 200px 1fr 200px;
  }
}

/* ---------- Item Navigasi ---------- */
.dock-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6.5px 9.5px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #a8a29e;
  font-size: 11.2px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .22s ease,
    transform .2s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.dock-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: color .18s ease;
}

.dock-item:hover,
.dock-item:focus-visible {
  color: var(--dock-gold-light);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1.5px);
  outline: none;
}

.dock-item:focus-visible {
  border-color: rgba(245, 230, 173, 0.45);
}

/* ---------- State Aktif (Champagne Gold Luminous) ---------- */
.dock-item.is-active {
  color: #FFF2BA;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(245, 230, 173, 0.22), rgba(229, 193, 88, 0.09));
  border-color: rgba(245, 230, 173, 0.50);
  box-shadow:
    0 4px 14px -6px rgba(229, 193, 88, 0.75),
    inset 0 1px 0 rgba(255, 242, 186, 0.25),
    inset 0 0 10px rgba(229, 193, 88, 0.12);
}

/* ---------- Tooltip (mode icon-only pada 1024-1279px) ---------- */
.dock-item::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  transform: translate(-50%, 4px);
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--dock-gold-light);
  background: rgba(12, 14, 19, 0.97);
  border: 1px solid rgba(245, 230, 173, 0.22);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 60;
  transition: opacity .15s ease, transform .15s ease;
}

/* 1024–1279px: label teks disembunyikan agar pas inline tanpa tabrakan */
@media (max-width: 1279px) {
  .dock-item .dock-txt { display: none; }
  .dock-item { padding: 7.5px 9px; }
  .dock-item:hover::after,
  .dock-item:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* >=1280px: samakan lebar tiap tab supaya dock terbaca rata & simetris
   (bukan hanya center secara matematis, tapi juga seimbang secara optik). */
@media (min-width: 1280px) {
  .dock-item {
    min-width: 94px;
    justify-content: center;
  }
}

/* ---------- Hormati Preferensi Gerak Minimal ---------- */
@media (prefers-reduced-motion: reduce) {
  .dock-item,
  .dock-item:hover,
  .dock-item:focus-visible {
    transition: none;
    transform: none;
  }
}

/* ============================================================
   FIX Sticky Header (overflow-x clip).
   ============================================================ */
html body:not(.ch-locked) {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

html body.ch-locked {
  overflow: hidden !important;
}

/* ============================================================
   VERTICAL LINE SPLIT REVEAL & ANIMATED HERO FRAME
   ============================================================ */

/* 1. Animated Hero Section Frame */
.hero-animated-frame {
  position: relative;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.96) 0%, rgba(10, 12, 18, 0.98) 50%, rgba(15, 20, 30, 0.96) 100%);
  border: 1px solid rgba(245, 230, 173, 0.18);
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.85), 0 0 30px -10px rgba(229, 193, 88, 0.15);
  animation: hero-frame-appear 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

@keyframes hero-frame-appear {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Subtle Shimmer Aura on the Hero Frame Border */
.hero-animated-frame::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, transparent 20%, rgba(245, 230, 173, 0.45) 50%, transparent 80%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: hero-border-sweep 6s ease-in-out infinite alternate;
}

@keyframes hero-border-sweep {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.85; transform: scale(1.002); }
}

/* 2. Vertical Line Split Reveal Container
   Garis diletakkan di gutter kiri (di luar alur teks) supaya headline,
   badge, scope switcher, dan search bar tetap rata pada satu sumbu. */
.hero-split-reveal-container {
  position: relative;
  padding-left: 0;
}

/* The Vertical Golden Dividing Line */
.hero-vertical-split-line {
  position: absolute;
  left: -18px;
  top: 4px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFF6D6 0%, #F5E6AD 30%, #E5C158 85%, rgba(229, 193, 88, 0.35) 100%);
  box-shadow: 0 0 10px rgba(229, 193, 88, 0.5), 0 0 20px rgba(229, 193, 88, 0.22);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, #000 12%, #000 82%, rgba(0,0,0,0.1) 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, #000 12%, #000 82%, rgba(0,0,0,0.1) 100%);
  transform: scaleY(0);
  transform-origin: top center;
  animation: vertical-line-grow 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes vertical-line-grow {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* 3. Smooth Text Reveal for Headline */
.hero-headline-split {
  display: inline-block;
  opacity: 0;
  transform: translateX(-14px);
  filter: blur(4px);
  animation: hero-headline-reveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

/* Gradient emas champagne untuk potongan headline (tanpa Tailwind arbitrary,
   supaya benar-benar ter-render oleh output.css yang sudah dikompilasi). */
.headline-gold {
  background-image: linear-gradient(100deg, #FFF4C2 0%, #F7E9B0 38%, #E5C158 78%, #D9B44C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@keyframes hero-headline-reveal {
  0% {
    opacity: 0;
    transform: translateX(-18px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

/* 4. Smooth Text Reveal for Subheadline */
.hero-sub-split {
  display: block;
  opacity: 0;
  transform: translateX(-10px);
  filter: blur(3px);
  animation: hero-sub-reveal 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

@keyframes hero-sub-reveal {
  0% {
    opacity: 0;
    transform: translateX(-14px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

/* 5. Animated Interactive Avatar Card */
.hero-avatar-animated {
  animation: hero-avatar-glow 5s ease-in-out infinite alternate;
}

@keyframes hero-avatar-glow {
  0% {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), 0 0 20px -8px rgba(229, 193, 88, 0.15);
  }
  100% {
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.9), 0 0 35px -5px rgba(229, 193, 88, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-animated-frame,
  .hero-animated-frame::after,
  .hero-vertical-split-line,
  .hero-headline-split,
  .hero-sub-split,
  .hero-avatar-animated {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}

