/* ════════════════════════════════════════════════════════════════
   THE VIOLIN — immersive scroll experience
   Palette: #CDFE02 accent · #010101 bg · #080808 bg2 · #FFF text
   ════════════════════════════════════════════════════════════════ */

:root {
  --accent: #CDFE02;
  --bg: #010101;
  --bg2: #080808;
  --text: #FFFFFF;
  --muted: #A1A1AA;
  --border: rgba(205, 254, 2, 0.18);
  --font-display: "Helvetica Neue", "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

::selection { background: var(--accent); color: #010101; }

/* ─────────────── Preloader ─────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; }
.preloader__logo {
  display: block;
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 0 18px rgba(205, 254, 2, 0.35));
  animation: logo-pulse 2.4s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .preloader__logo { animation: none; }
}
.preloader__code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.preloader__bar {
  width: 180px;
  height: 1px;
  margin: 1.2rem auto 0;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.preloader__fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

/* ─────────────── Fixed scene ─────────────── */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}
.scene__gl,
.scene__video,
.scene__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene__video {
  object-fit: cover;
  display: none;
}
.scene.is-fallback .scene__video { display: block; }
.scene.is-fallback .scene__gl { display: none; }
.scene__particles { pointer-events: none; }
.scene__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(1, 1, 1, 0.72) 100%),
    linear-gradient(to bottom, rgba(1, 1, 1, 0.5) 0%, transparent 12%, transparent 88%, rgba(1, 1, 1, 0.6) 100%);
}

/* ─────────────── Navigation ─────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem clamp(1.25rem, 4vw, 3.5rem);
  background: linear-gradient(to bottom, rgba(1, 1, 1, 0.82), transparent);
}
.nav__brand {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.nav__logo {
  display: block;
  filter: drop-shadow(0 0 10px rgba(205, 254, 2, 0.4));
}
.nav__brand-dim { color: var(--muted); font-weight: 400; }
.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav__link {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color 0.3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after { width: 100%; }
.nav__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}
.nav__progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(205, 254, 2, 0.6);
}

/* ─────────────── Sections ─────────────── */
main { position: relative; z-index: 10; }

.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}
.section--hero { min-height: 130vh; align-items: flex-start; padding-top: 24vh; }
.section--tall { min-height: 165vh; }
.section--tall .pin-copy { position: sticky; top: 30vh; }
.section--tall { align-items: flex-start; }
.section--finale {
  min-height: 150vh;
  justify-content: center;
  text-align: center;
  align-items: flex-start;
}
.section--finale .finale {
  position: sticky;
  top: 34vh;
}
.section--cards {
  min-height: auto;
  padding-top: 14vh;
  padding-bottom: 10vh;
  background: linear-gradient(to bottom, transparent, rgba(8, 8, 8, 0.94) 22%, var(--bg2));
}

/* ─────────────── Typography blocks ─────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.3rem;
}
.hero { max-width: 640px; }
.hero__title {
  font-size: clamp(2.6rem, 6.5vw, 4.9rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hl {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}
.hl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(205, 254, 2, 0.45);
}
.hero__sub {
  margin-top: 1.6rem;
  max-width: 460px;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.65;
  color: var(--muted);
}
.code-line {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  opacity: 0.85;
  margin-top: 1.9rem;
  letter-spacing: 0.04em;
}
.code-line--dim { color: var(--muted); opacity: 0.7; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2.2rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}
.btn--primary {
  background: var(--accent);
  color: #010101;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(205, 254, 2, 0.28);
}
.btn__arrow { transition: transform 0.3s; }
.btn--primary:hover .btn__arrow { transform: translateX(4px); }

/* ─────────────── Scroll cue ─────────────── */
.scroll-cue {
  position: absolute;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.scroll-cue__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue__line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line { animation: none; }
}

/* ─────────────── Pinned copy blocks ─────────────── */
.pin-copy {
  max-width: 430px;
  padding: 2rem 2.2rem;
  border: 1px solid var(--border);
  background: rgba(1, 1, 1, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pin-copy--left { margin-right: auto; }
.pin-copy--right { margin-left: auto; }
.pin-copy--center { margin: 0 auto; text-align: center; }
.pin-copy__title {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 640;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.pin-copy__text {
  margin-top: 1.1rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ─────────── Finale ─────────── */
.finale__logo {
  display: block;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 0 22px rgba(205, 254, 2, 0.4));
}
.finale__title {
  font-size: clamp(3.4rem, 10vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.finale__sub {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.finale__actions {
  margin-top: 2.4rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.finale__actions .btn { margin-top: 0; }
.btn--ghost {
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(1, 1, 1, 0.5);
  cursor: default;
}

/* ─────────────── Cards ─────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}
.card {
  position: relative;
  padding: 2.4rem 2rem 2.2rem;
  border: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.85);
  transition: transform 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(205, 254, 2, 0.4); }
.card:hover::before { opacity: 1; }
.card__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.2em;
}
.card__title {
  margin-top: 1.1rem;
  font-size: 1.32rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card__text {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ─────────── Footer ─────────── */
.footer {
  position: relative;
  z-index: 10;
  padding: 3.5rem clamp(1.25rem, 5vw, 4rem) 4rem;
  text-align: center;
  background: var(--bg2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer__logo {
  display: block;
  margin: 0 auto 1.2rem;
  opacity: 0.9;
  filter: drop-shadow(0 0 14px rgba(205, 254, 2, 0.3));
}
.footer__note {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.75;
}

/* ─────────────── Reveal transitions ─────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Hero fade driven by JS (scroll progress) */
.hero, .scroll-cue { will-change: opacity, transform; }

/* ─────────────── Responsive ─────────────── */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; max-width: 480px; }
  .nav__links { gap: 0.9rem; }
  .nav__link { font-size: 0.68rem; letter-spacing: 0.1em; }
}
@media (max-width: 640px) {
  .section--hero { padding-top: 19vh; min-height: 120vh; }
  .pin-copy { padding: 1.5rem 1.4rem; max-width: 100%; }
  .nav { padding: 1rem 1.1rem; }
  .nav__brand { font-size: 0.74rem; }
  .hero__title { font-size: clamp(2.1rem, 9.5vw, 2.9rem); }
}
