/* ==========================================================================
   CV. Alzeara Majestic Cargo — Custom Styles
   Tailwind menangani utility/layout, file ini menangani detail visual & animasi.
   ========================================================================== */

/* ---------- Base ---------- */
:root {
  --header-height: 80px;
  --accent: #b5813a;
  --primary: #00142f;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

section[id],
footer[id] {
  scroll-margin-top: calc(var(--header-height) + 8px);
}

[tabindex='-1']:focus {
  outline: none;
}

/* Material Symbols */
.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp,
.material-icons {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1 !important;
  box-sizing: content-box;
  overflow: hidden;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f5f3f6;
}
::-webkit-scrollbar-thumb {
  background: #c4c6cf;
  border-radius: 9999px;
  border: 2px solid #f5f3f6;
}
::-webkit-scrollbar-thumb:hover {
  background: #74777f;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ---------- Header ---------- */
.site-header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px -18px rgba(0, 20, 47, 0.45);
  background-color: rgba(250, 249, 252, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--primary);
}

/* Hamburger -> close icon morph */
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 9999px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.menu-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu slide (grid trick, no fixed height needed) */
.mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.2, 0, 0, 1);
}
.mobile-menu > .mobile-menu-inner {
  overflow: hidden;
}
.mobile-menu.is-open {
  grid-template-rows: 1fr;
}
.mobile-menu .mobile-link {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-menu.is-open .mobile-link {
  opacity: 1;
  transform: none;
}
.mobile-menu.is-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  isolation: isolate;
  background-color: #00142f;
  background-image:
    linear-gradient(
      90deg,
      rgba(0, 20, 47, 0.92) 0%,
      rgba(0, 20, 47, 0.78) 40%,
      rgba(0, 20, 47, 0.42) 72%,
      rgba(0, 20, 47, 0.3) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 20, 47, 0.35) 0%,
      rgba(0, 20, 47, 0.2) 35%,
      rgba(0, 20, 47, 0.72) 100%
    ),
    url('../images/hero-cargo.jpg');
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse at 78% 38%,
    transparent 0%,
    rgba(0, 20, 47, 0.24) 55%,
    rgba(0, 20, 47, 0.6) 100%
  );
  pointer-events: none;
}

/* Hero entrance animation */
.hero-anim {
  opacity: 0;
  transform: translateY(22px);
  animation: heroRise 0.75s cubic-bezier(0.2, 0, 0, 1) forwards;
}
.hero-anim.delay-1 { animation-delay: 0.08s; }
.hero-anim.delay-2 { animation-delay: 0.16s; }
.hero-anim.delay-3 { animation-delay: 0.24s; }
.hero-anim.delay-4 { animation-delay: 0.32s; }
.hero-anim.delay-5 { animation-delay: 0.4s; }

@keyframes heroRise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Pulsing status dot */
.status-dot {
  position: relative;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--accent);
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* ---------- Cards & hover ---------- */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(0, 20, 47, 0.5);
  border-color: #d9b48a;
}

