/* ========================================
   RED BULL LANDING PAGE - COMPLETE
   ======================================== */

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

:root {
  --bg-light: #E8E8E8;
  --bg-white: #FFFFFF;
  --bg-dark: #0a0a0a;
  --text-dark: #1E1E1E;
  --text-outline: #9CA3AF;
  --redbull-blue: #1E3A8A;
  --redbull-blue-dark: #0F172A;
  --redbull-red: #DC2626;
  --redbull-gold: #F59E0B;
  --gray-dark: #374151;
  --gray-light: #6B7280;
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-white);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ========================================
   LOADING & LOGO REVEAL
   ======================================== */
.screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

.loading-screen {
  background: var(--bg-light);
  z-index: 100;
}

.marquee-container {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
  z-index: 1;
}

.marquee-track {
  display: flex;
  animation: marquee 20s linear infinite;
  width: max-content;
}

.marquee-text {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 0 2rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-outline);
  opacity: 0.5;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.can-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.can-image {
  width: auto;
  height: clamp(350px, 55vh, 550px);
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  animation: canFloat 3s ease-in-out infinite;
}

@keyframes canFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.can-shadow {
  width: 120px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: -20px;
  animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.7; }
}

/* Logo Reveal */
.logo-reveal-screen {
  z-index: 90;
}

.gate-panel {
  position: absolute;
  width: 150%;
  height: 60%;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.gate-top {
  top: -10%;
  left: -25%;
  background: linear-gradient(135deg, var(--redbull-blue) 0%, var(--redbull-blue-dark) 100%);
  transform: rotate(-15deg) translateY(-100%);
}

.gate-bottom {
  bottom: -10%;
  right: -25%;
  background: linear-gradient(135deg, var(--gray-dark) 0%, #1f1f1f 100%);
  transform: rotate(-15deg) translateY(100%);
}

.logo-reveal-screen.active .gate-top { transform: rotate(-15deg) translateY(0); }
.logo-reveal-screen.active .gate-bottom { transform: rotate(-15deg) translateY(0); }
.logo-reveal-screen.closing .gate-top { transform: rotate(-15deg) translateY(-100%); }
.logo-reveal-screen.closing .gate-bottom { transform: rotate(-15deg) translateY(100%); }

.logo-container {
  z-index: 20;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease 0.6s, transform 0.6s ease 0.6s;
}

.logo-reveal-screen.active .logo-container {
  opacity: 1;
  transform: scale(1);
}

.reveal-logo {
  width: clamp(250px, 40vw, 450px);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* ========================================
   MAIN WRAPPER
   ======================================== */
.main-wrapper {
  display: none;
  position: relative;
}

.main-wrapper.visible {
  display: block;
}

/* ========================================
   FIXED CAN
   ======================================== */
.fixed-can {
  position: fixed;
  /* Center in product-can-area: margin + (40% of 1400px / 2) */
  left: calc((100vw - min(1400px, 100vw)) / 2 + min(1400px, 100vw) * 0.2);
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 80;
  pointer-events: none;
  transition: all 0.6s ease;
}

.fixed-can-img {
  height: clamp(340px, 45vh, 460px);
  width: auto;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.35));
  transition: transform 0.4s ease;
}

/* When can enters the 3D box - stay centered */
.fixed-can.in-box {
  /* Same position - stay centered in frame */
}

/* Hide can when leaving product section */
.fixed-can.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 4rem;
  overflow: visible;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
  background: var(--redbull-blue);
}

