/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Scroll progress bar (sticky top) ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 9999;
  pointer-events: none;
}

#scroll-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, #9633ba, #9633ba);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.859);
  transition: width 0.05s linear;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0a0a0a;
  color: #f0f0f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}


/* ── Text reveal (word-by-word mask) ── */
.text-reveal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.word-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s ease;
}

.text-reveal.revealed .word-inner {
  transform: translateY(0);
  opacity: 1;
}

/* ── Hero section ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 70%);
  position: relative;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 5rem;
  color: #e0e0e0;
}

.hero-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #c8c8c8;
  font-weight: 300;
}

.hero-intro:last-of-type {
  margin-bottom: 0;
}

.scroll-cta {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 1rem;
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.scroll-arrow {
  font-size: 1.5rem;
  color: #888;
  animation: bounce 2s infinite;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ── Pinned page: any section that sticks during scroll ── */
.pin-spacer {
  position: relative;
}

.pin-spacer--hero {
  height: 250vh;
}

.pin-spacer--intro {
  height: 600vh;
}

.pin-spacer--transition {
  height: 300vh;
}

.pin-spacer--page {
  height: 300vh;
}

.pin-spacer--visits {
  height: 400vh;
}

.pin-spacer--conclusion {
  height: 450vh;
}


.pinned-page {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Intro step sections ── */
.intro-step {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}

/* Background image layer */
.intro-step::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: 0;
}

/* Dark overlay on top of the image */
.intro-step::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.85) 0%,
    rgba(10, 10, 10, 0.4) 40%,
    rgba(10, 10, 10, 0.4) 60%,
    rgba(10, 10, 10, 0.85) 100%
  );
  z-index: 1;
}

/* Text content — starts hidden, revealed by scroll progress */
.step-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 700px;
  padding: 2.5rem 3rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}

.step-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.step-content h2 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.step-content p {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.7;
  color: #ddd;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* ── Reveal images: appear sequentially while section is pinned ── */
.reveal-images {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.reveal-img {
  position: absolute;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: none; /* controlled by JS */
  border: 2px solid rgba(255, 255, 255, 0.08);
}

/* Positions: each image in a different corner/zone */
.reveal-img:nth-child(1) {
  top: 6vh;
  right: 4vw;
}

.reveal-img:nth-child(2) {
  bottom: 8vh;
  left: 4vw;
}

.reveal-img:nth-child(3) {
  bottom: 12vh;
  right: 10vw;
}

/* Size variants — big contrast, smallest = 1/4 screen minimum */
.reveal-xl {
  width: 50vw;
  height: 60vh;
}

.reveal-md {
  width: 35vw;
  height: 40vh;
}

.reveal-sm {
  width: 25vw;
  height: 25vh;
}

/* ── Scroll progress bar (subtle indicator) ── */
.pin-progress {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 4;
  overflow: hidden;
}

.pin-progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.5);
}

/* ── Last step special styling ── */
.last-step {
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 70%);
}

.last-step h2 {
  font-size: 2.8rem;
  font-weight: 400;
}

/* ── Opening question: extra-large headline on the radial dark background ── */
.intro-question .step-content {
  background: transparent;
  padding: 2rem 2.5rem;
  max-width: 1100px;
}

.intro-question h2 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #f0f0f0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
}

@media (max-width: 720px) {
  .intro-question h2 {
    font-size: clamp(2rem, 9vw, 3rem);
    letter-spacing: 0.02em;
  }
}

/* ── Map scrollytelling ── */
#map-story {
  position: relative;
}

#map {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  background: #000;
  overflow: hidden;
}

#map-chapters {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.map-chapter {
  min-height: 500vh;
}

