/* ============================================
   TIANJIN PLC — ANIMATION LAYER
   Touches: transitions, transforms, opacity ONLY
   Layout / color / content: NEVER changed here

   Phase 2 confirmed selectors:
   .nav-links a         nav links
   .nvocc-eyebrow       hero badge/eyebrow
   .hero-slide h1       hero heading
   .hero-lead           hero subtext
   .hero-actions        hero button row
   .proof-item          stat card
   .corridor-tab        route tab button
   .reasons-list li     why-choose-us items
   .result-card         dark highlight card
   .about-milestone-item milestone rows
   .process-step        how-we-work steps
   .lane                service cards
   .lane-link           service CTA links
   .image-stack figure  ops images
   .ops-item            NVOCC/feature boxes
   .hub                 network region cards
   .client-strip        marquee outer
   .client-track        marquee inner track
   .quote-form input/select/textarea  form fields
   .quote-form button[type="submit"]  submit btn
   ============================================ */

/* ── GLOBAL ── */
html { scroll-behavior: smooth; }

::selection { background: #ff3841; color: #fff; }

@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 5px; }
  ::-webkit-scrollbar-track { background: #f0f2f5; }
  ::-webkit-scrollbar-thumb { background: #d42830; border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: #ff3841; }
  * { scrollbar-width: thin; scrollbar-color: #d42830 #f0f2f5; }
}

/* ── SCROLL REVEAL BASE ── */
.fx-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fx-reveal.fx-in {
  opacity: 1;
  transform: translateY(0);
}
.fx-from-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fx-from-left.fx-in {
  opacity: 1;
  transform: translateX(0);
}
.fx-from-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fx-from-right.fx-in {
  opacity: 1;
  transform: translateX(0);
}

/* ── KEYFRAMES ── */
@keyframes fx-fadeup {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fx-blurslide {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0px); }
}
@keyframes fx-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}
@keyframes fx-statpop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes fx-pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(255, 56, 65, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(255, 56, 65, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 56, 65, 0); }
}
@keyframes fx-linedrw {
  from { width: 0; }
  to   { width: 36px; }
}
@keyframes fx-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── NAV LINKS — underline spread from centre ── */
.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: #ff3841;
  border-radius: 2px;
  transition: left 0.25s ease, right 0.25s ease;
}
.nav-links a:hover::after {
  left: 0;
  right: 0;
}

/* NAV CTA */
.nav-cta {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 18px rgba(255, 56, 65, 0.4);
}

/* ── HERO ENTRANCE (fires once on load, active slide only) ── */
/* Eyebrow / badge */
.hero-slide.active .nvocc-eyebrow {
  animation: fx-fadeup 0.6s ease both;
  animation-delay: 0.1s;
}
/* H1 */
.hero-slide.active h1 {
  animation: fx-blurslide 0.7s ease both;
  animation-delay: 0.25s;
}
/* Lead / subtext */
.hero-slide.active .hero-lead {
  animation: fx-fadeup 0.6s ease both;
  animation-delay: 0.4s;
}
/* Buttons row */
.hero-slide.active .hero-actions {
  animation: fx-fadeup 0.5s ease both;
  animation-delay: 0.55s;
}

/* Hero CTA buttons */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 56, 65, 0.35);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Hero arrow buttons */
.hero-arrow {
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hero-arrow:hover {
  transform: scale(1.15);
}

/* Scroll-down chevron injected by scroll-fx.js */
.fx-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
  animation: fx-bounce 1.8s ease-in-out infinite;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 10;
  cursor: default;
}
.fx-scroll-hint.fx-hidden {
  opacity: 0;
}

/* ── STAT CARDS (.proof-item) ── */
.proof-item {
  transition: transform 0.2s ease;
}
.proof-item:hover {
  transform: translateY(-3px);
}
.fx-statpop {
  animation: fx-statpop 0.55s ease-out;
}

/* ── SECTION HEADINGS ── */
.fx-heading {
  position: relative;
}

