:root {
  --bg-light: #fdf8f5;
  --bg-dark: #1c0f0a;
  --bg-tan: #f0e4d8;
  --text-on-light: #1c0f0a;
  --text-on-dark: #fdf8f5;
  --text-muted: #7a5c4a;
  --accent: #c8a882;
  --accent-soft: #e2cdb0;
  --accent-deep: #a8855a;
  --scrim-dark: rgba(20, 12, 8, 0.55);
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: auto; }

body {
  /* Dark, not cream: this shows through briefly during the hero-to-canvas
     crossfade, and cream there reads as a blank/broken page. */
  background: var(--bg-dark);
  color: var(--text-on-light);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: default;
}

::selection { background: var(--accent); color: var(--bg-dark); }

img, canvas { display: block; max-width: 100%; }

/* ============ Loader ============ */
#loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  color: var(--text-on-dark);
}
#loader-bar {
  width: 220px; height: 2px;
  background: rgba(253, 248, 245, 0.15);
  overflow: hidden;
}
#loader-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.2s ease;
}
#loader-percent {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}

/* ============ Header ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.75rem 5vw;
}
.site-header::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15, 9, 6, 0.55) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-on-dark);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}
.nav-links {
  display: flex; align-items: center; gap: 2.25rem;
}
.nav-links a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-cta {
  border: 1px solid rgba(253, 248, 245, 0.45);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}

/* ============ Hero ============ */
.hero-standalone {
  position: relative;
  height: 100vh;
  width: 100%;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 5vw;
  z-index: 2;
  overflow: hidden;
}
.hero-standalone::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 15%, rgba(200, 168, 130, 0.2), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(168, 133, 90, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-label {
  color: var(--accent);
  margin-bottom: 1.5rem;
  position: relative;
}
.hero-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 20ch;
  position: relative;
}
.hero-heading .word {
  display: inline-block;
  overflow: hidden;
}
.hero-tagline {
  margin-top: 1.75rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(253, 248, 245, 0.7);
  max-width: 40ch;
  position: relative;
  font-weight: 400;
}
.scroll-indicator {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.scroll-indicator span {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(253, 248, 245, 0.5);
}
.scroll-arrow {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, rgba(253, 248, 245, 0.6), transparent);
  animation: arrow-pulse 1.8s ease-in-out infinite;
}
@keyframes arrow-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============ Canvas ============ */
.canvas-wrap {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 1;
  background: rgb(85, 90, 92);
  clip-path: circle(0% at 50% 50%);
}
#canvas { width: 100%; height: 100%; }

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

/* ============ Marquee ============ */
.marquee-wrap {
  position: fixed; top: 87%; left: 0;
  transform: translateY(-50%);
  z-index: 4;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  padding: 1.1rem 0;
  background: linear-gradient(to bottom, transparent, rgba(15, 9, 6, 0.45), transparent);
}
.marquee-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4.2vw, 3.4rem);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-on-dark);
  letter-spacing: 0.01em;
  display: inline-block;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

/* ============ Scroll container ============ */
#scroll-container {
  position: relative;
  height: 1050vh;
  z-index: 5;
}

.scroll-section {
  position: absolute;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  padding: 0 5vw;
}

.section-inner {
  max-width: 36vw;
  position: relative;
  padding: 2.25rem 2rem;
}
.section-inner::before {
  content: '';
  position: absolute;
  inset: -1rem -1.5rem;
  z-index: -1;
  border-radius: 4px;
}
.align-left .section-inner::before {
  background: linear-gradient(to right, var(--scrim-dark) 55%, transparent 100%);
}
.align-right .section-inner::before {
  background: linear-gradient(to left, var(--scrim-dark) 55%, transparent 100%);
}

.align-left .section-inner { margin-right: auto; }
.align-right { display: flex; justify-content: flex-end; }
.align-right .section-inner { margin-left: auto; text-align: right; }

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

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text-on-dark);
  margin-bottom: 1.1rem;
}

.section-body {
  font-size: clamp(0.95rem, 1.05vw, 1.1rem);
  line-height: 1.6;
  color: rgba(253, 248, 245, 0.82);
  font-weight: 400;
}

.section-stats { text-align: center; }
.stats-grid {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
  flex-wrap: wrap;
  max-width: 90vw;
  margin: 0 auto;
}
.stat {
  display: flex; flex-direction: column; align-items: center;
  color: var(--text-on-dark);
}
.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  color: var(--accent);
  margin-left: 0.15rem;
}
.stat-label {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 248, 245, 0.65);
}

/* ============ Pricing ============ */
.section-pricing { text-align: center; }
.pricing-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 2.25rem;
  position: relative;
}
.pricing-inner::before {
  content: '';
  position: absolute;
  inset: -0.5rem;
  z-index: -1;
  border-radius: 8px;
  background: var(--scrim-dark);
}
.pricing-sub { margin-bottom: 0.5rem; }
.pricing-grid {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.price-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: rgba(253, 248, 245, 0.06);
  border: 1px solid rgba(200, 168, 130, 0.25);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: left;
}
.price-card-popular {
  border-color: var(--accent);
  background: rgba(200, 168, 130, 0.1);
  box-shadow: 0 0 40px rgba(200, 168, 130, 0.18);
}
.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.price-tier {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-on-dark);
  margin-bottom: 0.3rem;
}
.price-sub {
  font-size: 0.76rem;
  color: rgba(253, 248, 245, 0.55);
  margin-bottom: 1.2rem;
}
.price-amount { margin-bottom: 1.5rem; }
.price-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.price-period { font-size: 0.85rem; color: rgba(253, 248, 245, 0.55); }
.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  flex: 1;
}
.price-features li {
  font-size: 0.83rem;
  color: rgba(253, 248, 245, 0.82);
  padding-left: 1.2rem;
  position: relative;
}
.price-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.price-card .cta-button {
  width: 100%;
  text-align: center;
  margin-top: auto;
}
.cta-button-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.cta-button-outline:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.section-cta .section-inner { max-width: 32vw; }
.cta-button {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 1rem 2.2rem;
  background: var(--accent);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  /* Only transition background here: a transform transition fights GSAP's
     per-frame inline transform writes during the entrance animation and
     never lets the button settle at its final (untransformed) position. */
  transition: background 0.3s ease;
}
.cta-button:hover {
  background: var(--accent-soft);
  transform: translateY(-3px);
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  #scroll-container { height: 740vh; }
  .site-header { padding: 1.25rem 6vw; }
  .nav-links { gap: 1.1rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section-inner, .section-cta .section-inner { max-width: 84vw; text-align: center; margin: 0 auto; }
  .align-left .section-inner::before,
  .align-right .section-inner::before { background: var(--scrim-dark); inset: -1rem; }
  .align-right { justify-content: center; }
  .scroll-section { padding: 0 6vw; }
  .marquee-text { font-size: clamp(1.4rem, 7vw, 2.4rem); }
  .stats-grid { gap: 2.5rem; padding: 1.5rem; }
  .hero-heading { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .pricing-inner { padding: 1.75rem 1.25rem; max-width: 90vw; }
  .pricing-grid { flex-direction: column; align-items: stretch; gap: 1.1rem; margin-top: 1.5rem; }
  .price-card { max-width: 100%; padding: 1.5rem 1.25rem; }
}