.hero-content {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.hero-left {
  width: 50%;
}

.hero-right {
  width: 50%;
  display: flex;
  align-items: center;
  padding-left: 4rem;
}

.hero-title-large {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  color: white;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.hero-title-large span {
  color: var(--redbull-gold);
}

/* ========================================
   PRODUCT SECTION - 3D Box + Parallax
   ======================================== */
.product-section {
  background: var(--bg-white);
  min-height: 120vh;
  position: relative;
  overflow: hidden;
}

/* Parallax Background Text */
.parallax-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  overflow: hidden;
}

.parallax-row {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}

.parallax-row span {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 2rem;
  color: var(--redbull-blue);
}

/* Product Layout - Side by Side */
.product-layout {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  min-height: 100vh;
  align-items: center;
}

/* Left: Can Area */
.product-can-area {
  width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 3D Box Frame - Matches text area height */
.box-frame {
  position: relative;
  width: clamp(220px, 20vw, 300px);
  height: clamp(380px, 50vh, 500px);
  z-index: 70;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.box-frame.visible {
  opacity: 1;
}

.box-frame.hidden {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Back of the box */
.box-back {
  position: absolute;
  inset: 0;
  background: var(--redbull-blue);
  border-radius: 16px;
  z-index: 1;
}

/* Front edge of the box */
.box-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--redbull-blue);
  border-radius: 0 0 16px 16px;
  z-index: 200;
  transition: height 0.5s ease;
}

.box-frame.visible .box-front {
  height: 80px;
}

/* Right: Text Area */
.product-text-area {
  width: 60%;
  padding-left: 4rem;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.product-text-area.blur-out {
  filter: blur(10px);
  opacity: 0;
}

/* ========================================
   FLAVORS SECTION
   ======================================== */
.flavors-section {
  background: linear-gradient(180deg, var(--bg-white) 0%, #f8fafc 100%);
  flex-direction: column;
  justify-content: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Dynamic Background Overlay - Radial Effect */
.flavors-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, transparent 100%);
  opacity: 0;
  transform: scale(0);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.flavors-section.flavor-active .flavors-bg-overlay {
  opacity: 1;
  transform: scale(3);
}

/* Large Flavor Name Background Text */
.flavor-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(8rem, 20vw, 18rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-transform: capitalize;
  letter-spacing: -0.02em;
}

.flavors-section.flavor-active .flavor-bg-text {
  opacity: 1;
}

/* Default Header - hidden on hover */
.flavors-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.flavors-section.flavor-active .flavors-header {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.flavors-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.flavors-subtitle {
  font-size: 1rem;
  color: var(--gray-light);
}

/* Hover Detail View - Can + Info side by side */
.flavor-detail-view {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  width: 100%;
  max-width: 1000px;
  padding: 0 2rem;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.flavors-section.flavor-active .flavor-detail-view {
  opacity: 1;
}

.flavor-detail-can {
  flex-shrink: 0;
}

.flavor-detail-can img {
  height: clamp(300px, 45vh, 450px);
  width: auto;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.3));
  animation: canFloat 3s ease-in-out infinite;
}

@keyframes canFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.flavor-detail-info {
  max-width: 400px;
}

.flavor-detail-desc {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: white;
  line-height: 1.7;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Arc of cans */
.flavors-arc {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 2rem 0;
  perspective: 1000px;
  position: relative;
  z-index: 10;
}

.flavor-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease;
}

/* Arc rotation for each can */
.flavor-item:nth-child(1) { transform: rotate(-10deg) translateY(15px); }
.flavor-item:nth-child(2) { transform: rotate(-5deg) translateY(5px); }
.flavor-item:nth-child(3) { transform: rotate(0deg) translateY(0); }
.flavor-item:nth-child(4) { transform: rotate(5deg) translateY(5px); }
.flavor-item:nth-child(5) { transform: rotate(10deg) translateY(15px); }

/* Hover state - lift up and scale */
.flavor-item:hover,
.flavor-item.hovered {
  transform: rotate(0deg) translateY(-40px) scale(1.15);
  z-index: 50;
  filter: none;
  opacity: 1;
}

/* Dim OTHER cans when one is hovered */
.flavors-arc:has(.flavor-item:hover) .flavor-item:not(:hover) {
  filter: blur(2px);
  opacity: 0.6;
  transform: scale(0.95);
}

.flavor-can-wrapper {
  position: relative;
  transition: transform 0.4s ease;
}

.flavor-can {
  height: clamp(180px, 25vh, 280px);
  width: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
  transition: filter 0.3s ease;
}

.flavor-item:hover .flavor-can,
.flavor-item.hovered .flavor-can {
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.4));
}

.flavor-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-top: 1rem;
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
}

/* Hover tooltip "Clique e saiba mais" */
.flavor-item::after {
  content: 'Clique e saiba mais';
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.flavor-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.flavors-section.flavor-active .flavor-name {
  color: white;
}

.flavor-item.hovered .flavor-name {
  opacity: 1;
}

/* ========================================
   TYPOGRAPHY & COMPONENTS
   ======================================== */
.section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--redbull-blue);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

.benefit {
  margin-bottom: 2rem;
}

.benefit h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.benefit p {
  font-size: 0.95rem;
  color: var(--gray-light);
  line-height: 1.7;
}

/* ========================================
   FADE IN ANIMATIONS
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-delay="1"] { transition-delay: 0.3s; }
.fade-in[data-delay="2"] { transition-delay: 0.6s; }
.fade-in[data-delay="3"] { transition-delay: 0.9s; }
.fade-in[data-delay="4"] { transition-delay: 1.2s; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .fixed-can {
    transform: translate(-50%, -50%) translateX(-25vw);
  }
  
  .fixed-can.in-box {
    transform: translate(-50%, -40%) translateX(-25vw);
  }
  
  .box-frame {
    transform: translate(-50%, -40%) translateX(-25vw);
  }
  
  .flavors-arc {
    gap: 0.5rem;
  }
  
  .flavor-can {
    height: clamp(140px, 18vh, 200px);
  }
}

@media (max-width: 768px) {
  .fixed-can {
    display: block;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    opacity: 1;
    z-index: 5;
  }

  .fixed-can.in-box {
    transform: translate(-50%, -50%);
  }
  
  .fixed-can-img {
    height: 45vh;
    max-height: 500px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
  }
  
  .section {
    flex-direction: column;
    padding: 2rem;
    min-height: auto;
  }
  
  .hero-content, .product-content {
    flex-direction: column;
  }
  
  .hero-left, .hero-right,
  .product-left, .product-right {
    width: 100%;
    padding: 0;
    text-align: center;
  }
  
  .box-frame {
    display: none;
  }
  
  .flavors-arc {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .flavor-item {
    transform: rotate(0) translateY(0) !important;
  }
  
  .flavor-can {
    height: 140px;
  }
}

/* ========================================
   FLAVOR DETAIL MODAL
   ======================================== */
.flavor-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.flavor-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Background color overlay */
.flavor-modal-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: background-color 0.5s ease;
}

