/* =============================================
   GHOSTO.CSS — The World's Most Haunted Stylesheet
   ============================================= */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS VARIABLES --- */
:root {
  --ghost-white:    #E8F4F8;
  --spectral-blue:  #7FDBDA;
  --midnight:       #0D0D1A;
  --twilight:       #1A1A2E;
  --phantom:        #2D2D44;
  --specter:        #9B7FE6;
  --ecto-green:     #4ADE80;
  --grave-red:      #F87171;
  --mist:           #A0AEC0;
  --gold-sheet:      #FFD93D;

  --font-display:   'Creepster', cursive;
  --font-serif:     'Playfair Display', Georgia, serif;
  --font-body:      'Inter', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      16px;
  --radius-full:    9999px;

  --shadow-ghost:   0 8px 32px rgba(127, 219, 218, 0.15);
  --shadow-lift:    0 16px 48px rgba(127, 219, 218, 0.2);

  --transition-fast: 150ms ease-out;
  --transition-med:  300ms ease-out;
  --transition-slow: 500ms ease-out;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--midnight);
  color: var(--ghost-white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

::selection {
  background: var(--spectral-blue);
  color: var(--midnight);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 8vw, 5rem); }
h2 { font-size: clamp(1.8rem, 5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.1rem; }

.display-title {
  font-family: var(--font-display);
  color: var(--spectral-blue);
  text-shadow: 0 0 40px rgba(127, 219, 218, 0.4);
  letter-spacing: 0.02em;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

a {
  color: var(--spectral-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--specter); }

p { max-width: 65ch; }
p + p { margin-top: 1em; }

/* --- LAYOUT UTILITIES --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
}

.section {
  padding: 80px 0;
}

.section-lg {
  padding: 120px 0;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; align-items: center; }
.flex-gap-sm { gap: 8px; }
.flex-gap-md { gap: 16px; }
.flex-gap-lg { gap: 24px; }

.text-center { text-align: center; }
.text-mist { color: var(--mist); }
.text-green { color: var(--ecto-green); }
.text-red { color: var(--grave-red); }
.text-gold { color: var(--gold-sheet); }
.text-specter { color: var(--specter); }

/* --- FLOATING GHOST BACKGROUND --- */
.ghost-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ghost-bg .ghost-shape {
  position: absolute;
  opacity: 0.04;
  animation: floatGhost 20s ease-in-out infinite;
}

.ghost-bg .ghost-shape:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.ghost-bg .ghost-shape:nth-child(2) { top: 30%; right: 10%; animation-delay: -5s; animation-duration: 25s; }
.ghost-bg .ghost-shape:nth-child(3) { top: 60%; left: 15%; animation-delay: -10s; animation-duration: 18s; }
.ghost-bg .ghost-shape:nth-child(4) { top: 75%; right: 20%; animation-delay: -7s; animation-duration: 22s; }
.ghost-bg .ghost-shape:nth-child(5) { top: 45%; left: 60%; animation-delay: -3s; animation-duration: 28s; }

@keyframes floatGhost {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-30px) rotate(3deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
  75% { transform: translateY(-40px) rotate(2deg); }
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(13, 13, 26, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(127, 219, 218, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--spectral-blue);
  text-shadow: 0 0 20px rgba(127, 219, 218, 0.5);
}

.nav-logo svg { width: 36px; height: 36px; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--ghost-white);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--spectral-blue);
  transform: scaleX(0);
  transition: transform var(--transition-med);
  box-shadow: 0 0 8px var(--spectral-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a:hover { color: var(--ghost-white); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ghost-white);
  transition: var(--transition-med);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--midnight);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 999;
  }

  .nav-links.open { display: flex; }

  .nav-links a { font-size: 1.5rem; }

  .nav-hamburger { display: flex; z-index: 1001; }

  .nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(127, 219, 218, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(155, 127, 230, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(127, 219, 218, 0.04) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text { max-width: 600px; }

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--spectral-blue);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--spectral-blue);
  text-shadow: 0 0 60px rgba(127, 219, 218, 0.5);
  line-height: 1;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--mist);
  margin-bottom: 40px;
  max-width: 500px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

