/* yamkoo, coming soon. Always in daylight colours, like the app's public pages. */
:root {
  color-scheme: light;
  --bg: #f6fbf9;
  --ink: #0a2e2c;
  --muted: #557277;
  --brand: #047b62;
  --lagoon: #0eb09e;
  --mint: #3ad2b7;
  --lens: #d4f7f0;
  --accent: #dcf4ef;
  --amber: #f5b83d;
  --font:
    'Geist', 'Geist Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 80% 20%, var(--accent), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 0%, #fff6dc, transparent 65%), var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Top: the language ───────────────────────────────────────────────────── */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding-block: 16px 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.lang {
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.75);
  color: var(--ink);
  font: 500 0.875rem var(--font);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.lang:hover {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
}

/* ── The middle: logo and words ──────────────────────────────────────────── */

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  max-width: 44rem;
  margin: 0 auto;
  padding-block: 2rem 1.5rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  text-align: center;
}

.wordmark {
  width: clamp(220px, 56vw, 380px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 12px 18px rgb(4 123 98 / 0.14));
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.wordmark .ink {
  stroke: var(--ink);
}

.binoculars {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: hop 7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s infinite;
}

.eyes {
  animation: look 9s ease-in-out infinite;
}

.pupil {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 6s ease-in-out infinite;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, white);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.08s backwards;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lagoon);
  animation: pulse 1.8s ease-out infinite;
}

.headline {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.8rem, 5.2vw, 3rem);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-wrap: balance;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.16s backwards;
}

.lede {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.6;
  text-wrap: pretty;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.24s backwards;
}

/* A departures board, as at the airport. */
.board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.32s backwards;
}

.board-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.board-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem 0.9rem;
  padding: 0.65rem 0.95rem;
  border-radius: 14px;
  background: var(--ink);
  color: #eaf5f1;
  font-family: var(--mono);
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  box-shadow: 0 14px 28px -16px rgb(10 46 44 / 0.6);
}

.board-code {
  color: var(--mint);
  font-weight: 700;
}

.board-dest {
  display: inline-flex;
  gap: 2px;
  min-width: 9ch;
  perspective: 300px;
}

.board-dest .cell {
  display: inline-block;
  min-width: 1.05ch;
  padding: 0.1rem 0.12rem;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.08);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0;
}

.board-dest .cell.flip {
  animation: flip 0.26s ease-in-out;
}

.board-status {
  color: var(--amber);
  font-weight: 700;
  text-transform: uppercase;
  animation: blink-text 2.4s steps(1) infinite;
}

.contact {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── The ground and the foot ─────────────────────────────────────────────── */

.ground {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: clamp(200px, 32vh, 320px);
  margin-top: -2rem;
}

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.4rem;
  padding-block: 0.9rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: #cfe4de;
  color: #3f5d61;
  font-size: 0.8rem;
  text-align: center;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Vehicles drive across; wheels turn; everyone bumps along a little. */
.train {
  animation: train 22s linear infinite;
}

.car {
  animation: drive-east 11s linear infinite;
}

.bus {
  animation: drive-east 11s linear -5.5s infinite;
}

.tuk {
  animation: drive-west 15s linear -4s infinite;
}

.bounce,
.rumble {
  animation: bounce 0.5s ease-in-out infinite alternate;
}

.rumble {
  animation-duration: 0.35s;
}

.wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 0.6s linear infinite;
}

.boat {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: rock 3.2s ease-in-out infinite;
}

.boat-drift {
  animation: drift 14s ease-in-out infinite alternate;
}

/* ── The sky ─────────────────────────────────────────────────────────────── */

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 6%;
  left: 7%;
  width: clamp(54px, 8vw, 90px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe6a3 0 55%, #fff1c9 56% 100%);
  box-shadow:
    0 0 0 14px rgb(255 230 163 / 0.35),
    0 0 0 30px rgb(255 230 163 / 0.18);
  animation: glow 5s ease-in-out infinite;
}

.cloud {
  position: absolute;
  left: 0;
  height: auto;
  opacity: 0.95;
  animation: cloud 80s linear infinite;
}

.cloud-1 {
  top: 9%;
  width: 120px;
  animation-delay: -10s;
}

.cloud-2 {
  top: 24%;
  width: 84px;
  opacity: 0.8;
  animation-duration: 110s;
  animation-delay: -60s;
}

.cloud-3 {
  top: 15%;
  width: 150px;
  animation-duration: 95s;
  animation-delay: -40s;
}

.cloud-4 {
  top: 34%;
  width: 70px;
  opacity: 0.7;
  animation-duration: 130s;
  animation-delay: -95s;
}

.flight {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
}

.flight .plane {
  height: auto;
  animation: bob 2.6s ease-in-out infinite alternate;
}

.flight .trail {
  width: clamp(80px, 14vw, 180px);
  border-top: 3px dashed color-mix(in srgb, var(--lagoon) 55%, transparent);
  margin-top: 2px;
}

