@font-face {
  font-family: SeaMotionArchivo;
  src: url("/features/sea-ranking-motion/archivo.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

.sea-motion {
  --sea-cream: #fff4db;
  --sea-gold: #ffd088;
  --sea-ink: #0b2139;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  overflow: hidden;
  background: var(--sea-ink);
  color: var(--sea-cream);
}

#sea-thailand-homepage {
  margin-block: 1.2rem;
}

.sea-motion-scene, .sea-motion-shade, .sea-motion-runway, .sea-motion-market-photo {
  position: absolute;
  inset: 0;
}

.sea-motion-scene {
  z-index: -1;
  overflow: hidden;
  background: #1a3c59;
}

.sea-motion-runway {
  background: #29445a url("/features/sea-ranking-motion/singapore-runway.jpg") center 65% / cover no-repeat;
  transform: scale(1.025);
  animation: sea-runway 14s ease-in-out infinite;
}

.sea-motion--flight .sea-motion-shade {
  background:
    linear-gradient(90deg, #07192bfa 0%, #0b243beb 29%, #102d4580 51%, #132f4408 73%),
    linear-gradient(0deg, #0a1e2bbf, transparent 46%);
}

.sea-motion-aircraft {
  position: absolute;
  top: 8%;
  left: 40%;
  width: 59%;
  aspect-ratio: 464 / 270;
  transform: translate(-2%, 10%);
  animation: sea-takeoff 14s cubic-bezier(.48,.06,.37,1) infinite;
}

.sea-motion-aircraft img {
  display: block;
  width: 100%;
  height: auto;
  clip-path: polygon(0.00% 60.00%, 5.17% 59.63%, 28.02% 63.33%, 24.35% 42.96%, 26.08% 41.11%, 31.25% 51.85%, 39.22% 64.44%, 43.97% 61.85%, 48.28% 58.52%, 58.19% 52.96%, 67.24% 48.15%, 75.43% 44.44%, 82.33% 42.22%, 85.34% 42.59%, 87.28% 45.19%, 88.15% 48.52%, 87.93% 52.59%, 86.64% 55.93%, 82.76% 60.00%, 86.42% 60.74%, 99.35% 55.56%, 99.78% 56.67%, 85.34% 63.70%, 86.21% 66.30%, 86.21% 69.63%, 84.70% 72.22%, 82.97% 72.59%, 81.25% 74.81%, 78.66% 75.19%, 77.59% 74.07%, 76.08% 75.19%, 74.57% 77.78%, 72.41% 79.63%, 71.98% 82.96%, 70.91% 85.56%, 68.97% 86.67%, 67.67% 85.93%, 65.73% 84.44%, 66.16% 81.48%, 68.10% 79.63%, 68.75% 76.67%, 70.26% 74.44%, 68.10% 74.81%, 65.09% 76.30%, 59.70% 78.15%, 54.09% 80.74%, 53.88% 84.07%, 53.23% 85.93%, 51.72% 85.93%, 50.65% 87.78%, 48.71% 87.41%, 47.20% 86.30%, 48.06% 82.96%, 44.18% 84.44%, 39.66% 84.81%, 32.97% 83.70%, 29.53% 83.33%, 26.94% 83.70%, 26.72% 79.26%, 27.16% 75.93%, 28.88% 70.74%, 27.59% 67.78%, 7.97% 64.44%, 0.43% 62.22%);
}

.sea-motion-market-photo {
  left: 34%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 19%);
}

.sea-motion-market-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  transform: scale(1.025);
  transform-origin: 59% 49%;
  animation: sea-market 16s ease-in-out infinite alternate;
}

.sea-motion--market .sea-motion-shade {
  background:
    linear-gradient(90deg, #091e36 4%, #0a213aec 30%, #1327326e 53%, transparent 76%),
    linear-gradient(0deg, #0b1e34a6 0%, transparent 43%);
}

.sea-motion-copy {
  max-width: 56%;
  padding: clamp(1.4rem, 5.3vw, 5rem);
}

.sea-motion-kicker {
  margin: 0 0 .95rem;
  color: var(--sea-gold);
  font: 600 clamp(.64rem, 1.25vw, .85rem)/1.15 system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sea-motion-copy h2 {
  margin: 0;
  color: var(--sea-cream);
  font: 900 clamp(2.05rem, 5.2vw, 5.3rem)/.99 SeaMotionArchivo, system-ui, sans-serif;
  letter-spacing: -.052em;
  text-wrap: balance;
  text-transform: none;
}

.sea-motion-copy h2 em {
  color: var(--sea-gold);
  font-style: normal;
}

.sea-motion-summary {
  max-width: 27ch;
  margin: 1rem 0 0;
  color: #f5e6cf;
  font: 400 clamp(.97rem, 1.55vw, 1.4rem)/1.4 system-ui, sans-serif;
}

.sea-motion-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0;
  color: var(--sea-gold);
}

.sea-motion-stat strong {
  font: 900 clamp(3.7rem, 9.9vw, 9rem)/.85 SeaMotionArchivo, system-ui, sans-serif;
  letter-spacing: -.06em;
}

.sea-motion-stat span {
  color: var(--sea-cream);
  font: 600 clamp(.8rem, 1.65vw, 1.22rem)/1.28 system-ui, sans-serif;
}

.sea-motion-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-height: 44px;
  margin-top: 1.35rem;
  padding: .58rem .92rem;
  background: var(--sea-gold);
  color: #102841;
  font: 700 clamp(.78rem, 1.2vw, .96rem)/1.2 system-ui, sans-serif;
  border-radius: 3px;
  text-decoration: none;
}

.sea-motion-link:hover {
  background: var(--sea-cream);
}

.sea-motion-toggle {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 44px;
  padding: 0;
  min-height: 44px;
  border: 1px solid #f9e4b5a6;
  border-radius: 3px;
  background: #0a2038b3;
  color: var(--sea-cream);
  font: 700 .9rem system-ui, sans-serif;
  cursor: pointer;
}

.sea-motion-toggle[hidden] {
  display: none;
}

.sea-motion :focus-visible {
  outline: 3px solid #fff9e9;
  outline-offset: 4px;
}

.sea-motion-runway, .sea-motion-aircraft, .sea-motion-market-photo img {
  animation-play-state: paused;
}

.sea-motion[data-motion-state="running"] .sea-motion-runway,
.sea-motion[data-motion-state="running"] .sea-motion-aircraft,
.sea-motion[data-motion-state="running"] .sea-motion-market-photo img {
  animation-play-state: running;
}

@keyframes sea-takeoff {
  0% { transform: translate(-9%, 22%) rotate(-1deg) scale(.88); opacity: 1; }
  33% { transform: translate(4%, 1%) rotate(-3deg) scale(.98); }
  62% { transform: translate(18%, -20%) rotate(-6deg) scale(1.03); opacity: 1; }
  82% { transform: translate(49%, -58%) rotate(-6deg) scale(.96); opacity: 0; }
  83% { transform: translate(-9%, 22%) rotate(-1deg) scale(.88); opacity: 0; }
  100% { transform: translate(-9%, 22%) rotate(-1deg) scale(.88); opacity: 1; }
}

@keyframes sea-runway {
  0%, 100% { transform: scale(1.025); }
  62% { transform: scale(1.095) translate(-1.4%, 1%); }
}

@keyframes sea-market {
  from { transform: scale(1.025) translate(0, 1%); }
  to { transform: scale(1.2) translate(-2.6%, -2.6%); }
}

@media (max-width: 700px) {
  .sea-motion {
    aspect-ratio: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .sea-motion-scene {
    position: relative;
    aspect-ratio: 16 / 9;
    z-index: 0;
  }

  .sea-motion--flight .sea-motion-shade, .sea-motion--market .sea-motion-shade {
    background: linear-gradient(0deg, #0b2139 0%, transparent 55%);
  }

  .sea-motion-aircraft {
    left: 17%;
    top: 2%;
    width: 77%;
  }

  .sea-motion-market-photo {
    left: 0;
    mask-image: none;
  }

  .sea-motion-market-photo img {
    object-position: center 50%;
  }

  .sea-motion-copy {
    max-width: none;
    padding: .8rem 1.2rem 1.6rem;
  }

  .sea-motion-copy h2 {
    max-width: 17ch;
    font-size: clamp(2rem, 7.8vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sea-motion .sea-motion-aircraft, .sea-motion .sea-motion-runway, .sea-motion .sea-motion-market-photo img {
    animation: none;
  }
}