/* TAGLINE CAROUSEL */
.tagline-carousel {
  position: relative;
  min-height: 60px;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.tagline-slide {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ghost-white);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  pointer-events: none;
  line-height: 1.4;
  max-width: 560px;
}

.tagline-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

/* LEAD TAGLINE — THE HEADLINE TAGLINE */
.tagline-slide.lead-tagline {
  font-size: 1.4rem;
  color: var(--spectral-blue);
  text-shadow: 0 0 30px rgba(127, 219, 218, 0.3);
  font-weight: 700;
}

.tagline-slide.lead-tagline::before {
  content: '💡 ';
  font-style: normal;
}

.tagline-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  min-height: 12px;
}

.tagline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phantom);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}

.tagline-dot.active {
  background: var(--spectral-blue);
  box-shadow: 0 0 8px var(--spectral-blue);
  transform: scale(1.2);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.hero-mascot {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

/* BOOILDING mascot */
.booilding {
  width: 320px;
  height: 380px;
  position: relative;
  animation: booildingFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(127, 219, 218, 0.3));
}

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

.booilding-body {
  fill: rgba(232, 244, 248, 0.9);
  animation: ghostPulse 3s ease-in-out infinite;
}

@keyframes ghostPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

.booilding-eye {
  fill: var(--midnight);
  animation: eyeBlink 4s ease-in-out infinite;
}

@keyframes eyeBlink {
  0%, 45%, 55%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.1); }
}

.booilding-mouth {
  fill: var(--midnight);
  opacity: 0.6;
}

.booilding-glow {
  fill: var(--spectral-blue);
  opacity: 0.15;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.25; }
}

/* Ghost speech bubble from BOOILDING */
.speech-bubble {
  position: absolute;
  top: -20px;
  right: -120px;
  background: var(--twilight);
  border: 1px solid var(--spectral-blue);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--spectral-blue);
  max-width: 200px;
  box-shadow: var(--shadow-ghost);
  animation: bubbleFloat 3s ease-in-out infinite;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--spectral-blue);
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* Hero Stats Bar */
.hero-stats {
  position: relative;
  z-index: 2;
  background: rgba(26, 26, 46, 0.9);
  border-top: 1px solid rgba(127, 219, 218, 0.15);
  border-bottom: 1px solid rgba(127, 219, 218, 0.15);
  padding: 24px 0;
  margin-top: 60px;
}

.stats-inner {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--spectral-blue);
  text-shadow: 0 0 20px rgba(127, 219, 218, 0.4);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-med);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--spectral-blue);
  color: var(--midnight);
}

.btn-primary:hover {
  background: var(--specter);
  color: var(--ghost-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155, 127, 230, 0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--spectral-blue);
  border-color: var(--spectral-blue);
}

.btn-secondary:hover {
  background: rgba(127, 219, 218, 0.1);
  color: var(--ghost-white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(127, 219, 218, 0.1);
  color: var(--spectral-blue);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(127, 219, 218, 0.2);
  color: var(--ghost-white);
}

/* Ghost hover sprite */
.btn:hover .btn-ghost-sprite {
  opacity: 1;
  transform: translateX(5px);
}

.btn-ghost-sprite {
  position: absolute;
  right: -30px;
  opacity: 0;
  transition: all var(--transition-med);
  pointer-events: none;
}

/* --- CARDS --- */
.card {
  background: var(--twilight);
  border: 1px solid var(--phantom);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--spectral-blue), var(--specter));
  opacity: 0;
  transition: opacity var(--transition-med);
}

.card:hover {
  border-color: var(--spectral-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(127, 219, 218, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--spectral-blue);
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: 12px; }

.card p {
  color: var(--mist);
  font-size: 0.95rem;
  max-width: none;
}

/* Space Card */
.space-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.space-card-img {
  height: 160px;
  background: var(--phantom);
  position: relative;
  overflow: hidden;
}

.space-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.space-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-free { background: var(--ecto-green); color: var(--midnight); }
.badge-after-hours { background: var(--specter); color: var(--ghost-white); }
.badge-vacant { background: var(--grave-red); color: var(--ghost-white); }
.badge-community { background: var(--gold-sheet); color: var(--midnight); }

.space-card-body { padding: 20px; }

.space-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.space-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--mist);
}