/* ── ROUTE TABS ── */
.corridor-tab {
  transition: transform 0.22s ease, opacity 0.22s ease,
              box-shadow 0.22s ease;
}
.corridor-tab:hover:not(.active) {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* Route fact chips */
.fact {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fact:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px #ff3841;
}

/* ── WHY CHOOSE US — numbered list items ── */
.reasons-list li {
  transition: transform 0.55s ease, opacity 0.55s ease, background 0.25s ease;
}
.reasons-list li:hover {
  transform: translateX(5px);
  transition: transform 0.25s ease, background 0.25s ease;
}

/* Icon inside reason item */
.reason-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reasons-list li:hover .reason-icon {
  transform: scale(1.18) rotate(-8deg);
}

/* ── WHY CHOOSE US — dark result card ── */
.result-card {
  transition: transform 0.55s ease, opacity 0.55s ease, box-shadow 0.3s ease;
}
.result-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(17, 25, 54, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── MILESTONE ITEMS (.about-milestone-item) ── */
.about-milestone-item {
  transition: transform 0.55s ease, opacity 0.55s ease, background 0.2s ease;
  border-radius: 6px;
}
.about-milestone-item:hover {
  background: rgba(255, 56, 65, 0.05);
  transform: translateX(5px);
  transition: transform 0.2s ease, background 0.2s ease;
}

/* Milestone number */
.milestone-num {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.about-milestone-item:hover .milestone-num {
  transform: scale(1.12);
}

/* About checklist */
.about-checklist li {
  transition: transform 0.22s ease;
}
.about-checklist li:hover {
  transform: translateX(5px);
}

/* ── PROCESS STEPS (.process-step) ── */
.process-step {
  transition: transform 0.55s ease, opacity 0.55s ease, box-shadow 0.28s ease,
              background 0.25s ease;
}
.process-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(17, 25, 54, 0.1);
  transition: transform 0.28s ease, box-shadow 0.28s ease,
              background 0.25s ease;
}

/* Process step number */
.process-num {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.process-step:hover .process-num {
  transform: scale(1.12);
}

/* ── SERVICE CARDS (.lane) ── */
.lane {
  transition: transform 0.55s ease, opacity 0.55s ease, box-shadow 0.28s ease;
  will-change: transform;
}
.lane:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 0 2px #ff3841,
              0 20px 48px rgba(17, 25, 54, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

/* Service CTA link (.lane-link) */
.lane-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}
.lane-link::after {
  content: ' →';
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lane-link:hover::after {
  opacity: 1;
  transform: translateX(3px);
}
.lane-link::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #ff3841;
  width: 0;
  transition: width 0.25s ease;
}
.lane-link:hover::before {
  width: 100%;
}

/* ── OPS IMAGES — image-stack figures ── */
.image-stack figure {
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.image-stack figure:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.image-stack figure img {
  transition: transform 0.5s ease;
  display: block;
  width: 100%;
}
.image-stack figure:hover img {
  transform: scale(1.07);
}

/* ── FEATURE / OPS BOXES (.ops-item) ── */
.ops-item {
  transition: transform 0.55s ease, opacity 0.55s ease, box-shadow 0.25s ease;
}
.ops-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(17, 25, 54, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Icon inside ops-item */
.ops-num {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ops-item:hover .ops-num {
  transform: scale(1.15) rotate(-5deg);
}

/* ── NETWORK / REGION CARDS (.hub) ── */
.hub {
  transition: transform 0.55s ease, opacity 0.55s ease, box-shadow 0.28s ease,
              border-color 0.28s ease;
}
.hub:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(17, 25, 54, 0.12);
  border-color: #ff3841;
  transition: transform 0.28s ease, box-shadow 0.28s ease,
              border-color 0.28s ease;
}

/* Pulse dot injected by scroll-fx.js into each .hub */
.fx-pulse-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff3841;
  margin-right: 8px;
  vertical-align: middle;
  animation: fx-pulse-dot 2.2s ease-out infinite;
  flex-shrink: 0;
}

/* ── CARRIER MARQUEE — edge fade + CSS animation ── */
/* Outer wrapper: mask edges */
.client-strip {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 7%,
    black 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 7%,
    black 93%,
    transparent 100%
  );
}

/* Inner scrolling track — CSS-driven scroll */
.client-track {
  animation: fx-ticker 28s linear infinite;
}

/* Pause on hover (enhanced by scroll-fx.js too) */
.client-strip:hover .client-track {
  animation-play-state: paused;
}

/* ── QUOTE FORM INPUTS ── */
.quote-form input,
.quote-form select,
.quote-form textarea {
  transition: border-color 0.22s ease, box-shadow 0.22s ease,
              transform 0.2s ease;
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  border-color: #ff3841 !important;
  box-shadow: 0 0 0 3px rgba(255, 56, 65, 0.18) !important;
  outline: none;
  transform: translateY(-1px);
}

/* ── QUOTE FORM SUBMIT BUTTON ── */
.quote-form button[type="submit"] {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
}
.quote-form button[type="submit"]:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 28px rgba(255, 56, 65, 0.4);
}
.quote-form button[type="submit"]:active {
  transform: scale(1);
  box-shadow: none;
}

/* Contact links */
.contact-item-row a {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.contact-item-row a:hover {
  opacity: 0.75;
  transform: translateX(3px);
}

/* Social icon hover */
.contact-socials a {
  display: grid;
  place-items: center;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.contact-socials a:hover {
  transform: translateY(-4px) scale(1.15);
  opacity: 0.85;
}

/* Port list hover */
.ports-list li {
  transition: transform 0.2s ease;
}
.ports-list li:hover {
  transform: translateX(4px);
}

/* ── BACK TO TOP ── */
.to-top {
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.28s ease;
}
.to-top:hover {
  transform: translateY(-4px) scale(1.12);
}

/* ── FOOTER LOGO ── */
.footer-logo {
  transition: transform 0.3s ease, filter 0.3s ease;
}
.footer-logo:hover {
  transform: scale(1.07) rotate(-2deg);
}

/* ── VALUE CARDS (mission section) ── */
.value-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(17, 25, 54, 0.12);
}
.value-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.value-card:hover .value-icon {
  transform: scale(1.2) rotate(-6deg);
}

/* Mission quote items */
.mission-quote-item {
  transition: transform 0.25s ease;
}
.mission-quote-item:hover {
  transform: translateX(6px);
}

/* Philosophy stats strip */
.phil-stat-item {
  transition: transform 0.25s ease;
}
.phil-stat-item:hover {
  transform: translateY(-4px);
}

/* ── REDUCED MOTION — always last block ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fx-reveal,
  .fx-from-left,
  .fx-from-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
