/* ============================================================
   MERIDIAN — luxe layer
   First-visit intro veil · precision gold cursor · film grain
   Loaded after meridian.css on every page.
============================================================ */

/* ---------- First-visit intro veil ---------- */
html.is-preloading { overflow: hidden; }

.intro-veil {
  position: fixed; inset: 0; z-index: 12000;
  background: #080F14;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1);
}
.intro-veil__inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.intro-veil__logo {
  width: min(210px, 46vw); height: auto;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.7s ease 0.05s, transform 0.95s cubic-bezier(0.19, 1, 0.22, 1) 0.05s;
}
.intro-veil__line {
  display: block; width: min(280px, 58vw); height: 1px;
  background: linear-gradient(90deg, rgba(196,173,130,0) 0%, #C4AD82 30%, #C4AD82 70%, rgba(196,173,130,0) 100%);
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1) 0.12s;
}
.intro-veil__word {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.34em; padding-left: 0.34em; text-transform: uppercase;
  color: rgba(196,173,130,0.8);
  opacity: 0; transition: opacity 0.6s ease 0.5s;
}
.intro-veil.is-play .intro-veil__logo { opacity: 1; transform: translateY(0); }
.intro-veil.is-play .intro-veil__line { transform: scaleX(1); }
.intro-veil.is-play .intro-veil__word { opacity: 1; }
.intro-veil.is-done { transform: translateY(-101%); }
.intro-veil.is-done .intro-veil__inner { opacity: 0; transition: opacity 0.45s ease; }
@media (prefers-reduced-motion: reduce) { .intro-veil { display: none; } }

/* ---------- Film grain (kills gradient banding, adds print texture) ---------- */
html::after {
  content: ''; position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.045; mix-blend-mode: overlay;
}

/* ---------- Precision gold cursor (desktop only, JS-activated) ---------- */
@media (pointer: fine) {
  html.luxe-cursor,
  html.luxe-cursor *:not(input):not(textarea):not(select) { cursor: none !important; }
}
html.luxe-cursor input, html.luxe-cursor textarea, html.luxe-cursor select { cursor: auto; }

.gc {
  position: fixed; top: 0; left: 0; z-index: 13000; pointer-events: none;
  opacity: 0; transition: opacity 0.25s ease;
}
.gc.is-on { opacity: 1; }
.gc.is-hidden { opacity: 0; }
.gc__arrow, .gc__ring { position: fixed; top: 0; left: 0; will-change: transform; }
.gc__arrow svg {
  display: block;
  filter: drop-shadow(0 1px 2.5px rgba(0, 0, 0, 0.5));
}
.gc__arrow > i { display: block; transition: transform 0.16s ease; transform-origin: 5px 3px; }
.gc.is-down .gc__arrow > i { transform: scale(0.92); }
.gc__ring > i {
  position: relative; display: block; width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(196, 173, 130, 0.4);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease;
}
/* north tick — the surveyor's nod */
.gc__ring > i::before {
  content: ''; position: absolute; top: -1px; left: 50%;
  width: 1px; height: 5px; margin-left: -0.5px;
  background: rgba(196, 173, 130, 0.85);
}
.gc.is-link .gc__ring > i { transform: scale(1.38); border-color: rgba(196, 173, 130, 0.85); }
.gc.is-down .gc__ring > i { transform: scale(0.82); }
.gc.is-link.is-down .gc__ring > i { transform: scale(1.12); }

/* ---------- Quiet refinements ---------- */
::selection { background: rgba(196, 173, 130, 0.3); color: #F5FAF5; }