.space-card-hours {
  background: rgba(127, 219, 218, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--spectral-blue);
  margin-bottom: 16px;
}

.space-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- BADGES / TAGS --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-spectral { background: rgba(127, 219, 218, 0.15); color: var(--spectral-blue); }
.badge-specter { background: rgba(155, 127, 230, 0.15); color: var(--specter); }
.badge-ecto { background: rgba(74, 222, 128, 0.15); color: var(--ecto-green); }
.badge-grave { background: rgba(248, 113, 113, 0.15); color: var(--grave-red); }

/* --- FORMS --- */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--ghost-white);
}

.form-label span {
  color: var(--mist);
  font-weight: 400;
  font-size: 0.85rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--twilight);
  border: 1px solid var(--phantom);
  border-radius: var(--radius-md);
  color: var(--ghost-white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--spectral-blue);
  box-shadow: 0 0 0 3px rgba(127, 219, 218, 0.15);
}

.form-input::placeholder { color: var(--mist); font-style: italic; }

.form-textarea { min-height: 140px; resize: vertical; }

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A0AEC0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-error {
  color: var(--grave-red);
  font-size: 0.85rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-hint {
  color: var(--mist);
  font-size: 0.8rem;
  margin-top: 6px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--spectral-blue);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Multi-step form */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--phantom);
  transition: all var(--transition-med);
}

.step-dot.active {
  background: var(--spectral-blue);
  box-shadow: 0 0 12px var(--spectral-blue);
}

.step-dot.completed { background: var(--ecto-green); }

.form-step {
  display: none;
}

.form-step.active { display: block; animation: fadeInUp 0.4s ease-out; }

/* --- MAP --- */
.map-container {
  position: relative;
  height: calc(100vh - 80px);
  min-height: 500px;
  background: var(--twilight);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

#ghost-map {
  width: 100%;
  height: 100%;
}

.map-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  background: rgba(13, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--phantom);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 280px;
  max-height: calc(100% - 100px);
  overflow-y: auto;
}

.map-controls h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--spectral-blue);
}

.layer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--phantom);
  font-size: 0.9rem;
}

.layer-toggle:last-of-type { border-bottom: none; }

.layer-toggle input[type="checkbox"] {
  accent-color: var(--spectral-blue);
  width: 18px;
  height: 18px;
}

.layer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-free { background: var(--ecto-green); }
.dot-after-hours { background: var(--specter); }
.dot-vacant { background: var(--grave-red); }
.dot-community { background: var(--gold-sheet); }
.dot-library { background: var(--spectral-blue); }

/* Time slider */
.time-slider-container {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(13, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--phantom);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  width: min(500px, calc(100% - 48px));
}

.time-slider-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--spectral-blue);
  margin-bottom: 12px;
}

.time-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--phantom);
  border-radius: 3px;
  cursor: pointer;
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--spectral-blue);
  box-shadow: 0 0 12px var(--spectral-blue);
  cursor: pointer;
}

.time-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--spectral-blue);
  box-shadow: 0 0 12px var(--spectral-blue);
  border: none;
  cursor: pointer;
}

/* Map popup */
.maplibregl-popup {
  z-index: 20;
}

.maplibregl-popup-content {
  background: var(--twilight) !important;
  border: 1px solid var(--spectral-blue) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0 !important;
  box-shadow: var(--shadow-lift) !important;
  color: var(--ghost-white) !important;
  min-width: 260px;
}

.maplibregl-popup-close-button {
  color: var(--mist) !important;
  font-size: 20px !important;
  padding: 8px !important;
}

.maplibregl-popup-close-button:hover {
  color: var(--ghost-white) !important;
  background: transparent !important;
}

.map-popup {
  padding: 20px;
}

.map-popup-badge {
  display: inline-block;
  margin-bottom: 10px;
}

.map-popup h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.map-popup p {
  font-size: 0.85rem;
  color: var(--mist);
  margin-bottom: 8px;
  max-width: none;
}

.map-popup-hours {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(127, 219, 218, 0.1);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--spectral-blue);
  margin-bottom: 12px;
}

