:root {
  --brand-teal: #0a7e8c;
  --brand-teal-light: #14b8c4;
  --brand-navy: #0d2a4a;
  --brand-blue: #1e88e5;
  --brand-amber: #f2a93b;
  --brand-amber-light: #ffc670;
  --bg: #07131a;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.18);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ---------- Ambient background blobs ---------- */
/* Fixed, decorative, slow-drifting gradient blobs behind everything - a
   single shared layer so every page gets the same ambient depth without
   each section needing its own background treatment. */

.ambient-blobs {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.ambient-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  animation: blob-drift 9s ease-in-out infinite;
}

.ambient-blobs span:nth-child(1) {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -100px;
  background: var(--brand-teal);
}

.ambient-blobs span:nth-child(2) {
  width: 420px;
  height: 420px;
  top: 30%;
  right: -140px;
  background: var(--brand-blue);
  animation-delay: -3s;
  animation-duration: 11s;
}

.ambient-blobs span:nth-child(3) {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: 20%;
  background: var(--brand-amber);
  opacity: 0.22;
  animation-delay: -6s;
  animation-duration: 13s;
}

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(70px, 50px) scale(1.15); }
  66% { transform: translate(-55px, 25px) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-blobs span {
    animation: none;
  }
}

/* ---------- Star field ---------- */
/* Small drifting lights layered above the ambient blobs (sharper, not
   blurred, so they read as distinct twinkling points rather than getting
   lost in the blob glow) - see initStarField() in script.js. Fixed to the
   viewport like the blobs, so it stays visible no matter how far down the
   page you've scrolled, not just behind the hero. */

.star-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(7, 19, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
}

.nav-brand img {
  width: 30px;
  height: 30px;
}

.nav-brand .trip {
  color: #fff;
}

.nav-brand .io {
  color: var(--brand-teal-light);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dim);
}

.nav-links a:hover {
  color: #fff;
}

.lang-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.is-active {
  background: var(--brand-teal-light);
  color: #06181c;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: #fff;
  cursor: pointer;
}

.nav-toggle svg {
  fill: currentColor;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  isolation: isolate;
}

