/* ===================================
   THE LIFE OF LARS — Presented by Mo
   CSS Styles
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: url('./assets/paw-cursor.svg') 14 16, auto;
}

:root {
  /* Scene palette */
  --morning-bg: #0a0e1a;
  --morning-accent: #f4a261;
  --gym-bg: #1a0a0a;
  --gym-accent: #e63946;
  --screen-bg: #0a0a1a;
  --screen-accent: #7b61ff;
  --kitchen-bg: #1a140a;
  --kitchen-accent: #e9a319;
  --travel-bg: #0a1a14;
  --travel-accent: #2ec4b6;
  --evening-bg: #0e0a1a;
  --evening-accent: #b8a9ff;

  /* Shared */
  --text-primary: #f0ece6;
  --text-secondary: #a8a4a0;
  --bubble-bg: rgba(255, 255, 255, 0.06);
  --bubble-border: rgba(255, 255, 255, 0.12);
  --bubble-alt-bg: rgba(255, 255, 255, 0.03);

  --font-main: 'Space Grotesk', sans-serif;
  --font-narration: 'Noto Sans', 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: auto; /* GSAP handles smoothness */
}

body {
  font-family: var(--font-main);
  background: var(--morning-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--morning-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-content {
  text-align: center;
}

.paw-prints {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.paw {
  font-size: 2rem;
  opacity: 0;
  animation: pawAppear 1.5s ease-in-out infinite;
}

.paw:nth-child(2) { animation-delay: 0.3s; }
.paw:nth-child(3) { animation-delay: 0.6s; }

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

.preloader-text {
  font-family: var(--font-narration);
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--morning-accent), var(--gym-accent), var(--screen-accent), var(--kitchen-accent), var(--travel-accent), var(--evening-accent));
  z-index: 1000;
  transition: width 0.1s ease;
}

/* --- Scene Navigation --- */
.scene-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.scene-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.scene-dot.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  transform: scale(1.3);
}

.scene-dot:hover {
  border-color: var(--text-primary);
}

/* --- Mo Narrator (Fixed) --- */
.mo-narrator {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
}

.mo-narrator.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease;
}

.mo-avatar {
  width: 56px;
  height: 56px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
}

.mo-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  position: absolute;
  top: 0;
  left: 0;
}

.mo-eyes-closed {
  opacity: 0;
}