.icon-badge {
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.card-lift:hover .icon-badge {
  transform: translateY(-2px) scale(1.06);
}

/* ---------- Fleet tabs & panels ---------- */
.fleet-tab {
  cursor: pointer;
  white-space: nowrap;
}

.fleet-tab[aria-selected='true'] {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(0, 20, 47, 0.8);
}

.fleet-panel.is-active {
  animation: panelIn 0.45s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fleet-panel img {
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}
.fleet-panel:hover img {
  transform: scale(1.04);
}

/* ---------- Accordion ---------- */
details > summary {
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}
details[open] > summary {
  color: var(--primary);
}
.accordion-content {
  animation: accordionIn 0.32s ease;
}
@keyframes accordionIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Partner logos ---------- */
.partner-logo {
  transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(0.2, 0, 0, 1),
    transform 0.65s cubic-bezier(0.2, 0, 0, 1);
  will-change: opacity, transform;
}
.reveal.from-left {
  transform: translateX(-32px);
}
.reveal.from-right {
  transform: translateX(32px);
}
.reveal.zoom {
  transform: scale(0.94);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Floating action buttons ---------- */
.wa-float {
  box-shadow: 0 14px 28px -10px rgba(37, 211, 102, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 34px -10px rgba(37, 211, 102, 0.7);
}
.wa-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(37, 211, 102, 0.5);
  animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- Progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #e9d6b4);
  z-index: 60;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ==========================================================================
   Colorful, soft & interactive sections
   ========================================================================== */
.section-tone {
  position: relative;
  overflow: hidden;
}
.section-tone > * {
  position: relative;
  z-index: 1;
}
.section-tone::before,
.section-tone::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.tone-about {
  background: linear-gradient(180deg, #f8f5ef 0%, #f1f5fc 100%);
}
.tone-about::before {
  width: 320px;
  height: 320px;
  top: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(216, 224, 242, 0.95), transparent 70%);
}
.tone-about::after {
  width: 280px;
  height: 280px;
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(233, 214, 180, 0.85), transparent 70%);
}

.tone-fleet {
  background: linear-gradient(180deg, #f1f5fc 0%, #fbf7f0 100%);
}
.tone-fleet::before {
  width: 360px;
  height: 360px;
  top: 10%;
  left: -140px;
  background: radial-gradient(circle, rgba(214, 225, 245, 0.95), transparent 70%);
}
.tone-fleet::after {
  width: 320px;
  height: 320px;
  bottom: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(233, 214, 180, 0.85), transparent 70%);
}

.tone-service {
  background: linear-gradient(180deg, #fbf6ee 0%, #eff4fb 100%);
}
.tone-service::before {
  width: 340px;
  height: 340px;
  top: -120px;
  left: 30%;
  background: radial-gradient(circle, rgba(233, 214, 180, 0.8), transparent 70%);
}
.tone-service::after {
  width: 300px;
  height: 300px;
  bottom: 0;
  right: -120px;
  background: radial-gradient(circle, rgba(214, 225, 245, 0.9), transparent 70%);
}

.tone-partners {
  background: linear-gradient(180deg, #f3f7fc 0%, #fdf8f1 100%);
}
.tone-partners::before {
  width: 320px;
  height: 320px;
  top: -120px;
  right: 20%;
  background: radial-gradient(circle, rgba(216, 224, 242, 0.9), transparent 70%);
}
.tone-partners::after {
  width: 280px;
  height: 280px;
  bottom: -120px;
  left: -60px;
  background: radial-gradient(circle, rgba(233, 214, 180, 0.8), transparent 70%);
}

/* Section heading accent */
#tentang h2,
#armada h2,
#layanan h2,
#mitra h2 {
  position: relative;
}
#tentang h2::after,
#armada h2::after,
#layanan h2::after,
#mitra h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 14px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #b5813a, #173a6b);
}

/* Soft panels & cards */
.soft-panel {
  position: relative;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(196, 198, 207, 0.45);
  box-shadow: 0 1px 2px rgba(0, 20, 47, 0.03), 0 18px 40px -34px rgba(0, 20, 47, 0.55);
}

.soft-card {
  position: relative;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(196, 198, 207, 0.42);
  box-shadow: 0 1px 2px rgba(0, 20, 47, 0.03), 0 16px 36px -30px rgba(0, 20, 47, 0.5);
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s ease,
    border-color 0.4s ease, background-color 0.4s ease,
    opacity 0.65s cubic-bezier(0.2, 0, 0, 1);
  overflow: hidden;
}
.soft-card:hover {
  transform: translateY(-6px);
  background: #fff;
  border-color: rgba(181, 129, 58, 0.34);
  box-shadow: 0 28px 56px -34px rgba(0, 20, 47, 0.5);
}

/* Cursor spotlight */
.spotlight-card {
  --mx: 50%;
  --my: 0%;
}
.spotlight-card > * {
  position: relative;
  z-index: 1;
}
.spotlight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(181, 129, 58, 0.18), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.spotlight-card:hover::after {
  opacity: 1;
}

/* Icon badges */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 15px;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}
.icon-badge .material-symbols-outlined {
  font-size: 22px;
}
.soft-card:hover .icon-badge,
.flow-card:hover .icon-badge {
  transform: scale(1.08) rotate(-4deg);
}

.tint-navy {
  background: linear-gradient(135deg, #e6ecf7, #d2ddec);
  color: #173a6b;
}
.tint-gold {
  background: linear-gradient(135deg, #f8efdf, #efdcc0);
  color: #7a5320;
}
.tint-slate {
  background: linear-gradient(135deg, #edf1f7, #dde4ef);
  color: #3a4a63;
}

/* Fleet tabs & panels */
.fleet-tabs {
  background: linear-gradient(135deg, #eef2fa, #fbf3e8);
  border-color: rgba(196, 198, 207, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 20, 47, 0.05);
}
.fleet-tab {
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease,
    box-shadow 0.3s ease;
}
.fleet-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}
.fleet-tab[aria-selected='true'] {
  background: linear-gradient(135deg, #00142f, #1d3a63);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(0, 20, 47, 0.8);
}

.fleet-panel {
  border-radius: 26px !important;
  border-color: rgba(196, 198, 207, 0.4) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%) !important;
  box-shadow: 0 24px 60px -46px rgba(0, 20, 47, 0.6);
}
.spec-box {
  border-radius: 16px !important;
  border-color: rgba(196, 198, 207, 0.4) !important;
  background: linear-gradient(135deg, #f3f6fc, #fbf6ef) !important;
}
.spec-box > div {
  transition: transform 0.3s ease;
}
.spec-box > div:hover {
  transform: translateY(-2px);
}

/* Service flow cards */
.flow-card {
  border-radius: 22px !important;
  border-color: transparent !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 16px 38px -30px rgba(0, 20, 47, 0.5);
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s ease,
    border-color 0.4s ease, opacity 0.65s cubic-bezier(0.2, 0, 0, 1);
}
.flow-card:hover {
  transform: translateY(-6px);
  border-color: rgba(181, 129, 58, 0.32);
  box-shadow: 0 28px 56px -34px rgba(0, 20, 47, 0.45);
}
.flow-card .step-number {
  font-variant-numeric: tabular-nums;
}

/* Partner marquee (one running row) */
.partner-marquee {
  position: relative;
  overflow: hidden;
  padding-block: 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.partner-track {
  display: flex;
  width: max-content;
}
.partner-track.is-marquee {
  animation: partnerScroll 40s linear infinite;
  will-change: transform;
}
.partner-marquee:hover .partner-track.is-marquee,
.partner-marquee:focus-within .partner-track.is-marquee {
  animation-play-state: paused;
}
.partner-item {
  flex: 0 0 auto;
  width: 190px;
  padding: 8px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.partner-item img {
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
}
.partner-item:hover img {
  transform: scale(1.06);
}
@media (min-width: 640px) {
  .partner-item {
    width: 220px;
  }
}
@keyframes partnerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Footer CTA */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #00142f 0%, #0f294a 58%, #173a6b 100%);
  box-shadow: 0 30px 70px -40px rgba(0, 20, 47, 0.8);
}
.cta-panel::before,
.cta-panel::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(30px);
}
.cta-panel::before {
  width: 360px;
  height: 360px;
  top: -150px;
  right: -60px;
  background: radial-gradient(circle, rgba(181, 129, 58, 0.4), transparent 70%);
}
.cta-panel::after {
  width: 320px;
  height: 320px;
  bottom: -160px;
  left: -40px;
  background: radial-gradient(circle, rgba(122, 145, 183, 0.35), transparent 70%);
}
.cta-panel > * {
  position: relative;
  z-index: 1;
}

/* ---------- Site footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 15%, rgba(181, 129, 58, 0.16), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(122, 145, 183, 0.2), transparent 40%),
    linear-gradient(135deg, #00142f 0%, #07223f 52%, #0d2c52 100%);
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(
    circle at 108% 118%,
    transparent 0 34px,
    rgba(255, 255, 255, 0.035) 34px 35px
  );
  pointer-events: none;
}
.site-footer::after {
  content: '';
  position: absolute;
  right: -140px;
  bottom: -170px;
  width: 420px;
  height: 420px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(181, 129, 58, 0.2), transparent 66%);
  filter: blur(24px);
  pointer-events: none;
}
.site-footer > * {
  position: relative;
  z-index: 1;
}
.footer-logo {
  filter: brightness(0) invert(1);
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.25s ease, transform 0.25s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: #fff;
  transform: translateX(3px);
}
.footer-contact-icon {
  color: var(--accent);
  flex: none;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  transition: background-color 0.25s ease, border-color 0.25s ease,
    color 0.25s ease, transform 0.25s ease;
}
.footer-social:hover,
.footer-social:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.footer-social svg {
  width: 18px;
  height: 18px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal,
  .reveal.from-left,
  .reveal.from-right,
  .reveal.zoom {
    opacity: 1;
    transform: none;
  }
  .partner-track {
    animation: none;
  }
  .partner-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- Small devices tweaks ---------- */
@media (max-width: 640px) {
  :root {
    --header-height: 72px;
  }
}
