/* ============================================================
   TENSEGRITY — Fascia Performance Training
   Premium-wellness direction. Palette sampled from the écorché clip:
   warm near-black, muscle clay-red, bone/fascia cream.
   ============================================================ */

:root {
  --black:        #0b0a09;  /* warm near-black — hero + canvas fill + dark zones */
  --espresso:     #14110e;
  --cream:        #efe7d8;  /* light zone — the price stage */
  --bone:         #e5d6be;
  --clay:         #c26049;  /* primary accent — muscle red */
  --clay-soft:    #c97b5e;
  --maroon:       #6e2e22;

  --text-on-dark:        #efe7d8;
  --text-on-dark-muted:  #ab9a86;
  --text-on-light:       #1f1a15;
  --text-on-light-muted: #6b5e50;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;

  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --edge: clamp(1.4rem, 5vw, 5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--black);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* Carousel: hide native scroll affordances — navigation is gesture-driven */
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

::selection { background: var(--clay); color: var(--cream); }

em { font-style: italic; }

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease-soft), visibility 0.8s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { width: min(78vw, 30rem); text-align: center; }
.loader-brand {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.42em;
  font-size: 0.82rem;
  color: var(--bone);
  text-indent: 0.42em;
  margin-bottom: 1.6rem;
}
.loader-track {
  height: 1px; width: 100%;
  background: rgba(229, 214, 190, 0.16);
  overflow: hidden;
}
#loader-bar {
  height: 100%; width: 0%;
  background: var(--clay);
  transition: width 0.3s linear;
}
.loader-meta {
  display: flex; justify-content: space-between;
  margin-top: 0.9rem;
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

/* ============================================================
   ATMOSPHERE — vignette + grain
   ============================================================ */
.vignette {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 38%, rgba(8,7,6,0.55) 78%, rgba(8,7,6,0.9) 100%);
  mix-blend-mode: multiply;
}
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 6s steps(5) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%, 2%); }
  40% { transform: translate(3%, -3%); }
  60% { transform: translate(-2%, 4%); }
  80% { transform: translate(4%, 1%); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1.1rem, 2.4vw, 1.9rem) var(--edge);
  mix-blend-mode: difference; /* stays legible over light + dark zones */
}
.logo {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.34em;
  font-size: 0.82rem;
  text-indent: 0.34em;
  color: var(--cream);
  text-decoration: none;
}
.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.4rem); }
.nav a {
  font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.3s;
}
.nav a:hover { opacity: 1; }
.nav-cta {
  opacity: 1 !important;
  border: 1px solid var(--cream);
  border-radius: 100px;
  padding: 0.5em 1.15em;
}
@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero-standalone {
  position: relative; z-index: 20;
  height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--edge);
  background: radial-gradient(130% 120% at 70% 20%, #1a1512 0%, var(--black) 55%);
}
.hero-inner { max-width: 60rem; }
.hero-label { color: var(--clay-soft); margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.hero-heading {
  font-family: var(--font-display);
  font-weight: 330;
  font-size: clamp(4rem, 16vw, 13rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.hero-heading .word { display: inline-block; overflow: hidden; }
.hero-heading em { color: var(--clay); font-weight: 360; }
.hero-tagline {
  margin-top: clamp(1.6rem, 3vw, 2.6rem);
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}

.scroll-indicator {
  position: absolute; bottom: clamp(1.6rem, 4vh, 3rem); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
.scroll-arrow {
  width: 1px; height: 2.6rem;
  background: linear-gradient(var(--clay-soft), transparent);
  animation: scroll-pulse 2.4s var(--ease-soft) infinite;
}
@keyframes scroll-pulse {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ============================================================
   CANVAS (the figure)
   ============================================================ */
.canvas-wrap {
  position: fixed; inset: 0; z-index: 2;
  clip-path: circle(0% at 50% 50%);
  transition: transform 1.1s var(--ease-soft);
  will-change: clip-path, opacity, transform;
}
#canvas { display: block; width: 100vw; height: 100vh; height: 100svh; }

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

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-wrap {
  position: fixed; top: 46%; left: 0; z-index: 3;
  transform: translateY(-50%);
  width: 100%; pointer-events: none;
  opacity: 0;
  will-change: opacity;
}
.marquee-text {
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 13vw;
  line-height: 1;
  letter-spacing: -0.01em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(229, 214, 190, 0.2);
  text-stroke: 1px rgba(229, 214, 190, 0.2);
  will-change: transform;
}

/* ============================================================
   SCROLL SECTIONS
   ============================================================ */
#scroll-container { position: relative; height: 900vh; z-index: 10; }

.scroll-section {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  pointer-events: none;
}
.align-left  { justify-content: flex-start; padding: 0 55vw 0 var(--edge); }
.align-right { justify-content: flex-end;   padding: 0 var(--edge) 0 55vw; }
.section-inner { max-width: 40ch; }

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--clay-soft);
  margin-bottom: 1.4rem;
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.section-heading em { color: var(--clay); }
.section-body {
  margin-top: clamp(1.1rem, 2vw, 1.7rem);
  font-size: clamp(1rem, 1.25vw, 1.22rem);
  line-height: 1.58;
  color: var(--text-on-dark-muted);
}
.section-body em { color: var(--bone); font-style: italic; }

/* Stats — the one centered moment, over the dark overlay */
.section-stats { justify-content: center; padding: 0 var(--edge); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  width: 100%; max-width: 78rem;
  text-align: center;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-number {
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  color: var(--cream);
}
.stat-suffix {
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--clay);
  margin-top: 0.2em;
}
.stat-label {
  margin-top: 1.1rem;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

/* ============================================================
   PRICE STAGE — static cream background revealed at the end
   ============================================================ */
#price-stage {
  position: fixed; inset: 0; z-index: 6;
  background:
    radial-gradient(120% 100% at 50% 0%, #f6f0e6 0%, var(--cream) 48%, #e4d8c5 100%);
  color: var(--text-on-light);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  clip-path: circle(0% at 50% 100%);
  visibility: hidden;
  will-change: clip-path;
}
.price-inner { padding: 6rem var(--edge); max-width: 46rem; }
.price-kicker {
  display: block;
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--clay); font-weight: 600;
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
}
.price-begin {
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(3.6rem, 11vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--espresso);
}
.price-figure {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0.08em;
  margin: clamp(1.4rem, 3vw, 2.4rem) 0 0.4rem;
  color: var(--espresso);
}
.price-currency {
  font-family: var(--font-display); font-weight: 340;
  font-size: clamp(1.6rem, 3.5vw, 3rem); margin-top: 0.5em;
  color: var(--clay);
}
.price-amount {
  font-family: var(--font-display); font-weight: 360;
  font-size: clamp(5rem, 17vw, 13rem); line-height: 0.85;
  letter-spacing: -0.03em;
}
.price-term {
  font-family: var(--font-body);
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-on-light-muted);
  margin-top: 0.9em;
}
.price-includes {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem 1.4rem;
  margin: clamp(1.8rem, 3vw, 2.6rem) auto;
  max-width: 34rem;
}
.price-includes li {
  position: relative;
  font-size: 0.92rem; color: var(--text-on-light-muted);
  padding-left: 1.1rem;
}
.price-includes li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--clay);
}
.price-cta {
  display: inline-flex; align-items: center; gap: 0.6em;
  background: var(--espresso); color: var(--cream);
  text-decoration: none;
  font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  padding: 1.15em 2.2em;
  border-radius: 100px;
  transition: background 0.4s var(--ease-soft), transform 0.4s var(--ease-soft);
}
.price-cta span { transition: transform 0.4s var(--ease-soft); }
.price-cta:hover { background: var(--clay); transform: translateY(-2px); }
.price-cta:hover span { transform: translateX(5px); }
.price-note {
  margin-top: clamp(1.4rem, 2.5vw, 2rem);
  font-size: 0.74rem; letter-spacing: 0.06em;
  color: var(--text-on-light-muted);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  :root { --edge: 1.4rem; }
  #scroll-container { height: 620vh; }

  .align-left, .align-right {
    justify-content: center;
    padding: 0 var(--edge);
    text-align: left;
  }
  .scroll-section.section-content { align-items: flex-end; padding-bottom: 16vh; }
  .section-inner {
    max-width: none; width: 100%;
    background: linear-gradient(transparent, rgba(8,7,6,0.78) 22%);
    padding: 4rem 1.2rem 1.2rem;
    border-radius: 12px;
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.4rem 1.2rem; }
  .marquee-text { font-size: 22vw; }
  .price-includes { flex-direction: column; align-items: center; gap: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-arrow { animation: none; }
}
