/* ============================================================
   SUJATA — DESIGN SYSTEM
   ============================================================ */

:root {
  --bg-dark:       #0a0a0a;
  --bg-void:       #000000;
  --text-primary:  #F2E8D5;
  --text-muted:    #8A7E6E;
  --accent-gold:   #C8922A;
  --accent-glow:   #D4A84B;
  --accent-red:    #8B2020;
  --font-display:  'Yatra One', serif;
  --font-body:     'Barlow', sans-serif;
  --font-callout:  'DM Serif Display', serif;
}

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

html {
  scroll-behavior: auto;
}

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   GRAIN TEXTURE OVERLAY
   ============================================================ */

body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 80;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain-shift 0.22s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  15%  { transform: translate(-4%, -6%); }
  30%  { transform: translate(7%, -10%); }
  45%  { transform: translate(-6%, 5%); }
  60%  { transform: translate(9%, -4%); }
  75%  { transform: translate(-3%, 8%); }
  90%  { transform: translate(5%, -7%); }
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */

#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9000;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.3s ease;
}

/* ============================================================
   SECTION COUNTER
   ============================================================ */

#section-counter {
  position: fixed;
  left: 2.25rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#counter-current {
  color: var(--accent-gold);
}

.counter-sep,
.counter-total {
  color: var(--text-muted);
}

/* ============================================================
   SOUND TOGGLE
   ============================================================ */

#sound-toggle {
  position: fixed;
  bottom: 2.25rem;
  right: 2.25rem;
  z-index: 100;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(200, 146, 42, 0.25);
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

#sound-toggle:hover {
  color: var(--accent-gold);
  border-color: rgba(200, 146, 42, 0.6);
}

#sound-toggle.active {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(200, 146, 42, 0.08);
}

#sound-toggle .icon-on  { display: none; }
#sound-toggle .icon-off { display: block; }

#sound-toggle.active .icon-on  { display: block; }
#sound-toggle.active .icon-off { display: none; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-gold);
  z-index: 300;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* ============================================================
   LOADER
   ============================================================ */

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--accent-gold);
  letter-spacing: 0.25em;
}

.loader-bar-wrap {
  width: 240px;
  height: 1px;
  background: rgba(200, 146, 42, 0.2);
}

#loader-bar {
  height: 100%;
  background: var(--accent-gold);
  width: 0%;
  transition: width 0.1s linear;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(10,10,10,0.9) 0%, transparent 100%);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  height: 30px;
  width: auto;
  opacity: 0.92;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

.nav-links .nav-cta {
  color: var(--accent-gold);
  border: 1px solid rgba(200, 146, 42, 0.4);
  padding: 0.5rem 1.25rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-links .nav-cta:hover {
  background: var(--accent-gold);
  color: var(--bg-void);
}

/* ============================================================
   HERO
   ============================================================ */

.hero-standalone {
  position: relative;
  height: 100vh;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

.hero-inner {
  text-align: center;
  padding: 0 2rem;
}

.hero-label {
  display: block;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 13vw, 14rem);
  line-height: 0.92;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.hero-word {
  display: block;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
}

.hero-word.accent {
  color: var(--accent-gold);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(16px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

.scroll-indicator span {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

/* ============================================================
   CANVAS
   ============================================================ */

.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}

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

/* ============================================================
   DARK OVERLAY
   ============================================================ */

#dark-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}


/* ============================================================
   SCROLL CONTAINER
   ============================================================ */

#scroll-container {
  position: relative;
  height: 900vh;
  z-index: 4;
}

/* ============================================================
   SCROLL SECTIONS — shared
   ============================================================ */

.scroll-section {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0;
}

/* Side alignment — product occupies center */
.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

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

.section-inner {
  max-width: 40vw;
  pointer-events: auto;
  transform: translateY(var(--parallax-y, 0px));
  will-change: transform;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 4.5vw, 6rem);
  line-height: 0.95;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.heading-sub {
  font-size: 0.5em;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
}

.section-accent {
  font-family: var(--font-callout);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.section-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 38ch;
}

.section-callout {
  font-family: var(--font-callout);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent-gold);
  margin-top: 1.5rem;
}

.section-badge {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1rem;
  border-left: 2px solid rgba(200, 146, 42, 0.3);
  padding-left: 1rem;
}

/* ============================================================
   WARRANTY BLOCK
   ============================================================ */

.warranty-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.25rem 1.75rem;
  border: 1px solid rgba(200, 146, 42, 0.35);
  border-left: 3px solid var(--accent-gold);
  background: rgba(200, 146, 42, 0.04);
  max-width: fit-content;
}

.warranty-years {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5vw, 5.5rem);
  color: var(--accent-gold);
  line-height: 1;
  flex-shrink: 0;
}

.warranty-detail {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.warranty-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.warranty-desc {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ============================================================
   STATS SECTION
   ============================================================ */

.section-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
  z-index: 6;
}

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

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

.stat-row {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5.5vw, 7rem);
  color: var(--accent-glow);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 300;
  color: var(--accent-gold);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   CTA SECTION — fixed overlay, stays centered-right
   ============================================================ */

#buy {
  position: fixed;
  top: 50%;
  right: 5vw;
  left: auto;
  width: auto;
  padding: 0;
  transform: translateY(-50%);
  z-index: 15;
  display: block;
}

#buy .section-inner {
  max-width: 38vw;
  transform: none;
}