/* MapLibre overrides */
.maplibregl-ctrl-logo,
.maplibregl-ctrl-attrib {
  opacity: 0.5 !important;
}

/* --- SECTION DIVIDERS --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phantom), transparent);
  margin: 60px 0;
}

/* --- MANIFESTO PAGE --- */
.manifesto-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
}

.manifesto-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--spectral-blue), transparent);
}

.manifesto-content {
  max-width: 720px;
  margin: 0 auto;
}

.manifesto-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--phantom);
}

.manifesto-section:last-child { border-bottom: none; }

.manifesto-section h2 {
  font-family: var(--font-serif);
  color: var(--spectral-blue);
  margin-bottom: 24px;
  font-size: 1.8rem;
}

.manifesto-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ghost-white);
  margin-bottom: 20px;
}

.manifesto-pullquote {
  border-left: 3px solid var(--spectral-blue);
  padding: 20px 30px;
  margin: 40px 0;
  background: rgba(127, 219, 218, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.manifesto-pullquote p {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--spectral-blue);
  margin: 0;
}

.ghost-list {
  list-style: none;
  margin: 24px 0;
}

.ghost-list li {
  padding: 12px 0;
  padding-left: 32px;
  position: relative;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(45, 45, 68, 0.5);
}

.ghost-list li:last-child { border-bottom: none; }

.ghost-list li::before {
  content: '👻';
  position: absolute;
  left: 0;
  top: 14px;
}

/* --- ZONING HORROR STORIES --- */
.zoning-card {
  border-left: 3px solid var(--grave-red);
}

.zoning-card h3 { color: var(--grave-red); }

.zoning-card blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--spectral-blue);
  border-left: 2px solid var(--specter);
  padding-left: 16px;
  margin: 16px 0;
}

/* --- MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-med);
}

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

.modal {
  background: var(--twilight);
  border: 1px solid var(--spectral-blue);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-med);
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--phantom);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { margin: 0; }

.modal-close {
  background: none;
  border: none;
  color: var(--mist);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover { color: var(--ghost-white); }

.modal-body { padding: 28px; }

/* Toast / Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--twilight);
  border: 1px solid var(--ecto-green);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3000;
  box-shadow: var(--shadow-lift);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-med);
}

.toast.show { transform: translateY(0); opacity: 1; }

.toast-icon { color: var(--ecto-green); font-size: 1.2rem; }

/* --- FOOTER --- */
.footer {
  background: var(--twilight);
  border-top: 1px solid var(--phantom);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--mist);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 300px;
}

.footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--spectral-blue);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--mist);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid var(--phantom);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--mist);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a { color: var(--mist); font-size: 0.85rem; }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand { grid-column: 1 / -1; }
}

/* --- 404 PAGE --- */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.page-404 .ghost-404 {
  font-size: 10rem;
  font-family: var(--font-display);
  color: var(--spectral-blue);
  text-shadow: 0 0 80px rgba(127, 219, 218, 0.4);
  line-height: 1;
  margin-bottom: 24px;
  animation: floatGhost 3s ease-in-out infinite;
}

.page-404 h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 16px;
}