.hero-bg-slideshow {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: saturate(1.05);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-bg-slide.is-active {
  opacity: 1;
  z-index: 1;
}

/* A different flourish plays each time a slide becomes active (picked
   randomly in script.js) - deliberately big, PowerPoint-transition-style
   moves (cube turns, a full flip, a spin-in, a curtain wipe, a pendulum
   swing, an iris reveal) rather than a subtle fade, so the rotation reads
   as a real "moment" instead of an easy-to-miss drift. Durations run
   1-1.4s: enough for the bigger moves (vortex, swing) to actually read as
   motion without lingering. */
.hero-bg-slide.anim-cube.is-active {
  animation: heroCubeIn 1.15s cubic-bezier(0.22, 0.75, 0.32, 1) both;
}

.hero-bg-slide.anim-flip.is-active {
  animation: heroFlipIn 1.2s cubic-bezier(0.22, 0.75, 0.32, 1) both;
}

.hero-bg-slide.anim-vortex.is-active {
  animation: heroVortexIn 1.4s cubic-bezier(0.22, 0.75, 0.32, 1) both;
}

.hero-bg-slide.anim-curtain.is-active {
  animation: heroCurtainIn 1.1s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.hero-bg-slide.anim-fall.is-active {
  animation: heroFallIn 1.1s cubic-bezier(0.22, 0.75, 0.32, 1) both;
}

.hero-bg-slide.anim-swing.is-active {
  animation: heroSwingIn 1.3s cubic-bezier(0.22, 0.75, 0.32, 1) both;
}

.hero-bg-slide.anim-iris.is-active {
  animation: heroIrisIn 1.1s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.hero-bg-slide.anim-blur.is-active {
  animation: heroBlurIn 1.1s ease-out both;
}

@keyframes heroCubeIn {
  0% { opacity: 0; transform: perspective(1200px) rotateY(-100deg) scale(1.1); transform-origin: left center; }
  55% { opacity: 1; }
  100% { opacity: 1; transform: perspective(1200px) rotateY(0deg) scale(1.02); transform-origin: left center; }
}

@keyframes heroFlipIn {
  0% { opacity: 0; transform: perspective(1000px) rotateY(110deg) scale(1.15); }
  70% { opacity: 1; transform: perspective(1000px) rotateY(-8deg) scale(1.03); }
  100% { opacity: 1; transform: perspective(1000px) rotateY(0deg) scale(1.02); }
}

@keyframes heroVortexIn {
  0% { opacity: 0; transform: rotate(-540deg) scale(0.15); }
  65% { opacity: 1; }
  100% { opacity: 1; transform: rotate(0deg) scale(1.03); }
}

@keyframes heroCurtainIn {
  0% { opacity: 1; -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0); transform: scale(1.06); }
  100% { opacity: 1; -webkit-clip-path: inset(0 0% 0 0); clip-path: inset(0 0% 0 0); transform: scale(1.02); }
}

@keyframes heroFallIn {
  0% { opacity: 0; transform: perspective(1000px) rotateX(-70deg) scale(1.1); transform-origin: bottom center; }
  100% { opacity: 1; transform: perspective(1000px) rotateX(0deg) scale(1.02); transform-origin: bottom center; }
}

@keyframes heroSwingIn {
  0% { opacity: 0; transform: rotate(-18deg) scale(1.15); transform-origin: top center; }
  55% { opacity: 1; transform: rotate(6deg) scale(1.05); transform-origin: top center; }
  80% { transform: rotate(-3deg) scale(1.03); transform-origin: top center; }
  100% { opacity: 1; transform: rotate(0deg) scale(1.02); transform-origin: top center; }
}

@keyframes heroIrisIn {
  0% { opacity: 1; -webkit-clip-path: circle(0% at 50% 45%); clip-path: circle(0% at 50% 45%); transform: scale(1.08); }
  100% { opacity: 1; -webkit-clip-path: circle(150% at 50% 45%); clip-path: circle(150% at 50% 45%); transform: scale(1.02); }
}

@keyframes heroBlurIn {
  from { opacity: 0; filter: blur(32px) saturate(1.1); transform: scale(1.18); }
  to { opacity: 1; filter: blur(0) saturate(1.05); transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-slide {
    transition: opacity 0.4s ease;
  }
  .hero-bg-slide.is-active {
    animation: none !important;
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(7, 19, 26, 0.55) 0%,
    rgba(7, 19, 26, 0.55) 35%,
    rgba(7, 19, 26, 0.92) 100%
  );
}

.hero-logo-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
}

/* A soft rotating color halo behind the logo, plus a slimmer dashed ring
   spinning the opposite way in front of it - two independent rotations at
   different speeds/directions read as one complex, layered motion instead
   of a single flat spin. */
.hero-logo-halo {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand-teal-light), var(--brand-blue), var(--brand-amber-light), var(--brand-teal-light));
  filter: blur(20px);
  opacity: 0.6;
  animation: logoHaloSpin 5s linear infinite;
  z-index: -1;
}

.hero-logo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  animation: logoRingSpin 8s linear infinite reverse;
}

.hero-logo {
  position: relative;
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
  animation: logoBreathe 3s ease-in-out infinite;
  animation-delay: 0.6s;
}

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

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

@keyframes logoBreathe {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 0 rgba(20, 184, 196, 0));
  }
  50% {
    transform: scale(1.06) rotate(-2deg);
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 28px rgba(20, 184, 196, 0.6));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-halo,
  .hero-logo-ring,
  .hero-logo {
    animation: none;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-amber-light);
  letter-spacing: 0.02em;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-amber-light);
  box-shadow: 0 0 10px var(--brand-amber-light);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.hero h1 .io {
  color: var(--brand-teal-light);
}

