/* ==========================================================================
   AURELIUS & CO. — ANIMATIONS, CURSOR, PRELOADER & MOTION SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CUSTOM REFINED CURSOR (Desktop Only)
   -------------------------------------------------------------------------- */
.custom-cursor-dot,
.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--gold-light);
  box-shadow: 0 0 8px var(--gold-primary);
  z-index: 10000;
}

.custom-cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(200, 169, 107, 0.45);
  background: rgba(200, 169, 107, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s var(--ease-out-expo), 
              height 0.3s var(--ease-out-expo), 
              background-color 0.3s ease, 
              border-color 0.3s ease, 
              opacity 0.3s ease;
}

.cursor-text-tag {
  font-family: var(--font-sans);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg-primary);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Cursor Interactive States */
body.cursor-hover .custom-cursor-ring {
  width: 64px;
  height: 64px;
  border-color: var(--gold-primary);
  background: rgba(200, 169, 107, 0.12);
}

body.cursor-text-active .custom-cursor-ring {
  width: 76px;
  height: 76px;
  background: var(--gold-primary);
  border-color: var(--gold-light);
}

body.cursor-text-active .cursor-text-tag {
  opacity: 1;
  transform: scale(1);
}

body.cursor-text-active .custom-cursor-dot {
  opacity: 0;
}

/* --------------------------------------------------------------------------
   2. INITIAL PRELOADER SEQUENCE
   -------------------------------------------------------------------------- */
.site-preloader {
  position: fixed;
  inset: 0;
  background: #06080B;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
}

.site-preloader.loaded {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.preloader-monogram-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 2rem;
}

.preloader-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-subtle);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: preloaderSpin 1.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.preloader-mark {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold-light);
}

.preloader-brand-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.preloader-progress-track {
  width: 140px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-pill);
}

.preloader-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
  transition: width 0.3s ease-out;
}

@keyframes preloaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   3. PAGE TRANSITION OVERLAY
   -------------------------------------------------------------------------- */
.page-transition-curtain {
  position: fixed;
  inset: 0;
  background: var(--bg-surface-elevated);
  z-index: 99999;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
  transition: transform 0.4s var(--ease-in-out);
}

.page-transition-curtain.active {
  transform: scaleY(1);
  transform-origin: top;
}

/* --------------------------------------------------------------------------
   4. SCROLL REVEALS & CLIP PATHS
   -------------------------------------------------------------------------- */
.reveal-fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal-fade-up.is-inview {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger-child > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-stagger-child.is-inview > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger-child.is-inview > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger-child.is-inview > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger-child.is-inview > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger-child.is-inview > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger-child.is-inview > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger-child.is-inview > *:nth-child(6) { transition-delay: 0.55s; }

/* Image Clip Path Reveal */
.clip-reveal-frame {
  position: relative;
  overflow: hidden;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.1s cubic-bezier(0.19, 1, 0.22, 1);
}

.clip-reveal-frame.is-inview {
  clip-path: inset(0 0 0 0);
}

.clip-reveal-frame img {
  transform: scale(1.04);
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), filter 0.6s ease;
}

.clip-reveal-frame.is-inview img {
  transform: scale(1.0);
}

/* Editorial Text Highlights */
.editorial-scroll-text span.word {
  opacity: 0.25;
  transition: opacity 0.4s ease, color 0.4s ease;
  display: inline-block;
  margin-right: 0.28em;
}

.editorial-scroll-text span.word.lit {
  opacity: 1;
  color: var(--text-primary);
}

.editorial-scroll-text span.word.lit-gold {
  opacity: 1;
  color: var(--gold-light);
}

/* --------------------------------------------------------------------------
   5. REDUCED MOTION (ACCESSIBILITY)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .custom-cursor-dot,
  .custom-cursor-ring,
  .site-preloader,
  .page-transition-curtain {
    display: none !important;
  }
  
  .reveal-fade-up,
  .reveal-stagger-child > *,
  .clip-reveal-frame {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  
  .editorial-scroll-text span.word {
    opacity: 1 !important;
  }
}
