/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Chewy&family=Courier+Prime:wght@400;700&family=Nunito:wght@700;800;900&display=swap');

/* ===== CSS RESET & VARIABLES ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette: soft sage canvas matching #E5ECCB theme */
  --obsidian: #E5ECCB;
  --obsidian-light: #dce3c0;
  --obsidian-card: #d4dbb8;
  --border: rgba(28, 35, 64, 0.15);
  --border-hover: rgba(8, 127, 140, 0.45);

  /* Fomies official palette tokens */
  --ink: #1c2340;
  --ink-soft: #4a5270;
  --ink-filed: #1c402e;
  --paper: #f4efe2;
  --paper-card: #f6f0de;
  --cyan: #087f8c;
  --cyan-hi: #0fa89e;
  --butter: #00d2e0;
  --butter-hi: #38e5f3;
  --lilac: #6d28d9;
  --mint: #15803d;
  --coral: #c0392b;

  /* Theme Accents mapped to accessible deep tones */
  --neon-green: #15803d;
  --neon-cyan: #087f8c;
  --neon-purple: #6d28d9;
  --neon-pink: #c0392b;
  --neon-yellow: #b45309;

  /* Text */
  --text-primary: #1c2340;
  --text-secondary: #3b425e;
  --text-muted: #555c7a;

  /* Fonts: unified font style matching fomies.family */
  --font-pixel: 'Chewy', cursive, sans-serif;
  --font-display: 'Chewy', cursive, sans-serif;
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Courier Prime', ui-monospace, 'Courier New', monospace;

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
}

html {
  scroll-behavior: smooth;
}

body {
  background: #E5ECCB;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection {
  background: var(--butter);
  color: var(--ink);
}

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

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

/* ===== INTRO / LOADING INTERFACE (FOMIES STYLE) ===== */
#intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #E5ECCBb8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .45s ease, backdrop-filter .45s ease, -webkit-backdrop-filter .45s ease;
  user-select: none;
  -webkit-user-select: none;
}

#intro.gone {
  background: #E5ECCB00;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}

#intro .intro-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  padding: 0 24px;
}

.intro-brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform .45s ease, opacity .45s ease;
  user-select: none;
}

#intro.gone .intro-brand-wrap {
  transform: scale(.86);
  opacity: 0;
}

.intro-logo-text {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(2px, 0.8vw, 8px);
  font-family: 'Chewy', cursive, sans-serif;
  font-size: clamp(64px, 15vw, 136px);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.7));
}

.intro-letter {
  display: inline-block;
  transform-origin: 50% 85%;
  -webkit-text-stroke: clamp(2px, 0.4vw, 4px) #1c2340;
  paint-order: stroke fill;
  text-shadow: 
    0 6px 0 #1c2340,
    0 10px 0 rgba(10, 14, 28, 0.9),
    0 16px 28px rgba(0, 0, 0, 0.8);
  animation: 
    letterDropIn 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i) * 0.09s) both,
    letterFloatWave 2.8s ease-in-out calc(0.85s + var(--i) * 0.18s) infinite;
  will-change: transform, opacity;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}

/* Individual letter candy palette matching visual language */
.intro-letter:nth-child(1) { color: #00f0ff; } /* H - Electric cyan */
.intro-letter:nth-child(2) { color: #a4ecc8; } /* O - Mint green */
.intro-letter:nth-child(3) { color: #c9bcff; } /* M - Lilac purple */
.intro-letter:nth-child(4) { color: #ffb3a3; } /* I - Coral */
.intro-letter:nth-child(5) { color: #b44dff; } /* E - Electric violet */
.intro-letter:nth-child(6) { color: #00f0ff; } /* S - Electric cyan */

.intro-letter:hover {
  transform: translateY(-16px) scale(1.18) rotate(calc((var(--i) - 2.5) * 4deg)) !important;
}

@keyframes letterDropIn {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.5) rotate(calc((var(--i) - 2.5) * -8deg));
  }
  65% {
    opacity: 1;
    transform: translateY(-20px) scale(1.16) rotate(calc((var(--i) - 2.5) * 4deg));
  }
  85% {
    transform: translateY(4px) scale(0.96) rotate(calc((var(--i) - 2.5) * -1.5deg));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes letterFloatWave {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-12px) rotate(calc((var(--i) % 2 === 0 ? -3deg : 3deg))) scale(1.04, 0.96);
  }
  50% {
    transform: translateY(-2px) rotate(0deg) scale(0.98, 1.02);
  }
  75% {
    transform: translateY(8px) rotate(calc((var(--i) % 2 === 0 ? 2deg : -2deg))) scale(1.02, 0.98);
  }
}

.intro-brand-wrap:hover .intro-letter {
  animation-duration: 0.85s, 1.8s;
}

#intro-enter {
  position: relative;
  box-sizing: border-box;
  height: 48px;
  min-height: 0;
  padding: 0 1.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', var(--font-sans), system-ui, sans-serif;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--butter);
  color: var(--ink);
  box-shadow: inset 0 1.5px rgba(255, 255, 255, 0.6), 0 3px rgba(9, 10, 16, 0.55), 0 10px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s, background .15s ease, box-shadow .15s ease;
  cursor: pointer;
}

#intro.ready #intro-enter {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .4s ease, transform .4s ease, visibility 0s, background .15s ease, box-shadow .15s ease;
}

#intro.ready #intro-enter:hover {
  transform: translateY(-1px);
  background: var(--butter-hi);
  box-shadow: inset 0 1.5px rgba(255, 255, 255, 0.7), 0 4px rgba(9, 10, 16, 0.55), 0 14px 32px rgba(0, 0, 0, 0.45);
}

#intro.ready #intro-enter:active {
  transform: translateY(3px);
  transition-duration: .06s;
  box-shadow: inset 0 1.5px rgba(255, 255, 255, 0.4), 0 0 rgba(9, 10, 16, 0.55), 0 6px 16px rgba(0, 0, 0, 0.35);
}

#intro-enter:focus-visible {
  outline: 2px solid #f2f5ff;
  outline-offset: 3px;
}

#intro.gone #intro-enter {
  opacity: 0;
  transform: scale(.86);
}

@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  #intro {
    padding-bottom: 8vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  #intro {
    display: none;
  }
}

/* ===== BACKGROUND ===== */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: #E5ECCB;
}

/* Dynamic NFT Canvas */
.nft-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 85% 55% at 50% -10%, rgba(0, 240, 255, 0.15), transparent 70%),
    radial-gradient(ellipse 65% 45% at 85% 60%, rgba(201, 188, 255, 0.10), transparent 70%),
    radial-gradient(ellipse 55% 45% at 15% 75%, rgba(164, 236, 200, 0.09), transparent 70%);
}

