/* FADE & STEEL — Sharp by design.
   Workflow A scroll-scrubbed. True-black source (#000), yellow + white type. */

:root {
  --bg:        #000000;
  --bg-deep:   #000000;
  --text:      #f4f3ef;
  --text-mut:  #8a8a85;
  --accent:    #f4c20a;          /* sharp industrial yellow */
  --accent-dim:#bf960a;
  --font-display: 'Anton', system-ui, sans-serif;
  --font-body:    'Sora', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { min-height: 100vh; }

a { color: inherit; 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.6rem;
  transition: opacity 0.8s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-brand {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.18em;
  color: var(--text);
}
.loader-track {
  width: min(280px, 60vw); height: 2px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
#loader-bar {
  width: 0%; height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}
#loader-percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-mut);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 3vw;
  mix-blend-mode: difference;
}
.site-header .logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.16em;
  color: #fff;
}
.site-header nav {
  display: flex; gap: 2.2rem;
}
.site-header nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.site-header nav a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero-standalone {
  position: relative; z-index: 4;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 6vw;
  background: var(--bg);
}
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(244,194,10,0.35);
}
.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 10.5vw, 11rem);
  line-height: 1.0;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--text);
}
.hero-heading .word {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.08em;
}
.hero-heading .word:last-child { color: var(--accent); }
.hero-tagline {
  margin-top: 2.2rem;
  max-width: 44ch;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-mut);
}
.scroll-indicator {
  position: absolute; bottom: 3rem; right: 6vw;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mut);
}
.scroll-indicator .arrow { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(7px)} }

/* ---------- Canvas ---------- */
.canvas-wrap {
  position: fixed; inset: 0; z-index: 1;
  clip-path: circle(0% at 50% 50%);
  background: var(--bg);
}
#canvas { width: 100%; height: 100%; display: block; }

/* ---------- Dark overlay (stats) ---------- */
#dark-overlay {
  position: fixed; inset: 0; z-index: 2;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Scroll container ---------- */
#scroll-container {
  position: relative; z-index: 3;
  min-height: 540vh;
}

.scroll-section {
  position: fixed; left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.section-stats, .section-cta { z-index: 10; }

.align-left  { padding-left: 6vw;  padding-right: 60vw; }
.align-right { padding-left: 60vw; padding-right: 6vw;  }
.section-inner { max-width: 34vw; }

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--text);
  margin: 1.4rem 0 1.6rem;
}
.section-body {
  font-size: 1.08rem;
  line-height: 1.65;
  color: #c9c9c4;
  max-width: 38ch;
}
.section-note {
  display: inline-block;
  margin-top: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mut);
}

/* ---------- Stats ---------- */
.section-stats {
  display: flex; align-items: center; justify-content: center;
  padding: 0 6vw;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3vw;
  width: 100%;
  max-width: 1200px;
}
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 9rem);
  line-height: 1;
  color: var(--accent);
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 0.3rem;
}
.stat-label {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mut);
}

/* ---------- CTA ---------- */
.cta-button {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 1.15rem 2.4rem;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.25s ease;
}
.cta-button:hover { background: #fff; transform: translateY(-2px); }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .site-header        { padding: 1.1rem 1.25rem; }
  .site-header nav    { display: none; }
  .site-header .logo  { font-size: 1.05rem; }

  .hero-standalone    { padding: 0 1.25rem; min-height: 100dvh; }
  .hero-heading       { font-size: clamp(3.2rem, 18vw, 6rem); line-height: 0.9; }
  .hero-tagline       { font-size: 1rem; max-width: 34ch; }
  .scroll-indicator   { bottom: calc(env(safe-area-inset-bottom, 0px) + 1.6rem); right: 1.25rem; font-size: 0.62rem; }

  .canvas-wrap        { left: 0; }
  #scroll-container   { min-height: 460vh; }

  /* Bottom-anchor the text so the last line (section-note) can never be clipped
     by the iOS toolbar. dvh + safe-area inset adapt to the live viewport. The
     clipper owns the top ~58% (placed in JS), text grows upward from here. */
  .scroll-section {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 3.5dvh);
    transform: none;
    padding: 0 1.25rem;
  }

  .align-left { padding-left: 1.25rem; padding-right: 1.25rem; }
  .align-left .section-inner {
    max-width: 100%;
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
  }

  .section-label   { font-size: 0.68rem; margin-bottom: 0.85rem; padding-bottom: 0.5rem; }
  .section-heading { font-size: clamp(2.1rem, 10.5vw, 3rem); line-height: 0.95; margin: 0.7rem 0 0.85rem; }
  .section-body    { font-size: 0.95rem; line-height: 1.45; max-width: 100%; }
  .section-note    { font-size: 0.66rem; margin-top: 1.1rem; }

  /* Stats: dark overlay covers the whole viewport, no clipper to dodge —
     return to true viewport centering. */
  .section-stats { padding: 0 1.5rem; top: 50%; bottom: auto; transform: translateY(-50%); }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .stat-number   { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .stat-suffix   { font-size: 1rem; }
  .stat-label    { font-size: 0.72rem; margin-top: 0.85rem; }

  .cta-button    { font-size: 0.74rem; padding: 1rem 1.65rem; }
}
