/* ═══════════════════════════════════════
   NOIR ÉTERNEL – Epic Cinematic Design v3
   Fonts: Cinzel (epic display) + Outfit (clean body)
   Palette: Pure black, warm ivory, soft gold
   ═══════════════════════════════════════ */

:root {
  --black: #000;
  --bg: #0a0a0a;
  --ivory: #f0ece4;
  --ivory-mid: rgba(240, 236, 228, 0.6);
  --ivory-low: rgba(240, 236, 228, 0.25);
  --gold: #c9a96e;
  --gold-dim: rgba(201, 169, 110, 0.4);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.06);
  --font-display: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--black);
}

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

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

.loader-inner {
  text-align: center;
  perspective: 1000px;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--ivory);
  display: inline-flex;
}

.fold-letter {
  display: inline-block;
  transform-origin: bottom center;
  transform: rotateX(90deg);
  opacity: 0;
  animation: foldIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger each letter – fast burst */
.fold-letter:nth-child(1) {
  animation-delay: 0.01s;
}

.fold-letter:nth-child(2) {
  animation-delay: 0.025s;
}

.fold-letter:nth-child(3) {
  animation-delay: 0.04s;
}

.fold-letter:nth-child(4) {
  animation-delay: 0.055s;
}

.fold-letter:nth-child(5) {
  animation-delay: 0.075s;
}

.fold-letter:nth-child(6) {
  animation-delay: 0.09s;
}

.fold-letter:nth-child(7) {
  animation-delay: 0.10s;
}

.fold-letter:nth-child(8) {
  animation-delay: 0.11s;
}

.fold-letter:nth-child(9) {
  animation-delay: 0.12s;
}

.fold-letter:nth-child(10) {
  animation-delay: 0.13s;
}

.fold-letter:nth-child(11) {
  animation-delay: 0.14s;
}

.fold-letter:nth-child(12) {
  animation-delay: 0.15s;
}

@keyframes foldIn {
  0% {
    transform: rotateX(90deg) translateY(20px);
    opacity: 0;
  }

  60% {
    transform: rotateX(-10deg) translateY(-2px);
    opacity: 1;
  }

  100% {
    transform: rotateX(0deg) translateY(0);
    opacity: 1;
  }
}

/* ═══════════════════════════════════
   BEAMS – GradientBlinds shader
   ═══════════════════════════════════ */
#beams {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: lighten;
}

#beams canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  pointer-events: all;
}

/* ═══════════════════════════════════
   NAV – Split layout: brand left, soft UI card right
   ═══════════════════════════════════ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3.5rem;
  transition: padding 0.5s var(--ease);
}

#nav.scrolled {
  padding: 0.8rem 3.5rem;
}

/* ── Left group: brand + tagline ── */
.nav-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--ivory);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.3s var(--ease);
}

.nav-brand:hover {
  opacity: 1;
}

.nav-tagline {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.28);
  padding-left: 1.2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Nav card (right) ── */
.nav-card {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(12, 12, 12, 0.6);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 0.4rem 0.5rem;
  box-shadow:
    0 2px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Divider between nav items ── */
.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 0.15rem;
  flex-shrink: 0;
}

/* ── Nav items ── */
.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.25s var(--ease);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-simple {
  color: rgba(255, 255, 255, 0.55);
}

.nav-link-simple:hover {
  color: var(--ivory);
}

.nav-chevron {
  transition: transform 0.25s var(--ease);
  opacity: 0.4;
}

.nav-item:hover .nav-chevron {
  transform: rotate(180deg);
  opacity: 0.8;
}

.nav-item:hover .nav-link {
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Dropdown ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 320px;
  background: rgba(14, 14, 14, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown bridge */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 1rem;
  display: none;
}

.nav-item:hover::after {
  display: block;
}

.dropdown-grid {
  display: grid;
  gap: 0.3rem;
}

.dropdown-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ivory);
  transition: background 0.2s var(--ease);
}

.dropdown-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-card-wide {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px 12px 0 0;
  padding-bottom: 1rem;
  margin-bottom: 0.2rem;
}

.dropdown-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--gold);
  flex-shrink: 0;
}

.dropdown-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ivory);
  margin-bottom: 0.15rem;
}

.dropdown-desc {
  display: block;
  font-size: 0.65rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
}

.dropdown-arrow {
  margin-left: auto;
  opacity: 0.3;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.dropdown-card:hover .dropdown-arrow {
  opacity: 0.8;
}

/* ═══════════════════════════════════
   CANVAS
   ═══════════════════════════════════ */
#canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--black);
  opacity: 0.55;
}

