/* =========================================================================
   css/motion.css — everything the GSAP layer needs (loads last)
   Reveal hooks · cinematic components · ScrollSmoother scaffolding ·
   performance hints · hover polish · reduced motion.
   Depends on the tokens defined in style.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   SCROLLSMOOTHER SCAFFOLDING
   js/smoother.js creates these wrappers.
   ------------------------------------------------------------------------- */

#smooth-wrapper {
  overflow: hidden;
}

#smooth-content {
  will-change: transform;
}

/* -------------------------------------------------------------------------
   SCROLL-REVEAL HOOKS
   ------------------------------------------------------------------------- */

[data-tpal9-reveal].tpal9-armed {
  will-change:
    transform,
    opacity,
    clip-path;
}

[data-tpal9-reveal].tpal9-armed--soft {
  opacity: 0;
  transform: translateY(24px);
  clip-path: inset(0 0 8% 0);

  transition:
    opacity 760ms var(--tpal9-ease),
    transform 760ms var(--tpal9-ease),
    clip-path 760ms var(--tpal9-ease);
}

[data-tpal9-reveal].tpal9-armed--soft.tpal9-inview {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0% 0);
}

/* =========================================================================
   CINEMATIC COMPONENTS
   ========================================================================= */

/* -------------------------------------------------------------------------
   CIRCULAR / ORBITAL FLEET SHOWREEL

   Desktop:
   - Pinned elliptical carousel.
   - Active card remains centred and largest.
   - Side cards curve around the centre.

   Mobile, touch devices and reduced-motion:
   - Swipeable horizontal scroll-snap carousel.
   ------------------------------------------------------------------------- */

.tpal9-hscroll {
  position: relative;
  width: 100%;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% 48%,
      rgba(0, 155, 119, 0.16),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      #10231d 0%,
      var(--tpal9-ink) 100%
    );

  color: var(--tpal9-white);
}

.tpal9-hscroll-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.tpal9-hscroll-track {
  width: 100%;

  padding:
    clamp(2.5rem, 5vw, 5rem)
    clamp(1rem, 3vw, 2.5rem);

  will-change: transform;
}

.tpal9-hpanel {
  position: relative;

  flex:
    0
    0
    min(84vw, 470px);

  width: min(84vw, 470px);
  max-width: 470px;

  overflow: hidden;

  border:
    1px
    solid
    rgba(255, 255, 255, 0.10);

  border-radius:
    var(--tpal9-radius-lg);

  background: #1b2b26;

  box-shadow:
    0 28px 70px -28px rgba(0, 0, 0, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;

  transform-style: preserve-3d;
  backface-visibility: hidden;

  will-change:
    transform,
    filter,
    opacity;
}

.tpal9-hpanel::after {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  border-radius: inherit;

  box-shadow:
    0 0 0 1px
    rgba(200, 178, 115, 0);

  transition:
    box-shadow 420ms var(--tpal9-ease),
    opacity 420ms var(--tpal9-ease);
}

.tpal9-hpanel.tpal9-hpanel-active {
  box-shadow:
    0 38px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 44px -18px rgba(0, 155, 119, 0.55);
}

.tpal9-hpanel.tpal9-hpanel-active::after {
  box-shadow:
    0 0 0 1px
    rgba(200, 178, 115, 0.42);
}

.tpal9-hpanel-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tpal9-emerald-deep);
}

.tpal9-hpanel-media img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transform: scale(1.015);

  transition:
    transform
    700ms
    var(--tpal9-ease);
}

.tpal9-hpanel-active .tpal9-hpanel-media img {
  transform: scale(1.06);
}

.tpal9-hpanel-body {
  padding: var(--tpal9-space-3);
}

.tpal9-hpanel-body .tpal9-cap {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tpal9-gold);
}

.tpal9-hpanel-body h3 {
  margin-block: 0.3rem 0.4rem;
  color: var(--tpal9-white);
}

.tpal9-hpanel-body p {
  max-width: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.94rem;
}