.hero p.tagline {
  max-width: 560px;
  margin: 0 auto 34px;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--text-dim);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 56px;
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.hero-stat .label {
  font-size: 0.82rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  position: relative;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  border: none;
  color: #fff;
  box-shadow: 0 10px 30px rgba(10, 126, 140, 0.35);
  overflow: hidden;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(10, 126, 140, 0.5);
}

/* A light streak sweeps across the button on a loop, independent of
   hover, so the main CTA keeps drawing the eye even when idle. */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.2s ease-in-out infinite;
}

@keyframes btnShine {
  0% { left: -60%; }
  40%, 100% { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary::after {
    animation: none;
    display: none;
  }
}

.btn-ghost {
  background: var(--glass-bg);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--glass-bg-strong);
}

.btn[data-unavailable="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn .badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Sections ---------- */

section {
  padding: 90px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--brand-teal-light);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 12px;
  font-weight: 800;
}

.section-head p {
  color: var(--text-dim);
  margin: 0;
}

/* ---------- Glass panel ---------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- Download cards ---------- */

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.download-card {
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.download-card:hover {
  transform: translateY(-6px);
  background: var(--glass-bg-strong);
  border-color: rgba(20, 184, 196, 0.45);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(20, 184, 196, 0.12) inset;
}

.download-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  flex-shrink: 0;
  transition: transform 0.25s ease;
  animation: iconFloat 3s ease-in-out infinite;
}

.download-card:hover .icon {
  animation-play-state: paused;
  transform: scale(1.08) rotate(-4deg);
}

.download-card .icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.download-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.download-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  flex-grow: 1;
}

.download-card .meta {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.download-card .btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 26px 22px;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--glass-bg-strong);
  border-color: rgba(242, 169, 59, 0.4);
}

.feature-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 14px;
  transition: background 0.25s ease, transform 0.25s ease;
  animation: iconFloat 3s ease-in-out infinite;
}

.feature-card:hover .icon {
  animation-play-state: paused;
  background: rgba(242, 169, 59, 0.18);
  transform: scale(1.08);
}

/* Stagger the float so a row of cards bobs like a loose group, not in
   robotic lockstep. */
.download-grid .download-card:nth-child(2) .icon,
.feature-grid .feature-card:nth-child(2) .icon { animation-delay: -0.6s; }
.download-grid .download-card:nth-child(3) .icon,
.feature-grid .feature-card:nth-child(3) .icon { animation-delay: -1.2s; }
.feature-grid .feature-card:nth-child(4) .icon { animation-delay: -1.8s; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .download-card .icon,
  .feature-card .icon {
    animation: none;
  }
}

.feature-card .icon svg {
  width: 22px;
  height: 22px;
  fill: var(--brand-teal-light);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 14px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  cursor: default;
}

/* A handful of cells span 2 rows for an asymmetric, less-grid-like feel. */
.gallery-item.tall {
  grid-row: span 2;
}

/* Reserved for wide/panoramic shots (e.g. a stadium exterior) that read
   better spanning columns than rows. */
.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 12, 0.92));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Community (WhatsApp) ---------- */

#community {
  padding: 0 0 30px;
}

.community-card {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 30px;
}

.community-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.community-icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.community-copy {
  flex: 1 1 260px;
}

.community-copy h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.community-copy p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.community-card .btn {
  flex-shrink: 0;
}

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

footer {
  padding: 40px 0 60px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer .footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text-dim);
}

footer .footer-brand img {
  width: 20px;
  height: 20px;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 18px;
    background: rgba(7, 19, 26, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    /* Collapsed by default; JS toggles .is-open. Height-animated (not
       display:none) so the open/close has a transition instead of a snap. */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .nav-links.is-open {
    max-height: 400px;
    opacity: 1;
  }
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links a:last-child {
    border-bottom: none;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
  }
}

/* ---------- Stats page ---------- */

.stats-page-header {
  padding: 140px 0 20px;
}

.stats-page-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 8px;
}

.stats-page-header p {
  color: var(--text-dim);
  margin: 0;
}