.flight-east {
  top: 4%;
  animation: fly-east 19s linear infinite;
}

.flight-east .plane {
  width: clamp(70px, 9vw, 110px);
}

/* The second plane flies low over the hills, below the words. */
.flight-west {
  bottom: calc(clamp(200px, 32vh, 320px) * 0.72 + 3rem);
  opacity: 0.7;
  animation: fly-west 28s linear -9s infinite;
}

.flight-west .plane {
  width: clamp(48px, 6vw, 72px);
  transform: scaleX(-1);
  animation-name: bob-mirrored;
}

.balloon {
  position: absolute;
  top: 16%;
  right: 7%;
  width: clamp(36px, 4.5vw, 56px);
  height: auto;
  animation: float 7s ease-in-out infinite alternate;
}

/* ── Keyframes ───────────────────────────────────────────────────────────── */

@keyframes rise {
  from {
    transform: translateY(14px);
  }
}

@keyframes hop {
  0%,
  86%,
  100% {
    transform: translateY(0);
  }
  90% {
    transform: translateY(-5px) rotate(-3deg);
  }
  94% {
    transform: translateY(0) rotate(2deg);
  }
}

@keyframes look {
  0%,
  8% {
    transform: translate(2.1px, -2px);
  }
  16% {
    transform: translate(0, -2.9px);
  }
  24% {
    transform: translate(-2.1px, -2px);
  }
  32%,
  42% {
    transform: translate(-2.9px, 0.2px);
  }
  50% {
    transform: translate(-2.1px, -2px);
  }
  58% {
    transform: translate(0, -2.9px);
  }
  66% {
    transform: translate(2.1px, -2px);
  }
  74% {
    transform: translate(2.9px, 0.2px);
  }
  84% {
    transform: translate(2.5px, 1.2px);
  }
  92% {
    transform: translate(2.9px, 0.2px);
  }
  100% {
    transform: translate(2.1px, -2px);
  }
}

@keyframes blink {
  0%,
  44%,
  48%,
  100% {
    transform: scaleY(1);
  }
  46% {
    transform: scaleY(0.1);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(14 176 158 / 0.55);
  }
  100% {
    box-shadow: 0 0 0 10px rgb(14 176 158 / 0);
  }
}

@keyframes flip {
  50% {
    transform: rotateX(90deg);
  }
}

@keyframes blink-text {
  0%,
  70% {
    opacity: 1;
  }
  85% {
    opacity: 0.35;
  }
}

@keyframes train {
  from {
    transform: translateX(-340px);
  }
  to {
    transform: translateX(1660px);
  }
}

@keyframes drive-east {
  from {
    transform: translateX(-140px);
  }
  to {
    transform: translateX(1660px);
  }
}

@keyframes drive-west {
  from {
    transform: translateX(1640px);
  }
  to {
    transform: translateX(-120px);
  }
}

@keyframes bounce {
  to {
    transform: translateY(-1.5px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rock {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

@keyframes drift {
  from {
    transform: translateX(-60px);
  }
  to {
    transform: translateX(80px);
  }
}

@keyframes glow {
  50% {
    transform: scale(1.06);
  }
}

@keyframes cloud {
  from {
    transform: translateX(-180px);
  }
  to {
    transform: translateX(110vw);
  }
}

@keyframes fly-east {
  from {
    transform: translateX(-45vw);
  }
  to {
    transform: translateX(115vw);
  }
}

@keyframes fly-west {
  from {
    transform: translateX(110vw);
  }
  to {
    transform: translateX(-40vw);
  }
}

@keyframes bob {
  from {
    transform: translateY(-5px) rotate(-2deg);
  }
  to {
    transform: translateY(5px) rotate(1deg);
  }
}

@keyframes bob-mirrored {
  from {
    transform: scaleX(-1) translateY(-4px) rotate(-2deg);
  }
  to {
    transform: scaleX(-1) translateY(4px) rotate(1deg);
  }
}

@keyframes float {
  from {
    transform: translateY(-10px) rotate(-3deg);
  }
  to {
    transform: translateY(12px) rotate(3deg);
  }
}

/* Visitors who prefer less motion get the same picture, standing still. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }

  .train {
    transform: translateX(560px);
  }

  .car {
    transform: translateX(300px);
  }

  .bus {
    transform: translateX(1000px);
  }

  .tuk {
    transform: translateX(760px);
  }

  .eyes {
    transform: translate(2.1px, -2px);
  }

  .cloud-1 {
    transform: translateX(12vw);
  }

  .cloud-2 {
    transform: translateX(70vw);
  }

  .cloud-3 {
    transform: translateX(40vw);
  }

  .cloud-4 {
    transform: translateX(85vw);
  }

  .flight-east {
    transform: translateX(14vw);
  }

  .flight-west {
    transform: translateX(62vw);
  }

  .flight-west .plane {
    transform: scaleX(-1);
  }
}
