/* ================================================================
   PIXORA — motion layer
   1. Preloader
   2. "Step Inside" pinned horizontal section
   ================================================================ */

/* ============================================================
   1. PRELOADER
   ============================================================ */
.pl {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  background: var(--bg-0);
  /* failsafe: if the script never runs, clear itself rather than trap the page */
  animation: plFailsafe 0s linear 6s forwards;
}
@keyframes plFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.pl::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, rgba(232,80,2,.14) 0%, transparent 70%);
  opacity: 0; transition: opacity 1.1s var(--ease);
}
.pl.is-live::after { opacity: 1; }

.pl-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.pl.is-live .pl-inner { opacity: 1; transform: none; }

.pl-logo { width: clamp(150px, 22vw, 230px); height: auto; display: block;
  filter: invert(1) brightness(1.7); }

.pl-bar {
  position: relative; width: min(240px, 54vw); height: 2px;
  background: rgba(249,249,249,.14); overflow: hidden;
}
.pl-bar span {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.pl-meta {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--t3);
}
.pl-count { font-variant-numeric: tabular-nums; color: var(--t2); min-width: 4ch; text-align: right; }

/* the reveal: two panels part vertically */
.pl-curtain { position: absolute; inset: 0; pointer-events: none; }
.pl-curtain i {
  position: absolute; left: 0; width: 100%; height: 50.2%; background: var(--bg-0);
  transition: transform 1.05s cubic-bezier(.76,0,.24,1);
}
.pl-curtain i:first-child { top: 0; }
.pl-curtain i:last-child { bottom: 0; }
.pl.is-open { background: transparent; animation: none; }
.pl.is-open::after { opacity: 0; }
.pl.is-open .pl-inner { opacity: 0; transform: translateY(-14px); transition-duration: .4s; }
.pl.is-open .pl-curtain i:first-child { transform: translateY(-100%); }
.pl.is-open .pl-curtain i:last-child { transform: translateY(100%); }
.pl.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

html.pl-lock, html.pl-lock body { overflow: hidden; }

/* short form for repeat navigations within a session */
.pl.pl-quick .pl-inner { display: none; }
.pl.pl-quick .pl-curtain i { transition-duration: .5s; }

@media (prefers-reduced-motion: reduce) {
  .pl, .pl-inner, .pl-curtain i { transition: none !important; animation: none !important; }
}

/* ============================================================
   2. STEP INSIDE — pinned horizontal scroll
   ============================================================ */
.si {
  position: relative;
  background: var(--bg-0);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.si-stage {
  position: sticky; top: 0; height: 100vh; min-height: 620px;
  overflow: hidden; display: flex; flex-direction: column;
}
.si-stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 90% at 88% 10%, rgba(232,80,2,.13) 0%, transparent 62%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
}
.si-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(232,80,2,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,80,2,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, black 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, black 0%, transparent 78%);
}

.si-head {
  position: relative; z-index: 2;
  padding: clamp(22px, 4vh, 48px) clamp(18px, 4vw, 56px) 0;
  display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
}
.si-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
  color: var(--orange);
}
.si-hint { font-size: 12.5px; color: var(--t3); }

/* the moving filmstrip */
.si-rail { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; align-items: center; }
.si-track {
  display: flex; gap: clamp(16px, 2.4vw, 34px);
  padding-inline: clamp(18px, 4vw, 56px);
  will-change: transform;
}
.si-panel {
  position: relative; flex: none;
  width: clamp(260px, 46vw, 620px);
  aspect-ratio: 16 / 10;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border-md);
  background: var(--bg-2);
  transition: border-color .5s var(--ease), opacity .5s var(--ease);
  opacity: .38;
}
.si-panel.is-on { opacity: 1; border-color: var(--border-orange); }

/* photo, when one is supplied */
.si-panel img {
  position: absolute; inset: -8% -8%; width: 116%; height: 116%;
  object-fit: cover; display: block;
  will-change: transform;
}
.si-panel img[data-missing] { display: none; }

/* branded fallback, shown only while a photo is missing */
.si-fallback { position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease); }
.si-panel:has(img[data-missing]) .si-fallback,
.si-panel.no-photo .si-fallback { opacity: 1; }
.si-fallback::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, #1A0A00 0%, #2A1104 38%, #120600 72%, #050200 100%);
}
.si-fallback::after {
  content: ""; position: absolute; inset: 14% 12%;
  border: 1px solid rgba(232,80,2,.55);
  background:
    linear-gradient(rgba(232,80,2,.22) 1px, transparent 1px) 0 0 / 100% 12.5%,
    linear-gradient(90deg, rgba(232,80,2,.22) 1px, transparent 1px) 0 0 / 8.333% 100%,
    linear-gradient(150deg, rgba(232,80,2,.30), rgba(193,8,1,.12) 55%, rgba(0,0,0,.7));
  box-shadow: 0 0 70px rgba(232,80,2,.22);
}
.si-num {
  position: absolute; left: 20px; bottom: 14px; z-index: 2;
  font-size: clamp(46px, 7vw, 96px); font-weight: 800; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(249,249,249,.34);
  letter-spacing: -.03em; pointer-events: none;
}
.si-tag {
  position: absolute; right: 18px; top: 16px; z-index: 2;
  font-family: var(--font); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--white);
  background: rgba(0,0,0,.5); border: 1px solid var(--border-md);
  padding: 6px 11px; border-radius: 999px; backdrop-filter: blur(6px);
}
.si-shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 48%, rgba(0,0,0,.35) 100%);
}

/* the caption block that swaps as you travel */
.si-foot {
  position: relative; z-index: 2;
  padding: 0 clamp(18px, 4vw, 56px) clamp(22px, 4vh, 44px);
}
.si-cap { position: relative; min-height: 132px; }
.si-cap article {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.si-cap article.is-on { opacity: 1; transform: none; }
.si-cap h3 { font-size: clamp(20px, 2.6vw, 34px); margin: 0 0 8px; }
.si-cap p { max-width: 62ch; color: var(--t2); font-size: 14.5px; line-height: 1.7; margin: 0; }
.si-cap .si-kit {
  display: inline-block; margin-top: 12px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .1em;
  color: var(--orange); text-transform: uppercase; font-weight: 700;
}
.si-bar { position: relative; height: 2px; background: rgba(249,249,249,.12); margin-top: 20px; }
.si-bar span {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
}

/* touch / narrow: drop the pin, stack it and let it scroll normally */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .si { height: auto !important; }
  .si-stage { position: static; height: auto; min-height: 0; }
  .si-rail { display: block; }
  .si-track {
    transform: none !important;
    display: grid; grid-template-columns: 1fr; gap: 16px;
    padding-block: 20px;
  }
  .si-panel { width: auto; opacity: 1; border-color: var(--border-orange); }
  .si-panel img { transform: none !important; }
  .si-cap { min-height: 0; }
  .si-cap article { position: static; opacity: 1; transform: none; margin-bottom: 22px; }
  .si-bar { display: none; }
  .si-num { font-size: 40px; }
}
