/*
 * CX Virtual landing page: tokens and shared components.
 * Colours and type follow the CX City pilot portal (cxcity-frontend
 * assets/css/tailwind.css): Cathay Jade for identity, Medium Jade for
 * actions, gold accents on a warm sand ground; Figtree for text and
 * Philosopher for the wordmark only.
 */
:root {
  --jade: #006564;
  --jade-700: #004b4a;
  --action: #367878;
  --action-hover: #1a4e4e;
  --jade-95: #e8f3f4;
  --gold: #886521;
  --gold-light: #c9a24e;
  --gold-surface: #f0eadf;
  --sand: #f9f8f7;
  --sand-95: #f3f1ef;
  --ink: #2d2d2d;
  --ink-muted: #66686a;
  --line: #e6e7e8;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px -12px rgb(0 0 0 / 0.18);
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Philosopher', Georgia, serif;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
a {
  color: var(--action);
}
a:hover {
  color: var(--action-hover);
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Layout ---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(56px, 9vw, 112px);
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-title {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 62ch;
}
.wordmark {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0;
}
.rule {
  width: 56px;
  height: 3px;
  border: 0;
  margin: 18px 0;
  background: var(--gold-light);
}

/* ---- Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.btn-primary {
  background: var(--action);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--action-hover);
  color: var(--white);
}
.btn-light {
  background: var(--white);
  color: var(--jade);
}
.btn-light:hover {
  background: var(--jade-95);
  color: var(--jade);
}
.btn-ghost {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}
.btn-ghost:hover {
  background: rgb(255 255 255 / 0.12);
  color: inherit;
}
.btn-outline {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--action);
  color: var(--action);
}
.btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Top bar ------------------------------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
  color: var(--white);
}
.topbar.is-solid {
  background: rgb(249 248 247 / 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-brand);
  font-size: 1.45rem;
}
.topbar .brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--white);
  padding: 2px;
}
.topbar nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.topbar nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 550;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
  opacity: 0.88;
}
.topbar nav a:hover {
  opacity: 1;
  background: rgb(127 127 127 / 0.12);
}
.topbar .actions {
  display: flex;
  gap: 8px;
}
.topbar .btn {
  min-height: 38px;
  padding: 6px 16px;
  font-size: 0.92rem;
}
.topbar:not(.is-solid) .btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgb(255 255 255 / 0.6);
}
.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle svg {
  width: 26px;
  height: 26px;
}
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }
  .topbar nav,
  .topbar .actions {
    display: none;
  }
  .topbar.menu-open {
    background: var(--sand);
    color: var(--ink);
    box-shadow: 0 1px 0 var(--line);
  }
  .topbar.menu-open .topbar-inner {
    flex-wrap: wrap;
  }
  .topbar.menu-open nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 0 8px;
  }
  .topbar.menu-open .actions {
    display: flex;
    width: 100%;
    padding-bottom: 16px;
  }
  .topbar.menu-open .actions .btn {
    flex: 1;
  }
  .topbar.menu-open .btn-outline {
    color: var(--ink);
    border-color: var(--line);
    background: var(--white);
  }
}

/* ---- Cards ------------------------------------------------------------------------ */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- Browser and phone frames for portal screenshots ------------------------------ */

.frame {
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.08),
    0 24px 60px -24px rgb(0 40 40 / 0.45);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: var(--sand-95);
  border-bottom: 1px solid var(--line);
}
.frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9d6d2;
}
.frame-bar em {
  margin-left: 10px;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-muted);
  background: var(--white);
  border-radius: 999px;
  padding: 1px 12px;
}
.frame img {
  width: 100%;
  height: auto;
}
.phone {
  width: 100%;
  max-width: 280px;
  border-radius: 34px;
  padding: 10px;
  background: #151918;
  box-shadow: 0 30px 60px -28px rgb(0 0 0 / 0.55);
}
.phone img {
  border-radius: 26px;
  width: 100%;
  height: auto;
}

/* ---- Live map ------------------------------------------------------------------------ */

.live-map {
  position: relative;
  width: 100%;
  min-height: 420px;
  background: #cfe3e3;
  overflow: hidden;
}
.live-map .maplibregl-map {
  position: absolute;
  inset: 0;
}
.live-map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--white);
  background:
    linear-gradient(rgb(0 75 74 / 0.72), rgb(0 75 74 / 0.72)),
    var(--fallback-image, none) center / cover no-repeat;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.live-badge::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2fbf71;
  box-shadow: 0 0 0 0 rgb(47 191 113 / 0.6);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  70% {
    box-shadow: 0 0 0 10px rgb(47 191 113 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(47 191 113 / 0);
  }
}
.flight-card {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 16px;
  max-width: min(320px, calc(100% - 32px));
  padding: 14px 16px;
  font-size: 0.9rem;
}
.flight-card[hidden] {
  display: none;
}
.flight-card strong {
  font-size: 1.1rem;
}
.flight-card .route {
  font-weight: 600;
}
.flight-card .muted,
.muted {
  color: var(--ink-muted);
}
.flight-card button {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
}
.maplibregl-cooperative-gesture-screen {
  background: rgb(0 75 74 / 0.55) !important;
  color: var(--white) !important;
  font-family: var(--font) !important;
}

/* ---- News ------------------------------------------------------------------------------ */

.news-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.news-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}
.news-item time {
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.news-item h3 {
  font-size: 1.15rem;
}
.news-item p {
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.news-item button {
  margin-top: auto;
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--action);
  cursor: pointer;
}
.news-item button:hover {
  text-decoration: underline;
}
.news-skeleton {
  min-height: 180px;
  background: linear-gradient(90deg, var(--sand-95), var(--white), var(--sand-95));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.news-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.5);
}
.news-dialog::backdrop {
  background: rgb(0 40 40 / 0.5);
}
.news-dialog article {
  padding: clamp(20px, 4vw, 36px);
}
.news-dialog h2 {
  font-size: 1.5rem;
  margin: 6px 0 16px;
}
.news-dialog .body p {
  margin: 0 0 1em;
}
.news-dialog .close {
  position: sticky;
  top: 0;
  float: right;
  margin: 12px;
}

/* ---- Partners and socials ------------------------------------------------------------------ */

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 72px);
}
.partners a {
  display: block;
  transition: opacity 0.15s;
}
.partners a:hover {
  opacity: 0.75;
}
.partners img {
  height: 56px;
  width: auto;
}
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--white);
}
.social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.social-discord {
  background: #5865f2;
}
.social-facebook {
  background: #1877f2;
}
.social:hover {
  color: var(--white);
  filter: brightness(1.08);
}

/* ---- Career stripes -------------------------------------------------------------------------- */

.ranks {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}
.rank {
  padding: 18px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.rank svg {
  width: 120px;
  height: 34px;
}
.rank h3 {
  font-size: 1rem;
}
.rank .hours {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 650;
}
.rank p {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* ---- Footer ---------------------------------------------------------------------------------- */

.site-footer {
  background: #0e2b2b;
  color: rgb(255 255 255 / 0.78);
  padding-block: 56px 32px;
  font-size: 0.92rem;
}
.site-footer a {
  color: var(--white);
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.site-footer h2 {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 12px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.site-footer .wordmark {
  font-size: 1.8rem;
  color: var(--white);
}
.disclaimer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  font-size: 0.82rem;
  color: rgb(255 255 255 / 0.6);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 10px;
  color: rgb(255 255 255 / 0.78);
}
.footer-legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