.tpal9-hscroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.5rem;

  padding:
    0
    var(--tpal9-space-3)
    var(--tpal9-space-3);

  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.58);
}

.tpal9-hscroll-hint svg {
  width: 26px;
  height: 12px;

  animation:
    tpal9-orbit-hint
    1.8s
    var(--tpal9-ease)
    infinite;
}

@keyframes tpal9-orbit-hint {
  0%,
  100% {
    transform: translateX(-3px);
    opacity: 0.55;
  }

  50% {
    transform: translateX(4px);
    opacity: 1;
  }
}

/* Desktop orbital stage.
   JavaScript adds this class only while the orbit is active. */

.tpal9-hscroll.tpal9-hscroll-ready {
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tpal9-hscroll.tpal9-hscroll-ready
.tpal9-hscroll-viewport {
  overflow: visible;
}

.tpal9-hscroll.tpal9-hscroll-ready
.tpal9-hscroll-track {
  position: relative;
  display: block;

  width: 100%;
  max-width: 1500px;

  margin-inline: auto;

  padding-inline:
    clamp(1rem, 4vw, 4rem);

  transform-style: preserve-3d;
  perspective: 1400px;
}

.tpal9-hscroll.tpal9-hscroll-ready
.tpal9-hpanel {
  position: absolute;

  left: 50%;
  top: 50%;

  margin: 0;
}

/* Touch and no-JavaScript fallback. */

.tpal9-hscroll:not(.tpal9-hscroll-ready)
.tpal9-hscroll-viewport {
  overflow-x: auto;
  overflow-y: hidden;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;

  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
}

.tpal9-hscroll:not(.tpal9-hscroll-ready)
.tpal9-hscroll-track {
  display: flex;

  gap: var(--tpal9-space-3);

  width: max-content;
  min-width: 100%;
}

.tpal9-hscroll:not(.tpal9-hscroll-ready)
.tpal9-hpanel {
  position: relative;

  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* Tablet and mobile fallback sizing. */

@media (max-width: 899px) {
  .tpal9-hscroll-track {
    padding:
      var(--tpal9-space-4)
      var(--tpal9-space-3);
  }

  .tpal9-hpanel {
    flex-basis:
      min(86vw, 430px);

    width:
      min(86vw, 430px);
  }

  .tpal9-hscroll-hint {
    padding-bottom:
      var(--tpal9-space-3);
  }
}

/* Small mobile screens. */

@media (max-width: 479px) {
  .tpal9-hscroll-track {
    gap: var(--tpal9-space-2);

    padding:
      var(--tpal9-space-3)
      var(--tpal9-space-2);
  }

  .tpal9-hpanel {
    flex-basis:
      calc(100vw - 2.5rem);

    width:
      calc(100vw - 2.5rem);

    border-radius:
      var(--tpal9-radius-md);
  }

  .tpal9-hpanel-body {
    padding:
      var(--tpal9-space-2);
  }
}

/* -------------------------------------------------------------------------
   ZOOM PARALLAX SHOWPIECE
   ------------------------------------------------------------------------- */

.tpal9-zoom {
  position: relative;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  border-radius:
    var(--tpal9-radius-lg);

  background:
    var(--tpal9-emerald-deep);

  box-shadow:
    var(--tpal9-shadow-lift);
}

.tpal9-zoom img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transform: scale(1.35);
  transform-origin: center;

  will-change: transform;
}

.tpal9-zoom-caption {
  position: absolute;

  inset:
    auto
    0
    0
    0;

  padding:
    var(--tpal9-space-4)
    var(--tpal9-space-3)
    var(--tpal9-space-3);

  background:
    linear-gradient(
      0deg,
      rgba(20, 36, 32, 0.78),
      transparent
    );

  color:
    var(--tpal9-white);
}

.tpal9-zoom-caption h3 {
  color:
    var(--tpal9-white);
}

.tpal9-zoom-caption p {
  max-width: 46ch;

  color:
    rgba(255, 255, 255, 0.85);
}

/* -------------------------------------------------------------------------
   MASKED WORD REVEAL
   ------------------------------------------------------------------------- */

.tpal9-reveal-text {
  max-width: 24ch;

  margin-inline: auto;

  text-align: center;

  font-family:
    var(--tpal9-font-display);

  font-weight: 700;

  font-size:
    var(--tpal9-fs-mega);

  line-height: 1.05;
  letter-spacing: -0.02em;

  color:
    var(--tpal9-emerald-ink);
}

.tpal9-reveal-text .tpal9-word {
  display: inline-block;

  overflow: hidden;

  vertical-align: top;

  padding-bottom: 0.08em;
}

.tpal9-reveal-text .tpal9-word-in {
  display: inline-block;

  will-change: transform;
}

.tpal9-reveal-stage {
  min-height: 42vh;

  display: grid;
  place-items: center;

  padding-block:
    clamp(3rem, 7vw, 5rem);
}

@media (min-width: 760px) {
  .tpal9-reveal-stage {
    min-height: 34vh;
    padding-block: 3rem;
  }
}

/* -------------------------------------------------------------------------
   STICKY STACK
   ------------------------------------------------------------------------- */

.tpal9-stack {
  display: flex;
  flex-direction: column;

  gap:
    var(--tpal9-space-3);
}

.tpal9-stack-card {
  position: sticky;
  top: 90px;

  padding:
    var(--tpal9-space-4);

  background:
    var(--tpal9-white);

  border:
    1px
    solid
    var(--tpal9-line);

  border-radius:
    var(--tpal9-radius-lg);

  box-shadow:
    var(--tpal9-shadow-lift);

  will-change:
    transform,
    filter;

  backface-visibility: hidden;
}

.tpal9-stack-card:nth-child(2) {
  top: 102px;
}

.tpal9-stack-card:nth-child(3) {
  top: 114px;
}

.tpal9-stack-card:nth-child(4) {
  top: 126px;
}

.tpal9-stack-card
.tpal9-stack-index {
  font-family:
    var(--tpal9-font-display);

  font-weight: 700;
  font-size: 1rem;

  color:
    var(--tpal9-gold-ink);
}

.tpal9-stack-card h3 {
  margin-block:
    0.3rem
    0.6rem;

  font-size:
    clamp(
      1.3rem,
      1.1rem + 1vw,
      1.9rem
    );
}

@media (min-width: 820px) {
  .tpal9-stack-card {
    display: grid;

    grid-template-columns:
      0.9fr
      1.1fr;

    gap:
      var(--tpal9-space-4);

    align-items: center;
  }
}

/* -------------------------------------------------------------------------
   PARALLAX PERFORMANCE HINT
   ------------------------------------------------------------------------- */

[data-tpal9-parallax] {
  will-change: transform;
}

/* =========================================================================
   PERPETUAL MICRO-INTERACTIONS
   ========================================================================= */

@keyframes tpal9-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 3px
      rgba(0, 155, 119, 0.18);
  }

  50% {
    box-shadow:
      0 0 0 6px
      rgba(0, 155, 119, 0.06);
  }
}

