/* ---------------------------------------------------------------------
 * SONY WH-1000XM6 Scrollytelling Landing Page
 * Premium Corporate Dark Mode Design System
 * --------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #020202;      /* Matches the image sequence background perfectly */
  --bg-secondary: #0A0A0C;    /* Subtle variation for sections & cards */
  --accent-blue: #0050FF;     /* Sony Brand Blue */
  --accent-cyan: #00D6FF;     /* Electric highlights */
  --text-white-90: rgba(255, 255, 255, 0.9);
  --text-white-60: rgba(255, 255, 255, 0.6);
  --text-white-40: rgba(255, 255, 255, 0.4);
  
  /* Font Family */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease-out;
}

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

html, body {
  background-color: var(--bg-primary);
  color: var(--text-white-90);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Apple-style Translucent Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 52px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: rgba(2, 2, 2, 0); /* Starts transparent */
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  opacity: 0;
  transform: translateY(-10px);
  transition: background-color 0.4s ease, border-color 0.4s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Navbar active state (scrolled) */
.navbar.scrolled {
  background-color: rgba(2, 2, 2, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Navbar loaded state (intro animation) */
.navbar.loaded {
  opacity: 1;
  transform: translateY(0);
}

.nav-logo {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-white-90);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}
.nav-logo:hover {
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-white-60);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-white-90);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  color: #fff;
  border: none;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 80, 255, 0.2);
  text-decoration: none;
  display: inline-block;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 214, 255, 0.4);
}

/* Scrollytelling Structure */
.scroll-container {
  position: relative;
  width: 100%;
  height: 500vh; /* Pinned area for scrolling interaction */
}

.sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-primary);
}

/* Canvas Background Glow */
.canvas-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  height: 70vw;
  max-width: 1000px;
  max-height: 1000px;
  background: radial-gradient(circle, rgba(0, 80, 255, 0.08) 0%, rgba(0, 214, 255, 0.02) 50%, rgba(2, 2, 2, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* HTML5 Canvas */
#headphone-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

/* Storytelling Overlays */
.overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass through to background elements */
  z-index: 3;
}

.text-overlay {
  position: absolute;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10%;
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
  pointer-events: none; /* Starts disabled to avoid overlay blocking */
}

/* Active overlay state enables pointer events for buttons/links */
.text-overlay.active {
  pointer-events: auto;
}

/* Layout Variations for Beats */
.text-overlay.center {
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.text-overlay.left {
  align-items: flex-start;
  max-width: 650px;
}

.text-overlay.right {
  align-items: flex-end;
  text-align: right;
  left: auto;
  right: 10%;
  max-width: 650px;
}

/* Typography styles */
.gradient-headline {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, #ffffff 60%, rgba(255, 255, 255, 0.8) 80%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  display: inline-block;
}

/* Smaller size for side headlines */
.text-overlay.left .gradient-headline,
.text-overlay.right .gradient-headline {
  font-size: 3.5rem;
}

.subheadline {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-white-90);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.body-text {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-white-60);
  max-width: 500px;
  margin-bottom: 24px;
}

.key-points {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.key-point {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-overlay.right .key-point {
  flex-direction: row-reverse;
}

.key-point-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.key-point-text {
  font-size: 1.05rem;
  color: var(--text-white-90);
}

/* CTA buttons in final beat */
.cta-group {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  color: #fff;
  border: none;
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 80, 255, 0.25);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 214, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white-90);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.micro-copy {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-white-40);
  letter-spacing: 0.02em;
}

/* Preloader Screen */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: #fff;
  opacity: 0;
  animation: logoFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

.loader-track {
  width: 200px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  transition: width 0.1s ease-out;
}

.loader-text {
  font-size: 0.8rem;
  color: var(--text-white-40);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ambient grids or grounding lines */
.alignment-lines {
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 0;
}

.grid-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.015) 30%, rgba(255, 255, 255, 0.015) 70%, rgba(255, 255, 255, 0) 100%);
}

/* Footer style details */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.scroll-indicator.hide {
  opacity: 0;
}

.scroll-indicator span {
  font-size: 0.75rem;
  color: var(--text-white-40);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.scroll-wheel {
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  position: relative;
}

.scroll-dot {
  width: 4px;
  height: 6px;
  background-color: var(--accent-cyan);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollAnim 1.5s infinite;
}

@keyframes scrollAnim {
  0% {
    top: 6px;
    opacity: 1;
  }
  50% {
    top: 16px;
    opacity: 0.2;
  }
  100% {
    top: 6px;
    opacity: 1;
  }
}

/* Responsive Scaling Rules */
@media (max-width: 1024px) {
  .gradient-headline {
    font-size: 3.5rem;
  }
  .text-overlay.left .gradient-headline,
  .text-overlay.right .gradient-headline {
    font-size: 2.8rem;
  }
  .subheadline {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }
  .nav-links {
    display: none; /* Hide middle links on mobile for minimal layout */
  }
  .gradient-headline {
    font-size: 2.8rem;
  }
  .text-overlay {
    padding: 0 5%;
    align-items: center !important;
    text-align: center !important;
  }
  .text-overlay.left,
  .text-overlay.right {
    max-width: 100%;
    left: 0;
    right: 0;
  }
  .text-overlay.left .gradient-headline,
  .text-overlay.right .gradient-headline {
    font-size: 2.4rem;
  }
  .body-text {
    font-size: 1rem;
    max-width: 100%;
  }
  .cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }
}
