/* ==========================================================================
   GRESK // SCROLL-DRIVEN 3D CINEMATIC EXPERIENCE
   Design System & Premium Aesthetics (Awwwards Grade)
   ========================================================================== */

:root {
  --bg-primary: #050608;
  --bg-secondary: #0c0f17;
  --surface-glass: rgba(10, 14, 23, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.09);
  --surface-glass-hover: rgba(255, 255, 255, 0.14);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #9b51e0;
  --accent-neon: #00f5a0;
  --accent-whatsapp: #25d366;
  --accent-instagram: #e1306c;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.45);
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  overscroll-behavior: none;
}

::selection {
  background: var(--accent-cyan);
  color: #000;
}

/* Ambient Grain & Gradient Background */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: 
    radial-gradient(circle at 12% 18%, rgba(79, 172, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(155, 81, 224, 0.08) 0%, transparent 45%);
}

/* ==========================================================================
   CANVAS STAGE (FIXED FULLSCREEN)
   ========================================================================== */
#canvas-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2;
  overflow: hidden;
  background-color: #000;
}

#scroll-canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: translateZ(0);
  will-change: transform;
}

.canvas-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 38%, rgba(5, 6, 8, 0.55) 80%, rgba(5, 6, 8, 0.95) 100%);
  mix-blend-mode: multiply;
}

/* ==========================================================================
   VIRTUAL SCROLL TRACK (Calibrated: 5% faster frame transition)
   ========================================================================== */
#virtual-scroll-track {
  position: relative;
  width: 100%;
  height: 714vh;
  z-index: 3;
  pointer-events: none;
}

/* ==========================================================================
   NAVIGATION HUD (HEADER, MENU & SOCIAL BUTTONS)
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.1rem 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.85) 0%, rgba(5, 6, 8, 0.4) 60%, transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  pointer-events: auto;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.45));
  transition: transform 0.3s var(--ease-cinematic), filter 0.3s;
}

.brand-container:hover .brand-logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 18px rgba(0, 242, 254, 0.75));
}

.header-top-row {
  display: contents;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.top-hint {
  display: none;
}

/* Top Center Navigation Menu */
.main-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.nav-item-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.95rem;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.25s, background-color 0.25s, transform 0.2s, box-shadow 0.25s;
  white-space: nowrap;
}

.nav-item-btn:hover {
  color: #fff;
  background: var(--surface-glass-hover);
  transform: translateY(-1px);
}

.nav-item-btn.active {
  color: #000;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  box-shadow: 0 2px 14px rgba(0, 242, 254, 0.45);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  pointer-events: auto;
  flex-shrink: 0;
}

.header-status-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.9rem;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.frame-metric {
  color: var(--text-primary);
  font-weight: 600;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s, border-color 0.25s, box-shadow 0.25s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.whatsapp-btn:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: var(--accent-whatsapp);
  color: var(--accent-whatsapp);
  box-shadow: 0 0 16px rgba(37, 211, 102, 0.4);
}

.instagram-btn:hover {
  background: rgba(225, 48, 108, 0.2);
  border-color: var(--accent-instagram);
  color: var(--accent-instagram);
  box-shadow: 0 0 16px rgba(225, 48, 108, 0.4);
}

/* ==========================================================================
   STORY OVERLAYS & CHAPTER CARDS
   ========================================================================== */
#story-overlays {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.story-card {
  position: absolute;
  max-width: 640px;
  width: 100%;
  padding: clamp(1.8rem, 3.2vw, 2.6rem);
  background: var(--surface-glass);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--surface-glass-border);
  border-radius: 24px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 0 45px rgba(79, 172, 254, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  will-change: opacity, transform;
}

.story-card.active {
  pointer-events: auto;
}

/* Positioning Variants */
.story-card[data-align="left"] {
  left: clamp(2rem, 6vw, 6rem);
}

.story-card[data-align="right"] {
  right: clamp(2rem, 6vw, 6rem);
}

.story-card[data-align="center"] {
  margin: 0 auto;
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  padding: 0.35rem 0.85rem;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.28);
  border-radius: 100px;
  width: fit-content;
}

.chapter-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.6; }
}

.story-card h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff 40%, rgba(255, 255, 255, 0.65) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-subtitle {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.story-card p {
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Service Bullet List */
.service-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  color: var(--text-primary);
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: transform 0.25s, background-color 0.25s, border-color 0.25s;
}

.service-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 242, 254, 0.3);
}

.service-item-bullet {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  line-height: 1;
}

/* Quote Box for Portafolio & Contacto */
.quote-box {
  position: relative;
  padding: 1.2rem 1.4rem;
  background: rgba(0, 242, 254, 0.05);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 14px 14px 0;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.story-cta-group {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: none;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: transform 0.25s var(--ease-cinematic), box-shadow 0.25s;
}

.btn-whatsapp-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.55);
}