.section-cta .section-heading.cta-heading {
  font-size: clamp(4rem, 6vw, 8rem);
  line-height: 0.88;
  margin-bottom: 1.5rem;
}

.gold-label {
  color: var(--accent-gold) !important;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 2rem;
  max-width: 280px;
}

.cta-button {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cta-button.primary {
  background: var(--accent-gold);
  color: var(--bg-void);
}

.cta-button.primary:hover {
  background: var(--accent-glow);
}

.cta-button.secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(242, 232, 213, 0.3);
}

.cta-button.secondary:hover {
  border-color: var(--text-primary);
}

.cta-fine {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 1.25rem;
  letter-spacing: 0.05em;
}

/* ============================================================
   SECTION POSITIONING
   Formula: top = 50vh + midpoint_fraction * 800vh
   (800vh = 900vh container - 100vh viewport = scrollable range)
   transform: translateY(-50%) centers the section at that position
   ============================================================ */

.scroll-section {
  transform: translateY(-50%);
}

/* 001 Power: midpoint 14% → 50 + 0.14*800 = 162vh */
[data-enter="8"][data-leave="20"] {
  top: 162vh;
}

/* 002 Heritage: midpoint 26.5% → 50 + 0.265*800 = 262vh */
[data-enter="20"][data-leave="33"] {
  top: 262vh;
}

/* 003 Build: midpoint 40% → 50 + 0.40*800 = 370vh */
[data-enter="33"][data-leave="47"] {
  top: 370vh;
}

/* 004 Stats: midpoint 56.5% → 50 + 0.565*800 = 502vh */
[data-enter="48"][data-leave="65"] {
  top: 502vh;
}

/* 005 Versatility: midpoint 71.5% → 50 + 0.715*800 = 622vh */
[data-enter="65"][data-leave="78"] {
  top: 622vh;
}

/* 006 Speed: midpoint 83% → 50 + 0.83*800 = 714vh */
[data-enter="78"][data-leave="88"] {
  top: 714vh;
}

/* 007 CTA: fixed overlay — top is overridden by #buy rule */
[data-enter="88"][data-leave="100"] {
  top: 50%;
}

/* ============================================================
   MOBILE — bottom-sheet layout
   Sections anchor to the bottom of the viewport so the 3D canvas
   remains visible in the upper portion. A gradient fades the section
   in from transparent at the top to opaque at the bottom.
   ============================================================ */

@media (max-width: 768px) {

  /* --- Header --- */
  .site-header { padding: 1.25rem 1.5rem; }
  .nav-links { gap: 1.25rem; }

  /* --- Hero --- */
  .hero-heading { font-size: clamp(3.5rem, 14vw, 6rem); }

  /* --- Scroll container keeps 900vh so all sections get equal time --- */
  #scroll-container { height: 900vh; }

  /* --- All scroll sections: fixed bottom-sheet.
        Canvas is visible above; gradient fades into text below. --- */
  .scroll-section {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 3.5rem 1.5rem 3rem !important;
    background: linear-gradient(
      to top,
      rgba(8, 8, 8, 0.97) 55%,
      rgba(8, 8, 8, 0.82) 78%,
      rgba(8, 8, 8, 0.35) 92%,
      transparent 100%
    ) !important;
    z-index: 5;
  }

  /* Strip card backdrop — gradient on the section handles contrast */
  .section-inner {
    max-width: 100% !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    transform: none !important;
  }

  /* Text shadow ensures legibility wherever the gradient is thinner */
  .section-label,
  .section-heading,
  .section-accent,
  .section-body,
  .section-callout,
  .section-badge,
  .warranty-title,
  .warranty-desc,
  .stat-number,
  .stat-suffix,
  .stat-label {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
  }

  .section-heading { font-size: clamp(2.5rem, 10vw, 4.5rem); }

  /* --- Stats section --- */
  .section-stats {
    padding: 3rem 1.5rem 3rem !important;
  }

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

  /* --- CTA section — same bottom-sheet treatment --- */
  #buy {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
    padding: 3.5rem 1.5rem 3rem !important;
    display: block !important;
    background: linear-gradient(
      to top,
      rgba(8, 8, 8, 0.97) 55%,
      rgba(8, 8, 8, 0.82) 78%,
      rgba(8, 8, 8, 0.35) 92%,
      transparent 100%
    ) !important;
    z-index: 15;
  }

  #buy .section-inner {
    max-width: 100% !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    transform: none !important;
  }

  /* CTA heading: tighter on mobile */
  .section-cta .section-heading.cta-heading {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  /* Buttons side-by-side */
  .cta-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 100%;
    margin-top: 1.25rem;
  }

  .cta-button {
    flex: 1;
    min-width: 130px;
    padding: 0.875rem 0.75rem;
    font-size: 0.7rem;
  }

  /* --- Warranty / jar highlight: compact --- */
  .warranty-block {
    padding: 0.875rem 1.25rem;
    gap: 0.875rem;
    margin-top: 1.25rem;
  }

  .warranty-years {
    font-size: clamp(2.5rem, 9vw, 3.5rem);
  }

  /* --- Chrome: hide cursor dot (no mouse) --- */
  #cursor-dot { display: none !important; }

  /* --- Section counter: too cramped on small screens --- */
  #section-counter { display: none; }

  /* --- Sound toggle --- */
  #sound-toggle {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 34px;
    height: 34px;
  }

  /* --- Scroll progress bar: slightly thicker for mobile visibility --- */
  #scroll-progress { height: 3px; }
}
