/**
 * Vaerfel Idle - Scroll Jack System
 * 
 * Fixed viewport with scene transitions triggered by scroll.
 * The parchment stays centered, content fades between scenes.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL JACK CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

html.scroll-jacked,
html.scroll-jacked body {
  overflow: hidden;
  height: 100vh;
  background: #1a1510 !important;
  /* Match scroll wrapper - hide any gaps */
}

.scroll-jack-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #1a1510;
  /* Warm dark void - softer than pure black */
}

/* Header nav visibility fix for scroll-jack pages */
.scroll-jack-wrapper~header .wp-block-navigation a,
.scroll-jack-wrapper~header .wp-block-navigation-item a,
html.scroll-jacked .site-header .wp-block-navigation a,
html.scroll-jacked .site-header .wp-block-navigation-item a {
  color: #d4a574 !important;
}

html.scroll-jacked .site-header .wp-block-navigation a:hover,
html.scroll-jacked .site-header .wp-block-navigation-item a:hover {
  color: #e8c89a !important;
}

/* Hidden scroll track - captures scroll events */
.scroll-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 400vh;
  /* 4 scenes worth of scroll */
  z-index: -1;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   THE ETERNAL SCROLL (PARCHMENT)
   ═══════════════════════════════════════════════════════════════════════════ */

.eternal-scroll {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Responsive sizing that maintains aspect ratio with viewport */
  width: min(90vw, calc(85vh * 1.6));
  /* Width limited by height aspect or viewport */
  max-width: 1600px;
  /* Height scales with width to maintain proper aspect ratio */
  aspect-ratio: 1.6 / 1;
  /* Match the scroll image aspect ratio */
  max-height: 88vh;
  background-image: url('../assets/HorizontalBackground2x.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 1;
  overflow: visible;
  /* Allow title to extend above scroll */
  animation: scrollFloat 5s ease-in-out infinite;
}

@keyframes scrollFloat {

  0%,
  100% {
    transform: translate(-50%, -50%);
  }

  50% {
    transform: translate(-50%, calc(-50% - 5px));
  }
}

/* Title on the scroll header */
.eternal-scroll-title {
  position: absolute;
  top: -4%;
  /* Above the scroll, resting on top */
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Alagard', serif;
  font-size: clamp(1.8rem, 6.6vw, 6rem);
  /* Scales with viewport, full size on large screens */
  font-weight: bold;
  color: #d4a574;
  /* Golden color for visibility */
  z-index: 10;
  /* Higher z-index to ensure visibility */
  text-align: center;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(210, 120, 20, 0.8),
    0 0 40px rgba(180, 90, 10, 0.6),
    0 0 60px rgba(139, 69, 19, 0.4),
    0 0 100px rgba(139, 69, 19, 0.3);
  letter-spacing: 2px;
  white-space: nowrap;
  animation: titleBreathe 4s ease-in-out infinite;
}

/* Title breathing glow animation - strong golden/orange */
@keyframes titleBreathe {

  0%,
  100% {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.9),
      0 0 20px rgba(210, 120, 20, 0.8),
      0 0 40px rgba(180, 90, 10, 0.6),
      0 0 60px rgba(139, 69, 19, 0.4),
      0 0 100px rgba(139, 69, 19, 0.3);
  }

  50% {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.9),
      0 0 30px rgba(210, 120, 20, 1),
      0 0 60px rgba(180, 90, 10, 0.8),
      0 0 100px rgba(139, 69, 19, 0.6),
      0 0 150px rgba(139, 69, 19, 0.4);
  }
}

/* Title hidden by default - JS will reveal it */
.eternal-scroll-title:not(.typing-started) {
  visibility: hidden;
}

.eternal-scroll-title.typing-started {
  visibility: visible;
}

