/* Atashi Fashion Ltd — enhance.css
   Adds update2 features to update: preloader, Lenis smooth scroll,
   fiber canvas, virtual tour, sound toggle, contextual cursor label,
   clip-path reveals. Layered on top of index.css — never overrides content. */

/* ── EXTRA BRAND VARS (not in index.css) ──────────────────────────── */
:root {
  --dark:  #0D0804;
  --dark2: #1C120A;
}

/* ── LENIS SMOOTH SCROLL ──────────────────────────────────────────── */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════════
   PRELOADER — branded curtain wipe on every page load.
   ═══════════════════════════════════════════════════════════════════ */
body.afl-loading { overflow: hidden; }

#afl-loader {
  position: fixed; inset: 0; z-index: 100002;
  background: #0D0804;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.6rem;
  overflow: hidden;
}
#afl-loader.afl-loaded {
  transform: translateY(-100%);
  transition: transform 1.05s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: none;
}
#afl-loader::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(232,81,10,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,81,10,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
#afl-loader::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 600px; height: 600px; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(232,81,10,0.16) 0%, transparent 65%);
  pointer-events: none;
}
.afl-load-mark {
  position: relative; z-index: 1;
  font-family: var(--ff-d);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 400; letter-spacing: -0.02em;
  color: #fff; line-height: 1;
  display: flex; align-items: baseline; gap: 0.1em;
  overflow: hidden;
}
.afl-load-mark em { font-style: italic; color: var(--org); }
.afl-load-word { display: inline-block; transform: translateY(110%); }
.afl-load-sub {
  position: relative; z-index: 1;
  font-family: var(--ff-b);
  font-size: 0.58rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  opacity: 0;
}
.afl-load-bar {
  position: relative; z-index: 1;
  width: min(260px, 60vw); height: 2px;
  background: rgba(255,255,255,0.12);
  overflow: hidden; margin-top: 0.4rem;
}
.afl-load-bar i {
  position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, var(--org), var(--org-mid));
  display: block;
}
.afl-load-pct {
  position: absolute; bottom: 2rem; right: 2.4rem; z-index: 1;
  font-family: var(--ff-d); font-size: 2.4rem;
  color: rgba(255,255,255,0.85); font-weight: 400;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .afl-load-pct { font-size: 1.6rem; bottom: 1.4rem; right: 1.4rem; }
}
/* Failsafe noscript rule */
noscript ~ #afl-loader { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   FIBER CANVAS — hero textile thread animation
   ═══════════════════════════════════════════════════════════════════ */
#fiberCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: 0.72; display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   CONTEXTUAL CURSOR LABEL
   ═══════════════════════════════════════════════════════════════════ */
#afl-cursor-label {
  position: fixed; top: 0; left: 0; z-index: 99998;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
  background: var(--org); color: #fff;
  font-family: var(--ff-b); font-size: 0.52rem;
  letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  padding: 0.45rem 0.7rem; border-radius: 100px;
  opacity: 0; white-space: nowrap;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
#afl-cursor-label.afl-cl-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (pointer: coarse) { #afl-cursor-label { display: none !important; } }

/* ═══════════════════════════════════════════════════════════════════
   CLIP-PATH IMAGE REVEALS (.afl-clip → .afl-in)
   Applied to about image, product images, and tour mockup.
   Gated by html.afl-ready so no-JS users see content normally.
   ═══════════════════════════════════════════════════════════════════ */
html.afl-ready .afl-clip {
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}
html.afl-ready .afl-clip > * {
  transform: scale(1.08);
  transition: transform 1.2s cubic-bezier(0.22,1,0.36,1);
}
html.afl-ready .afl-clip.afl-in {
  clip-path: inset(0 0 0% 0);
  transition: clip-path 1.1s cubic-bezier(0.76,0,0.24,1);
}
html.afl-ready .afl-clip.afl-in > * { transform: scale(1); }

/* ═══════════════════════════════════════════════════════════════════
   VIRTUAL TOUR SECTION
   ═══════════════════════════════════════════════════════════════════ */
#tour { background: var(--bg3); padding: 7rem 0; }
.tour-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: center;
}
.tour-mockup {
  aspect-ratio: 16/10; background: #0D0804;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}
.tour-play {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--org); display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease; z-index: 1;
}
.tour-play:hover {
  transform: scale(1.12);
  box-shadow: 0 0 0 16px rgba(201,74,8,0.1), 0 8px 32px rgba(201,74,8,0.3);
}
.tour-scan {
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--org), transparent);
  animation: scan 3.5s ease-in-out infinite;
}
@keyframes scan { 0%,100%{top:0;opacity:0.4;} 50%{top:calc(100% - 1px);opacity:0.9;} }
.tour-geo {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(232,81,10,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,81,10,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
@media (max-width: 900px) {
  .tour-inner { grid-template-columns: 1fr; gap: 3rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   REDUCED MOTION — strip all new animation enhancements
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  #afl-loader { display: none !important; }
  body.afl-loading { overflow: auto !important; }
  html.afl-ready .afl-clip { clip-path: none !important; }
  html.afl-ready .afl-clip > * { transform: none !important; }
  .tour-scan { animation: none; }
  #afl-cursor-label { display: none !important; }
}