/* Close button */
.flavor-modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.flavor-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Navigation arrows */
.flavor-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.flavor-modal-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.flavor-modal-prev {
  left: 2rem;
}

.flavor-modal-next {
  right: 2rem;
}

/* Background text (flavor name) */
.flavor-modal-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(10rem, 22vw, 22rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  letter-spacing: -0.03em;
  text-transform: capitalize;
  user-select: none;
}

/* Content container */
.flavor-modal-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  width: 100%;
  max-width: 1100px;
  padding: 0 6rem;
}

/* Can container with animation */
.flavor-modal-can {
  flex-shrink: 0;
  position: relative;
}

.flavor-modal-can img {
  height: clamp(350px, 55vh, 550px);
  width: auto;
  filter: drop-shadow(0 50px 100px rgba(0, 0, 0, 0.4));
  transform: translateY(100vh);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  animation: none;
}

.flavor-modal.active .flavor-modal-can img {
  transform: translateY(0);
  animation: modalCanFloat 3s ease-in-out infinite 0.7s;
}

/* Motion blur transition effect - higher specificity to override active styles */
.flavor-modal.active .flavor-modal-can img.transitioning-left {
  animation: slideOutLeft 0.3s ease forwards !important;
}

.flavor-modal.active .flavor-modal-can img.transitioning-right {
  animation: slideOutRight 0.3s ease forwards !important;
}

.flavor-modal.active .flavor-modal-can img.sliding-in-left {
  animation: slideInFromRight 0.35s ease forwards !important;
}

.flavor-modal.active .flavor-modal-can img.sliding-in-right {
  animation: slideInFromLeft 0.35s ease forwards !important;
}

@keyframes slideOutLeft {
  0% { 
    transform: translateX(0) scale(1); 
    opacity: 1;
    filter: blur(0);
  }
  100% { 
    transform: translateX(-150px) scale(0.9); 
    opacity: 0;
    filter: blur(8px);
  }
}

@keyframes slideOutRight {
  0% { 
    transform: translateX(0) scale(1); 
    opacity: 1;
    filter: blur(0);
  }
  100% { 
    transform: translateX(150px) scale(0.9); 
    opacity: 0;
    filter: blur(8px);
  }
}

@keyframes slideInFromRight {
  0% { 
    transform: translateX(150px) scale(0.9); 
    opacity: 0;
    filter: blur(8px);
  }
  100% { 
    transform: translateX(0) scale(1); 
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes slideInFromLeft {
  0% { 
    transform: translateX(-150px) scale(0.9); 
    opacity: 0;
    filter: blur(8px);
  }
  100% { 
    transform: translateX(0) scale(1); 
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes modalCanFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Info section */
.flavor-modal-info {
  max-width: 400px;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.flavor-modal.active .flavor-modal-info {
  opacity: 1;
  transform: translateX(0);
}

.flavor-modal-edition {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.flavor-modal-desc {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: white;
  line-height: 1.7;
  font-weight: 400;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Modal */
@media (max-width: 1024px) {
  .flavor-modal-content {
    padding: 0 4rem;
    gap: 2rem;
  }
  
  .flavor-modal-can img {
    height: clamp(280px, 40vh, 400px);
  }
  
  .flavor-modal-bg-text {
    font-size: clamp(6rem, 18vw, 14rem);
  }
}

@media (max-width: 768px) {
  .flavor-modal-content {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    padding-top: 5rem;
  }
  
  .flavor-modal-can img {
    height: clamp(220px, 35vh, 320px);
  }
  
  .flavor-modal-info {
    max-width: 100%;
  }
  
  .flavor-modal-nav {
    width: 50px;
    height: 50px;
  }
  
  .flavor-modal-prev {
    left: 1rem;
  }
  
  .flavor-modal-next {
    right: 1rem;
  }
  
  .flavor-modal-close {
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  .flavor-modal-bg-text {
    font-size: clamp(4rem, 15vw, 10rem);
  }
}