/* Chapter card — floats like the Street View panel (glassmorphism) */
.chapter-card {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  max-width: 380px;
  pointer-events: auto;
  background: rgba(5, 5, 5, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2rem 2rem 1.8rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  z-index: 5;
  /* Default side: LEFT (matches original nth-child(odd) placement) */
  left: 3rem;
  right: auto;
  /* GSAP-controlled — hidden by default, no CSS transition */
  opacity: 0;
  visibility: hidden;
}

/* Even chapters: card on the RIGHT (opposite side from Street View) */
.map-chapter:nth-child(even) .chapter-card {
  left: auto;
  right: 3rem;
}

/* Intro + Outro — scroll with page (not fixed), like the original behavior */
#chapter-intro,
#chapter-outro {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
}

#chapter-intro .chapter-card,
#chapter-outro .chapter-card {
  position: static;
  top: auto;
  transform: none;
  left: auto;
  right: auto;
  margin: 0;
  background: rgba(5, 5, 5, 0.88);
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.chapter-index {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.8rem;
}

.chapter-card h2 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #e0e0e0;
  margin-bottom: 0.8rem;
}

.chapter-card h3 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-bottom: 0.8rem;
}

.chapter-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: #aaa;
}

.map-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #e0e0e0;
  margin-bottom: 0.3rem;
}

/* ── Street View panel (glassmorphism) ── */
#streetview-panel {
  position: fixed;
  top: 50%;
  margin-top: -210px;
  width: 420px;
  height: 420px;
  z-index: 5;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  right: 3rem;
  left: auto;
  /* Fully hidden — GSAP controls visibility via wrapper */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#streetview-panel.sv-left {
  left: 3rem;
  right: auto;
}

/* Wrapper: animated by GSAP — never animate the iframe directly */
.streetview-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  /* Forced initial state — prevents white flash */
  opacity: 0;
  visibility: hidden;
  background-color: #000;
  pointer-events: none;
}

#streetview-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 6;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.7);
  color: #aaa;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
}

#streetview-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

#streetview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


/* ── Timeline map (MapLibre, inside visits section) ── */

#timeline-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  position: relative;
  width: 100vw;
  max-width: none;
  flex: 1 1 0;
  min-height: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: grab;
}

#timeline-container:active {
  cursor: grabbing;
}

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

/* Zoom in / out buttons */
#timeline-zoom-controls {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#timeline-zoom-controls button {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ddd;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

#timeline-zoom-controls button:hover {
  background: rgba(30, 30, 30, 0.85);
  transform: scale(1.05);
}

#timeline-zoom-controls button:active {
  transform: scale(0.95);
}

/* COVID-19 banner (shown only when slider year = 2020) */
#covid-banner {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 320px;
  background: rgba(120, 20, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 90, 90, 0.45);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ffe5e5;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.25);
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  animation: covid-pulse 2.4s ease-in-out infinite;
}

#covid-banner.hidden {
  opacity: 0;
  transform: translateX(-12px);
}

.covid-icon {
  font-size: 1.6rem;
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 80, 80, 0.6);
  flex-shrink: 0;
}

.covid-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.covid-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff8e8e;
}

.covid-sub {
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: #f5d5d5;
}

@keyframes covid-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.25); }
  50%      { box-shadow: 0 0 28px rgba(231, 76, 60, 0.55); }
}

/* Tooltip */
#timeline-tooltip {
  position: absolute;
  background: rgba(8, 8, 8, 0.92);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.8rem 1rem;
  pointer-events: none;
  z-index: 20;
  opacity: 1;
  backdrop-filter: blur(6px);
  transition: opacity 0.2s;
}

#timeline-tooltip.tl-tooltip-hidden {
  opacity: 0;
  pointer-events: none;
}

#timeline-tooltip .tt-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.3rem;
}

#timeline-tooltip .tt-visits {
  font-size: 0.85rem;
  color: #ccc;
}

/* Slider wrapper */
#slider-wrapper {
  position: absolute;
  bottom: 6.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 4rem);
  max-width: 640px;
  z-index: 10;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  text-align: center;
  box-sizing: border-box;
}

#slider-year-label {
  display: block;
  font-size: 1.6rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}

#year-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, #333, #555);
  outline: none;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #444;
}

#year-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c0392b;
  border: 3px solid #e74c3c;
  cursor: grab;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

