/* =========================================================
   PT Artha Logistics International
   Animation CSS
   Light Mode Minimal Professional + Parallax Feel
   ========================================================= */

/* =========================================================
   Base Animation Setup
   ========================================================= */

[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 720ms ease,
    transform 720ms ease;
  will-change: opacity, transform;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade"] {
  transform: none;
}

[data-animate="fade"].is-visible {
  opacity: 1;
}

[data-animate="fade-up"] {
  transform: translateY(34px);
}

[data-animate="fade-down"] {
  transform: translateY(-34px);
}

[data-animate="fade-left"] {
  transform: translateX(34px);
}

[data-animate="fade-right"] {
  transform: translateX(-34px);
}

[data-animate="zoom-in"] {
  transform: scale(0.94);
}

[data-animate="zoom-in"].is-visible {
  transform: scale(1);
}

/* =========================================================
   Animation Delay Utilities
   ========================================================= */

.delay-1 {
  transition-delay: 100ms;
}

.delay-2 {
  transition-delay: 180ms;
}

.delay-3 {
  transition-delay: 260ms;
}

.delay-4 {
  transition-delay: 340ms;
}

.delay-5 {
  transition-delay: 420ms;
}

.delay-6 {
  transition-delay: 500ms;
}

/* =========================================================
   Hero Entrance
   ========================================================= */

.hero-kicker,
.hero-title,
.hero-lead,
.hero .btn-group,
.hero-meta,
.parallax-scene {
  animation-fill-mode: both;
}

.hero-kicker {
  animation: fadeUpSoft 700ms ease 80ms both;
}

.hero-title {
  animation: fadeUpSoft 760ms ease 160ms both;
}

.hero-lead {
  animation: fadeUpSoft 820ms ease 240ms both;
}

.hero .btn-group {
  animation: fadeUpSoft 880ms ease 320ms both;
}

.hero-meta {
  animation: fadeUpSoft 920ms ease 400ms both;
}

.parallax-scene {
  animation: fadeInScale 960ms ease 260ms both;
}

/* =========================================================
   Parallax Scene Motion
   ========================================================= */

.parallax-scene::after {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.0) 35%,
      rgba(255, 255, 255, 0.36) 48%,
      rgba(255, 255, 255, 0.0) 62%,
      transparent 100%
    );
  transform: translateX(-40%) rotate(8deg);
  animation: softSweep 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}

.orb-navy {
  animation: floatSlow 7s ease-in-out infinite;
}

.orb-orange {
  animation: floatMedium 6s ease-in-out infinite;
}

.route-board {
  animation: floatTiny 8s ease-in-out infinite;
}

.ship-card {
  animation: shipFloat 5.4s ease-in-out infinite;
}

.tracking-mini-card.top {
  animation: floatMedium 6.5s ease-in-out infinite;
}

.tracking-mini-card.bottom {
  animation: floatSlow 7.5s ease-in-out infinite reverse;
}

.route-line {
  overflow: hidden;
}

.route-line::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -20%;
  width: 26%;
  height: 13px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.84),
    transparent
  );
  filter: blur(2px);
  animation: routePulse 3.2s ease-in-out infinite;
}

.route-dot.start,
.route-dot.end {
  animation: dotPulse 2.4s ease-in-out infinite;
}

.route-dot.end {
  animation-delay: 500ms;
}

/* =========================================================
   Tracking Panel Motion
   ========================================================= */

.tracking-map .route-line::after {
  animation: routePulse 3.4s ease-in-out infinite;
}

.status-card {
  animation: statusFloat 5.8s ease-in-out infinite;
}

.metric-box {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.metric-box:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 120, 36, 0.24);
  box-shadow: 0 12px 28px rgba(18, 59, 93, 0.08);
}

/* =========================================================
   Hover Micro Interactions
   ========================================================= */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.24),
    transparent
  );
  transition: transform 520ms ease;
}

.btn:hover::after {
  transform: translateX(110%);
}

.btn-outline::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(233, 120, 36, 0.12),
    transparent
  );
}

.card-icon,
.contact-icon,
.flow-number {
  transition:
    transform 240ms ease,
    background 240ms ease,
    color 240ms ease;
}

.card:hover .card-icon,
.contact-item:hover .contact-icon,
.flow-item:hover .flow-number {
  transform: translateY(-3px) scale(1.04);
}

.card-link {
  position: relative;
}

.card-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--orange);
  transition: width 220ms ease;
}

.card-link:hover::after {
  width: 100%;
}

.nav-link {
  transition:
    color 220ms ease,
    background 220ms ease;
}

/* =========================================================
   Minimal Line / Route Decoration
   ========================================================= */

.orange-line {
  position: relative;
  overflow: hidden;
}

.orange-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.54);
  transform: translateX(-100%);
  animation: lineSweep 3s ease-in-out infinite;
}

/* =========================================================
   Form Interaction Animation
   ========================================================= */

.form-control {
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    transform 220ms ease;
}

.form-control:focus {
  transform: translateY(-1px);
}

.form-group.has-error .form-control {
  border-color: #D64545;
  background: #FFF7F7;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.08);
}

.form-error {
  display: none;
  color: #D64545;
  font-size: 12px;
  font-weight: 700;
}

.form-group.has-error .form-error {
  display: block;
  animation: fadeUpSoft 260ms ease both;
}

.form-success {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #F0FAF3;
  color: #217A3B;
  border: 1px solid rgba(33, 122, 59, 0.18);
  font-size: 14px;
  font-weight: 700;
}

.form-success.is-visible {
  display: block;
  animation: fadeUpSoft 320ms ease both;
}

/* =========================================================
   Header Scroll State
   ========================================================= */

.site-header {
  transition:
    box-shadow 240ms ease,
    background 240ms ease,
    border-color 240ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(18, 59, 93, 0.08);
}

/* =========================================================
   Page Loading
   ========================================================= */

body.is-loading {
  cursor: wait;
}

body.is-loaded .site-header,
body.is-loaded main,
body.is-loaded .site-footer {
  animation: pageFadeIn 420ms ease both;
}

/* =========================================================
   Keyframes
   ========================================================= */

@keyframes fadeUpSoft {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes softSweep {
  0%,
  52% {
    transform: translateX(-52%) rotate(8deg);
    opacity: 0;
  }

  68% {
    opacity: 1;
  }

  100% {
    transform: translateX(52%) rotate(8deg);
    opacity: 0;
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -16px, 0);
  }
}

@keyframes floatMedium {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(10px, -12px, 0);
  }
}

@keyframes floatTiny {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -8px, 0);
  }
}

@keyframes shipFloat {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(-1deg);
  }

  50% {
    transform: translate(-50%, calc(-50% - 12px)) rotate(1deg);
  }
}

@keyframes statusFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes routePulse {
  0% {
    left: -22%;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes dotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(233, 120, 36, 0.14);
  }

  50% {
    box-shadow: 0 0 0 14px rgba(233, 120, 36, 0.06);
  }
}

@keyframes lineSweep {
  0%,
  45% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  [data-animate].is-visible,
  .hero-kicker,
  .hero-title,
  .hero-lead,
  .hero .btn-group,
  .hero-meta,
  .parallax-scene,
  .orb-navy,
  .orb-orange,
  .route-board,
  .ship-card,
  .tracking-mini-card.top,
  .tracking-mini-card.bottom,
  .status-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .parallax-scene::after,
  .route-line::after,
  .orange-line::after {
    animation: none !important;
    display: none;
  }
}