/* Modern Web Font pairing & layout configurations */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Syne:wght@700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --color-red: #E31B23;
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-cream: #FFFCEF;
  --color-yellow: #FFD200; /* Vibrant modern food-brand yellow */
  --color-green: #139D4E;  /* Energetic organic brand green */
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Smooth scrolling for transitions */
}

/* Universal Page Width Locking to Prevent Side-Sliding & Gray Bars */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* Strictly blocks horizontal overflow layout bugs */
}

body {
  background-color: var(--color-red);
  color: var(--color-white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: none; /* Custom interactive cursor */
}

/* Base anchor element colors to prevent browser default blue/purple links */
a {
  color: inherit;
  text-decoration: none;
}

a:visited, a:active, a:focus {
  color: inherit;
}

/* Selection highlight */
::selection {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-red);
}
::-webkit-scrollbar-thumb {
  background: var(--color-black);
  border: 2px solid var(--color-red);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1a1a1a;
}

/* Typography styles */
.font-syne {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
}

.font-anton {
  font-family: 'Anton', sans-serif;
}

.huge-text-stroke {
  -webkit-text-stroke: 2px var(--color-white);
  color: transparent;
}

/* ==========================================
   NAVIGATION HEADER
   ========================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px; /* Fixed height for pixel-perfect sticky sync */
  z-index: 50;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(227, 27, 35, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  pointer-events: auto; /* Clickable */
}

.brand-logo {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--color-black) !important;
  letter-spacing: -2px;
  display: flex;
  align-items: center;
  gap: 12px; /* Space between name and animated bottle logo */
  transition: transform 0.2s;
}

.brand-logo:hover {
  transform: scale(1.05);
}

.brand-logo span {
  color: var(--color-black);
}

/* Animated Bottle Logo with Green Stripe */
.bottle-logo-icon {
  animation: floatLogo 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}

.animated-green-stripe {
  animation: stripePulse 2s ease-in-out infinite;
}

@keyframes stripePulse {
  0%, 100% { height: 14px; y: 16px; fill: var(--color-green); opacity: 1; }
  50% { height: 18px; y: 14px; fill: #2ECC71; opacity: 0.8; }
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==========================================
   BUTTONS (STICKY BOUNCY LOOK)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 50px;
  border: 2px solid var(--color-black);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-decoration: none;
  pointer-events: auto; /* Active clicking */
}

.btn-pill-cta {
  background: var(--color-black);
  color: var(--color-white) !important;
  padding: 12px 24px;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,1);
}

.btn-pill-cta:hover {
  background: var(--color-cream);
  color: var(--color-black) !important;
  box-shadow: none;
}

/* ==========================================
   GLOBAL CANVAS & CURSOR
   ========================================== */
#physicsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Cursor click-through so user can interact with page naturally */
  z-index: 5; /* Sits on top of background photos, but behind text at z-index 10! */
}

.custom-cursor {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-black);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.3s, width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
  opacity: 0; /* Hide initially until first mouse movement */
}

.custom-cursor-inner {
  width: 6px;
  height: 6px;
  background-color: var(--color-white);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 101;
  transition: opacity 0.3s;
  opacity: 0; /* Hide initially until first mouse movement */
}

body.hover-active .custom-cursor {
  width: 55px;
  height: 55px;
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--color-white);
  mix-blend-mode: normal;
}

/* ==========================================
   PRELOADER
   ========================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #FFB800;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1);
}

#preloader.loaded {
  transform: translateY(-100%);
}

.loader-text {
  font-size: 8vw;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: -0.05em;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  animation: pulse 1.5s infinite;
}

.loader-progress {
  width: 0%;
  height: 4px;
  background-color: var(--color-red);
  position: absolute;
  bottom: 10%;
  left: 0;
  transition: width 0.1s linear;
}

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

/* ==========================================
   SECTIONS & MAIN LAYOUT
   ========================================== */
main {
  position: relative;
  z-index: 10; /* Higher than canvas at z-index 1 */
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 140px 20px 80px 20px;
  text-align: center;
  position: relative;
  pointer-events: none;
}

.physics-obstacle {
  position: relative;
  display: inline-block;
  line-height: 1;
  pointer-events: none;
}

.hero-title-line {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 9.5vw;
  line-height: 0.85;
  text-transform: uppercase;
  letter-spacing: -4px;
  margin-bottom: 12px;
  pointer-events: none;
  color: var(--color-white);
  animation: underwaterWiggle 7s ease-in-out infinite; /* Floating under water wiggle animation! */
  transform-origin: center;
  display: block;
}

/* Staggered animation offsets for realistic fluid waving */
.hero-title-line:nth-child(1) { animation-delay: 0s; }
.hero-title-line:nth-child(2) { animation-delay: -1.8s; }
.hero-title-line:nth-child(3) { animation-delay: -3.6s; }

@keyframes underwaterWiggle {
  0%, 100% { transform: translateY(0) rotate(0deg) skewX(0deg); }
  25% { transform: translateY(-5px) rotate(0.8deg) skewX(1deg); }
  75% { transform: translateY(5px) rotate(-0.8deg) skewX(-1deg); }
}

/* ==========================================
   INFINITE MARQUEE TICKER (YELLOW AND BLACK)
   ========================================== */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  background-color: #FFB800; /* Yellow strip background */
  border-top: none;
  border-bottom: 4px solid var(--color-black); /* Thick separation from image */
  margin: 0;
  pointer-events: none;
  width: 100%;
}