.stats-refresh-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-refresh-row .btn {
  padding: 9px 16px;
  font-size: 0.85rem;
}

.stats-refresh-row .btn svg {
  transition: transform 0.5s ease;
}

.stats-refresh-row .btn.is-loading svg {
  animation: stats-spin 0.8s linear infinite;
}

@keyframes stats-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stats-updated-at {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}

.kpi-tile {
  padding: 22px 20px;
}

.kpi-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: proportional-nums;
}

.kpi-label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.chart-card {
  padding: 24px 24px 18px;
  margin-bottom: 28px;
}

.chart-card h2 {
  margin: 0 0 2px;
  font-size: 1.1rem;
  font-weight: 700;
}

.chart-card .chart-sub {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.chart-svg-wrap {
  position: relative;
  width: 100%;
}

.chart-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Gridlines/axis text: recessive, never competes with the data line/bars. */
.chart-grid line {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--text-faint);
  font-size: 11px;
}

.chart-line {
  fill: none;
  stroke: var(--brand-teal-light);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: var(--brand-teal-light);
  opacity: 0.1;
}

.chart-dot {
  fill: var(--brand-teal-light);
  stroke: var(--bg);
  stroke-width: 2;
}

.chart-crosshair {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1;
  pointer-events: none;
}

.chart-hit {
  fill: transparent;
  cursor: pointer;
}

.chart-bar {
  fill: var(--brand-teal-light);
  transition: fill 0.12s ease;
}

.chart-bar:hover,
.chart-bar.is-active {
  fill: var(--brand-teal);
}

.chart-bar-label {
  fill: var(--text-dim);
  font-size: 12px;
}

.chart-bar-value {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(7, 19, 26, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  transform: translate(-50%, -110%);
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 5;
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.chart-tooltip .tt-value {
  font-weight: 700;
}

.chart-tooltip .tt-label {
  color: var(--text-faint);
  margin-left: 6px;
}

.chart-empty {
  color: var(--text-faint);
  font-size: 0.9rem;
  padding: 30px 0;
  text-align: center;
}

.table-toggle {
  margin-top: 10px;
}

.table-toggle summary {
  cursor: pointer;
  color: var(--text-faint);
  font-size: 0.82rem;
  user-select: none;
}

.table-toggle table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.85rem;
}

.table-toggle th,
.table-toggle td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--glass-border);
  font-variant-numeric: tabular-nums;
}

.table-toggle th {
  color: var(--text-faint);
  font-weight: 600;
}

/* Scroll-in animations are now handled by the AOS library (data-aos
   attributes in the HTML) rather than a hand-rolled IntersectionObserver -
   see script.js. */

/* ---------- Admin dashboard ---------- */

.admin-page {
  padding: 130px 24px 60px;
}

.admin-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 6px;
}

.admin-sub {
  color: var(--text-dim);
  margin: 0 0 28px;
}

.admin-card {
  padding: 26px;
  max-width: 460px;
}

.admin-card h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.admin-hint {
  color: var(--text-faint);
  font-size: 0.86rem;
  margin: 0 0 18px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-map-wrap {
  position: relative;
}

.admin-location-map {
  height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: crosshair;
}

.admin-map-locate {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #0b1a24;
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.admin-map-locate:hover {
  background: #13303b;
}

.admin-map-locate.is-busy {
  opacity: 0.6;
  cursor: wait;
}

.admin-image-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-image-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-form input,
.admin-form textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--brand-teal-light);
}

.admin-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(220, 70, 70, 0.16);
  border: 1px solid rgba(220, 70, 70, 0.4);
  color: #ffd7d7;
  font-size: 0.86rem;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-tab:hover {
  color: #fff;
}

.admin-tab.is-active {
  background: var(--brand-teal);
  color: #fff;
}

