:root {
  --color-bg: #030101;
  --color-text: #f4ece4;
  --color-accent-neon: #ff2a2a;
  /* Neon red from the Amigo sign */
  --color-accent-glow: rgba(255, 42, 42, 0.6);
  --color-warm: #ffb347;
  /* Amber lantern light */
  --color-warm-glow: rgba(255, 179, 71, 0.3);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body,
html {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* 
  PRELOADER
*/
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease;
}

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

.loader-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--color-accent-neon);
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 15px var(--color-accent-glow), 0 0 30px var(--color-accent-glow);
  animation: flicker 4s infinite alternate;
  margin-bottom: 2.5rem;
  white-space: nowrap;
}

.loader-cross {
  color: var(--color-warm);
  font-weight: 300;
  font-size: 0.65em;
  text-shadow: 0 0 15px var(--color-warm-glow);
  margin: 0 0.5rem;
  display: inline-block;
}

.loader-progress-bar {
  width: 250px;
  height: 2px;
  background: rgba(255, 179, 71, 0.2);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.loader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-warm);
  box-shadow: 0 0 15px var(--color-warm-glow);
  transition: width 0.1s linear;
}

/* 
  FINAL REDIRECT MESSAGE
*/
#final-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9000;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  text-align: center;
  padding: 0 2rem;
}

.final-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-accent-neon);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 30px var(--color-accent-glow);
  margin-bottom: 1rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.final-subtitle {
  font-family: var(--font-body);
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* 
  CANVAS CONTAINER
*/
#canvas-container {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #000;
}

canvas {
  display: block;
}

.overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Darker edge gradient to blend with the night sky of the video */
  background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* 
  CONTENT WRAPPER
*/
.content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.spacer {
  height: 90vh;
}

.large-spacer {
  height: 150vh;
}

.text-section {
  min-height: 75vh;
  padding: 6rem 8%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.title-section {
  min-height: 100vh;
  max-width: 1200px;
  align-items: center;
  text-align: center;
}

/* SECTION ALIGNMENTS */
.text-section.align-left {
  align-items: flex-start;
  text-align: left;
}

.text-section.align-right {
  align-items: flex-end;
  text-align: right;
}

.text-section.align-center {
  align-items: center;
  text-align: center;
}

/* TYPOGRAPHY */
.text-section p {
  font-size: 1.1rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: rgba(244, 236, 228, 0.85);
}

.text-section p strong {
  font-weight: 600;
  color: var(--color-warm);
}

.text-section p em {
  color: var(--color-accent-neon);
  font-style: normal;
  font-weight: 600;
}

.text-section h1 {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.pre-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: var(--color-warm);
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-shadow: 0 0 15px var(--color-warm-glow);
}

/* FLOATING TEXT (Inside Video Look) */
.floating-text {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 580px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Custom alignment styles */
.text-section.align-left .floating-text {
  text-align: left;
}

.text-section.align-left .floating-text p {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.text-section.align-right .floating-text {
  text-align: right;
}

.text-section.align-right .floating-text p {
  margin-right: 0;
  margin-left: auto;
  text-align: right;
}

/* Center aligned cards (e.g. End CTA) */
.text-section.align-center .floating-text {
  text-align: center;
  margin: 0 auto;
}

.text-section.align-center .floating-text p {
  margin: 0 auto;
  text-align: center;
}

.scene-title {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 800;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.2rem;
  /* Extra deep shadows to maintain readability without background */
  text-shadow: 0 5px 25px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.8), 0 0 15px var(--color-warm-glow);
  line-height: 1.15;
}

.floating-text p {
  font-size: 1.4rem;
  font-weight: 400;
  color: #fff;
  /* Extra deep shadows to maintain readability without background */
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.8);
}

.highlight-text {
  font-family: var(--font-display);
  font-size: 2rem !important;
  font-weight: 700 !important; /* Thinned from 800 to 700 to prevent neon bleeding */
  color: var(--color-accent-neon) !important;
  /* Multi-layered shadow: sharp black outline layer first, then soft neon glows behind it */
  text-shadow: 0 0 3px #000, 0 0 6px #000, 0 0 15px var(--color-accent-glow), 0 0 30px var(--color-accent-glow);
  text-transform: uppercase;
  letter-spacing: 3.5px; /* Increased from 2px for better readability */
  text-align: center;
  margin-bottom: 1.5rem !important;
  /* Specific Neon flicker animation that preserves the high-contrast backing shadows */
  animation: flicker-highlight 4s infinite alternate;
}

@keyframes flicker-highlight {
  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    text-shadow: 0 0 3px #000, 0 0 6px #000, 0 0 15px var(--color-accent-glow), 0 0 30px var(--color-accent-glow);
    opacity: 1;
  }

  20%,
  24%,
  55% {
    text-shadow: 0 0 3px #000, 0 0 6px #000, 0 5px 25px rgba(0, 0, 0, 0.9);
    opacity: 0.85;
  }
}