@keyframes tpal9-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes tpal9-shimmer {
  0% {
    background-position: -180% 0;
  }

  100% {
    background-position: 180% 0;
  }
}

@keyframes tpal9-drift {
  0%,
  100% {
    transform:
      translate3d(0, 0, 0)
      scale(1);
  }

  50% {
    transform:
      translate3d(3%, -4%, 0)
      scale(1.08);
  }
}

@keyframes tpal9-breathe-glow {
  0%,
  100% {
    box-shadow:
      0 12px 26px -10px
      rgba(200, 178, 115, 0.55);
  }

  50% {
    box-shadow:
      0 18px 42px -8px
      rgba(200, 178, 115, 0.85);
  }
}

.tpal9-float {
  animation:
    tpal9-float
    5s
    var(--tpal9-ease)
    infinite;
}

.tpal9-badge-shimmer {
  display: inline-flex;
  align-items: center;

  gap: 0.45rem;

  padding:
    0.4rem
    0.85rem;

  border:
    1px
    solid
    rgba(200, 178, 115, 0.4);

  border-radius:
    var(--tpal9-radius-pill);

  background:
    linear-gradient(
      100deg,
      rgba(200, 178, 115, 0.16) 40%,
      rgba(200, 178, 115, 0.45) 50%,
      rgba(200, 178, 115, 0.16) 60%
    );

  background-size: 220% 100%;

  font-family:
    var(--tpal9-font-display);

  font-weight: 700;
  font-size: 0.78rem;

  letter-spacing: 0.05em;
  text-transform: uppercase;

  color:
    var(--tpal9-gold-ink);

  animation:
    tpal9-shimmer
    3.4s
    linear
    infinite;
}

