/* ─── VARIABLES ──────────────────────────────────────────────────────────────── */
:root {
  --bg:            #f5f5f7;   /* Apple's off-white */
  --bg-white:      #ffffff;
  --text:          #1d1d1f;   /* Apple's main text */
  --text-secondary:#6e6e73;   /* Apple's secondary text */
  --text-dark-bg:  #f5f5f7;
  --border:        rgba(0, 0, 0, 0.08);
  --dark-section:  #1d1d1f;
  --font:          'DM Sans', -apple-system, sans-serif;
}

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

html { scroll-behavior: auto; }

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

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

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

.loader-brand {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

#loader-bar-wrap {
  width: 160px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  overflow: hidden;
}

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

#loader-percent {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 3rem;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

.nav-links a {
  font-size: 0.75rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.nav-links .nav-cta {
  font-weight: 500;
  color: var(--text);
  background: var(--text);
  color: var(--bg-white);
  padding: 0.45rem 1.1rem;
  border-radius: 980px;
  font-size: 0.72rem;
  transition: background 0.2s, opacity 0.2s;
}

.nav-links .nav-cta:hover {
  opacity: 0.8;
  color: var(--bg-white);
}

/* ─── HERO STANDALONE ────────────────────────────────────────────────────────── */
.hero-standalone {
  position: relative;
  height: 100vh;
  width: 100%;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
}

.hero-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-heading {
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-heading .word {
  display: inline-block;
}

.hero-tagline {
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 38ch;
}

.hero-cta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--bg-white);
  background: var(--text);
  padding: 0.85rem 2.2rem;
  border-radius: 980px;
  transition: opacity 0.2s;
}

.hero-cta:hover { opacity: 0.8; }

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow {
  width: 1px;
  height: 44px;
  background: var(--text-secondary);
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top center;
  opacity: 0.4;
}

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

/* ─── CANVAS ─────────────────────────────────────────────────────────────────── */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
  background: var(--bg-white);
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateZ(0); /* GPU compositing layer */
}

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

/* ─── MARQUEE ────────────────────────────────────────────────────────────────── */
.marquee-wrap {
  position: fixed;
  bottom: 4vh;
  left: 0;
  right: 0;
  z-index: 5;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.marquee-text {
  white-space: nowrap;
  font-family: var(--font);
  font-size: 12vw;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
  line-height: 1;
  will-change: transform;
}

/* ─── SCROLL CONTAINER ───────────────────────────────────────────────────────── */
#scroll-container {
  position: relative;
  height: 1050vh;
  z-index: 3;
}

/* ─── SCROLL SECTIONS ────────────────────────────────────────────────────────── */
.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  opacity: 0;
  will-change: opacity, transform;
}

.scroll-section[data-persist="true"] { pointer-events: auto; }

/* Side alignment — product center, text in outer 40% zones */
.align-left  { padding-left: 6vw;  padding-right: 54vw; }
.align-right { padding-left: 54vw; padding-right: 6vw;  }

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

/* ─── WHITE CARD BEHIND TEXT ────────────────────────────────────────────────── */
.section-content .section-inner {
  background: rgba(255, 255, 255, 0.96);
  padding: 1.6rem 2rem 1.8rem;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ─── SECTION TYPOGRAPHY ─────────────────────────────────────────────────────── */
.section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

/* On dark overlay (stats) — labels go lighter */
.section-stats .stat-label {
  color: rgba(245, 245, 247, 0.55);
}

.section-heading {
  font-size: clamp(2.8rem, 4.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* Headings on dark (stats, if any) */
.section-stats .section-heading { color: var(--text-dark-bg); }

.section-body {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 38ch;
}

/* ─── STATS SECTION ──────────────────────────────────────────────────────────── */
.section-stats {
  padding: 0 8vw;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 4vw;
  width: 100%;
  text-align: center;
}

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

.stat-top {
  display: flex;
  align-items: baseline;
  gap: 0.08em;
  line-height: 1;
}

.stat-number {
  font-size: clamp(3.5rem, 7vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-dark-bg);
  line-height: 1;
}

.stat-suffix {
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  font-weight: 400;
  color: rgba(245, 245, 247, 0.6);
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.5);
  margin-top: 0.75rem;
}

/* ─── CTA FOOTER ─────────────────────────────────────────────────────────────── */
.section-cta {
  left: 0 !important;
  right: 0 !important;
  /* anchor to bottom of scroll container, overriding JS midpoint positioning */
  top: auto !important;
  bottom: 0 !important;
  transform: none !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 4rem 8vw;
}

.cta-left {
  display: flex;
  flex-direction: column;
}

.cta-left .section-label {
  margin-bottom: 1rem;
}

.cta-heading {
  font-size: clamp(3rem, 5.5vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 1rem;
}

.cta-sub {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 400;
  color: var(--text-secondary);
}

.cta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  flex-shrink: 0;
}

.cta-price {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: #ffffff;
  background: #000000;
  padding: 1.1rem 3rem;
  border-radius: 980px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.section-note {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.65;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 5vw;
    gap: 2rem;
  }
  .cta-right { align-items: flex-start; }
}

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

  /* Full-width cards on mobile — collapse side alignment */
  .align-left, .align-right {
    padding: 0 4vw;
  }

  .section-content .section-inner {
    max-width: 100%;
    background: rgba(255, 255, 255, 0.94);
    padding: 1.4rem 1.5rem 1.6rem;
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  }

  /* Hero */
  .hero-standalone { text-align: center; }
  .hero-content { padding: 0 6vw; }
  .hero-heading { font-size: clamp(2.8rem, 13vw, 4.5rem); }
  .hero-tagline { font-size: 0.9rem; }
  .hero-cta { padding: 0.8rem 2rem; font-size: 0.85rem; }

  /* Section typography */
  .section-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .section-label   { font-size: 0.62rem; }
  .section-body    { font-size: 0.85rem; }

  /* Stats — 2 columns */
  .section-stats { padding: 0 4vw; min-height: 45vh; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 3vw;
  }
  .stat-number { font-size: clamp(3rem, 14vw, 5rem); }

  /* Marquee */
  .marquee-wrap { bottom: 3vh; }
  .marquee-text { font-size: 20vw; }

  /* CTA footer */
  .cta-inner { padding: 2.5rem 5vw; gap: 1.5rem; }
  .cta-heading { font-size: clamp(2rem, 9vw, 3rem); }
  .cta-button  { font-size: 0.9rem; padding: 1rem 2.2rem; }

  /* Nav */
  .site-header { padding: 0 1.25rem; }
  .nav-links li:not(:last-child) { display: none; } /* keep only Buy on mobile */
}