@keyframes flicker {

  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    text-shadow: 0 0 10px var(--color-accent-glow), 0 0 20px var(--color-accent-glow), 0 5px 25px rgba(0, 0, 0, 0.9);
    opacity: 1;
  }

  20%,
  24%,
  55% {
    text-shadow: 0 5px 25px rgba(0, 0, 0, 0.9);
    opacity: 0.8;
  }
}

/* HERO TITLE EFFECTS */
.gradient-text {
  background: linear-gradient(180deg, #ffffff 0%, #f4ece4 50%, #b8a99a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.1em;
}

.glow-text {
  text-shadow: 0 0 40px rgba(255, 179, 71, 0.2);
}

.nowrap {
  white-space: nowrap;
}


/* SCROLL INDICATOR */
.scroll-indicator {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0.8;
}

.scroll-indicator span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-warm);
}

.scroll-indicator .line {
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, var(--color-warm), transparent);
  animation: floatDown 2s infinite ease-in-out;
}

@keyframes floatDown {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* FOOTER STATS */
.footer-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px dashed rgba(255, 179, 71, 0.25);
  width: 100%;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

/* Elegant dividers between stats counters */
.footer-stats .stat:not(:last-child) {
  border-right: 1px dashed rgba(255, 179, 71, 0.25);
  padding-right: 3rem;
}

.stat h4 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-accent-neon);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px var(--color-accent-glow), 0 4px 10px rgba(0, 0, 0, 0.9);
}

.stat span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-warm);
  font-weight: 600;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* CTA BUTTON */
.cta-button {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 3rem;
  background-color: var(--color-accent-neon);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 0 20px var(--color-accent-glow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  background-color: #ff4040;
  box-shadow: 0 0 35px var(--color-accent-glow);
  transform: translateY(-3px);
  color: #fff;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .text-section {
    padding: 4rem 1.5rem;
    min-height: 60vh;
    width: 100%;
  }

  .text-section.align-left,
  .text-section.align-right {
    align-items: center;
    text-align: center;
  }

  .text-section.align-left .floating-text,
  .text-section.align-right .floating-text {
    text-align: center;
  }

  .text-section.align-left .floating-text p,
  .text-section.align-right .floating-text p {
    margin: 0 auto;
    text-align: center;
  }

  .floating-text {
    padding: 0;
    max-width: 100%;
  }

  .text-section h1 {
    font-size: clamp(1.8rem, 7.2vw, 3.5rem);
  }

  .floating-text p {
    font-size: 1.1rem;
  }

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

  .footer-stats {
    flex-direction: column;
    gap: 2.5rem;
  }

  .footer-stats .stat:not(:last-child) {
    border-right: none;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .loader-progress-bar {
    width: 180px;
  }

  .text-section {
    padding: 3rem 5%;
  }

  .scene-title {
    font-size: 2.1rem;
    letter-spacing: 0px;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  .floating-text p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .highlight-text {
    font-size: 1.5rem !important;
    letter-spacing: 2px !important;
  }

  .stat h4 {
    font-size: 2rem;
  }

  .stat span {
    font-size: 0.8rem;
  }

  .cta-button {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
  }

  .final-title {
    font-size: 2rem;
    letter-spacing: 0px;
  }

  .final-subtitle {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }
}