/* NFT Cyber Grid with perspective and floating wave */
.bg-cyber-grid {
  position: absolute;
  inset: -50% 0 0 0;
  height: 150%;
  z-index: 2;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  background-position: center bottom;
  transform: perspective(600px) rotateX(48deg);
  transform-origin: center bottom;
  opacity: 0.7;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 80%);
  animation: cyberGridRoll 18s linear infinite;
  pointer-events: none;
}

@keyframes cyberGridRoll {
  0% { background-position-y: 0px; }
  100% { background-position-y: 54px; }
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 2;
}

.bg-orb--1 {
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 400px;
  background: rgba(0, 240, 255, 0.08);
}

.bg-orb--2 {
  top: 5%;
  right: -60px;
  width: 520px;
  height: 520px;
  background: rgba(201, 188, 255, 0.07);
}

.bg-orb--3 {
  bottom: 10%;
  left: -60px;
  width: 540px;
  height: 540px;
  background: rgba(164, 236, 200, 0.07);
}

/* NFT Theme Breathing / Pulse Animations */
.anim-pulse-slow {
  animation: bgPulseSlow 9s ease-in-out infinite alternate;
}

.anim-pulse-mid {
  animation: bgPulseMid 7s ease-in-out infinite alternate;
}

@keyframes bgPulseSlow {
  0% { transform: translateX(-50%) scale(0.92); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.12); opacity: 0.95; }
  100% { transform: translateX(-50%) scale(1.0); opacity: 0.75; }
}

@keyframes bgPulseMid {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.55; }
  100% { transform: scale(1.18) translate(-15px, 20px); opacity: 0.9; }
}

.bg-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

.bg-ring--outer {
  width: 820px;
  height: 820px;
  border: 1px dashed rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.04);
}

.bg-ring--inner {
  width: 560px;
  height: 560px;
  border: 1.5px dotted rgba(201, 188, 255, 0.18);
  box-shadow: inset 0 0 40px rgba(201, 188, 255, 0.03);
}

.anim-rotate-slow {
  animation: bgRotateClockwise 45s linear infinite;
}

.anim-rotate-reverse {
  animation: bgRotateCounter 32s linear infinite;
}

@keyframes bgRotateClockwise {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes bgRotateCounter {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

.bg-dots {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: radial-gradient(rgba(0, 240, 255, 0.75) 1px, transparent 0);
  background-size: 28px 28px;
  z-index: 2;
}

/* Subtle CRT / Cyber NFT scanline bar */
.bg-scanline {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 240, 255, 0.02) 50%,
    transparent 100%
  );
  height: 120px;
  opacity: 0.7;
  animation: scanlineSweep 10s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scanlineSweep {
  0% { transform: translateY(-120px); }
  100% { transform: translateY(105vh); }
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-link:hover .logo-icon {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 240, 160, 0.4);
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--butter);
  padding: 2px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transition: all 0.3s ease;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  line-height: 1;
  font-weight: 800;
  background: linear-gradient(90deg, #0284c7, #087f8c, #6d28d9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 1;
  margin-top: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--obsidian-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  transition: all 0.25s ease;
}

.nav-btn:hover {
  color: var(--neon-green);
  border-color: rgba(21, 128, 61, 0.4);
}

.nav-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
}

.nav-btn svg {
  width: 16px;
  height: 16px;
}

#nav-opensea:hover {
  border-color: rgba(32, 129, 226, 0.45);
}

#nav-opensea svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.nav-btn .btn-label {
  display: none;
}

@media (min-width: 640px) {
  .nav-btn .btn-label { display: inline; }
}

.status-badge {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(8, 127, 140, 0.12);
  border: 1.5px solid var(--cyan);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--cyan);
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .status-badge { display: flex; }
}

.btn-primary {
  padding: 9px 18px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.5px;
  font-weight: 900;
  color: var(--ink);
  background: var(--butter);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: var(--butter-hi);
  box-shadow: 3.5px 3.5px 0 var(--ink);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  z-index: 10;
  padding: 60px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .hero { padding: 80px 24px 120px; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(8, 127, 140, 0.1);
  border: 1.5px solid rgba(8, 127, 140, 0.35);
  color: var(--cyan);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(8, 127, 140, 0.08);
  animation: fadeInUp 0.8s ease-out both;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  color: var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.5vw, 76px);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  max-width: 850px;
  line-height: 1.15;
  margin-bottom: 0;
  animation: fadeInUp 0.8s 0.15s ease-out both;
}