.btn-whatsapp-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--surface-glass-border);
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.25s, transform 0.25s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* ==========================================================================
   VERTICAL CHAPTER TIMELINE RAIL (RIGHT SIDE)
   ========================================================================== */
#timeline-rail {
  position: fixed;
  right: clamp(1.2rem, 3vw, 2.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  pointer-events: auto;
}

.rail-node {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
}

.rail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s var(--ease-cinematic), background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.rail-node:hover .rail-dot,
.rail-node.active .rail-dot {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: scale(1.5);
  box-shadow: 0 0 15px var(--accent-cyan);
}

.rail-tooltip {
  position: absolute;
  right: 28px;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.rail-node:hover .rail-tooltip,
.rail-node.active .rail-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   BOTTOM SCRUBBER & NAV HINTS
   ========================================================================== */
#scrubber-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem clamp(1.5rem, 4vw, 3rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.scrubber-track-wrap {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.scrubber-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  position: relative;
  overflow: visible;
  transition: height 0.2s;
}

.scrubber-track-wrap:hover .scrubber-track {
  height: 6px;
}

.scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
  will-change: width;
}

.scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.9);
  pointer-events: none;
  transition: transform 0.15s;
}

.scrubber-track-wrap:hover .scrubber-thumb {
  transform: translate(-50%, -50%) scale(1.35);
}

.bottom-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
}

.mobile-hint {
  display: none;
}

.scroll-hint-mouse {
  width: 14px;
  height: 22px;
  border: 1.5px solid var(--text-secondary);
  border-radius: 10px;
  position: relative;
}

.scroll-hint-wheel {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 5px;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: scroll-wheel 1.6s infinite ease-in-out;
}

@keyframes scroll-wheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 8px); opacity: 0; }
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: #050608;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
  transition: opacity 0.8s var(--ease-cinematic), visibility 0.8s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-glow-orb {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-blue);
  animation: spin-ring 1.8s linear infinite;
}

.loader-orb-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  filter: blur(4px);
  animation: pulse-core 2s infinite ease-in-out;
}

@keyframes spin-ring {
  100% { transform: rotate(360deg); }
}

@keyframes pulse-core {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}

.loader-text-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.loader-title {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.loader-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.loader-progress-track {
  width: min(320px, 80vw);
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.2s ease-out;
}

.loader-percent {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ==========================================================================
   MOBILE & RESPONSIVE (Optimized, 2-Row Top Menu, No Touch Scroll Lag)
   ========================================================================== */
.mobile-menu-btn {
  display: none !important;
}

.mobile-arrow-nav {
  display: none;
}

/* Glowing Hint Badges */
.nav-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.82rem;
  background: rgba(8, 14, 26, 0.88);
  border: 1px solid rgba(0, 242, 254, 0.55);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.03em;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
  animation: hint-breathe 2.2s infinite ease-in-out;
  transition: opacity 0.35s var(--ease-cinematic), transform 0.35s var(--ease-cinematic), visibility 0.35s;
  pointer-events: none;
}

.nav-hint-badge .hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.nav-hint-badge .hint-arrow-anim {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  display: inline-block;
  animation: hint-arrow-bounce 1.2s infinite ease-in-out;
}

@keyframes hint-breathe {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3), inset 0 0 8px rgba(0, 242, 254, 0.1);
    border-color: rgba(0, 242, 254, 0.45);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.8), inset 0 0 12px rgba(0, 242, 254, 0.25);
    border-color: #00f2fe;
  }
}

@keyframes hint-arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.nav-hint-badge.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0.9) !important;
  pointer-events: none !important;
}

/* Glowing Pulsing Aura for Arrow Navigation */
.mobile-nav-arrow-btn.glow-pulse {
  animation: arrow-glow 2s infinite ease-in-out;
  border-color: var(--accent-cyan);
}

@keyframes arrow-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4), 0 8px 24px rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 242, 254, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 22px rgba(0, 242, 254, 0.9), 0 0 35px rgba(79, 172, 254, 0.6), 0 8px 24px rgba(0, 0, 0, 0.6);
    border-color: #00f2fe;
    transform: scale(1.08);
  }
}

