/* ============================================================
   PT. ASA GLOBAL MANDIRI SAMUDERA — Design tokens & animations
   ============================================================ */

:root {
  /* Brand palette */
  --brand-navy-950: #0a1828;
  --brand-navy-900: #0f2238;
  --brand-navy-800: #1b3a5b;
  --brand-navy-600: #3a5773;
  --brand-navy-400: #7090b0;
  --brand-paper: #f7f4ed;
  --brand-bone: #ebe6d7;
  --brand-brass: #c9a961;
  --brand-brass-bright: #e6c785;
  --brand-ink: #0a1828;

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

*:focus-visible {
  outline: 2px solid var(--brand-brass);
  outline-offset: 3px;
  border-radius: 2px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  color: var(--brand-ink);
  background: var(--brand-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 400;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--brand-brass);
  font-weight: 500;
}

.brass-rule { border: 0; border-top: 1px solid var(--brand-brass); opacity: .4; }

/* ============================================================
   Skip link
   ============================================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 100;
  background: var(--brand-navy-950);
  color: var(--brand-brass);
  padding: 8px 12px;
  border-radius: 4px;
  transition: top .2s;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ============================================================
   Nav
   ============================================================ */
.nav-shell {
  transition:
    background-color .35s var(--ease-out-cubic),
    backdrop-filter .35s var(--ease-out-cubic),
    -webkit-backdrop-filter .35s var(--ease-out-cubic),
    border-color .35s var(--ease-out-cubic);
}
.nav-shell.scrolled {
  background-color: rgba(10, 24, 40, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

/* ============================================================
   Hero Ken Burns
   ============================================================ */
@keyframes ken-burns {
  0%   { transform: scale(1)    translateX(0); }
  100% { transform: scale(1.07) translateX(-1%); }
}
.hero-bg {
  animation: ken-burns 18s ease-out forwards;
  transform-origin: center center;
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: .6; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}
.scroll-indicator {
  animation: bob 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator { animation: none; opacity: .8; }
}

/* ============================================================
   Scroll-reveal
   ============================================================ */
:root {
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(60px);
  filter: blur(10px);
  transition:
    opacity 1.2s var(--ease-cinematic),
    transform 1.2s var(--ease-cinematic),
    filter 1.2s var(--ease-cinematic),
    clip-path 1.2s var(--ease-cinematic);
  will-change: opacity, transform, filter, clip-path;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered Children */
[data-reveal="stagger"] > * {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(8px);
  transition:
    opacity 1s var(--ease-cinematic),
    transform 1s var(--ease-cinematic),
    filter 1s var(--ease-cinematic);
  will-change: opacity, transform, filter;
}

[data-reveal="stagger"].is-visible > * {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger Delay Logic for up to 10 children */
[data-reveal="stagger"].is-visible > *:nth-child(1) { transition-delay: 0.1s; }
[data-reveal="stagger"].is-visible > *:nth-child(2) { transition-delay: 0.2s; }
[data-reveal="stagger"].is-visible > *:nth-child(3) { transition-delay: 0.3s; }
[data-reveal="stagger"].is-visible > *:nth-child(4) { transition-delay: 0.4s; }
[data-reveal="stagger"].is-visible > *:nth-child(5) { transition-delay: 0.5s; }
[data-reveal="stagger"].is-visible > *:nth-child(6) { transition-delay: 0.6s; }
[data-reveal="stagger"].is-visible > *:nth-child(7) { transition-delay: 0.7s; }
[data-reveal="stagger"].is-visible > *:nth-child(8) { transition-delay: 0.8s; }
[data-reveal="stagger"].is-visible > *:nth-child(9) { transition-delay: 0.9s; }
[data-reveal="stagger"].is-visible > *:nth-child(10) { transition-delay: 1.0s; }

/* Clip Reveal */
[data-reveal="clip"] {
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
  transform: translateY(0);
  filter: blur(0);
}

[data-reveal="clip"].is-visible {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}



/* ============================================================
   Trust marquee
   ============================================================ */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  animation: marquee 40s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============================================================
   WhatsApp pulse
   ============================================================ */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(201, 169, 97, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0); }
}
.wa-float {
  position: relative;
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  animation: pulse-ring 2.2s ease-out infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; }
}

/* ============================================================
   Service cards
   ============================================================ */
.service-card {
  transition:
    transform .35s var(--ease-out-cubic),
    background-color .35s var(--ease-out-cubic),
    color .35s var(--ease-out-cubic);
}
.service-card:hover {
  transform: translateY(-6px);
}

/* ============================================================
   Process timeline
   ============================================================ */
.timeline-line {
  background: linear-gradient(to right,
    transparent,
    var(--brand-brass) 10%,
    var(--brand-brass) 90%,
    transparent);
}
.timeline-node {
  background: var(--brand-navy-950);
  border: 2px solid var(--brand-brass);
  transition:
    background-color .35s var(--ease-out-cubic),
    transform .35s var(--ease-out-cubic);
}
.timeline-node.is-active {
  background: var(--brand-brass);
  transform: scale(1.15);
}

/* ============================================================
   Layout utilities
   ============================================================ */
.section-pad {
  padding-block: clamp(64px, 10vw, 128px);
}
.container-x {
  padding-inline: clamp(20px, 4vw, 56px);
  max-width: 1280px;
  margin-inline: auto;
}

/* ============================================================
   Reduced motion global kill switch
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   Custom scrollbar (subtle, dark theme)
   ============================================================ */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--brand-paper); }
::-webkit-scrollbar-thumb {
  background: var(--brand-brass);
  border: 4px solid var(--brand-paper);
  border-radius: 7px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-navy-600); }

/* ============================================================
   Print
   ============================================================ */
@media print {
  .nav-shell,
  .wa-float,
  .marquee-track,
  [data-reveal] { display: none !important; }
  body { background: white; color: black; }
}

/* Custom scrollbar for horizontal gallery */
.custom-scroll::-webkit-scrollbar {
  height: 8px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-brass);
  border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--brand-brass-bright);
}

/* ============================================================
   Premium Navbar Styles
   ============================================================ */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-cinematic);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

#navPill.scrolled {
  background-color: rgba(10, 24, 40, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.15);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Hide scrollbar on mobile */
@media (max-width: 767px) {
  ::-webkit-scrollbar {
    display: none !important;
  }
  * {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
}