/* Title letter-by-letter reveal with fade-in */
.eternal-scroll-title .title-char {
  opacity: 0;
  display: inline-block;
  transform: translateY(-10px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.eternal-scroll-title .title-char.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Content area within the scroll - where scenes appear */
.scroll-content-area {
  position: absolute;
  /* Position within the parchment safe area (excluding scroll handles) */
  top: 14%;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  /* Wider to accommodate roadmap columns + arrows */
  /* Use top/bottom instead of fixed height for better responsiveness */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCENES
   ═══════════════════════════════════════════════════════════════════════════ */

.scroll-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  padding: 1rem;
  box-sizing: border-box;
}

.scroll-scene.active {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCENE 0: TYPEWRITER INTRO
   ═══════════════════════════════════════════════════════════════════════════ */

.scene-intro {
  text-align: center;
}

.typewriter-text {
  font-family: 'Alagard', serif;
  /* Scale font relative to scroll/viewport size - allow big & bold on large screens */
  font-size: clamp(1rem, 3.5vw, 3.2rem);
  font-weight: bold;
  color: #1a1508;
  line-height: 1.85;
  max-width: 95%;
  margin: 0 auto;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.4);
  animation: textBreathe 4s ease-in-out infinite;
}

@keyframes textBreathe {

  0%,
  100% {
    text-shadow:
      0 3px 6px rgba(0, 0, 0, 0.5),
      0 0 15px rgba(255, 140, 0, 0.6),
      0 0 30px rgba(255, 100, 0, 0.4);
    opacity: 1;
  }

  50% {
    text-shadow:
      0 3px 6px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(255, 140, 0, 0.8),
      0 0 40px rgba(255, 100, 0, 0.6);
    opacity: 0.95;
  }
}

.typewriter-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 0.4em;
  min-height: 1.2em;
  /* Preserve space for empty lines */
}

/* Letter-by-letter typing animation */
.typewriter-line .char {
  opacity: 0;
  display: inline-block;
}

.typewriter-line .char.visible {
  opacity: 1;
}

/* Fallback for lines without JS char splitting */
.typewriter-line.revealed {
  opacity: 1;
}

/* Typing cursor */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: #8b4513;
  margin-left: 2px;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
  box-shadow: 0 0 8px rgba(139, 69, 19, 0.6);
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Emphasis styling - high contrast colors with glow */
.typewriter-text em {
  font-style: normal;
  color: #c45c10;
  /* Brighter orange-brown */
  text-shadow: 0 0 12px rgba(196, 92, 16, 0.6), 0 0 24px rgba(196, 92, 16, 0.3);
}

.typewriter-text strong {
  font-weight: bold;
  color: #e8b84a;
  /* Darker, richer gold for "story" */
  font-size: 1.08em;
  /* Slightly larger */
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(232, 184, 74, 0.9),
    0 0 40px rgba(232, 184, 74, 0.6),
    0 0 60px rgba(232, 184, 74, 0.4);
  animation: storyBreathe 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes storyBreathe {

  0%,
  100% {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.6),
      0 0 20px rgba(232, 184, 74, 0.9),
      0 0 40px rgba(232, 184, 74, 0.6),
      0 0 60px rgba(232, 184, 74, 0.4);
    transform: scale(1);
  }

  50% {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.6),
      0 0 30px rgba(232, 184, 74, 1),
      0 0 60px rgba(232, 184, 74, 0.8),
      0 0 90px rgba(232, 184, 74, 0.6);
    transform: scale(1.03);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCENE 1: HERO / CTA
   ═══════════════════════════════════════════════════════════════════════════ */

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

.scene-hero .hero-tagline {
  font-family: 'Alagard', serif;
  font-size: clamp(1rem, 3.6vw, 2.8rem);
  font-weight: bold;
  color: #1a1508;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.4);
  animation: textBreathe 4s ease-in-out infinite;
}

/* Hide tagline text until typewriter starts */
.scene-hero .hero-tagline:not(.typewriting) {
  visibility: hidden;
}

.scene-hero .hero-tagline.typewriting {
  visibility: visible;
}

.scene-hero .hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.scene-hero .btn-play,
.scene-hero .btn-signin {
  font-family: 'Alagard', serif;
  font-size: clamp(1rem, 3.6vw, 2.8rem);
  font-weight: 900;
  padding: 1.5rem 3.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease, opacity 0.5s ease;
  text-decoration: none;
  display: inline-block;
  /* Hidden until typewriter reveals them */
  opacity: 0;
  transform: translateY(10px);
}

.scene-hero .btn-play.typed-visible,
.scene-hero .btn-signin.typed-visible {
  opacity: 1;
  transform: translateY(0);
}

.scene-hero .btn-play {
  background: linear-gradient(135deg, #e8b84a 0%, #a67c32 100%);
  color: #1a1508;
  border: 2px solid #8b6f47;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.scene-hero .btn-play:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.5);
}

/* Logged-in state: HUGE glowing Play Now button */
.scene-hero .btn-play.emphasized {
  font-size: 2.1rem;
  padding: 1.8rem 4.2rem;
  box-shadow:
    0 0 20px rgba(212, 165, 116, 0.6),
    0 0 40px rgba(139, 69, 19, 0.4),
    0 8px 25px rgba(0, 0, 0, 0.3);
  animation: playButtonGlow 2s ease-in-out infinite;
}

@keyframes playButtonGlow {

  0%,
  100% {
    box-shadow:
      0 0 20px rgba(212, 165, 116, 0.6),
      0 0 40px rgba(139, 69, 19, 0.4),
      0 8px 25px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow:
      0 0 35px rgba(212, 165, 116, 0.9),
      0 0 70px rgba(139, 69, 19, 0.6),
      0 8px 25px rgba(0, 0, 0, 0.3);
  }
}

.scene-hero .btn-signin {
  background: transparent;
  color: #2c2416;
  border: 2px solid #8b6f47;
}

.scene-hero .btn-signin:hover {
  background: rgba(212, 165, 116, 0.2);
  color: #1a1508;
}

/* Hide sign-in button when logged in */
.scene-hero .btn-signin.hidden {
  display: none;
}

/* Hero tagline typewriter */
.scene-hero .hero-tagline .tw-char {
  opacity: 0;
  transition: opacity 0.1s ease;
}

.scene-hero .hero-tagline .tw-char.visible {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCENE 2: FEATURES - TRUE TYPEWRITER
   ═══════════════════════════════════════════════════════════════════════════ */

.scene-features {
  text-align: center;
}

.scene-features h2 {
  font-family: 'Alagard', serif;
  font-size: clamp(1.4rem, 5.2vw, 3.8rem);
  font-weight: bold;
  color: #1a1508;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.4);
}

/* Hide text before typewriting starts */
.scene-features h2:not(.typewriting):not(.typed) {
  opacity: 0;
}

/* When typewriting, hide chars until revealed */
.scene-features h2.typewriting .tw-char {
  opacity: 0;
  text-shadow: none;
  transition: opacity 0.15s ease, text-shadow 0.4s ease;
}

.scene-features h2.typewriting .tw-char.visible {
  opacity: 1;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.4);
}

/* Features Grid - All visible horizontally */
.features-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: 95%;
  margin: 0 auto;
  flex-wrap: nowrap;
}

/* Feature Columns */
.feature-column {
  flex: 1;
  min-width: 0;
  max-width: 280px;
  opacity: 0;
  text-align: left;
  animation: fadeInColumn 0.6s ease-out forwards;
}

.feature-column[data-column="0"] {
  animation-delay: 0s;
}

.feature-column[data-column="1"] {
  animation-delay: 0.1s;
}

.feature-column[data-column="2"] {
  animation-delay: 0.2s;
}

.feature-column[data-column="3"] {
  animation-delay: 0.3s;
}

@keyframes fadeInColumn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Category Headers */
.feature-category {
  font-family: 'Alagard', serif;
  font-size: clamp(0.9rem, 3.2vw, 2.07rem);
  font-weight: bold;
  color: #1a1508;
  margin: 0 0 1.3rem 0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 140, 0, 0.4),
    0 0 40px rgba(255, 100, 0, 0.2);
  animation: textBreathe 4s ease-in-out infinite;
  visibility: hidden;
  /* Hide completely until typewriting starts */
  word-break: keep-all;
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Show category when typewriting starts */
.feature-category.typewriting {
  visibility: visible;
}

/* Hide characters initially for typewriter effect */
.feature-category .tw-char {
  opacity: 0;
  display: inline;
  transition: opacity 0.15s ease, text-shadow 0.3s ease;
  white-space: pre;
}

.feature-category .tw-char.visible {
  opacity: 1;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 140, 0, 0.4),
    0 0 40px rgba(255, 100, 0, 0.2);
}

/* Feature Items */
.feature-items {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.feature-items li {
  font-family: 'Alagard', serif;
  font-size: clamp(0.7rem, 1.96vw, 1.15rem);
  color: #0d0a04;
  padding: 0.5rem 0;
  padding-left: 1.8rem;
  position: relative;
  line-height: 1.6;
  visibility: hidden;
  /* Hide completely until typewriting starts */
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  white-space: normal;
}

.feature-items li strong,
.feature-items li em {
  white-space: nowrap;
}

/* Show list item when typewriting starts */
.feature-items li.typewriting {
  visibility: visible;
}

/* Hide characters initially for typewriter effect */
.feature-items li .tw-char {
  opacity: 0;
  display: inline;
  transition: opacity 0.1s ease;
  white-space: pre;
}

.feature-items li .tw-char.visible {
  opacity: 1;
}

/* Bullet hidden by default */
.feature-items li::before {
  content: '⚔';
  position: absolute;
  left: 0;
  color: #1a1508;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show bullet when line is typing */
.feature-items li.typewriting::before {
  opacity: 1;
}

.feature-items strong {
  color: #000000;
  font-weight: bold;
  text-shadow: none;
}

.feature-items em {
  color: #8b4513;
  font-style: italic;
  font-weight: normal;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

/* Typewriter character animation */
.tw-char {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tw-char.visible {
  opacity: 1;
}

/* Rarity Colors */
.feature-items .rarity-common {
  color: #1a1508;
  font-weight: bold;
}

.feature-items .rarity-uncommon {
  color: #2e7d32;
  font-weight: bold;
}

.feature-items .rarity-rare {
  color: #1565c0;
  font-weight: bold;
}

.feature-items .rarity-epic {
  color: #7b1fa2;
  font-weight: bold;
}

.feature-items .rarity-legendary {
  color: #e65100;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

/* Slideshow dots removed - all features visible now */

/* ═══════════════════════════════════════════════════════════════════════════
   SCENE 3: ROADMAP / FUTURE
   ═══════════════════════════════════════════════════════════════════════════ */

.scene-roadmap {
  text-align: center;
}

.scene-roadmap h2 {
  font-family: 'Alagard', serif;
  font-size: clamp(1.4rem, 5.2vw, 3.8rem);
  font-weight: bold;
  color: #1a1508;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.4);
}

/* Hide title until typed */
.scene-roadmap h2:not(.typewriting):not(.typed) {
  opacity: 0;
}

.scene-roadmap h2.typewriting .tw-char {
  opacity: 0;
  text-shadow: none;
  transition: opacity 0.1s ease, text-shadow 0.3s ease;
}

.scene-roadmap h2.typewriting .tw-char.visible {
  opacity: 1;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 140, 0, 0.6),
    0 0 30px rgba(255, 100, 0, 0.4);
}

/* Roadmap Grid - Horizontal like Features */
.roadmap-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  max-width: 95%;
  margin: 0 auto;
  flex-wrap: nowrap;
}

/* Roadmap Arrows between columns */
.roadmap-arrow {
  font-family: 'Alagard', serif;
  font-size: 2rem;
  color: #1a1508;
  align-self: center;
  padding: 0 0.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(255, 140, 0, 0.4);
}

.roadmap-arrow.revealed {
  opacity: 1;
}

/* Roadmap Columns */
.roadmap-column {
  flex: 1;
  min-width: 0;
  max-width: 240px;
  text-align: left;
}

/* Phase Headers */
.phase-header {
  font-family: 'Alagard', serif;
  font-size: clamp(0.85rem, 2.8vw, 1.8rem);
  font-weight: bold;
  color: #1a1508;
  margin: 0 0 1rem 0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 140, 0, 0.4),
    0 0 40px rgba(255, 100, 0, 0.2);
  visibility: hidden;
  white-space: nowrap;
}

.phase-header.typewriting {
  visibility: visible;
}

.phase-header .tw-char {
  opacity: 0;
  display: inline;
  transition: opacity 0.15s ease;
}

.phase-header .tw-char.visible {
  opacity: 1;
}

/* Phase Items - Using ul/li like Features */
.phase-items {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.phase-items li {
  font-family: 'Alagard', serif;
  font-size: clamp(0.7rem, 1.9vw, 1.1rem);
  color: #1a1508;
  padding: 0.5rem 0;
  padding-left: 1.8rem;
  position: relative;
  line-height: 1.6;
  visibility: hidden;
  /* Prevent mid-word breaks */
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  white-space: normal;
}

.phase-items li.typewriting {
  visibility: visible;
}

.phase-items li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #1a1508;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.phase-items li.typewriting::before {
  opacity: 1;
}

.phase-items li .tw-char {
  opacity: 0;
  display: inline;
  transition: opacity 0.1s ease;
}

.phase-items li .tw-char.visible {
  opacity: 1;
}

/* Gated Column - Muted appearance */
.roadmap-column.gated .phase-header {
  color: #5a4a3a;
}

.roadmap-column.gated .phase-items li {
  color: #5a4a3a;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: -200% 0;
  }

  50% {
    background-position: 200% 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL PROGRESS INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.scroll-progress {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
}

.scroll-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.3);
  border: 2px solid #d4a574;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-progress-dot.active {
  background: #d4a574;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(212, 165, 116, 0.5);
}

.scroll-progress-dot:hover {
  background: rgba(212, 165, 116, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL HINT (bottom arrow)
   ═══════════════════════════════════════════════════════════════════════════ */

.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  animation: bounceHint 2s infinite;
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-hint-arrow {
  width: 24px;
  height: 24px;
  border-right: 3px solid #d4a574;
  border-bottom: 3px solid #d4a574;
  transform: rotate(45deg);
}

@keyframes bounceHint {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Make header invisible but don't hide it - buttons need to exist in DOM */
  .site-header {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  /* Hide everything in header except the buttons */
  .site-header>.wp-block-group:first-child,
  .site-header .wp-block-site-logo,
  .site-header .wp-block-site-title,
  .site-header .wp-block-navigation {
    display: none !important;
  }

  /* Position buttons at bottom of screen, nestled in scroll's bottom portion */
  .vfi-header-buttons {
    position: fixed !important;
    bottom: 2.5rem;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.75rem !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .vfi-header-buttons a,
  .vfi-header-buttons button {
    font-family: 'Alagard', 'MedievalSharp', Georgia, serif !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    white-space: nowrap;
    border-radius: 4px;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
  }

  /* Primary button (Play Now) - gold gradient like desktop */
  .vfi-header-buttons .btn-primary {
    background: linear-gradient(135deg, #e8b84a 0%, #a67c32 100%) !important;
    color: #1a1508 !important;
    border: 2px solid #8b6f47 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  /* Secondary buttons - parchment/gold text like desktop */
  .vfi-header-buttons .btn-secondary {
    background: rgba(26, 21, 16, 0.6) !important;
    color: #d4a574 !important;
    border: 1px solid rgba(139, 111, 71, 0.5) !important;
  }

  .scroll-jack-wrapper {
    top: 0;
    height: 100vh;
    /* Full height, no header */
  }

  .eternal-scroll {
    width: 100vw;
    max-width: none;
    aspect-ratio: auto;
    height: 92vh;
    background-image: url('../assets/VerticalBackground2x.png');
    /* Vertical for mobile */
  }

  .eternal-scroll-title {
    top: 8%;
    /* Position at top of vertical scroll */
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  .scroll-content-area {
    width: 75%;
    /* Wider to prevent text clipping */
    top: 22%;
    bottom: 10%;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .scroll-progress {
    right: 0.5rem;
  }

  .scroll-progress-dot {
    width: 8px;
    height: 8px;
  }

  .typewriter-text {
    font-size: clamp(1.1rem, 4.5vw, 1.8rem);
    /* Smaller to fit with nowrap */
    line-height: 1.7;
  }

  .typewriter-line {
    white-space: nowrap;
    /* Don't wrap, just scale down */
    text-align: center;
  }

  /* Intro/Hero scenes - start with padding from top */
  .scene-intro {
    align-items: center;
    justify-content: flex-start;
    padding-top: 20%;
  }

  .scene-hero {
    align-items: center;
    justify-content: flex-start;
    padding-top: 20%;
  }

  .scene-hero .hero-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  /* Features scene mobile - VERTICAL STACK */
  .scene-features {
    align-items: center;
    /* Center horizontally */
    justify-content: flex-start;
    padding: 0.5rem;
    text-align: center;
  }

  .scene-features h2 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin-bottom: 0.6rem;
    width: 100%;
    text-align: center;
  }

  .features-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 1rem;
    max-width: 100%;
    overflow-y: auto;
  }

  .feature-column {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }

  .feature-category {
    font-size: clamp(0.7rem, 3vw, 1rem);
    /* Compact category headers */
    margin-bottom: 0.25rem;
    text-align: center;
    width: 100%;
  }

  .feature-items {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .feature-items li {
    font-size: clamp(0.5rem, 1.8vw, 0.65rem);
    /* Very compact */
    padding: 0.1rem 0;
    padding-left: 0;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
  }

  .feature-items li::before {
    display: none;
    /* Hide bullets on mobile for cleaner look */
  }

  /* Roadmap scene mobile - VERTICAL STACK */
  .scene-roadmap {
    align-items: center;
    /* Center horizontally */
    justify-content: flex-start;
    padding: 0.5rem;
    text-align: center;
  }

  .scene-roadmap h2 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin-bottom: 0.6rem;
    width: 100%;
    text-align: center;
  }

  .roadmap-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 0.8rem;
    max-width: 100%;
    overflow-y: auto;
  }

  /* Hide horizontal arrows on mobile */
  .roadmap-arrow {
    display: none;
  }

  .roadmap-column {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }

  .phase-header {
    font-size: clamp(0.7rem, 3vw, 1rem);
    /* Compact phase headers */
    margin-bottom: 0.25rem;
    text-align: center;
    width: 100%;
  }

  .phase-items {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .phase-items li {
    font-size: clamp(0.5rem, 1.8vw, 0.65rem);
    /* Very compact */
    padding: 0.1rem 0;
    padding-left: 0;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
  }

  .phase-items li::before {
    display: none;
    /* Hide arrows on mobile for cleaner look */
  }
}

@media (max-width: 480px) {
  .eternal-scroll {
    width: 100vw;
    height: 92vh;
    /* Leave room for nav bar */
    max-height: 92vh;
  }

  .eternal-scroll-title {
    top: 6%;
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .scroll-content-area {
    width: 65%;
    top: 20%;
    bottom: 10%;
  }

  /* Intro scene - start higher with bigger font */
  .scene-intro {
    align-items: center;
    justify-content: flex-start;
    padding-top: 20%;
    /* Halfway down from top */
  }

  .typewriter-text {
    font-size: clamp(1.2rem, 5.5vw, 1.8rem);
    /* Bigger for intro */
    line-height: 1.7;
  }

  /* Hero scene - start higher with bigger font */
  .scene-hero {
    align-items: center;
    justify-content: flex-start;
    padding-top: 20%;
    /* Halfway down from top */
  }

  .scene-hero .hero-tagline {
    font-size: clamp(1rem, 4.5vw, 1.5rem);
    /* Bigger for hero */
  }

  .scene-hero .btn-play,
  .scene-hero .btn-signin {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
    padding: 0.8rem 1.5rem;
  }

  /* Features/Roadmap - keep centered (already perfect) */
  .scene-features,
  .scene-roadmap {
    justify-content: flex-start;
    padding-top: 0;
  }

  .scene-features h2,
  .scene-roadmap h2 {
    font-size: clamp(1.1rem, 5vw, 1.6rem);
    margin-bottom: 0.8rem;
  }

  .feature-category,
  .phase-header {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
  }

  .feature-items li,
  .phase-items li {
    font-size: clamp(0.75rem, 3vw, 1rem);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEIGHT-BASED RESPONSIVE (for vertically squeezed viewports)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Short viewport - reduce text size */
@media (max-height: 650px) and (min-width: 769px) {
  .typewriter-text {
    font-size: clamp(0.8rem, 2.2vw, 1.8rem);
    line-height: 1.6;
  }

  .typewriter-line {
    margin-bottom: 0.3em;
    min-height: 1.1em;
  }

  .scroll-content-area {
    top: 16%;
    bottom: 17%;
  }

  .scene-hero .hero-tagline {
    font-size: clamp(0.9rem, 2.5vw, 2rem);
    margin-bottom: 1.5rem;
  }

  .scene-features h2,
  .scene-roadmap h2 {
    font-size: clamp(1.1rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .feature-category,
  .phase-header {
    font-size: clamp(0.75rem, 2.5vw, 1.5rem);
    margin-bottom: 0.8rem;
  }

  .feature-items li,
  .phase-items li {
    font-size: clamp(0.6rem, 1.5vw, 0.95rem);
    padding: 0.35rem 0;
  }
}

/* Very short viewport - further reductions */
@media (max-height: 500px) and (min-width: 769px) {
  .typewriter-text {
    font-size: clamp(0.7rem, 1.8vw, 1.4rem);
    line-height: 1.5;
  }

  .typewriter-line {
    margin-bottom: 0.2em;
    min-height: 1em;
  }

  .scroll-content-area {
    top: 18%;
    bottom: 20%;
  }

  .eternal-scroll-title {
    font-size: clamp(1.2rem, 4.5vw, 3rem);
  }

  .scene-hero .btn-play,
  .scene-hero .btn-signin {
    font-size: clamp(0.8rem, 2.5vw, 1.6rem);
    padding: 1rem 2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGGED-IN STATE: Hide Sign In, Emphasize Play Now
   ═══════════════════════════════════════════════════════════════════════════ */

body.vfi-logged-in .scene-hero #scroll-signin-btn {
  display: none !important;
}

body.vfi-logged-in .scene-hero #scroll-play-btn {
  font-size: 2.1rem;
  padding: 1.8rem 4.2rem;
  box-shadow:
    0 0 20px rgba(212, 165, 116, 0.6),
    0 0 40px rgba(139, 69, 19, 0.4),
    0 8px 25px rgba(0, 0, 0, 0.3);
  animation: playButtonGlow 2s ease-in-out infinite;
}

@media (max-width: 480px) {
  body.vfi-logged-in .scene-hero #scroll-play-btn {
    font-size: 1.4rem;
    padding: 1.2rem 2.5rem;
  }
}