@media (max-width: 1024px) {
  /* Disable finger drag scroll on mobile to eliminate jank & heavy gesture friction */
  html, body {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
  }

  #canvas-stage, #story-overlays, #virtual-scroll-track {
    touch-action: none !important;
  }

  /* Header with 2-row menu (no hamburger collapse) */
  .main-header {
    padding: 0.5rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(180deg, rgba(5, 6, 8, 0.96) 0%, rgba(5, 6, 8, 0.85) 75%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .header-status-pill {
    display: none;
  }

  /* Uncollapsed 2-row Services Menu */
  .main-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.28rem !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .nav-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
    width: 100% !important;
  }

  .nav-item-btn {
    font-size: 0.70rem !important;
    font-weight: 500 !important;
    padding: 0.30rem 0.52rem !important;
    border-radius: 100px !important;
    background: rgba(10, 15, 26, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    white-space: nowrap !important;
  }

  .nav-item-btn.active {
    color: #000 !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)) !important;
    box-shadow: 0 2px 12px rgba(0, 242, 254, 0.5) !important;
  }

  /* Top Glowing Instruction Hint */
  .top-hint {
    display: inline-flex !important;
    margin-top: 0.1rem !important;
  }

  /* Hide timeline rail and bottom scrubber on mobile */
  #timeline-rail {
    display: none !important;
  }

  #scrubber-container {
    display: none !important;
  }

  /* Mobile Arrow Controls (Gh0ulos-Style with Glowing Pulse) */
  .mobile-arrow-nav {
    position: fixed;
    bottom: max(1.2rem, env(safe-area-inset-bottom, 1.2rem));
    left: 0;
    width: 100%;
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 40;
    pointer-events: none;
  }

  .mobile-nav-arrow-btn {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 14, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transition: all 0.25s var(--ease-cinematic);
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-arrow-btn svg {
    fill: currentColor;
    transition: transform 0.2s;
  }

  .mobile-nav-arrow-btn:active {
    transform: scale(0.92);
    background: rgba(0, 242, 254, 0.25);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.45);
  }

  .mobile-nav-arrow-btn.disabled {
    opacity: 0.25;
    pointer-events: none;
    box-shadow: none !important;
    animation: none !important;
  }

  .mobile-nav-center-wrap {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-section-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.85rem;
    background: rgba(10, 14, 23, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s;
  }

  .mobile-nav-center-wrap.has-hint .mobile-section-indicator {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-nav-center-wrap .bottom-hint {
    position: absolute;
    white-space: nowrap;
    z-index: 2;
  }

  .mobile-section-indicator #mobile-current-chapter {
    color: var(--accent-cyan);
    font-weight: 700;
  }

  .mobile-chapter-sep {
    color: rgba(255, 255, 255, 0.35);
  }

  #story-overlays {
    position: fixed;
    inset: 0;
    padding: 0;
    pointer-events: none;
    display: block;
  }
  
  /* Mobile Story Cards: Lightweight GPU profile (translucent dark glass without 60fps blur lag) */
  .story-card {
    position: absolute !important;
    left: 1rem !important;
    right: 1rem !important;
    bottom: 5.2rem !important;
    width: auto !important;
    max-width: calc(100vw - 2rem) !important;
    margin: 0 !important;
    padding: 1.1rem 1.25rem !important;
    border-radius: 18px !important;
    background: rgba(7, 12, 22, 0.82) !important;
    border: 1px solid rgba(0, 242, 254, 0.22) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 242, 254, 0.08) !important;
    gap: 0.55rem !important;
  }

  .story-card h2 {
    font-size: 1.25rem !important;
    line-height: 1.22 !important;
    margin-bottom: 0.1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  }

  .story-subtitle {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  }

  .story-card p {
    font-size: 0.84rem !important;
    line-height: 1.48 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  }

  .chapter-badge {
    font-size: 0.68rem !important;
    padding: 0.25rem 0.65rem !important;
  }

  .service-items-list {
    gap: 0.35rem !important;
    margin-top: 0.2rem !important;
  }

  .service-item {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.65rem !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px) !important;
  }

  .quote-box {
    font-size: 0.8rem !important;
    padding: 0.75rem 0.95rem !important;
    line-height: 1.45 !important;
  }

  .story-cta-group {
    flex-direction: column !important;
    gap: 0.45rem !important;
    margin-top: 0.35rem !important;
  }

  .btn-whatsapp-cta, .btn-secondary {
    padding: 0.72rem 1.1rem !important;
    font-size: 0.82rem !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .bottom-info-row {
    font-size: 0.7rem !important;
  }

  .desktop-hint {
    display: none !important;
  }

  .mobile-hint {
    display: inline !important;
  }

  .bottom-info-row .tech-info {
    display: none;
  }
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 6, 8, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.5rem;
  gap: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  transition: opacity 0.3s var(--ease-cinematic), transform 0.3s var(--ease-cinematic), visibility 0.3s;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.9rem;
}

.drawer-items {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.drawer-item-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.drawer-item-btn:hover, .drawer-item-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