.hero-title .highlight {
  color: var(--cyan);
  background: linear-gradient(90deg, #0284c7, #087f8c, #6d28d9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(8, 127, 140, 0.25));
}

.hero-desc {
  margin-top: 24px;
  font-size: clamp(15px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 550px;
  line-height: 1.7;
  animation: fadeInUp 0.8s 0.3s ease-out both;
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  animation: fadeInUp 0.8s 0.45s ease-out both;
}

.hero-cta .btn-hero {
  width: 100%;
  padding: 16px 32px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 18px;
  letter-spacing: 0.03em;
  font-weight: 900;
  color: var(--ink);
  background: var(--butter);
  box-shadow: 3.5px 3.5px 0 var(--ink), 0 8px 30px rgba(0, 210, 224, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cta .btn-hero:hover {
  background: var(--butter-hi);
  box-shadow: 4.5px 4.5px 0 var(--ink), 0 12px 35px rgba(0, 210, 224, 0.45);
  transform: translateY(-2px);
}

.hero-cta .btn-hero:active {
  transform: translateY(2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.hero-cta .btn-hero svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.hero-cta .btn-hero:hover svg {
  transform: translateX(4px);
}

/* ===== MARQUEE / SCROLLING GALLERY ===== */
/* ===== NFT TRAIN & RAILWAY SCENERY SECTION ===== */
.train-section {
  position: relative;
  z-index: 10;
  padding: 10px 0 70px 0;
  overflow: hidden;
}

.train-scene {
  position: relative;
  width: 100%;
  height: 330px;
  overflow: hidden;
}

/* ==========================================================================
   1. SCENERY BACKDROP: Trees with User's Feather Leaves & Landscape
   ========================================================================== */
.railway-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Distant rolling hills in soft thematic sage tones */
.scenic-hills {
  position: absolute;
  bottom: 45px;
  left: 0;
  right: 0;
  height: 120px;
  background: 
    radial-gradient(ellipse 900px 100px at 25% 100%, rgba(188, 199, 155, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 1100px 120px at 75% 100%, rgba(197, 208, 164, 0.4) 0%, transparent 70%);
  border-bottom: 2px solid rgba(135, 148, 102, 0.25);
}

/* Forest of Trees featuring the user's stylized feather leaf */
.scenic-forest {
  position: absolute;
  inset: 0;
  bottom: 45px;
}

.feather-tree {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
  animation: treeBreeze 5.5s ease-in-out infinite alternate;
}

.tree--1 { left: 4%; height: 240px; animation-delay: 0s; }
.tree--2 { left: 20%; height: 265px; animation-delay: -1.2s; }
.tree--3 { left: 38%; height: 235px; animation-delay: -2.5s; }
.tree--4 { left: 56%; height: 275px; animation-delay: -0.7s; }
.tree--5 { left: 74%; height: 250px; animation-delay: -3.1s; }
.tree--6 { left: 91%; height: 245px; animation-delay: -1.8s; }

@keyframes treeBreeze {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(1.4deg) skewX(0.8deg); }
  100% { transform: rotate(-0.8deg); }
}

/* Organic Timber Tree Trunk */
.tree-trunk {
  position: absolute;
  bottom: 0;
  width: 16px;
  background: linear-gradient(90deg, #382413 0%, #543922 45%, #6d4b2e 70%, #382413 100%);
  border-radius: 4px 4px 2px 2px;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.25);
}

.tree-trunk::before,
.tree-trunk::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 3px;
}

/* Branch forks */
.trunk--straight { height: 160px; width: 14px; }
.trunk--straight::before {
  top: 35px; left: -16px; width: 22px; height: 9px;
  transform: rotate(-35deg); border-radius: 4px;
}
.trunk--straight::after {
  top: 60px; right: -18px; width: 24px; height: 8px;
  transform: rotate(32deg); border-radius: 4px;
}

.trunk--curved-left {
  height: 155px; width: 15px;
  transform-origin: bottom center;
  transform: rotate(-3deg);
}
.trunk--curved-left::before {
  top: 40px; left: -22px; width: 26px; height: 9px;
  transform: rotate(-40deg);
}
.trunk--curved-left::after {
  top: 75px; right: -15px; width: 20px; height: 8px;
  transform: rotate(28deg);
}

.trunk--curved-right {
  height: 150px; width: 15px;
  transform: rotate(3deg);
}
.trunk--curved-right::before {
  top: 45px; right: -22px; width: 26px; height: 9px;
  transform: rotate(40deg);
}
.trunk--curved-right::after {
  top: 80px; left: -16px; width: 20px; height: 8px;
  transform: rotate(-28deg);
}

.trunk--tall { height: 185px; width: 17px; }
.trunk--tall::before {
  top: 50px; left: -24px; width: 28px; height: 10px;
  transform: rotate(-36deg);
}
.trunk--tall::after {
  top: 90px; right: -22px; width: 26px; height: 9px;
  transform: rotate(35deg);
}

/* Canopy Boughs holding the user's leaf foliage */
.tree-boughs {
  position: absolute;
  top: 10px;
  width: 170px;
  height: 150px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.leaf-branch {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* Leaf sprite styling using assets/leaf-feather.png */
.feather-leaf {
  position: absolute;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 3px 6px rgba(18, 50, 15, 0.35));
  transform-origin: bottom center;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Leaf cluster arrangements */
.fl-1 { width: 50px; height: 68px; top: 12px; left: 10px; transform: rotate(-48deg); }
.fl-2 { width: 44px; height: 60px; top: 38px; left: 2px; transform: rotate(-72deg); filter: brightness(0.88); }
.fl-3 { width: 48px; height: 64px; top: 62px; left: 16px; transform: rotate(-32deg); filter: brightness(0.95); }
.fl-4 { width: 54px; height: 72px; top: -6px; left: 56px; transform: rotate(-5deg); filter: brightness(1.05); }
.fl-5 { width: 48px; height: 65px; top: 22px; left: 62px; transform: rotate(12deg); }
.fl-6 { width: 45px; height: 62px; top: 48px; left: 50px; transform: rotate(-18deg); filter: brightness(0.92); }
.fl-7 { width: 52px; height: 70px; top: 10px; right: 12px; transform: rotate(44deg); filter: brightness(1.02); }
.fl-8 { width: 46px; height: 62px; top: 42px; right: 4px; transform: rotate(68deg); filter: brightness(0.85); }

/* Trackside shrubs along the ballast gravel */
.trackside-bushes {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  height: 45px;
  z-index: 1;
}

.track-bush {
  position: absolute;
  bottom: 0;
  width: 60px;
  height: 42px;
}

.bush--1 { left: 12%; }
.bush--2 { left: 34%; }
.bush--3 { left: 66%; }
.bush--4 { left: 86%; }

.bush-leaf {
  position: absolute;
  width: 28px;
  height: 38px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.bl-1 { bottom: 0; left: 0; transform: rotate(-35deg); filter: brightness(0.9); }
.bl-2 { bottom: 4px; left: 16px; transform: rotate(8deg); filter: brightness(1.08); }
.bl-3 { bottom: 0; left: 30px; transform: rotate(40deg); filter: brightness(0.85); }

/* Wind-drifted leaves floating in the sky */
.drifting-leaves-area {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.drift-leaf {
  position: absolute;
  width: 22px;
  height: 30px;
  opacity: 0.75;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
  animation: leafFloat linear infinite;
}

.dl-1 { top: 40px; animation-duration: 18s; animation-delay: 0s; }
.dl-2 { top: 90px; animation-duration: 22s; animation-delay: -6s; width: 18px; height: 24px; }
.dl-3 { top: 65px; animation-duration: 16s; animation-delay: -11s; width: 24px; height: 32px; }

@keyframes leafFloat {
  0% { transform: translateX(105vw) translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.85; }
  50% { transform: translateX(50vw) translateY(18px) rotate(180deg); }
  90% { opacity: 0.85; }
  100% { transform: translateX(-10vw) translateY(-10px) rotate(360deg); opacity: 0; }
}

/* ==========================================================================
   2. REALISTIC RAILWAY TRACK SYSTEM
   ========================================================================== */
.railway-system {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 2;
}

/* 3D Ballast Gravel Embankment with crushed rock texture */
.ballast-bed {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: 
    linear-gradient(180deg, rgba(82, 70, 52, 0.95) 0%, rgba(68, 57, 42, 0.98) 60%, rgba(50, 41, 30, 1) 100%);
  border-radius: 4px 4px 0 0;
  box-shadow: 
    inset 0 3px 6px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(35, 28, 18, 0.35);
}

.ballast-texture {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(200, 185, 160, 0.22) 1.5px, transparent 2px),
    radial-gradient(circle at 45% 65%, rgba(40, 32, 22, 0.35) 2px, transparent 2.5px),
    radial-gradient(circle at 80% 30%, rgba(180, 165, 140, 0.2) 1.5px, transparent 2px),
    radial-gradient(circle at 25% 80%, rgba(45, 38, 28, 0.3) 1.8px, transparent 2.2px);
  background-size: 16px 14px;
  opacity: 0.85;
}

.ballast-shoulder {
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(180deg, rgba(50, 41, 30, 0.8) 0%, rgba(135, 148, 102, 0.35) 100%);
}

/* Continuous Heavy Creosoted Wooden Railroad Ties / Sleepers with Tie-Plates */
.rail-sleepers {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 32px;
  background: repeating-linear-gradient(
    90deg,
    #2b1c11 0px,
    #3f2c1b 2px,
    #4a3422 6px,
    #332114 12px,
    #1d1209 14px,
    transparent 14px,
    transparent 28px
  );
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

/* Dual Polished Forged Steel Rails */
.steel-rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 22%, #64748b 55%, #334155 85%, #0f172a 100%);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-radius: 1px;
}

.steel-rail.rail--top {
  top: 7px;
  height: 5px;
  opacity: 0.92;
}

.steel-rail.rail--bottom {
  top: 25px;
  height: 7px;
}

.rail-crown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #fff 0%, #e2e8f0 50%, #fff 100%);
  opacity: 0.9;
}

/* ==========================================================================
   3. MOVING TRAIN: LOCOMOTIVE & FLATBED CARS
   ========================================================================== */
.train-track {
  position: absolute;
  bottom: 50px;
  display: flex;
  width: max-content;
  z-index: 5;
  animation: trainScroll 32s linear infinite;
  will-change: transform;
}

@keyframes trainScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.train-set {
  display: flex;
  align-items: flex-end;
}

/* Shared Train Car Base */
.train-car {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  animation: trainTrackRumble 0.45s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes trainTrackRumble {
  0% { transform: translateY(0); }
  100% { transform: translateY(-1.8px); }
}

/* --------------------------------------------------------------------------
   A. AUTHENTIC STEAM LOCOMOTIVE
   -------------------------------------------------------------------------- */
.locomotive {
  width: 235px;
  margin-right: 12px;
}

.loco-body {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  height: 122px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

/* Engineer's Cab */
.loco-cabin {
  width: 82px;
  height: 104px;
  background: linear-gradient(180deg, #2b313d 0%, #1c212b 60%, #12161f 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  border: 2px solid #0d1017;
  border-bottom: 3px solid #0a0d13;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.loco-cab-roof {
  position: absolute;
  top: -6px;
  left: -4px;
  right: -4px;
  height: 9px;
  background: linear-gradient(180deg, #3d4656 0%, #1e2430 100%);
  border-radius: 6px 6px 1px 1px;
  border: 1.5px solid #0d1017;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.loco-window {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 36px;
  background: linear-gradient(135deg, #1c150c 0%, #2e1d0d 100%);
  border: 2px solid #5a462f;
  border-radius: 4px 4px 2px 2px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.firebox-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 80%, rgba(255, 160, 30, 0.85) 0%, rgba(255, 80, 0, 0.5) 45%, transparent 75%);
  animation: fireboxFlicker 1.8s ease-in-out infinite alternate;
}

@keyframes fireboxFlicker {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

.loco-driver {
  position: absolute;
  bottom: 0;
  left: 8px;
  width: 22px;
  height: 26px;
  background: #0f131a;
  border-radius: 10px 10px 0 0;
  box-shadow: -2px 0 0 rgba(255, 170, 40, 0.3);
}

.loco-cab-handrail {
  position: absolute;
  bottom: 12px;
  right: 5px;
  width: 4px;
  height: 48px;
  background: linear-gradient(90deg, #d4af37, #f1c40f, #997a15);
  border-radius: 2px;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Cylindrical Boiler Barrel */
.loco-boiler {
  width: 110px;
  height: 74px;
  background: linear-gradient(180deg, #383f4d 0%, #242a36 30%, #161a22 70%, #0d0f14 100%);
  border-radius: 6px 28px 2px 2px;
  position: relative;
  border: 2px solid #0d1017;
  border-bottom: 3px solid #080a0f;
  box-shadow: 
    inset 0 4px 8px rgba(255, 255, 255, 0.15),
    inset 0 -8px 14px rgba(0, 0, 0, 0.7);
}

.boiler-highlight {
  position: absolute;
  top: 3px;
  left: 10px;
  right: 15px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.28) 40%, transparent 95%);
  border-radius: 2px;
}

/* Polished Brass Boiler Bands */
.loco-band {
  position: absolute;
  width: 5px;
  top: 4px;
  bottom: 4px;
  background: linear-gradient(180deg, #f9e79f 0%, #d4ac0d 40%, #b7950b 80%, #7d6608 100%);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.loco-band--1 { left: 16px; }
.loco-band--2 { left: 42px; }
.loco-band--3 { left: 68px; }
.loco-band--4 { left: 92px; }

/* Boiler Top Hardware */
.steam-dome {
  position: absolute;
  top: -18px;
  left: 28px;
  width: 22px;
  height: 20px;
  background: radial-gradient(circle at 40% 30%, #f7dc6f 0%, #d4ac0d 60%, #7d6608 100%);
  border-radius: 12px 12px 2px 2px;
  border: 1.5px solid #5d4037;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.safety-valve {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 6px;
  background: #f1c40f;
  border-radius: 2px;
}

.sand-dome {
  position: absolute;
  top: -14px;
  left: 78px;
  width: 18px;
  height: 16px;
  background: linear-gradient(180deg, #2d3340 0%, #161922 100%);
  border-radius: 10px 10px 2px 2px;
  border: 1.5px solid #0d1017;
}

.loco-bell {
  position: absolute;
  top: -11px;
  left: 54px;
  width: 10px;
  height: 12px;
  background: linear-gradient(180deg, #f9e79f, #b7950b);
  border-radius: 5px 5px 2px 2px;
  border: 1px solid #7d6608;
}

.boiler-handrail {
  position: absolute;
  top: 36px;
  left: 6px;
  right: 12px;
  height: 2.5px;
  background: linear-gradient(90deg, #d4af37, #f1c40f);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Front Smokebox & High Lantern Headlight */
.loco-front {
  width: 34px;
  height: 58px;
  background: linear-gradient(180deg, #212631 0%, #11141a 100%);
  border-radius: 4px 14px 4px 4px;
  position: relative;
  border: 2px solid #090b0e;
}

.smokebox-plate {
  position: absolute;
  top: 20px;
  left: 4px;
  width: 22px;
  height: 12px;
  background: #990000;
  border: 1.5px solid #d4af37;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smokebox-plate span {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

/* Headlight Lantern with Projected Light Beam */
.loco-headlight {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #f9e79f 0%, #d4ac0d 65%, #7d6608 100%);
  border-radius: 50%;
  border: 2px solid #332200;
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.95), 0 0 25px rgba(241, 196, 15, 0.5);
}

.headlight-lens {
  position: absolute;
  inset: 2px;
  background: radial-gradient(circle, #ffffff 20%, #fff9c4 70%, #f1c40f 100%);
  border-radius: 50%;
}

.headlight-beam {
  position: absolute;
  top: -8px;
  left: -90px;
  width: 95px;
  height: 34px;
  background: linear-gradient(270deg, rgba(255, 243, 176, 0.55) 0%, rgba(255, 230, 100, 0.18) 55%, transparent 100%);
  clip-path: polygon(100% 30%, 100% 70%, 0% 100%, 0% 0%);
  pointer-events: none;
}

/* Realistic Steel Cowcatcher / Pilot Wedge */
.loco-cowcatcher {
  position: absolute;
  bottom: -6px;
  left: -10px;
  width: 22px;
  height: 18px;
  background: repeating-linear-gradient(
    -45deg,
    #3f4857 0px,
    #3f4857 2px,
    #1e232d 2px,
    #1e232d 5px
  );
  clip-path: polygon(100% 0%, 0% 70%, 0% 100%, 100% 100%);
  border-bottom: 3px solid #11141a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Flanged Cast Iron Chimney & Steam Particles */
.chimney {
  position: absolute;
  top: -44px;
  left: 104px;
  width: 22px;
  height: 38px;
  background: linear-gradient(180deg, #2b313d 0%, #151820 100%);
  border: 2px solid #090b0e;
  border-radius: 2px;
}

.chimney-cap {
  position: absolute;
  top: -5px;
  left: -4px;
  right: -4px;
  height: 7px;
  background: linear-gradient(180deg, #d4af37 0%, #7d6608 100%);
  border: 1.5px solid #090b0e;
  border-radius: 4px;
}

/* Realistic expanding steam clouds */
.smoke-puff {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(245, 245, 250, 0.82) 0%, rgba(200, 205, 215, 0.45) 50%, transparent 80%);
  filter: blur(2px);
  animation: realisticSmoke 2.2s ease-out infinite;
}

.smoke-puff--1 { width: 22px; height: 22px; top: -28px; left: -2px; animation-delay: 0s; }
.smoke-puff--2 { width: 30px; height: 30px; top: -46px; left: 8px; animation-delay: 0.45s; }
.smoke-puff--3 { width: 40px; height: 40px; top: -68px; left: 24px; animation-delay: 0.9s; }
.smoke-puff--4 { width: 50px; height: 50px; top: -90px; left: 45px; animation-delay: 1.35s; }
.smoke-puff--5 { width: 64px; height: 64px; top: -115px; left: 70px; animation-delay: 1.8s; }

@keyframes realisticSmoke {
  0% {
    opacity: 0.85;
    transform: translateY(0) translateX(0) scale(0.45);
  }
  40% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) translateX(95px) scale(2.4);
  }
}

/* Running Gear with Working Mechanical Connecting Rods */
.loco-running-gear {
  position: relative;
  width: 100%;
  height: 48px;
  margin-top: -6px;
  z-index: 4;
}

.steam-cylinder {
  position: absolute;
  top: 6px;
  left: 20px;
  width: 36px;
  height: 18px;
  background: linear-gradient(180deg, #2b313d, #12151c);
  border: 1.5px solid #090b0e;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.crosshead-guide {
  position: absolute;
  top: 7px;
  right: -24px;
  width: 26px;
  height: 4px;
  background: linear-gradient(90deg, #cbd5e1, #64748b);
  border-radius: 1px;
}

/* Heavy Drive Wheels */
.loco-wheels {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-right: 14px;
  position: relative;
}

.wheel {
  border-radius: 50%;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), inset 0 0 4px rgba(255, 255, 255, 0.2);
}

.wheel--driver {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #252a35 0%, #151821 70%, #475569 88%, #0f1218 100%);
  border: 3px solid #0a0d13;
  animation: wheelSpin 0.9s linear infinite;
}

.wheel-counterweight {
  position: absolute;
  top: 4px;
  left: 6px;
  right: 6px;
  height: 14px;
  background: #333d4b;
  border-radius: 12px 12px 0 0;
}

.wheel-crankpin {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  background: radial-gradient(circle, #f1c40f, #7d6608);
  border-radius: 50%;
  border: 1px solid #222;
}

.wheel--pilot {
  width: 26px;
  height: 26px;
  background: radial-gradient(circle, #2c3340 0%, #13161c 70%, #475569 90%, #0a0d13 100%);
  border: 2px solid #0a0d13;
  align-self: flex-end;
  margin-right: auto;
  margin-left: 28px;
  animation: wheelSpin 0.55s linear infinite;
}

@keyframes wheelSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Working Mechanical Reciprocating Connecting Rods */
.loco-side-rod {
  position: absolute;
  bottom: 14px;
  right: 28px;
  width: 58px;
  height: 6px;
  background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 50%, #475569 100%);
  border-radius: 3px;
  border: 1px solid #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  z-index: 6;
  animation: sideRodReciprocate 0.9s linear infinite;
  transform-origin: center center;
}

@keyframes sideRodReciprocate {
  0% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-7px) rotate(-3deg); }
  50% { transform: translateY(0px) rotate(0deg); }
  75% { transform: translateY(7px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.loco-drive-rod {
  position: absolute;
  bottom: 18px;
  right: 66px;
  width: 62px;
  height: 5px;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 50%, #64748b 100%);
  border-radius: 2.5px;
  border: 1px solid #1e293b;
  z-index: 6;
  transform-origin: right center;
  animation: driveRodPumping 0.9s linear infinite;
}

@keyframes driveRodPumping {
  0% { transform: rotate(-5deg) translateX(0); }
  25% { transform: rotate(-14deg) translateX(-4px); }
  50% { transform: rotate(-5deg) translateX(0); }
  75% { transform: rotate(4deg) translateX(4px); }
  100% { transform: rotate(-5deg) translateX(0); }
}

/* Couplers */
.connector {
  position: absolute;
  right: -18px;
  bottom: 14px;
  width: 24px;
  height: 8px;
  background: linear-gradient(180deg, #475569, #1e293b);
  border-radius: 3px;
  z-index: 4;
}

.connector::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -3px;
  width: 12px;
  height: 14px;
  background: radial-gradient(circle, #64748b, #0f172a);
  border-radius: 50%;
  border: 2px solid #090b0e;
}

.connector--loco {
  right: -16px;
}

/* --------------------------------------------------------------------------
   B. HEAVY-DUTY FLATBED WAGONS (NFT EXHIBITION CARS)
   -------------------------------------------------------------------------- */
.wagon {
  width: 150px;
  margin-right: 14px;
}

.wagon-body {
  width: 100%;
  height: 140px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* Gallery Picture Lamp Spotlight */
.wagon-lamp {
  position: absolute;
  top: 0;
  width: 34px;
  height: 12px;
  background: linear-gradient(180deg, #d4af37, #997a15);
  border-radius: 4px 4px 1px 1px;
  border: 1px solid #5a420b;
  z-index: 6;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.6);
}

.lamp-light {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 245, 180, 0.35) 0%, rgba(255, 230, 100, 0.08) 50%, transparent 80%);
  clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
  z-index: 5;
}

/* Museum-Grade Exhibit Vitrine Frame / Train Compartment - Fills fully with NFT */
.wagon-frame {
  width: 100%;
  height: 130px;
  background: #14181f;
  border-radius: 8px 8px 3px 3px;
  border: 3.5px solid #1a1f29;
  box-shadow: 
    inset 0 0 12px rgba(0, 0, 0, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.wagon-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
  z-index: 4;
}

/* NFT Artwork Display - Fills the Compartment Fully */
.nft-display {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.nft-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
  display: block;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wagon:hover .nft-display img {
  transform: scale(1.08);
}

/* Polished Brass Identification Plaque */
.wagon-plaque {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f9e79f 0%, #d4ac0d 50%, #997a15 100%);
  border: 1px solid #5a420b;
  border-radius: 3px;
  padding: 1.5px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
  z-index: 6;
  white-space: nowrap;
}

.wagon-plaque span {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 900;
  color: #1a120b;
  letter-spacing: 0.8px;
}

/* Industrial Steel Flatcar Chassis & Reporting Marks */
.wagon-chassis {
  width: 100%;
  position: relative;
  z-index: 4;
}

.chassis-beam {
  width: 100%;
  height: 15px;
  background: linear-gradient(180deg, #3d4655 0%, #252b36 40%, #151921 100%);
  border-radius: 2px;
  border: 1.5px solid #090c10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.chassis-beam span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1.5px;
}

/* Dual 2-Axle Bogie Trucks with Flanged Steel Wheels */
.bogie-truck {
  position: absolute;
  top: 10px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.bogie-truck--left { left: 10px; }
.bogie-truck--right { right: 10px; }

.bogie-wheel {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: radial-gradient(circle, #333d4b 0%, #171b22 65%, #64748b 88%, #090b0e 100%);
  border: 2px solid #090c10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 3px rgba(255, 255, 255, 0.25);
  animation: wheelSpin 0.65s linear infinite;
  position: relative;
}

.bogie-wheel::after {
  content: '';
  position: absolute;
  inset: 6px;
  background: radial-gradient(circle, #cbd5e1, #475569);
  border-radius: 50%;
  border: 1px solid #1e293b;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .train-scene { height: 260px; }
  .scenic-hills { height: 80px; }
  .feather-tree { transform: scale(0.75); }
  .locomotive { width: 175px; transform: scale(0.85); transform-origin: bottom left; }
  .wagon { width: 120px; transform: scale(0.85); transform-origin: bottom left; }
}


/* ===== ABOUT SECTION ===== */
.about {
  position: relative;
  z-index: 10;
  padding: var(--section-pad) 24px;
  overflow: hidden;
}

.about-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.about-glow--1 {
  left: 20%;
  top: 0;
  width: 500px;
  height: 500px;
  background: rgba(0, 240, 160, 0.04);
}

.about-glow--2 {
  right: 20%;
  bottom: 0;
  width: 400px;
  height: 400px;
  background: rgba(180, 77, 255, 0.04);
}

.about-inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.section-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.section-badge span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(21, 128, 61, 0.1);
  border: 1.5px solid rgba(21, 128, 61, 0.35);
  color: var(--neon-green);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(21, 128, 61, 0.08);
}

.section-badge svg {
  width: 14px;
  height: 14px;
  color: var(--neon-green);
  animation: pulse 2s ease-in-out infinite;
}

.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.section-title .highlight {
  background: linear-gradient(90deg, #15803d, #087f8c, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(8, 127, 140, 0.2));
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.6vw, 17px);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.section-desc strong {
  color: var(--neon-green);
  font-weight: 800;
}

.section-desc .white {
  color: var(--text-primary);
  font-weight: 800;
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 48px;
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  border-radius: 18px;
  border: 1.5px solid rgba(28, 35, 64, 0.15);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(28, 35, 64, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 30px rgba(28, 35, 64, 0.1);
}

.stat-card--green, .stat-card--mint {
  border-color: rgba(21, 128, 61, 0.35);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 24px rgba(21, 128, 61, 0.08);
}

.stat-card--purple, .stat-card--lilac {
  border-color: rgba(109, 40, 217, 0.35);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 24px rgba(109, 40, 217, 0.08);
}

.stat-card--cyan, .stat-card--butter {
  border-color: rgba(2, 132, 199, 0.35);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.08);
}

.stat-card__icon {
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.stat-card:hover .stat-card__icon {
  opacity: 1;
  transform: scale(1.1);
}

.stat-card__icon svg {
  width: 24px;
  height: 24px;
}

.stat-card--butter .stat-card__icon, .stat-card--cyan .stat-card__icon, .stat-card--green .stat-card__icon { color: #0284c7; }
.stat-card--lilac .stat-card__icon, .stat-card--purple .stat-card__icon { color: var(--lilac); }
.stat-card--mint .stat-card__icon { color: var(--mint); }

.stat-card__value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
}

.stat-card--butter .stat-card__value, .stat-card--cyan .stat-card__value, .stat-card--green .stat-card__value { color: #0284c7; }
.stat-card--lilac .stat-card__value, .stat-card--purple .stat-card__value { color: var(--lilac); }
.stat-card--mint .stat-card__value { color: var(--mint); }

.stat-card__label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Info cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .info-grid { grid-template-columns: 1fr; }
}

.info-card {
  position: relative;
  padding: 24px;
  border-radius: 18px;
  border: 1.5px solid rgba(28, 35, 64, 0.15);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(28, 35, 64, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.info-card:hover {
  border-color: rgba(8, 127, 140, 0.45);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(8, 127, 140, 0.12);
  transform: translateY(-2px);
}

.info-card__glow {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 127, 140, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.info-card:hover .info-card__glow {
  opacity: 1;
}

.info-card__body {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-card__emoji,
.info-card__icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(28, 35, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--cyan);
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(28, 35, 64, 0.08);
}

.info-card__icon-box svg {
  width: 22px;
  height: 22px;
  color: var(--cyan);
  stroke-width: 2.2;
}

.info-card:hover .info-card__emoji,
.info-card:hover .info-card__icon-box {
  border-color: var(--cyan);
  background: rgba(8, 127, 140, 0.1);
  transform: scale(1.05);
}

.info-card__title {
  font-family: var(--font-pixel);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.info-card:hover .info-card__title {
  color: var(--cyan);
}

.info-card__desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
}

/* ===== COLLECTION GALLERY ===== */
.gallery {
  position: relative;
  z-index: 10;
  padding: var(--section-pad) 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; max-width: 260px; }
}

.gallery-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--obsidian-card);
  transition: all 0.4s ease;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-card:hover {
  border-color: var(--neon-green);
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 240, 160, 0.15);
}

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

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-card:hover .gallery-card__overlay {
  opacity: 1;
}

.gallery-card__name {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--neon-green);
  letter-spacing: 0.04em;
}

/* ===== ROADMAP SECTION ===== */
.roadmap {
  position: relative;
  z-index: 10;
  padding: var(--section-pad) 24px;
}

.roadmap-timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--lilac), var(--mint), transparent);
}

.roadmap-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 40px;
}

.roadmap-item:last-child {
  padding-bottom: 0;
}

.roadmap-dot {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  background: var(--obsidian);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.roadmap-item--upcoming .roadmap-dot {
  border-color: var(--lilac);
  background: rgba(201, 188, 255, 0.15);
  box-shadow: 0 0 10px rgba(201, 188, 255, 0.3);
}

.roadmap-item--future .roadmap-dot {
  border-color: var(--text-muted);
  background: transparent;
  box-shadow: none;
}

.roadmap-phase {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}

.roadmap-item--upcoming .roadmap-phase { color: var(--lilac); }
.roadmap-item--future .roadmap-phase { color: var(--text-muted); }

.roadmap-heading {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.roadmap-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 10;
  width: 100%;
  border-top: 1.5px solid rgba(28, 35, 64, 0.12);
  background: rgba(220, 227, 192, 0.7);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand svg {
  width: 16px;
  height: 16px;
  color: var(--neon-green);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.footer-copy {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(28, 35, 64, 0.15);
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.footer-admin-link:hover {
  color: var(--neon-cyan) !important;
  border-color: rgba(8, 127, 140, 0.4);
  background: rgba(8, 127, 140, 0.08);
  transform: translateY(-1px);
}

.footer-admin-link svg {
  width: 13px !important;
  height: 13px !important;
}

.status-badge--paused {
  background: rgba(255, 179, 163, 0.12) !important;
  border-color: var(--coral) !important;
  color: var(--coral) !important;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-links svg {
  width: 20px;
  height: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.anim-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.anim-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 560px) {
  .nav-btn, .status-badge { display: none; }
  .mobile-menu-toggle { display: flex; }
  .btn-primary.nav-join { display: none; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--obsidian);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 160, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 160, 0.35);
}

/* ===== WHITELIST MODAL ===== */
/* ===== CREW MODAL & ANIMATION (FOMIES STYLE) ===== */
.crew-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
  user-select: none;
}

.crew-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.crew-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(229, 236, 203, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1;
}

.crew-modal-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.crew-modal-close {
  position: absolute;
  top: -12px;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--butter);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
  transition: all 0.15s ease;
  z-index: 20;
}

.crew-modal-close:hover {
  background: var(--coral);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.crew-modal-close:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.crew-modal-close svg {
  width: 18px;
  height: 18px;
}

/* ===== THE SUITE-BOX & OPENING ANIMATION ===== */
.suitebox-container {
  width: 100%;
  max-width: 580px;
  position: relative;
  perspective: 1200px;
  margin: 0 auto;
}

/* Handle on top of the suite-box */
.suitebox-handle-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 6;
  margin-bottom: -8px;
}

.suitebox-handle {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  height: 26px;
  width: 120px;
}

.suitebox-handle-mount {
  width: 13px;
  height: 16px;
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  border: 2px solid var(--ink);
  border-radius: 3px 3px 0 0;
  box-shadow: 1px 1px 0 var(--ink);
}

.suitebox-handle-mount.left {
  margin-right: -4px;
}
.suitebox-handle-mount.right {
  margin-left: -4px;
}

.suitebox-handle-grip {
  flex: 1;
  height: 15px;
  background: #3b2210;
  border: 2.5px solid var(--ink);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: inset 0 2px 0 rgba(0, 240, 255, 0.35), 1px 1px 0 var(--ink);
  position: relative;
}

.suitebox-handle-grip::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: rgba(0, 240, 255, 0.4);
  border-radius: 2px;
}

/* Mascot atop the Suite-Box */
.suitebox-mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: -82px;
  left: 50%;
  transform: translateX(-50%) translateY(24px) scale(0.65);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  transition: transform 0.5s 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s 0.25s ease;
}

.crew-modal-overlay.open .suitebox-mascot {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.char-bubble {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  box-shadow: 2px 2px 0 var(--ink);
  position: relative;
  white-space: nowrap;
  animation: floatBubble 2.5s ease-in-out infinite;
}

.char-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink);
}

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

.char-avatar-box {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  background: #111422;
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.char-actor {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 0.25s ease;
}

.char-celebrate .char-actor,
.celebrate-char {
  animation: celebrateDance 0.8s ease-in-out infinite alternate;
}

@keyframes celebrateDance {
  0% { transform: translateY(0) rotate(-4deg) scale(1); }
  50% { transform: translateY(-10px) rotate(4deg) scale(1.1); }
  100% { transform: translateY(0) rotate(-4deg) scale(1); }
}

/* The Suite-Box Hinged Lid (Opens Upwards with 3D animation) */
.suitebox-lid {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(180deg, #1b213b 0%, #0d101c 100%);
  border: 3px solid var(--ink);
  border-radius: 20px 20px 0 0;
  transform-origin: top center;
  transform: rotateX(0deg);
  z-index: 5;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), inset 0 2px 0 rgba(0, 240, 255, 0.25);
  transition: transform 0.7s 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s 0.2s ease, visibility 0.7s ease;
  pointer-events: none;
}

.crew-modal-overlay.open .suitebox-lid {
  transform: rotateX(-115deg) translateY(-14px);
  opacity: 0.1;
  visibility: hidden;
}

.suitebox-lid-inner {
  height: 100%;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.suitebox-plaque {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  border: 2px solid var(--ink);
  padding: 5px 16px;
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 2px 2px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.suitebox-badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  background: var(--ink);
  color: var(--cyan);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Dual Cyan Metallic Latches */
.suitebox-latch {
  width: 22px;
  height: 28px;
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 2px 2px 0 var(--ink);
  position: absolute;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.suitebox-latch.left { left: 45px; }
.suitebox-latch.right { right: 45px; }

.crew-modal-overlay.open .suitebox-latch {
  transform: rotateX(80deg) translateY(-4px);
}

.latch-keyhole {
  width: 4px;
  height: 8px;
  background: var(--ink);
  border-radius: 2px;
}

/* The Suite-Box Body / Case containing all the tasks */
.suitebox-body {
  width: 100%;
  background: #090c17;
  border: 3.5px solid var(--ink);
  border-radius: 20px;
  box-shadow: 5px 5px 0 var(--ink), 0 25px 70px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
  transform: translateY(45px) scaleY(0.2) scaleX(0.85);
  transform-origin: bottom center;
  opacity: 0;
  transition: none;
}

.crew-modal-overlay.open .suitebox-body {
  animation: suiteboxOpenUpward 0.65s 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes suiteboxOpenUpward {
  0% {
    transform: translateY(45px) scaleY(0.2) scaleX(0.85);
    opacity: 0;
  }
  65% {
    transform: translateY(-8px) scaleY(1.03) scaleX(1.01);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scaleY(1) scaleX(1);
    opacity: 1;
  }
}

/* Metallic Cyan Corners */
.suitebox-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  z-index: 4;
  pointer-events: none;
}

.suitebox-corner.top-left {
  top: 0;
  left: 0;
  border-top: 5px solid #00f0ff;
  border-left: 5px solid #00f0ff;
  border-radius: 16px 0 0 0;
}
.suitebox-corner.top-right {
  top: 0;
  right: 0;
  border-top: 5px solid #00f0ff;
  border-right: 5px solid #00f0ff;
  border-radius: 0 16px 0 0;
}
.suitebox-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-bottom: 5px solid #00f0ff;
  border-left: 5px solid #00f0ff;
  border-radius: 0 0 0 16px;
}
.suitebox-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-bottom: 5px solid #00f0ff;
  border-right: 5px solid #00f0ff;
  border-radius: 0 0 16px 0;
}

/* Front Rim Strike Plates */
.suitebox-strike {
  position: absolute;
  top: 0;
  width: 22px;
  height: 10px;
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  border: 1.5px solid var(--ink);
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 4;
  pointer-events: none;
}

.suitebox-strike.left { left: 45px; }
.suitebox-strike.right { right: 45px; }

/* Inside Velvet Tray where the tasks live */
.suitebox-tray {
  padding: 26px 24px;
  position: relative;
  z-index: 2;
  background: radial-gradient(circle at 50% 10%, rgba(0, 240, 255, 0.05) 0%, rgba(10, 13, 25, 0.98) 75%);
}

.suitebox-tray::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(0, 240, 255, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.card-pin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.15);
  border: 1.5px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card-serial {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.card-form-area {
  max-height: calc(85vh - 140px);
  overflow-y: auto;
  padding-right: 4px;
}

.card-form-area::-webkit-scrollbar {
  width: 5px;
}

.card-form-area::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.35);
  border-radius: 4px;
}

.card-header {
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.5vw, 32px);
  color: #f4efe2;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.card-subtitle {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: #c5cee0;
  line-height: 1.5;
}

/* Quest Tasks List & Cards (Whitelist Interface) */
.quest-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.quest-task-card {
  background: #101424;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.quest-task-card:hover {
  border-color: rgba(0, 240, 255, 0.45);
  background: #13182b;
}

.quest-task-card:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2);
}

.quest-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.quest-task-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-num-pill {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  background: rgba(0, 240, 255, 0.16);
  color: #6bf6ff;
  border: 1px solid #00f0ff;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.quest-task-title {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 800;
  color: #f4efe2;
  margin: 0;
  line-height: 1.3;
}

.quest-req-badge {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--coral);
  background: rgba(255, 179, 163, 0.12);
  border: 1px solid rgba(255, 179, 163, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.quest-action-link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--cyan);
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.quest-action-link:hover {
  background: var(--cyan);
  color: var(--ink);
  transform: translateY(-1px);
}

/* Security Captcha */
.captcha-card {
  background: #0d101d;
  border: 1.5px dashed rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.captcha-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-question {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan);
  background: #05070e;
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.captcha-input-wrap {
  flex: 1;
  min-width: 140px;
}

/* Avatar Selector (Kept for optional picker) */
.avatar-picker-section {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.avatar-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.avatar-opt {
  aspect-ratio: 1;
  border-radius: 12px;
  background: #131726;
  border: 2px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-opt:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  background: #181d30;
}

.avatar-opt.active {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 0 2px var(--cyan), 2px 2px 0 var(--ink);
  transform: translateY(-2px) scale(1.06);
}

.avatar-opt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  border-radius: 8px;
}

/* Form Inputs */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  margin-bottom: 14px;
}

.input-wrap, .select-wrap {
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #070912;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
}

.form-input::placeholder {
  color: #8fa0c0;
  font-weight: 600;
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.18);
  background: #090c18;
}

.form-input.error {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 179, 163, 0.2);
}

.field-error {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  margin-top: 4px;
  display: none;
}

.field-error.show {
  display: block;
}

.form-select {
  cursor: pointer;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Cyan Action Buttons */
.btn-butter-submit,
.btn-cyan-submit {
  width: auto;
  min-width: 210px;
  max-width: 270px;
  padding: 11px 22px;
  border-radius: 11px;
  border: 2px solid var(--ink);
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 2.5px 2.5px 0 var(--ink), 0 6px 18px rgba(0, 240, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 auto;
}

.btn-butter-submit svg,
.btn-cyan-submit svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-butter-submit:hover:not(:disabled),
.btn-cyan-submit:hover:not(:disabled) {
  background: var(--cyan-hi);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ink), 0 12px 28px rgba(0, 240, 255, 0.4);
}

.btn-butter-submit:active:not(:disabled),
.btn-cyan-submit:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-butter-submit:disabled,
.btn-cyan-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-butter-secondary,
.btn-cyan-secondary {
  padding: 14px 20px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-butter-secondary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-butter-secondary:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-butter-secondary svg {
  width: 16px;
  height: 16px;
}

/* Alert Banner */
.crew-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.crew-alert--paused {
  background: rgba(255, 179, 163, 0.12);
  border: 1.5px solid var(--coral);
  color: var(--coral);
}

.crew-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Official Crew Pass Card (Success State) */
.card-pass-area {
  animation: passReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes passReveal {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pass-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pass-card {
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink), 0 15px 35px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.pass-top-band {
  background: var(--ink);
  color: var(--cyan);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--cyan);
}

.pass-brand {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1px;
}

.pass-id {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.pass-content {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 18px;
  background: repeating-linear-gradient(135deg, #fff 0 6px, #f4efe2 6px 8px);
}

.pass-photo-frame {
  width: 100px;
  height: 100px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 2px 2px 0 var(--ink);
}

.pass-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.pass-photo-stamp {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--mint);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.pass-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.pass-field {
  display: flex;
  flex-direction: column;
}

.pass-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.pass-value {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-value--badge {
  display: inline-block;
  background: var(--cyan);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 900;
  width: fit-content;
}

.pass-value--mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.pass-bottom-bar {
  background: #e7dfcc;
  border-top: 1.5px dashed rgba(28, 35, 64, 0.35);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pass-barcode {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
  opacity: 0.7;
}

.pass-seal {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: #c4202e;
  border: 1.5px solid #c4202e;
  padding: 1px 6px;
  border-radius: 4px;
  transform: rotate(-3deg);
  letter-spacing: 0.5px;
}

.pass-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

@media (max-width: 480px) {
  .pass-content { grid-template-columns: 1fr; }
  .pass-photo-frame { margin: 0 auto; }
  .pass-details { grid-template-columns: 1fr; }
  .pass-actions { grid-template-columns: 1fr; }
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
}


/* ===== QUEST FORM THEME ALIGNMENT ===== */
/* Keep the whitelist form and quest cards consistent with the site's sage canvas. */
.suitebox-body,
.quest-task-card {
  background: #E5ECCB;
  color: var(--text-primary);
}

.quest-task-card:hover,
.form-input:focus {
  background: #E5ECCB;
}

.card-title,
.quest-task-title {
  color: var(--text-primary);
}

.card-subtitle {
  color: var(--text-secondary);
}

.form-input {
  background: #f4efe2;
  color: var(--text-primary);
  border-color: rgba(28, 35, 64, 0.25);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  background: #f4efe2;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.18);
}