.mo-label {
  font-family: var(--font-narration);
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* --- Mo Photo (Large, Outro) --- */
.mo-photo-large {
  width: 140px;
  height: 140px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
}

.mo-eyes-closed-large {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}


/* --- Paw Print Transitions --- */
.paw-transition {
  position: relative;
  height: 40vh;
  overflow: visible;
}

.paw-print {
  position: absolute;
  width: 48px;
  height: 48px;
  opacity: 0;
  filter: brightness(0.6);
}

/* Left-side transitions: arc out toward left edge and back */
.paw-transition-left .paw-print:nth-child(1) { left: 20%; }
.paw-transition-left .paw-print:nth-child(2) { left: 12%; }
.paw-transition-left .paw-print:nth-child(3) { left: 8%; }
.paw-transition-left .paw-print:nth-child(4) { left: 12%; }
.paw-transition-left .paw-print:nth-child(5) { left: 20%; }

/* Right-side transitions: arc out toward right edge and back */
.paw-transition-right .paw-print:nth-child(1) { left: 74%; }
.paw-transition-right .paw-print:nth-child(2) { left: 82%; }
.paw-transition-right .paw-print:nth-child(3) { left: 86%; }
.paw-transition-right .paw-print:nth-child(4) { left: 82%; }
.paw-transition-right .paw-print:nth-child(5) { left: 74%; }

/* Alternate paw rotation for natural walk (180deg = pointing down) */
.paw-print:nth-child(odd) {
  transform: rotate(160deg);
}

.paw-print:nth-child(even) {
  transform: rotate(200deg);
}

/* --- Scene Base --- */
.scene {
  position: relative;
  min-height: 300vh;
  overflow: hidden;
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.scene-bg-morning,
.scene-bg-gym,
.scene-bg-screen,
.scene-bg-kitchen,
.scene-bg-travel,
.scene-bg-evening {
  background: none;
}

.scene-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Scene Headers --- */
.scene-header {
  padding-top: 100vh;
  padding-bottom: 20vh;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
}

.scene-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.scene-icon {
  font-size: 2.5rem;
}

/* --- Title Card (Scene 1) --- */
.title-card {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.main-title {
  margin-bottom: 16px;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
}

.title-line-1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.title-line-2 {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--morning-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(244, 162, 97, 0.4)) drop-shadow(0 0 60px rgba(244, 162, 97, 0.2));
}

.subtitle {
  font-family: var(--font-narration);
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(20px);
}

.subtitle-name {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

.hero-mo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 20px auto 8px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-mo-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  position: absolute;
  top: 0;
  left: 0;
}

.scroll-hint {
  position: absolute;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.scroll-hint span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scroll-arrow {
  animation: bounceDown 2s ease-in-out infinite;
  color: var(--text-secondary);
}

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

/* --- Speech Bubbles --- */
.narration-block {
  padding: 15vh 0;
  opacity: 0;
  transform: translateY(60px);
}

.speech-bubble {
  border-left: 2px solid var(--morning-accent);
  padding: 8px 0 8px 28px;
  max-width: 750px;
  position: relative;
}

.speech-bubble-alt {
  border-left: none;
  border-right: 2px solid var(--morning-accent);
  padding: 8px 28px 8px 0;
  margin-left: auto;
  text-align: right;
}

/* Scene-specific accent borders */
.scene-gym .speech-bubble { border-left-color: var(--gym-accent); }
.scene-gym .speech-bubble-alt { border-right-color: var(--gym-accent); border-left: none; }
.scene-screen .speech-bubble { border-left-color: var(--screen-accent); }
.scene-screen .speech-bubble-alt { border-right-color: var(--screen-accent); border-left: none; }
.scene-kitchen .speech-bubble { border-left-color: var(--kitchen-accent); }
.scene-kitchen .speech-bubble-alt { border-right-color: var(--kitchen-accent); border-left: none; }
.scene-travel .speech-bubble { border-left-color: var(--travel-accent); }
.scene-travel .speech-bubble-alt { border-right-color: var(--travel-accent); border-left: none; }
.scene-evening .speech-bubble { border-left-color: var(--evening-accent); }
.scene-evening .speech-bubble-alt { border-right-color: var(--evening-accent); border-left: none; }

.speech-bubble p {
  font-family: var(--font-narration);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.speech-bubble strong {
  color: var(--text-primary);
  font-weight: 600;
}

.speech-bubble em {
  color: var(--morning-accent);
  font-style: italic;
}

/* Word-by-word reveal */
.speech-bubble .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  margin-right: 0.25em;
  transition: none; /* GSAP handles this */
}

.speech-bubble .word.visible {
  opacity: 1;
  transform: translateY(0);
}

.speech-bubble em {
  color: var(--morning-accent);
  font-style: italic;
}

/* Scene-specific accent colors for emphasis */
.scene-gym .speech-bubble em { color: var(--gym-accent); }
.scene-screen .speech-bubble em { color: var(--screen-accent); }
.scene-kitchen .speech-bubble em { color: var(--kitchen-accent); }
.scene-travel .speech-bubble em { color: var(--travel-accent); }
.scene-evening .speech-bubble em { color: var(--evening-accent); }

/* --- Scene 1: Morning Visuals --- */
.morning-visual {
  display: flex;
  justify-content: center;
  padding: 10vh 0;
  opacity: 0;
}

.alarm-clock {
  position: relative;
  display: flex;
  justify-content: center;
}

.alarm-clock-img {
  width: 220px;
  height: auto;
  display: block;
}

.alarm-clock.ringing .alarm-clock-img {
  animation: alarmShake 0.1s ease-in-out infinite alternate;
}

@keyframes alarmShake {
  from { transform: rotate(-3deg); }
  to { transform: rotate(3deg); }
}

.lars-intro {
  padding: 10vh 0 20vh;
  opacity: 0;
}

.lars-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 40px 36px;
  background: var(--bubble-bg);
  border: 1px solid var(--bubble-border);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  will-change: transform;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.lars-card:hover {
  border-color: var(--morning-accent);
  box-shadow: 0 8px 32px rgba(244, 162, 97, 0.1);
}

/* --- Lars Portrait --- */
.lars-portrait-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.lars-portrait {
  width: 280px;
  height: 340px;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  opacity: 0;
  transform: translateY(80px);
}

/* --- Scene Photo (fullscreen expand) --- */
.scene-photo-wrap {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 20px 15vw;
}

.scene-photo {
  width: 100%;
  height: 60vh;
  border-radius: 16px;
  overflow: hidden;
}

.scene-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lars-info h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  background: rgba(244, 162, 97, 0.15);
  color: var(--morning-accent);
  border: 1px solid rgba(244, 162, 97, 0.25);
}

/* --- Scene 2: Gym Visuals --- */
.gym-visual {
  padding: 10vh 0;
  opacity: 0;
}

.gym-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bubble-bg);
  border: 1px solid var(--bubble-border);
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  opacity: 0;
  will-change: transform;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  border-color: var(--gym-accent);
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.12);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gym-accent);
}

.mo-exercise {
  padding: 10vh 0;
  opacity: 0;
}

.exercise-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.comparison-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bubble-bg);
  border: 1px solid var(--bubble-border);
  border-radius: 20px;
  padding: 36px 40px;
  will-change: transform;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comparison-item:hover {
  border-color: var(--gym-accent);
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.12);
}

