/* ==========================================================================
   Obsidian & Crimson Peak - Coca-Cola Zero Sugar Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-color: #050505;
  --surface-color: #0f0f11;
  --surface-hover: #161619;
  --primary-color: #f40009; /* True Coca-Cola Red */
  --primary-glow: rgba(244, 0, 9, 0.4);
  --primary-glow-subtle: rgba(244, 0, 9, 0.15);
  --text-color: #ffffff;
  --text-muted: #8e8e93;
  --border-color: #222225;
  --border-focus: #f40009;
  
  /* Fonts */
  --font-display: 'Unbounded', system-ui, -apple-system, sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Canvas */
#bubble-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
}

section {
  padding: 100px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  border-bottom: 1px solid var(--border-color);
}

/* Typography Utilities */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-color);
}

p {
  color: var(--text-muted);
  font-weight: 300;
}

.tagline {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 15px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  letter-spacing: 0;
}

.section-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 40px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-color);
  box-shadow: 0 4px 15px var(--primary-glow-subtle);
}

.btn-primary:hover {
  background-color: #d10007;
  box-shadow: 0 4px 25px var(--primary-glow);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--text-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

.btn-audio {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  gap: 10px;
}

.btn-audio:hover {
  border-color: var(--primary-color);
  background-color: var(--surface-hover);
  color: var(--primary-color);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background-color: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}

.logo-red {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-style: italic; /* Mimics the script font feel in a geometric display format */
  white-space: nowrap;
}

.logo-white {
  color: var(--text-color);
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding-top: calc(var(--header-height) + 40px);
}

.hero-container {
  width: 100%;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 24px;
  letter-spacing: 0;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.can-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.can-wrapper:active {
  cursor: grabbing;
}

.glow-backdrop {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.35;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.coke-can-img {
  position: relative;
  z-index: 2;
  width: 90%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* ==========================================================================
   Taste Paradox Section (Slider)
   ========================================================================== */

.section-container {
  width: 100%;
  max-width: var(--max-width);
}

.taste-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: center;
}

.taste-visual {
  display: flex;
  justify-content: center;
}

.pour-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 1;
}

.pour-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pour-wrapper:hover .pour-img {
  transform: scale(1.03);
}

.pour-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.9; /* Set dynamically by slider */
  z-index: 2;
  mix-blend-mode: color;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.taste-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slider-box {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  width: 100%;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.label-zero {
  color: var(--text-color);
}

.label-original {
  color: var(--primary-color);
}

/* Custom range slider styling */
.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  margin-bottom: 30px;
}

/* Slider thumb styling */
.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-color);
  border: 4px solid var(--bg-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.2s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--primary-color);
}

.custom-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-color);
  border: 4px solid var(--bg-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.2s ease;
}

.custom-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  background: var(--primary-color);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
}

.telemetry-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.telemetry-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  transition: color 0.3s ease;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-header {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 40px 30px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary-color);
  background-color: var(--surface-hover);
}

.card-icon {
  color: var(--primary-color);
  margin-bottom: 25px;
  display: inline-flex;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  letter-spacing: 0;
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   Sensory / ASMR Section
   ========================================================================== */

.sensory-box {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 60px;
  width: 100%;
}

.sensory-console {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.visualizer-container {
  position: relative;
  width: 100%;
  height: 150px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visualizer-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.visualizer-fallback {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  z-index: 2;
  transition: color 0.3s ease;
}

.sensory-btn {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background-color: var(--bg-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  z-index: 2;
}

.btn-core {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.sensory-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-glow-subtle);
}

.sensory-btn:active .btn-core {
  transform: scale(0.9);
}

.sensory-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-color);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-ripple {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  opacity: 0;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.sensory-btn.active .btn-ripple {
  animation: ripple 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

.sensory-instruction {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.main-footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding: 60px 20px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.footer-logo {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-style: italic;
}

.footer-logo-sub {
  color: var(--text-color);
  font-size: 0.65rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-color);
}

.footer-copy {
  color: #44444a;
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.6;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1; /* Place can above text on mobile/tablet */
  }
  
  .taste-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .sensory-box {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 20px;
  }
}

@media (max-width: 768px) {
  .main-header {
    height: 70px;
  }
  
  .nav-menu {
    display: none; /* Simplifies mobile nav - we can toggle or hide */
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    gap: 10px;
  }

  .logo {
    gap: 5px;
  }

  .logo-red {
    font-size: 1.02rem;
  }

  .logo-white {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }

  .header-actions .btn {
    padding: 8px 12px;
    font-size: 0.62rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .telemetry-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}
