/* ===== VARIABLES ===== */
:root {
  --bg: #0a0a0f;
  --bg-hero: #0c1a2a;
  --text: #e8e6e1;
  --text-dim: #8a8880;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

a {
  color: var(--text);
  text-decoration: none;
}

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

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

.loader-brand {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.loader-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  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.85rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

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

.site-header.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

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

.header-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.header-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-dim);
  transition: color 0.3s ease;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

/* ===== HERO ===== */
.hero-standalone {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  background-image: url('../assets/frontpage/sunset-sky-50-50-ocean-fish-school.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-standalone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 15, 0.3) 0%,
    rgba(10, 10, 15, 0.1) 40%,
    rgba(10, 10, 15, 0.4) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

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

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
}

.hero-content .section-label {
  opacity: 0;
  transform: translateY(20px);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  opacity: 0;
}

.scroll-indicator span {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.scroll-indicator svg {
  color: var(--text-dim);
  animation: bobDown 2s ease-in-out infinite;
}

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

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

.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;
}

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

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 14rem);
  font-weight: 700;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(232, 230, 225, 0.12);
  letter-spacing: -0.03em;
  line-height: 1;
  will-change: transform;
}

/* ===== END IMAGE ===== */
.end-image-wrap {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.end-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== SCROLL CONTAINER ===== */
#scroll-container {
  position: relative;
  height: 900vh;
  z-index: 5;
  pointer-events: none;
}

/* ===== SECTIONS ===== */
.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
}

.section-inner {
  max-width: 520px;
}

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

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

.align-center {
  justify-content: center;
  text-align: center;
  padding-left: 5vw;
  padding-right: 5vw;
}

.align-center .section-inner {
  max-width: 600px;
}

/* ===== TYPOGRAPHY ===== */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232, 230, 225, 0.75);
  margin-bottom: 1rem;
}

.section-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

/* ===== STATS ===== */
.section-stats {
  justify-content: center;
  text-align: center;
  padding: 0 5vw;
}

.section-stats .section-inner {
  max-width: 800px;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

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

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 700;
  color: var(--accent);
  display: inline;
  margin-left: 0.1em;
}

.stat .stat-number,
.stat .stat-suffix {
  display: inline;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

/* ===== CTA ===== */
.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.cta-button {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 1px solid rgba(232, 230, 225, 0.2);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  pointer-events: auto;
}

.cta-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .header-links {
    gap: 1.5rem;
  }

  .header-links a {
    font-size: 0.75rem;
  }

  #scroll-container {
    height: 600vh;
  }

  .align-left,
  .align-right {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    justify-content: center;
    text-align: left;
  }

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

  .section-inner {
    max-width: 100%;
    background: rgba(10, 10, 15, 0.75);
    padding: 2rem;
    border-radius: 8px;
  }

  .section-stats .section-inner {
    background: none;
  }

  .stats-grid {
    gap: 2rem;
  }

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

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

@media (max-width: 480px) {
  .header-links {
    gap: 1rem;
  }

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

  .cta-links {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-button {
    text-align: center;
  }
}
