/* ──────────────────────────────────────────────
   SETUP JOURNEY STYLE SHEET
   3D Perspective Winding Road Layout
   ────────────────────────────────────────────── */

:root {
  --bg: #fafafa;
  --bg-alt: #f0f0f0;
  --surface: #ffffff;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #666666;
  --primary: #101010;
  --road-color: #333333;
  --road-dash: #ffffff;

  --transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-alt: #121212;
  --surface: #161616;
  --border: #262626;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --primary: #ffffff;
  --road-color: #1a1a1a;
  --road-dash: #333333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ──────────── LAYOUT ──────────── */
.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ──────────── TOP BAR (GO BACK + THEME) ──────────── */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.back-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.theme-btn-header {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.theme-btn-header:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.theme-btn-header svg {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--ease-out);
}

.theme-btn-header:hover svg {
  transform: rotate(20deg);
}

.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* ──────────── HERO SECTION ──────────── */
.hero {
  padding: 90px 0 36px;
  text-align: left;
  position: relative;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 32px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: slideUp 0.6s var(--ease-out) forwards;
}

.hero .section-label {
  animation-delay: 0.05s;
}

.hero .hero-title {
  animation-delay: 0.15s;
}

.hero .hero-subtitle {
  animation-delay: 0.25s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ──────────── 3D TIMELINE SCENE ──────────── */
.timeline-3d-section {
  /* This creates the scrollable height. JS will set this dynamically based on road length. */
  height: 16000px;
  position: relative;
  margin-top: -800px;
  /* pull under hero */
}

#scene-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  perspective: 1000px;
  perspective-origin: 50% 45%;
  pointer-events: auto;
}

#camera {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

#world {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateX(55deg) translateY(0px) translateZ(-180px);
  will-change: transform;
}

/* The SVG curve that sits on the 3D floor — JS controls position */
#road-svg {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}

/* ──────────── 3D MARKERS ──────────── */
.marker-3d {
  position: absolute;
  width: 210px;
  transform-origin: center center;
  pointer-events: auto;
  will-change: opacity;
  transition: opacity 0.4s ease;
}

.card-inner {
  width: 100%;
  background: transparent;
}

.card-left {
  text-align: right;
}

.card-right {
  text-align: left;
}

.item-image-placeholder {
  width: 100%;
  height: 130px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.marker-3d:hover .item-image-placeholder {
  transform: scale(1.04) translateY(-4px);
}

.item-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.simple-date {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: block;
}

.item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
  max-width: 200px;
}

.card-left .item-desc {
  margin-left: auto;
}

/* ──────────── FOOTER ──────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  position: relative;
  z-index: 100;
  background: var(--bg);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ──────────── RESPONSIVE ──────────── */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.3rem;
  }

  .marker-3d {
    width: 200px;
  }

  .item-image-placeholder {
    height: 120px;
  }
}


#journey-end {
  pointer-events: none;
}

.journey-end-card {
  width: 800px;
  max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
}

.journey-end-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.journey-end-card h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.journey-end-card p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.journey-end-card span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ──────────── SETUP EVOLUTION GALLERY ──────────── */
.setup-gallery-section {
  position: relative;
  z-index: 100;
  background: var(--bg);
  padding: 80px 0 60px;
}

.gallery-header {
  text-align: left;
  margin-bottom: 40px;
}

.gallery-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 16px;
}

.gallery-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-tab:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.gallery-tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.gallery-content {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.gallery-pane {
  display: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.gallery-pane.active {
  display: block;
  opacity: 1;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px;
}

.coming-soon-placeholder {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .gallery-tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}