/* ═══════════════════════════════════════════════════
   OCTARINE — preloader.css  (homepage only)

   The lockup, the eyebrow and the heading fade in on a
   stagger, then the panels part. The letter-by-letter
   turn is gone; the fades it sat inside are kept.
═══════════════════════════════════════════════════ */

body.preloader-lock { overflow: hidden; }

/* ── Container ── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: all;
}

/* ── Glass panels ── */
.pl-panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: rgba(237, 235, 232, 0.94);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}
.pl-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 45%);
  pointer-events: none;
}
.pl-panel-left  { left: 0;  transform-origin: 100% 50%; }
.pl-panel-right { right: 0; transform-origin: 0%   50%; }

/* ── Content stage ── */
.pl-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 6vw;
  text-align: center;
}

/* ── Shared entrance ─────────────────────────────
   One curve, one travel. Only the delay changes, and
   that is set from JS so the sequence lives in a
   single place rather than split across two files. */
.pl-logo,
.pl-eyebrow,
.pl-heading {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  filter: blur(9px);
  animation: plRise 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform, filter;
}
@keyframes plRise {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ── Lockup ── */
.pl-logo {
  width: min(300px, 46vw);
  height: auto;
  display: block;
}

/* ── Eyebrow ── */
.pl-eyebrow {
  margin: 0.75rem 0 0;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: rgba(24, 20, 14, 0.42);
}

/* ── Heading ── */
.pl-heading {
  margin: 0;
  font-family: 'ivyora-display', serif;
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: rgba(20, 18, 16, 0.92);
}
.pl-heading em {
  font-style: italic;
  font-weight: 300;
}

/* ── EXIT ── */
#preloader.exit .pl-stage {
  animation: plStageOut 1.4s ease forwards;
}
@keyframes plStageOut {
  to { opacity: 0; transform: scale(0.55); }
}
#preloader.exit .pl-panel-left  { animation: plPanelLeft  1.4s ease forwards; }
#preloader.exit .pl-panel-right { animation: plPanelRight 1.4s ease forwards; }
@keyframes plPanelLeft  { to { transform: translateX(-115%) scaleX(1.4); } }
@keyframes plPanelRight { to { transform: translateX(115%)  scaleX(1.4); } }

/* ── Reduced motion: show it, do not perform it ── */
@media (prefers-reduced-motion: reduce) {
  .pl-logo, .pl-eyebrow, .pl-heading {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
}

@media (max-width: 600px) {
  .pl-stage { gap: 1.1rem; }
  .pl-eyebrow { letter-spacing: 5px; }
}