.page-404 p {
  color: var(--mist);
  margin-bottom: 32px;
  max-width: 400px;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.shake { animation: shake 0.4s ease-out; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}

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

/* Ghost cursor on interactive elements */
@media (hover: hover) {
  a:hover, button:hover, .card:hover { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='20' font-size='18'%3E👻%3C/text%3E%3C/svg%3E"), auto; }
}

/* --- LOADING STATES --- */
.skeleton {
  background: linear-gradient(90deg, var(--phantom) 25%, var(--twilight) 50%, var(--phantom) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-ghost {
  display: inline-block;
  animation: floatGhost 1.5s ease-in-out infinite;
  font-size: 2rem;
}

/* Ghost loading text */
.loading-text::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* --- WALL OF TAGLINES --- */
.wall-of-taglines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wall-tagline {
  background: var(--midnight);
  border: 1px solid var(--phantom);
  border-left: 3px solid var(--spectral-blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all var(--transition-med);
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.wall-tagline:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--spectral-blue);
}

.wall-tagline:nth-child(1) { animation-delay: 0.05s; }
.wall-tagline:nth-child(2) { animation-delay: 0.1s; }
.wall-tagline:nth-child(3) { animation-delay: 0.15s; }
.wall-tagline:nth-child(4) { animation-delay: 0.2s; }
.wall-tagline:nth-child(5) { animation-delay: 0.25s; }
.wall-tagline:nth-child(6) { animation-delay: 0.3s; }
.wall-tagline:nth-child(7) { animation-delay: 0.35s; }
.wall-tagline:nth-child(8) { animation-delay: 0.4s; }
.wall-tagline:nth-child(9) { animation-delay: 0.45s; }
  .wall-tagline:nth-child(10) { animation-delay: 0.5s; opacity: 1; animation-name: fadeInUp; }

/* THE LEAD TAGLINE IN THE WALL — spotlight it */
.wall-tagline:nth-child(9) {
  grid-column: span 3 !important;
  background: linear-gradient(135deg, var(--midnight), rgba(127,219,218,0.08));
  border-left-width: 5px;
  text-align: center;
  padding: 32px 40px;
  box-shadow: 0 0 40px rgba(127,219,218,0.1);
}

.wall-tagline:nth-child(9) p {
  font-size: 1.5rem;
  color: var(--spectral-blue);
  text-shadow: 0 0 20px rgba(127,219,218,0.3);
  max-width: 700px;
  margin: 0 auto 12px;
}

.wall-tagline:nth-child(9) span {
  font-size: 0.85rem;
  color: var(--gold-sheet);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

@media (max-width: 900px) {
  .wall-tagline:nth-child(9) {
    grid-column: span 2 !important;
  }
  .wall-tagline:nth-child(9) p { font-size: 1.2rem; }
}

@media (max-width: 600px) {
  .wall-tagline:nth-child(9) {
    grid-column: span 1 !important;
    padding: 24px;
  }
  .wall-tagline:nth-child(9) p { font-size: 1.05rem; }
}

.wall-tagline p {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--ghost-white);
  line-height: 1.4;
  margin-bottom: 12px;
  max-width: none;
}

.wall-tagline span {
  font-size: 0.75rem;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.wall-tagline-wide {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .wall-of-taglines {
    grid-template-columns: 1fr 1fr;
  }
  .wall-tagline-wide {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .wall-of-taglines {
    grid-template-columns: 1fr;
  }
  .wall-tagline-wide {
    grid-column: span 1;
  }
}
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text { max-width: 100%; }
  .hero-subtitle { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }

  .hero-mascot { order: -1; }
  .booilding { width: 240px; height: 280px; }

  .speech-bubble { display: none; }

  .stats-inner { gap: 30px; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-lg { padding: 80px 0; }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }

  .hero-stats { margin-top: 40px; }

  .map-controls {
    width: calc(100% - 32px);
    max-height: 40%;
  }

  .time-slider-container {
    bottom: 16px;
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}

/* --- MIDNIGHT MODE (auto at midnight) --- */
/* Detected via JS, adds .midnight class to body */
body.midnight {
  --ghost-white: #E8F4F8;
  --spectral-blue: #9B7FE6;
}

body.midnight .hero-bg {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(155, 127, 230, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(127, 219, 218, 0.08) 0%, transparent 50%);
}

/* --- PRINT --- */
/* FOOTER TAGLINE STRIP */
.footer-tagline-strip {
  text-align: center;
  padding: 32px 24px 0;
  border-top: 1px solid rgba(127,219,218,0.1);
  margin-top: 32px;
}

.footer-tagline-strip p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--spectral-blue);
  margin: 0 auto 8px;
  max-width: 700px;
  text-shadow: 0 0 20px rgba(127,219,218,0.2);
}

.footer-tagline-strip p:last-child {
  font-size: 0.85rem;
  color: var(--mist);
  font-style: italic;
  text-shadow: none;
}

.footer-tagline-strip strong {
  color: var(--ghost-white);
}

@media print {
  .nav, .hero-mascot, .ghost-bg, .btn { display: none; }
  body { background: white; color: black; }
}