.tpal9-badge-shimmer::before {
  content: "";

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background:
    var(--tpal9-gold-dark);
}

.tpal9-hero::before {
  animation:
    tpal9-drift
    16s
    ease-in-out
    infinite;
}

.tpal9-final-cta::after {
  animation:
    tpal9-drift
    20s
    ease-in-out
    infinite;
}

.tpal9-final-cta
.tpal9-btn--gold {
  animation:
    tpal9-breathe-glow
    4.5s
    var(--tpal9-ease)
    infinite;
}

.tpal9-final-cta
.tpal9-btn--gold:hover {
  animation-play-state: paused;
}

/* =========================================================================
   GSAP PERFORMANCE HINTS AND HOVER POLISH
   ========================================================================= */

.tpal9-trust-strip
.tpal9-stat {
  transition:
    text-shadow
    600ms
    var(--tpal9-ease);

  will-change: transform;
}

.tpal9-trust-strip
.tpal9-stat.tpal9-lit-num {
  text-shadow:
    0 0 22px
    rgba(200, 178, 115, 0.65);
}

.tpal9-hero-copy,
.tpal9-hero-visual,
.tpal9-hero-flight-card,
.tpal9-hero-visual-tag,
.tpal9-hero-visual img {
  will-change: transform;
}

.tpal9-btn--primary,
.tpal9-btn--gold {
  will-change: transform;

  transition:
    box-shadow var(--tpal9-transition),
    background var(--tpal9-transition),
    border-color var(--tpal9-transition),
    color var(--tpal9-transition);
}

.tpal9-btn--primary:hover {
  transform: none;

  box-shadow:
    0 18px 40px -12px
    rgba(0, 155, 119, 0.60);
}

.tpal9-btn--gold:hover {
  transform: none;

  box-shadow:
    0 18px 40px -12px
    rgba(200, 178, 115, 0.60);
}

.tpal9-feature-card,
.tpal9-fleet-card,
.tpal9-policy-card {
  will-change: transform;
  transform-style: preserve-3d;

  transition:
    box-shadow
    var(--tpal9-transition);
}

@media (hover: hover) and (pointer: fine) {
  .tpal9-feature-card:hover,
  .tpal9-policy-card:hover,
  .tpal9-fleet-card:hover {
    transform: none;

    box-shadow:
      var(--tpal9-shadow-lift);
  }
}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  .tpal9-site *,
  .tpal9-site *::before,
  .tpal9-site *::after {
    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;
  }

  .tpal9-zoom img {
    transform:
      scale(1) !important;
  }

  .tpal9-hscroll,
  .tpal9-hscroll.tpal9-hscroll-ready {
    min-height: auto;
    display: block;
  }

  .tpal9-hscroll-viewport {
    overflow-x: auto !important;
    overflow-y: hidden;

    scroll-snap-type:
      x mandatory;
  }

  .tpal9-hscroll-track {
    display: flex !important;

    width: max-content !important;
    height: auto !important;

    perspective: none !important;
    transform-style: flat !important;
  }

  .tpal9-hpanel {
    position: relative !important;

    left: auto !important;
    top: auto !important;

    transform: none !important;

    opacity: 1 !important;
    filter: none !important;

    pointer-events: auto !important;
  }

  .tpal9-hscroll-hint svg {
    animation: none;
  }
}