#year-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #c0392b;
  border: 3px solid #e74c3c;
  cursor: grab;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

/* Play button + slider row */
#slider-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
}

#slider-row #year-slider {
  flex: 1;
}

#play-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #c0392b;
  border: 3px solid #e74c3c;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

#play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(231, 76, 60, 0.8);
}

#play-btn:active {
  transform: scale(0.96);
}

#play-btn .play-icon {
  font-size: 1rem;
  line-height: 1;
  margin-left: 3px;
}

#play-btn .pause-icon {
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: -2px;
  display: none;
}

#play-btn.playing .play-icon { display: none; }
#play-btn.playing .pause-icon { display: inline; }

#slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  padding-left: calc(38px + 0.9rem + 8px);
  padding-right: 8px;
}

#slider-ticks span {
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Site description panel (shown when a site is clicked / zoomed) ── */
#site-description-panel {
  --site-color: #888;
  position: absolute;
  top: 40%;
  right: 7vw;
  z-index: 12;
  width: clamp(280px, 28vw, 420px);
  max-height: 62vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.25rem 1.5rem 1.35rem;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--site-color);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  color: #d6d6d6;
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  opacity: 0;
  transform: translate(24px, -50%);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

#site-description-panel.visible {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

#site-description-panel h3 {
  margin: 0 0 0.7rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--site-color);
  line-height: 1.3;
}

#site-description-panel p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #c8c8c8;
  text-align: justify;
  hyphens: auto;
}

#site-description-panel::-webkit-scrollbar {
  width: 6px;
}

#site-description-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

#site-description-panel::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1100px) {
  #site-description-panel {
    width: clamp(240px, 32vw, 340px);
    right: 1.4vw;
    padding: 1rem 1.15rem 1.1rem;
    font-size: 0.82rem;
  }
  #site-description-panel h3 { font-size: 0.88rem; }
  #site-description-panel p { font-size: 0.8rem; line-height: 1.5; }
}

/* ── Visits section (timeline map + visits list, end of page) ── */
#visits-section {
  position: sticky;
  top: 0;
  background: #0d0d0d;
  height: 100vh;
  width: 100%;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.visits-title {
  position: absolute;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #e0e0e0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

.visits-subtitle {
  position: absolute;
  top: 3.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  margin: 0;
  font-size: 0.85rem;
  color: #aaa;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

#visits-list {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.4rem;
  width: max-content;
  max-width: calc(100% - 3rem);
  margin: 0;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  box-sizing: border-box;
}

.visit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.visit-name {
  font-size: 0.85rem;
  color: #aaa;
}

.visit-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ── Vote section ── */
#vote-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  padding: 4rem 2rem;
}

.vote-title {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #e0e0e0;
  margin-bottom: 0.6rem;
}

.vote-subtitle {
  font-size: 0.95rem;
  color: #a0a0a0;
  letter-spacing: 0.03em;
  margin-bottom: 1.2rem;
}

#vote-container {
  width: 80vw;
  max-width: none;
}

#vote-svg {
  width: 100%;
  display: block;
  overflow: visible;
}

#vote-svg .axis-line {
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: butt;
}

#vote-svg .tick-line {
  stroke: #555;
  stroke-width: 1;
}

#vote-svg .tick-label {
  fill: #888;
  font-size: 16px;
  text-anchor: middle;
}

#vote-svg .axis-label-left,
#vote-svg .axis-label-right {
  fill: #aaa;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#vote-svg .axis-label-left {
  text-anchor: start;
}

#vote-svg .axis-label-right {
  text-anchor: end;
}

#vote-svg .place-circle {
  cursor: grab;
  stroke-width: 2;
  transition: filter 0.2s;
}

#vote-svg .place-circle:hover {
  filter: brightness(1.3);
}

#vote-svg .place-circle.dragging {
  cursor: grabbing;
  filter: brightness(1.4) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

#vote-svg .place-label-fo {
  pointer-events: none;
  overflow: visible;
}

#vote-svg .place-label {
  color: #ccc;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
}