.admin-count {
  font-size: 0.74rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.admin-search {
  flex: 1 1 220px;
  max-width: 360px;
}

.admin-search input {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-search input:focus {
  outline: none;
  border-color: var(--brand-teal-light);
}

.admin-search input::placeholder {
  color: var(--text-faint);
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: flex-start;
}

.admin-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.admin-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-faint);
  font-size: 0.75rem;
}

.admin-item-body {
  flex: 1;
  min-width: 0;
}

.admin-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-item-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.admin-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}

.admin-badge.is-pending {
  background: rgba(242, 169, 59, 0.2);
  color: var(--brand-amber-light);
}

.admin-badge.is-approved {
  background: rgba(20, 184, 196, 0.2);
  color: var(--brand-teal-light);
}

.admin-badge.is-rejected {
  background: rgba(220, 70, 70, 0.2);
  color: #ff9d9d;
}

.admin-item-meta {
  margin: 5px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.admin-item-desc {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.admin-item-actions .btn {
  padding: 7px 15px;
  font-size: 0.82rem;
}

.admin-danger {
  color: #ff9d9d;
  border-color: rgba(220, 70, 70, 0.4);
}

.admin-danger:hover {
  background: rgba(220, 70, 70, 0.18);
}

.admin-empty {
  color: var(--text-faint);
  text-align: center;
  padding: 40px 0;
}

.admin-dialog {
  width: min(560px, 92vw);
  padding: 26px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: #0d1e28;
  color: var(--text);
}

.admin-dialog::backdrop {
  background: rgba(4, 12, 17, 0.7);
  backdrop-filter: blur(4px);
}

.admin-dialog h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ---------- Shared itinerary page ---------- */

.shared-header {
  text-align: center;
  max-width: 640px;
  padding-top: 140px;
  padding-bottom: 40px;
}

.shared-eyebrow {
  display: inline-block;
  color: var(--brand-teal-light);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.shared-header h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin: 0 0 10px;
  font-weight: 800;
  text-wrap: balance;
}

.shared-sub {
  color: var(--text-dim);
  margin: 0 0 24px;
}

.shared-cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shared-stop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 90px;
}

.shared-stop-card {
  overflow: hidden;
}

.shared-stop-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.shared-stop-body {
  padding: 14px 16px;
}

.shared-stop-body h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 700;
}

.shared-stop-location {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.shared-empty {
  color: var(--text-faint);
  text-align: center;
  padding: 30px 0 90px;
}

@media (max-width: 640px) {
  .admin-item {
    flex-direction: column;
  }
  .admin-thumb {
    width: 100%;
    height: 150px;
  }
}

/* ---------- QR / "scan to visit" page ---------- */

.qr-page {
  text-align: center;
  max-width: 560px;
  padding: 140px 24px 100px;
}

.qr-eyebrow {
  display: inline-block;
  color: var(--brand-teal-light);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.qr-page h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin: 0 0 12px;
  font-weight: 800;
  text-wrap: balance;
}

.qr-sub {
  color: var(--text-dim);
  margin: 0 0 40px;
}

/* The actual printable card - deliberately styled with its own light
   palette (not the page's dark theme) since this is meant to be printed
   or screenshotted as a standalone flyer, not just viewed inline. */
.qr-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 40px 32px 32px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.qr-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--brand-amber);
  border-radius: 0 0 8px 8px;
}

.qr-card-brand {
  color: var(--brand-navy);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}

.qr-card-label {
  color: var(--brand-amber-light);
  background: var(--brand-navy);
  display: inline-block;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 10px 0 24px;
}

.qr-card-frame {
  background: #f2f4f5;
  border-radius: 20px;
  padding: 20px;
}

.qr-card-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.qr-card-url {
  margin-top: 22px;
  color: #4a555c;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.qr-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
}

@media print {
  .ambient-blobs,
  .nav,
  .qr-eyebrow,
  .qr-page h1,
  .qr-sub,
  .qr-actions,
  .qr-hide-on-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
  }
  .qr-page {
    padding: 0;
    max-width: none;
  }
  .qr-card {
    box-shadow: none;
    margin: 0 auto;
  }
}
