/* =========================================================
   ARIES MARINE TRADING — ANIMATIONS STYLESHEET
   Handles: hero zoom, fade-up entrance, scroll reveal,
            hover accents, reduced-motion accessibility
   Depends on: css/style.css
   ========================================================= */

/* ---------- HERO BACKGROUND ZOOM ---------- */
@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

.hero-bg {
  animation: heroZoom 20s ease-in-out infinite alternate;
  transform-origin: center center;
  will-change: transform;
}

/* ---------- FADE-UP ENTRANCE ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
}

.anim-fade-up.delay-1 { animation-delay: 0.25s; }
.anim-fade-up.delay-2 { animation-delay: 0.5s; }
.anim-fade-up.delay-3 { animation-delay: 0.75s; }

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for grid children */
.strengths-grid .reveal:nth-child(1),
.services-grid .reveal:nth-child(1),
.compliance-grid .reveal:nth-child(1),
.trade-grid .reveal:nth-child(1),
.values-grid .reveal:nth-child(1),
.process-flow .reveal:nth-child(1),
.faq-list .reveal:nth-child(1) { transition-delay: 0.05s; }

.strengths-grid .reveal:nth-child(2),
.services-grid .reveal:nth-child(2),
.compliance-grid .reveal:nth-child(2),
.trade-grid .reveal:nth-child(2),
.values-grid .reveal:nth-child(2),
.process-flow .reveal:nth-child(2),
.faq-list .reveal:nth-child(2) { transition-delay: 0.12s; }

.strengths-grid .reveal:nth-child(3),
.services-grid .reveal:nth-child(3),
.compliance-grid .reveal:nth-child(3),
.trade-grid .reveal:nth-child(3),
.values-grid .reveal:nth-child(3),
.process-flow .reveal:nth-child(3),
.faq-list .reveal:nth-child(3) { transition-delay: 0.19s; }

.strengths-grid .reveal:nth-child(4),
.services-grid .reveal:nth-child(4),
.compliance-grid .reveal:nth-child(4),
.trade-grid .reveal:nth-child(4),
.values-grid .reveal:nth-child(4),
.process-flow .reveal:nth-child(4),
.faq-list .reveal:nth-child(4) { transition-delay: 0.26s; }

.services-grid .reveal:nth-child(5),
.process-flow .reveal:nth-child(5),
.faq-list .reveal:nth-child(5) { transition-delay: 0.33s; }

.services-grid .reveal:nth-child(6),
.process-flow .reveal:nth-child(6),
.faq-list .reveal:nth-child(6) { transition-delay: 0.4s; }

.process-flow .reveal:nth-child(7) { transition-delay: 0.47s; }

/* ---------- HOVER ENHANCEMENTS ---------- */
.btn { will-change: transform; }
.btn:hover { box-shadow: 0 10px 22px rgba(10, 31, 61, 0.18); }

.service-card:hover .service-icon { transform: scale(1.08); transition: transform 0.3s ease; }
.service-link { position: relative; }
.service-link::after { content: ''; display: inline-block; margin-left: 4px; transition: transform 0.25s ease; }
.service-link:hover::after { transform: translateX(4px); }
.service-card::before { transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.strength-card:hover .strength-num { color: var(--gold-light); transition: color 0.3s ease; }
.compliance-card:hover .compliance-badge { background: var(--gold); color: var(--navy); transition: background 0.3s ease, color 0.3s ease; }
.trade-card:hover h3 { color: var(--gold); transition: color 0.3s ease; }
.value-card:hover h3 { color: var(--gold-light); transition: color 0.3s ease; }
.process-step:hover .process-num { color: var(--gold-light); transition: color 0.3s ease; }
.footer-col a { position: relative; display: inline-block; transition: color 0.25s ease, transform 0.25s ease; }
.footer-col a:hover { transform: translateX(3px); }

/* ---------- FORM FEEDBACK ANIMATIONS ---------- */
@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

.form-group input.invalid, .form-group textarea.invalid, .form-group select.invalid { animation: shakeError 0.35s ease; }

@keyframes successPop {
  0%   { opacity: 0; transform: translateY(8px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.form-success { animation: successPop 0.4s ease forwards; }

/* ---------- MOBILE MENU TRANSITIONS ---------- */
.main-nav { will-change: right; }

@media (max-width: 768px) {
  .main-nav.open ul li { animation: fadeUp 0.35s ease forwards; opacity: 0; }
  .main-nav.open ul li:nth-child(1) { animation-delay: 0.05s; }
  .main-nav.open ul li:nth-child(2) { animation-delay: 0.10s; }
  .main-nav.open ul li:nth-child(3) { animation-delay: 0.15s; }
  .main-nav.open ul li:nth-child(4) { animation-delay: 0.20s; }
  .main-nav.open ul li:nth-child(5) { animation-delay: 0.25s; }
  .main-nav.open ul li:nth-child(6) { animation-delay: 0.30s; }
  .main-nav.open ul li:nth-child(7) { animation-delay: 0.35s; }
  .main-nav.open ul li:nth-child(8) { animation-delay: 0.40s; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg { animation: none !important; transform: none !important; }
  .anim-fade-up, .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
}