.comparison-emoji {
  font-size: 3.5rem;
}

.comparison-label {
  font-size: 1.3rem;
  font-weight: 600;
}

.comparison-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-narration);
  font-size: 1.15rem;
}

.comparison-vs {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gym-accent);
  font-family: var(--font-narration);
}

/* --- Scene 3: Screen Visuals --- */
.tools-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 10vh 0;
  opacity: 0;
}

.tool-card {
  background: var(--bubble-bg);
  border: 1px solid var(--bubble-border);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  will-change: transform;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
  border-color: var(--screen-accent);
  box-shadow: 0 8px 32px rgba(123, 97, 255, 0.15);
}

.tool-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon svg {
  width: 100%;
  height: 100%;
}

.tool-text-icon {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--screen-accent);
}

.tool-card[data-tool="premiere"] .tool-text-icon {
  color: #9999ff;
}

.tool-card[data-tool="aftereffects"] .tool-text-icon {
  color: #cf96fd;
}

.tool-name {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.keyboard-scene {
  padding: 10vh 0;
  display: flex;
  justify-content: center;
  opacity: 0;
}

.keyboard {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bubble-border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}

.key-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: center;
}

.key-row:last-of-type {
  margin-bottom: 0;
}

.key {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.paw-on-keyboard {
  position: absolute;
  font-size: 2rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  filter: drop-shadow(0 0 10px rgba(123, 97, 255, 0.4));
}

.business-reveal {
  padding: 10vh 0;
  display: flex;
  justify-content: center;
  opacity: 0;
}

.badge {
  text-align: center;
  padding: 48px 56px;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.15), rgba(123, 97, 255, 0.05));
  border: 1px solid rgba(123, 97, 255, 0.3);
  border-radius: 24px;
  will-change: transform;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.badge:hover {
  box-shadow: 0 8px 32px rgba(123, 97, 255, 0.15);
}

.badge-age {
  display: block;
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--screen-accent);
  line-height: 1;
  margin-bottom: 10px;
}

.badge-text {
  font-size: 1.3rem;
  color: var(--text-secondary);
}

/* --- Scene 4: Kitchen Visuals --- */
.smell-visual {
  padding: 10vh 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
}

.smell-waves {
  display: flex;
  gap: 8px;
}

.wave {
  font-size: 2rem;
  color: var(--kitchen-accent);
  opacity: 0;
  animation: waveFloat 2s ease-in-out infinite;
}

.wave:nth-child(2) { animation-delay: 0.3s; }
.wave:nth-child(3) { animation-delay: 0.6s; }

@keyframes waveFloat {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-10px); }
}

.drumstick-icon {
  font-size: 4rem;
}

.unfair-meter {
  padding: 10vh 0;
  max-width: 400px;
  margin: 0 auto;
  opacity: 0;
}

.meter-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.meter-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--kitchen-accent), #e63946);
  border-radius: 100px;
  transition: width 1.5s ease;
}

.meter-verdict {
  margin-top: 12px;
  font-family: var(--font-narration);
  font-size: 1.3rem;
  color: var(--kitchen-accent);
  opacity: 0;
}

/* --- Scene 5: Travel Visuals --- */
.travel-map {
  padding: 10vh 0;
  opacity: 0;
}

.world-map-img {
  width: 100%;
  max-width: 900px;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
}

/* --- Scene 6: Evening Visuals --- */
.lars-summary {
  padding: 10vh 0;
  display: flex;
  justify-content: center;
  opacity: 0;
}

.summary-card {
  text-align: center;
}

.summary-titles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.summary-title {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--evening-accent);
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--evening-accent);
  opacity: 0;
  transform: translateY(20px);
}

.outro-card {
  padding: 10vh 0 5vh;
  text-align: center;
  opacity: 0;
}

.outro-presented p {
  font-family: var(--font-narration);
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.outro-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f5f5f5 0%, var(--evening-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.outro-tagline {
  font-family: var(--font-narration);
  font-size: 1.3rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.outro-mo {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

/* --- Credits --- */
.credits {
  text-align: center;
  padding: 60px 0 40px;
  opacity: 0;
}

.credits p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .scene-nav {
    right: 12px;
  }

  .scene-dot {
    width: 8px;
    height: 8px;
  }

  .mo-narrator {
    bottom: 16px;
    left: 16px;
  }

  .scene-content {
    padding: 0 16px;
  }

  .gym-stats {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }

  .tools-showcase {
    grid-template-columns: repeat(2, 1fr);
  }

  .lars-card {
    flex-direction: column;
    text-align: center;
  }

  .exercise-comparison {
    flex-direction: column;
    gap: 16px;
  }


  .key {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tools-showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .speech-bubble {
    padding: 20px 24px;
  }

  .summary-titles {
    flex-direction: column;
    align-items: center;
  }
}
