/* ============================================
   VELLION — Luxury Pen Scroll-Driven Website
   ============================================ */

:root {
  /* Backgrounds */
  --bg-light: #f5f2ed;
  --bg-dark: #111111;
  --bg-accent: #e8e3db;

  /* Text */
  --text-on-light: #1a1a1a;
  --text-body: #3d3a36;
  --text-muted: #8a857d;
  --text-on-dark: #f0ede8;

  /* Accent */
  --accent-gold: #b8a88a;
  --accent-gold-light: #d4c9b5;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Libre Baskerville', 'Times New Roman', serif;

  /* Spacing */
  --section-pad: 5vw;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-on-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body {
  height: auto;
}

body {
  overflow-x: hidden;
}

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

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

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

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

.loader-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-on-light);
}

.loader-track {
  width: 200px;
  height: 1px;
  background: var(--bg-accent);
  position: relative;
  overflow: hidden;
}

#loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--text-on-light);
  transition: width 0.1s linear;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem var(--section-pad);
  transition: background 0.4s var(--ease-smooth);
}

.site-header.scrolled {
  background: rgba(245, 242, 237, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header.dark-mode {
  background: rgba(17, 17, 17, 0.85);
}

.site-header.dark-mode .header-logo,
.site-header.dark-mode .header-links a {
  color: var(--text-on-dark);
}

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

.header-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.4s;
}

.header-links {
  display: flex;
  gap: 2.5rem;
}

.header-links a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  transition: color 0.3s;
}

.header-links a:hover {
  color: var(--text-on-light);
}

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

.hero-standalone {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-light);
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--section-pad);
}

.hero-est {
  margin-bottom: 2rem;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 14rem);
  font-weight: 800;
  line-height: 0.9;
  color: var(--text-on-light);
  margin-bottom: 2rem;
}

.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.word-inner {
  display: inline-block;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  animation: bounce 2.5s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

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

.canvas-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
}

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

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

#dark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-dark);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

/* ============================================
   MARQUEE
   ============================================ */

.marquee-wrap {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100vw;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  overflow: visible;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: 12vw;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: var(--text-on-light);
  opacity: 0.06;
}

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

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

/* ============================================
   SCROLL SECTIONS
   ============================================ */

.scroll-section {
  position: absolute;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  min-height: 60vh;
}

.scroll-section.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Side alignment */
.align-left {
  padding-left: var(--section-pad);
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: var(--section-pad);
  justify-content: flex-end;
}

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

/* ============================================
   SECTION TYPOGRAPHY
   ============================================ */

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

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text-on-light);
  margin-bottom: 1.5rem;
}

.section-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 34ch;
}

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

.section-stats {
  justify-content: center;
  text-align: center;
  padding: 0 var(--section-pad);
}

.section-stats .section-inner {
  max-width: 100%;
  width: 100%;
}

.section-stats .section-label {
  color: var(--text-on-dark);
  opacity: 0.6;
  margin-bottom: 3rem;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 8vw;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--text-on-dark);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--accent-gold);
  margin-top: 0.25rem;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-on-dark);
  opacity: 0.5;
  margin-top: 0.5rem;
}

/* ============================================
   CTA BUTTON
   ============================================ */

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-on-light);
  border: 1px solid var(--text-on-light);
  padding: 1.1rem 2.5rem;
  margin-top: 2.5rem;
  transition: all 0.5s var(--ease-smooth);
  cursor: pointer;
}

.cta-button:hover {
  background: var(--text-on-light);
  color: var(--bg-light);
}

.cta-button svg {
  transition: transform 0.4s var(--ease-smooth);
}

.cta-button:hover svg {
  transform: translateX(4px);
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
  .header-links {
    display: none;
  }

  .hero-heading {
    font-size: clamp(3rem, 14vw, 5.5rem);
  }

  #scroll-container {
    height: 600vh;
  }

  .align-left,
  .align-right {
    padding-left: 6vw;
    padding-right: 6vw;
    justify-content: flex-start;
  }

  .align-left .section-inner,
  .align-right .section-inner {
    max-width: 100%;
  }

  .section-heading {
    font-size: clamp(2rem, 9vw, 3.5rem);
  }

  .section-body {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .stats-grid {
    flex-direction: column;
    gap: 2.5rem;
  }

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

  .section-content .section-inner {
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.08);
  }
}