#vote-svg .place-score {
  fill: #fff;
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
  opacity: 0;
}

#vote-svg .place-score.visible {
  opacity: 1;
}

#submit-btn {
  margin-top: 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 2px solid #cfcfcf;
  padding: 0.9rem 2.8rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s;
}

#submit-btn:hover {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
  transform: translateY(-1px);
}

#submit-btn:disabled {
  background: rgba(46, 204, 113, 0.12);
  border-color: #2ecc71;
  color: #2ecc71;
  cursor: default;
  transform: none;
}

#submit-confirmation {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: #ccc;
  letter-spacing: 0.03em;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#submit-confirmation.hidden {
  opacity: 0;
}

/* ── Comparison section (sticky like other pages) ── */
#compare-spacer.hidden {
  display: none;
}

#compare-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #0d0d0d;
  padding: 1.25rem 2rem;
}

.compare-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #e0e0e0;
  margin-bottom: 0.3rem;
}

.compare-subtitle {
  font-size: 0.9rem;
  color: #a0a0a0;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

#compare-container {
  width: 80vw;
  max-width: 1400px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#compare-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

#compare-svg .axis-line {
  stroke: #cfcfcf;
  stroke-width: 2;
  stroke-linecap: butt;
}

#compare-svg .tick-line {
  stroke: #888;
  stroke-width: 1;
}

#compare-svg .tick-label {
  fill: #a0a0a0;
  font-size: 15px;
  text-anchor: middle;
}

#compare-svg .axis-label-left,
#compare-svg .axis-label-right {
  fill: #a0a0a0;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#compare-svg .axis-label-left { text-anchor: start; }
#compare-svg .axis-label-right { text-anchor: end; }

#compare-svg .comp-row-line {
  stroke: #1a1a1a;
  stroke-width: 1;
}

#compare-svg .comp-place-name {
  fill: #d0d0d0;
  font-size: 22px;
  font-weight: 500;
  text-anchor: end;
}

#compare-svg .comp-score-label {
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: #0d0d0d;
  stroke-width: 5px;
  stroke-linejoin: round;
}

#compare-svg .comp-user-score {
  fill: #ffffff;
}

#compare-svg .comp-public-score {
  fill: #ffffff;
}

#compare-svg .comp-connector {
  stroke: #555;
  stroke-width: 1;
  stroke-dasharray: 4,3;
}

/* Legend */
#compare-legend {
  display: flex;
  gap: 2rem;
  margin-top: 0.75rem;
}

.compare-source {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: #666;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 520px;
  line-height: 1.55;
}

.compare-source strong {
  color: #aaa;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #cfcfcf;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-user {
  background: #e0e0e0;
}

.legend-public {
  background: none;
  border: 2px dashed #fff;
}

/* ── Conclusion section (pinned full-page) ── */
#conclusion-section {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #141414 0%, #050505 75%);
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.conclusion-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* Each stage is hidden by default — revealed by scroll progress */
.conclusion-stage {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.conclusion-stage.visible {
  opacity: 1;
  transform: translateY(0);
}

.conclusion-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: #f0f0f0;
  margin: 0;
  text-shadow: 0 0 32px rgba(150, 51, 186, 0.28);
}

.conclusion-lead {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #a8a8a8;
  max-width: 720px;
  margin: 0;
}

.conclusion-quote {
  font-size: 1.7rem;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #ddd;
  margin: 1rem 0 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    letter-spacing: 0.1em;
  }

  .step-content h2 {
    font-size: 1.8rem;
  }

  .step-content p {
    font-size: 1rem;
  }

  .reveal-xl {
    width: 70vw;
    height: 45vh;
  }

  .reveal-md {
    width: 50vw;
    height: 30vh;
  }

  .reveal-sm {
    width: 40vw;
    height: 25vh;
  }

  #conclusion-section {
    padding: 4rem 1.2rem 3.5rem;
  }

  .conclusion-title {
    font-size: 1.8rem;
  }

  .conclusion-quote {
    font-size: 1.2rem;
  }
}
