/* ===== AirPods 3 — Premium Landing Page ===== */

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

/* --- VARIABLES --- */
:root {
  --bg-light: #f2f0ed;
  --bg-dark: #0a0a0a;
  --bg-accent: #1a1a1e;
  --text-on-light: #1a1a1a;
  --text-on-dark: #f0ede8;
  --text-muted-light: #666;
  --text-muted-dark: #888;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-on-light);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- LOADER --- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.loader-brand {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.loader-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 1rem;
}

#loader-bar {
  width: 0%;
  height: 100%;
  background: white;
  border-radius: 2px;
  transition: width 0.2s ease;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 3vw;
  transition: background 0.4s ease;
}

.site-header.scrolled {
  background: rgba(242, 240, 237, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-gen {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  opacity: 0.5;
  margin-left: 0.15em;
  vertical-align: super;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
}

.nav-cta {
  background: var(--accent);
  color: white;
  padding: 0.5rem 1.4rem;
  border-radius: 100px;
  opacity: 1;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

/* --- HERO --- */
.hero-standalone {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-light);
  z-index: 10;
  padding: 2rem;
}

.hero-standalone .section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted-light);
  margin-bottom: 2rem;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-on-light);
  margin-bottom: 1.5rem;
  padding: 0 5vw;
}

.hero-heading .word {
  display: block;
  opacity: 0;
  transform: translateY(60px);
}

.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 300;
  color: var(--text-muted-light);
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(30px);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(20px);
}

.scroll-indicator span {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted-light);
}

.scroll-indicator svg {
  animation: bounce 2s infinite;
  color: var(--text-muted-light);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --- CANVAS --- */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- DARK OVERLAY --- */
#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: var(--bg-dark);
  opacity: 0;
  pointer-events: none;
}

/* --- MARQUEE --- */
.marquee-wrap {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(6rem, 13vw, 14vw);
  font-weight: 800;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  will-change: transform;
}

.marquee-reverse .marquee-text {
  color: rgba(255, 255, 255, 0.04);
}

/* --- SCROLL CONTAINER --- */
#scroll-container {
  position: relative;
  height: 900vh;
  z-index: 5;
}

/* --- SCROLL SECTIONS (generic) --- */
.scroll-section {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.scroll-section.active {
  opacity: 1;
  pointer-events: auto;
}

.section-inner {
  position: relative;
}

/* --- SIDE ALIGNMENT --- */
.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  justify-content: flex-end;
}

.align-left .section-inner,
.align-right .section-inner {
  max-width: 40vw;
}

/* --- SECTION TYPOGRAPHY --- */
.scroll-section .section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #bbb;
  margin-bottom: 1.4rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.scroll-section .section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-on-light);
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.25);
}

.scroll-section .section-body {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-on-light);
  margin-bottom: 0.8rem;
  max-width: 28ch;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 0, 0, 0.2);
}

.scroll-section .section-note {
  font-size: 0.85rem;
  font-weight: 400;
  color: #555;
  line-height: 1.5;
  max-width: 26ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 0, 0, 0.15);
}

/* --- STATS SECTION --- */
.section-stats {
  justify-content: center;
  padding: 0 5vw;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  color: white;
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.2rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.8rem;
}

/* --- CTA SECTION --- */
.section-cta {
  justify-content: center;
  text-align: center;
  padding: 0 5vw;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-heading {
  font-size: clamp(3.5rem, 8vw, 7rem) !important;
  margin-bottom: 0.6rem !important;
  color: white !important;
}

.cta-button {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.9rem 2.8rem;
  background: var(--accent);
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.25s ease;
  letter-spacing: 0.01em;
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.cta-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.3s ease;
}

.cta-link:hover {
  opacity: 0.7;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
  #scroll-container {
    height: 580vh;
  }

  .hero-heading {
    font-size: clamp(2.4rem, 10vw, 4rem);
    padding: 0 4vw;
  }

  .align-left,
  .align-right {
    padding-left: 6vw;
    padding-right: 6vw;
    justify-content: center;
  }

  .align-left .section-inner,
  .align-right .section-inner {
    max-width: 90vw;
  }

  .scroll-section .section-heading {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .scroll-section .section-body,
  .scroll-section .section-note {
    max-width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .marquee-text {
    font-size: 18vw;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-heading {
    font-size: 2.2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .cta-heading {
    font-size: 2.8rem !important;
  }
}

/* --- NAV CART BUTTON --- */
.nav-cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-on-light);
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--accent);
  color: white;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cart-count.visible {
  opacity: 1;
  transform: scale(1);
}

#nav-buy-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

/* --- CART DRAWER --- */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  backdrop-filter: blur(4px);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  z-index: 999;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid #eee;
}

.cart-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-on-light);
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 0.3rem;
  transition: color 0.2s ease;
}

.cart-close:hover {
  color: var(--text-on-light);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.4rem 1.6rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 0;
}

.cart-empty p {
  font-size: 0.95rem;
  color: #999;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-light);
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cart-item-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-on-light);
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.3rem;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: #fafafa;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-on-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.qty-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.qty-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.qty-btn:hover {
  background: #eee;
}

.qty-value {
  width: 36px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-on-light);
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  padding: 0.3rem;
  transition: color 0.2s ease;
}

.cart-item-remove:hover {
  color: #e74c3c;
}

.cart-footer {
  padding: 1.2rem 1.6rem;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-on-light);
}

.cart-checkout-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--bg-dark);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.cart-checkout-btn:hover {
  background: #222;
  transform: scale(1.01);
}

/* --- CHECKOUT OVERLAY --- */
.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.checkout-overlay.open {
  opacity: 1;
  visibility: visible;
}

.checkout-modal {
  max-width: 520px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.checkout-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: #888;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.checkout-back:hover {
  color: var(--text-on-light);
}

.checkout-step-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-on-light);
  margin-bottom: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-on-light);
  background: #fafafa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
  background: #fff;
}

.checkout-summary {
  margin: 1.6rem 0;
  padding: 1.2rem;
  background: #f8f7f5;
  border-radius: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #666;
  padding: 0.35rem 0;
}

.summary-total {
  border-top: 1px solid #e0e0e0;
  margin-top: 0.5rem;
  padding-top: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-on-light);
}

.payment-methods {
  margin-top: 0.5rem;
}

.payment-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.8rem;
}

.payment-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.checkout-pay-btn {
  width: 100%;
  padding: 1rem;
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pay-stripe {
  background: var(--bg-dark);
}

.pay-stripe:hover {
  background: #222;
  transform: scale(1.01);
}

.pay-paypal {
  background: #0070ba;
}

.pay-paypal:hover {
  background: #005ea6;
  transform: scale(1.01);
}

/* --- CONFIRMATION --- */
.confirm-icon {
  text-align: center;
  margin-bottom: 1.5rem;
}

.confirm-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-on-light);
  text-align: center;
  margin-bottom: 1rem;
}

.confirm-text {
  font-size: 1rem;
  color: #666;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.confirm-order {
  font-size: 0.9rem;
  color: #999;
  text-align: center;
  margin-bottom: 2rem;
}

.checkout-done-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 0.85rem;
  background: var(--bg-dark);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.checkout-done-btn:hover {
  background: #222;
}

/* --- TOAST --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-dark);
  color: white;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .checkout-modal {
    padding: 2rem 1.2rem 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- UTILITY --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