.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
  font-family: 'Anton', sans-serif;
  font-size: 3vw;
  line-height: 1;
  padding: 22px 0;
  color: var(--color-black); /* Black text */
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.sequence-container {
  position: relative;
  height: auto; /* Sized exactly as requested - no extra scroll height */
  background: transparent;
  border: none;
  margin: 0;
  padding: 0;
  z-index: 2; /* Sits below 3D active elements */
}

.sequence-sticky {
  position: relative; /* Fixed structure flow */
  top: auto;
  height: auto;
  display: block;
  overflow: hidden;
  padding: 0;
  margin: 0;
  z-index: 2;
}

/* Unified wrapper holding Yellow Marquee and Image edge-to-edge flush with zero gaps */
.sequence-player-wrapper {
  width: 100%; /* Adapts perfectly inside the locked screen margins */
  margin: 0;
  padding: 0;
}

.sequence-player-img {
  display: block; /* Removes any default browser inline spacing gaps */
  width: 100%; /* Perfect full width */
  height: auto;
  aspect-ratio: 1920 / 569; /* Exact 1920x569 aspect-ratio */
  object-fit: cover; /* Guarantees the image covers the exact bounding space natively */
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* No rounded corners */
}

/* ==========================================
   NEW COAT ABOUT US SECTION (STARK STYLED)
   ========================================== */
.about-section {
  background-color: var(--color-black); /* Black background right after the image */
  margin: 0;
  padding: 120px 40px;
  position: relative;
  z-index: 20;
  pointer-events: auto; /* Clickable cards */
}

.about-container {
  max-width: 960px;
  margin: 0 auto;
}

.about-badge {
  display: inline-block;
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  background-color: var(--color-yellow);
  color: var(--color-black);
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 24px;
  box-shadow: 4px 4px 0px 0px rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-title {
  font-family: 'Syne', sans-serif;
  font-size: 6.5vw;
  font-weight: 800;
  line-height: 1.0;
  text-transform: uppercase;
  margin-bottom: 40px;
  letter-spacing: -3px;
}

.about-desc {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--color-cream);
  opacity: 0.95;
  max-width: 720px;
  margin: 0 auto 60px auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Pillars grid layout - responsive natively */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
  text-align: left;
}

.pillar-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.pillar-card:hover {
  border-color: rgba(255, 210, 0, 0.4);
  transform: translateY(-6px);
}

.pillar-num {
  font-family: 'Anton', sans-serif;
  color: var(--color-yellow);
  font-size: 24px;
  display: block;
  margin-bottom: 12px;
}

.pillar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-white);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.pillar-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 252, 239, 0.7);
  font-weight: 500;
}

/* ==========================================
   FOOTER (STARK STYLED)
   ========================================== */
.main-footer {
  background-color: var(--color-red);
  color: var(--color-black);
  padding: 50px 40px;
  border-top: 4px solid var(--color-black);
  position: relative;
  z-index: 20;
  pointer-events: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.footer-copyright {
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-weight: 700;
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--color-white);
}

/* ==========================================
   MOBILE RESPONSIVENESS CONFIGURATIONS
   ========================================== */
@media (max-width: 1024px) {
  .main-header {
    padding: 16px 20px;
  }
  .brand-logo {
    font-size: 26px;
  }
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto !important; /* Restore natural cursor on mobile */
  }

  .custom-cursor, .custom-cursor-inner {
    display: none !important; /* Hide visual mouse elements on touchscreens */
  }

  /* Optimized, No-Clipping Boccoa Title Headers on Mobile */
  .hero-title-line {
    font-size: 7.2vw !important; /* Shrunk so "LAUNCHING" fits perfectly without clipping! */
    letter-spacing: -1px;
    line-height: 0.95;
    margin-bottom: 12px;
    width: 100%;
    text-align: center;
    font-weight: 800; /* Solid bold */
    animation: underwaterWiggleMobile 7s ease-in-out infinite;
  }

  /* Target only the last line (SOON. VERY SOON.) so it stays on a single line */
  .hero-title-line:last-of-type {
    font-size: 6.2vw !important; /* Slightly smaller to fit the 16 characters on one single line! */
    white-space: nowrap; /* Forces the text to stay on one single line and never break! */
  }

  /* Staggered animation offsets for mobile */
  .hero-title-line:nth-child(1) { animation-delay: 0s; }
  .hero-title-line:nth-child(2) { animation-delay: -1.8s; }
  .hero-title-line:nth-child(3) { animation-delay: -3.6s; }

  @keyframes underwaterWiggleMobile {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(0.5deg); }
    75% { transform: translateY(4px) rotate(-0.5deg); }
  }

  /* Sharper hollow stroke text matching mobile letter sizes */
  .huge-text-stroke {
    -webkit-text-stroke: 1.5px var(--color-white) !important;
  }

  .hero-section {
    padding-top: 140px;
    padding-left: 24px !important; /* Safe gutters to prevent any letter clipping */
    padding-right: 24px !important;
    box-sizing: border-box;
  }

  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .marquee-content {
    font-size: 6vw;
    padding: 12px 0;
  }

  .about-section {
    padding: 80px 20px;
  }

  .about-title {
    font-size: 10vw;
  }

  .about-desc {
    font-size: 15px;
  }

  .pillars-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
    gap: 16px;
  }

  .pillar-card {
    padding: 24px;
  }

  /* Centers the footer alignment perfectly on mobile */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  /* Centered Brand Logo inside Footer on mobile screens */
  .main-footer img {
    margin: 0 auto 16px auto !important;
    height: 28px !important; /* Slightly more compact on mobile */
  }

  .footer-links {
    justify-content: center;
  }
}
