/* ============================================
   PulpitFlow — Premium Dark Landing Page
   ============================================ */

:root {
  --bg: #000000;
  --bg-overlay: rgba(0, 0, 0, 0.92);
  --text-primary: #f0ede8;
  --text-muted: #777777;
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

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

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

body {
  background: var(--bg);
  overflow-x: hidden;
}

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

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

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

.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.loader-track {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

#loader-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.15s ease;
}

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

/* ---- HEADER ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 4vw;
  transition: opacity 0.4s ease;
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

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

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 0.5rem 1.4rem;
  border-radius: 2px;
  transition: background 0.3s ease, color 0.3s ease !important;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

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

.hero-content {
  text-align: center;
  max-width: 90vw;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 2rem;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 12rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.hero-heading .word {
  display: inline-block;
  margin: 0 0.15em;
  opacity: 0;
  transform: translateY(60px);
}

.hero-heading .word.accent {
  color: var(--accent);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(30px);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: pulse-down 2s ease-in-out infinite;
}

@keyframes pulse-down {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

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

.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

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

/* ---- LEFT GRADIENT OVERLAY ---- */
#left-gradient {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 30%, rgba(0, 0, 0, 0.4) 50%, transparent 65%);
  opacity: 0;
  pointer-events: none;
}

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

.marquee-text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 14vw);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(201, 168, 76, 0.25);
  will-change: transform;
}

/* ---- SCROLL CONTAINER ---- */
#scroll-container {
  position: relative;
  height: 500vh;
  z-index: 5;
}

/* ---- SCROLL SECTIONS ---- */
.scroll-section {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0;
}

.scroll-section.visible {
  pointer-events: auto;
}

.section-inner {
  max-width: 40vw;
  position: relative;
  padding: 3rem 2.5rem;
}

/* Strong dark gradient behind text for readability */
.section-content .section-inner::before {
  content: '';
  position: absolute;
  inset: -4rem -5rem;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.3) 70%, transparent 85%);
  z-index: -1;
  pointer-events: none;
}

/* Intro text centered below the plaque */
.section-intro {
  justify-content: center;
  padding: 0;
  text-align: center;
  padding-top: 65vh;
}

.section-intro .section-inner {
  max-width: 80vw;
  text-align: center;
}

.section-intro .section-inner::before {
  display: none;
}

.section-intro.section-content .section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9), 0 0 60px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Hard right-side gradient for carousels section */
.section-carousels .section-inner::before {
  inset: -100vh -20vw -100vh -5rem;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.95) 60%, rgba(0, 0, 0, 0.6) 80%, transparent 100%);
}

/* Left-side gradient sections use a full-screen fixed overlay instead of ::before */
.section-thumbnails .section-inner::before,
.section-quotes .section-inner::before,
.section-blog .section-inner::before {
  display: none;
}

/* Side alignment */
.align-left {
  justify-content: flex-start;
  padding-left: 6vw;
  padding-right: 55vw;
}

.align-right {
  justify-content: flex-end;
  padding-left: 55vw;
  padding-right: 6vw;
}

.align-right .section-inner {
  text-align: right;
}

/* Section typography */
.section-content .section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.6);
}

.section-content .section-body {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 400;
  line-height: 1.8;
  color: rgba(240, 237, 232, 0.95);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 0, 0, 0.7);
}

/* ---- STATS ---- */
.section-stats {
  justify-content: center;
  padding: 0 8vw;
}

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

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

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  font-weight: 300;
  color: var(--accent);
  margin-top: -0.2rem;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---- STATS + CTA COMBINED ---- */
.stats-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6rem;
  width: 100%;
  max-width: 1100px;
}

.cta-inline {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 700px;
}

.cta-inline .section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
}

.cta-inline .section-body {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 400;
  line-height: 1.8;
  color: rgba(240, 237, 232, 0.85);
  margin-bottom: 2.5rem;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--accent);
  padding: 1.1rem 3rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.3);
}

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

  .hero-heading {
    font-size: clamp(2.5rem, 12vw, 4.5rem);
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

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

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

  .align-right .section-inner {
    text-align: left;
  }

  .section-content .section-body {
    font-size: 0.95rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
  }

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

  .cta-inner .section-heading {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .section-content .section-heading {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 1rem 5vw;
  }

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

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 1.5rem;
  }

  .cta-button {
    padding: 1rem 2rem;
    font-size: 0.8rem;
  }
}