/* ─── SCROLL SCENES ─── */
#sections {
  position: relative;
  z-index: 5;
}

.scene {
  height: 200vh;
  position: relative;
}

.scene:last-child {
  height: 400vh;
}

.scene:first-child {
  height: 250vh;
}

/* Scenes 3–5 need more scroll room for text to stay visible */
.scene:nth-child(3),
.scene:nth-child(4),
.scene:nth-child(5) {
  height: 350vh;
}

.scene-content {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 8vw;
  pointer-events: none;
}

/* ─── TEXT ─── */
.text-wrap {
  max-width: 600px;
}

.text-center {
  margin: 0 auto;
  text-align: center;
}

.text-right {
  margin-left: auto;
  margin-right: -3vw;
  max-width: 480px;
}

.text-left {
  margin-right: auto;
}

.text-wrap>* {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.text-wrap.visible>* {
  opacity: 1;
  transform: translateY(0);
}

.text-wrap>*:nth-child(2) {
  transition-delay: 0.1s;
}

.text-wrap>*:nth-child(3) {
  transition-delay: 0.2s;
}

.text-wrap>*:nth-child(4) {
  transition-delay: 0.3s;
}

.text-wrap>*:nth-child(5) {
  transition-delay: 0.4s;
}

.text-wrap.visible {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.95), 0 0 100px rgba(0, 0, 0, 0.6);
}

/* ─── TYPOGRAPHY ─── */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.06em;
  color: var(--ivory);
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 0.82rem;
  font-weight: 200;
  letter-spacing: 0.12em;
  color: var(--ivory-mid);
  margin-bottom: 3rem;
}

.chapter {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.5em;
  color: var(--gold-dim);
  margin-bottom: 1.2rem;
}

.chapter::before {
  content: '— ';
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.25em;
}

.heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: var(--ivory);
  margin-bottom: 1.2rem;
}

.body {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ivory-mid);
  max-width: 380px;
}

.text-center .body {
  margin: 0 auto;
}

.text-right .body {
  margin-left: auto;
}

/* ═══════════════════════════════════
   CREATIVE LEFT ELEMENT (Scene 2)
   ═══════════════════════════════════ */
.scene-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 4vw;
}

.creative-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  opacity: 0;
}

.creative-left.visible {
  opacity: 1;
}

.note-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateX(-40px);
}

.note-line.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.note-bar {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  flex-shrink: 0;
}

.note-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--gold-dim);
}

.note-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ivory-low);
  white-space: nowrap;
}

.note-accent {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold-dim);
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════
   U-SHAPE TEXT (Scene 3)
   ═══════════════════════════════════ */
.u-shape-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.u-shape {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0;
  max-width: 900px;
  width: 100%;
}

.u-word {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--ivory);
  opacity: 0;
  padding: 0.3em 0.2em;
}

.u-word.accent {
  color: var(--gold);
}

/* U-shape grid placement */
.u-top-left {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
}

.u-top-right {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}

.u-mid-right {
  grid-column: 2;
  grid-row: 2;
  text-align: right;
}

.u-bot-right {
  grid-column: 2;
  grid-row: 3;
  text-align: right;
}

.u-bot-left {
  grid-column: 1;
  grid-row: 3;
  text-align: left;
}

.u-connector {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.u-body {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ivory-mid);
  padding: 0.5em 0.2em;
  opacity: 0;
  align-self: center;
}

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */
#footer {
  position: relative;
  z-index: 10;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
  padding: 4rem 3rem;
}

#footer::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ivory-mid);
}

.footer-copy {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ivory-low);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-low);
  transition: color 0.3s var(--ease);
}

.footer-links a:hover {
  color: var(--ivory);
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 768px) {
  #nav {
    padding: 0.6rem 1rem;
  }

  .nav-card,
  .nav-tagline {
    display: none;
  }

  .scene-content {
    padding: 0 5vw;
  }

  .text-wrap {
    max-width: 100%;
  }

  .text-right,
  .text-left {
    margin: 0;
  }

  .display {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

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

  .body {
    font-size: 0.8rem;
  }

  .scene-split {
    flex-direction: column;
    gap: 2rem;
  }

  .creative-left {
    display: none;
  }

  .u-shape {
    max-width: 100%;
  }

  .u-word {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }

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

  .footer-links {
    gap: 1rem;
  }

  #footer {
    padding: 3rem 1.5rem;
  }
}