/* ================================================================
   Oura Ring — Editorial Luxury Wellness
   Pure black • Fraunces + Satoshi • Champagne accent
   ================================================================ */

:root {
  --bg-dark: #000000;
  --text-on-dark: #E8E4DC;
  --text-muted: #7A7670;
  --accent: #E0C28A;
  --accent-soft: rgba(224, 194, 138, 0.18);
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;

  --header-h: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #000; }

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

/* ---------- Loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  text-align: center;
  width: min(400px, 80vw);
}
.loader-brand {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 400, "SOFT" 30;
  font-size: 3.2rem;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  color: var(--accent);
  margin-bottom: 2.5rem;
}
.loader-bar-wrap {
  width: 100%;
  height: 1px;
  background: rgba(232, 228, 220, 0.12);
  overflow: hidden;
  margin-bottom: 1rem;
}
#loader-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}
#loader-percent {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 3vw;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0));
  pointer-events: none;
}
.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  pointer-events: auto;
}
.site-header .logo {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40, "wght" 500, "SOFT" 20;
  font-size: 1.25rem;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: var(--text-on-dark);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-on-dark);
  opacity: 0.75;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.nav-links a:hover { opacity: 1; color: var(--accent); }
.nav-links .nav-cta {
  color: var(--accent);
  opacity: 1;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------- Hero ---------- */
.hero-standalone {
  position: relative;
  height: 100vh;
  width: 100vw;
  background: var(--bg-dark);
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 0 6vw;
  overflow: hidden;
}
.hero-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
.hero-label {
  display: block;
  margin-bottom: 2rem;
}
.hero-heading {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 400, "SOFT" 50;
  font-size: clamp(3.5rem, 11.5vw, 11.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 2.5rem 0;
  color: var(--text-on-dark);
  font-weight: 400;
}
.hero-heading em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 350, "SOFT" 100;
  color: var(--accent);
}
.hero-word {
  display: inline-block;
  overflow: hidden;
  will-change: transform, opacity;
}
.hero-word > em,
.hero-word {
  /* baseline alignment helper */
}
.hero-break {
  display: block;
  height: 0;
  width: 100%;
}
.hero-tagline {
  max-width: 560px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(232, 228, 220, 0.78);
  margin: 0;
  font-weight: 400;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(224,194,138,0), var(--accent));
  animation: scrollPulse 2.4s ease-in-out infinite;
  transform-origin: top;
}
.scroll-text {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ---------- Canvas ---------- */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: var(--bg-dark);
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
  pointer-events: none;
}
#canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  z-index: 3;
  transform: translateY(-50%);
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.marquee-text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 300, "SOFT" 0;
  font-size: 14vw;
  letter-spacing: -0.04em;
  color: rgba(232, 228, 220, 0.045);
  text-transform: uppercase;
  will-change: transform;
  font-style: italic;
}
.marquee-text span { padding: 0 0.2em; }
.marquee-text .dot {
  color: rgba(224, 194, 138, 0.12);
  font-style: normal;
}

/* ---------- Scroll sections ---------- */
#scroll-container {
  position: relative;
  width: 100%;
  height: 450vh;
  z-index: 10;
}

.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  padding: 0;
  z-index: 11;
  pointer-events: none;
}
.scroll-section .section-inner {
  pointer-events: auto;
  max-width: 44vw;
}

.align-left {
  padding-left: 6vw;
  padding-right: 50vw;
}
.align-right {
  padding-left: 50vw;
  padding-right: 6vw;
  text-align: right;
}
.align-right .section-inner {
  margin-left: auto;
}

/* Editorial tags */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
  font-feature-settings: "tnum";
  padding-left: 0.28em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.85);
}

.section-heading {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 110, "wght" 500, "SOFT" 40;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin: 0 0 1.6rem 0;
  font-weight: 500;
  color: var(--text-on-dark);
  text-shadow: 0 2px 40px rgba(0,0,0,0.85), 0 0 80px rgba(0,0,0,0.5);
}
.section-heading em {
  font-style: italic;
  font-variation-settings: "opsz" 110, "wght" 400, "SOFT" 100;
  color: var(--accent);
}

.section-body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(232, 228, 220, 0.92);
  max-width: 460px;
  margin: 0;
  text-shadow: 0 2px 30px rgba(0,0,0,0.9), 0 0 60px rgba(0,0,0,0.6);
  font-weight: 400;
}
.align-right .section-body { margin-left: auto; }

/* ---------- Stats ---------- */
.section-stats {
  z-index: 12;
}
.stats-inner {
  width: 100%;
  padding: 0 6vw;
  text-align: center;
  pointer-events: auto;
}
.stats-label {
  display: block;
  margin-bottom: 3rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  position: relative;
}
.stat::after {
  content: "";
  position: absolute;
  right: -1.5rem;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(224, 194, 138, 0.18);
}
.stat:last-child::after { display: none; }
.stat-number {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 350, "SOFT" 30;
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-on-dark);
  font-feature-settings: "tnum";
  display: inline;
}
.stat-suffix {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48, "wght" 350, "SOFT" 30;
  font-size: clamp(1.8rem, 3vw, 3rem);
  color: var(--accent);
  margin-left: 0.15em;
  vertical-align: baseline;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------- CTA ---------- */
.section-cta {
  z-index: 13;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.1rem 2.2rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.45s ease, color 0.45s ease, letter-spacing 0.45s ease, padding 0.45s ease;
  position: relative;
  overflow: hidden;
}
.cta-button .cta-arrow {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-block;
}
.cta-button:hover {
  background: var(--accent);
  color: #000;
  letter-spacing: 0.28em;
  padding-right: 2.6rem;
}
.cta-button:hover .cta-arrow {
  transform: translateX(0.4rem);
}

.end-marker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 3rem;
  justify-content: flex-end;
}
.end-marker .end-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, rgba(224,194,138,0), var(--accent));
}
.end-marker .end-text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Grain ---------- */
#grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  :root { --header-h: 56px; }

  .site-header { padding: 0 5vw; }
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.65rem; letter-spacing: 0.18em; }

  .hero-standalone { padding: 0 6vw; }
  .hero-heading {
    font-size: clamp(2.6rem, 13vw, 5.5rem);
    line-height: 1;
  }
  .hero-tagline { font-size: 0.95rem; }

  #scroll-container { height: 400vh; }

  .align-left, .align-right {
    padding-left: 6vw;
    padding-right: 6vw;
    text-align: left;
  }
  .scroll-section .section-inner {
    max-width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    border-radius: 2px;
    backdrop-filter: blur(6px);
  }
  .section-heading { font-size: clamp(2rem, 8vw, 3.4rem); }
  .section-body { font-size: 0.95rem; }

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

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

  .cta-button { padding: 1rem 1.6rem; font-size: 0.72rem; }
}
