/* ══════════════════════════════════════════════════════════════════
   ELARO — single-screen fashion hero slider.
   Off-white ground, one accent that re-tints per look, WebGL glitch
   between looks, 3-D card flip on hover.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f0f0f0;
  --ink: #141414;
  --mute: #9a9a9a;
  --line: #dcdcdc;
  --accent: #e6323e;
  --card: #ffffff;
  --u: clamp(0.55rem, 1vw, 1.25rem);   /* base unit ~ 1vw at 1280 → 12.8px */
  --font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --brand: 'Michroma', 'Orbitron', 'Eurostile', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { background: var(--bg); }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  overflow: hidden; -webkit-font-smoothing: antialiased; cursor: none;
  font-variant-numeric: lining-nums tabular-nums;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
@media (hover: none), (pointer: coarse) { body, button { cursor: auto; } }

/* ── preloader ─────────────────────────────────────────── */
.pre {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; transition: clip-path .9s var(--ease);
  clip-path: inset(0 0 0 0);
}
.pre.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.pre__inner { width: min(320px, 70vw); text-align: center; }
.pre__mark { font-family: var(--brand); font-size: 22px; letter-spacing: .32em; text-indent: .32em; margin-bottom: 26px; }
.pre__rail { height: 1px; background: var(--line); overflow: hidden; }
.pre__rail i { display: block; height: 100%; width: 0; background: var(--ink); }
.pre__meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.pre__meta em { font-style: normal; color: var(--ink); }

/* ── cursor ────────────────────────────────────────────── */
.cur, .cur-ring { position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none; opacity: 0; will-change: transform; }
.cur { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--ink); }
.cur-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1px solid rgba(20,20,20,.5); transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, border-color .3s;
  display: grid; place-items: center;
}
.cur-ring span { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity .2s; }
.cur-ring.is-active { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: var(--accent); border-color: var(--accent); }
.cur-ring.is-active span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cur, .cur-ring { display: none; } }

/* ── page frame ────────────────────────────────────────── */
.page { position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

/* nav */
.nav {
  position: absolute; z-index: 20; left: 6.25vw; right: 6.25vw; top: 9.5vh;
  display: flex; align-items: center; gap: 4.5vw;
}
.nav__brand { font-family: var(--brand); font-size: clamp(11px, 1.05vw, 15px); letter-spacing: .28em; color: var(--ink); }
.nav__links { display: flex; gap: 2vw; font-size: clamp(9px, .8vw, 12px); color: var(--mute); }
.nav__links a { position: relative; transition: color .3s; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: var(--ink); transition: right .35s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 2.4vw; }
.nav__search { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: clamp(9px, .8vw, 12px); }
.nav__search svg { width: 12px; height: 12px; }
.nav__cart {
  width: 1.7vw; height: 1.7vw; min-width: 20px; min-height: 20px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 9px; font-weight: 600; display: grid; place-items: center;
}
.nav__burger { display: flex; flex-direction: column; gap: 4px; }
.nav__burger i { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.nav__burger:hover i:first-child { transform: translateX(-2px); }
.nav__burger:hover i:last-child { transform: translateX(2px); }

/* stage (WebGL) */
.stage { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__fallback { display: none; position: absolute; left: 50%; top: 0; height: 100%; width: auto; transform: translateX(-46%); object-fit: cover; }
.no-webgl .stage__fallback { display: block; }

/* left column */
.left { position: absolute; z-index: 10; left: 6.25vw; top: 0; bottom: 0; width: 40vw; pointer-events: none; }
.left > * { pointer-events: auto; }

.vid { position: absolute; top: 33vh; left: 0; display: flex; align-items: center; gap: 1.6vw; }
.vid__thumb { position: relative; width: 18.75vw; aspect-ratio: 16 / 7.4; overflow: hidden; background: #111; border-radius: 2px; }
.vid__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.05); transition: transform .8s var(--ease); }
.vid__thumb img[aria-hidden] { opacity: 0; }
.vid:hover .vid__thumb img { transform: scale(1.06); }
.vid__play {
  position: absolute; left: 50%; top: 50%; width: 2.2vw; height: 2.2vw; min-width: 24px; min-height: 24px; margin: -1.1vw 0 0 -1.1vw;
  border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform .4s var(--ease);
}
.vid__play svg { width: 40%; height: 40%; fill: var(--ink); }
.vid:hover .vid__play { transform: scale(1.12); }
.vid__cap { display: flex; flex-direction: column; gap: 3px; font-size: clamp(9px, .8vw, 12px); }
.vid__cap b { font-weight: 500; }
.vid__cap span { color: var(--mute); }

.title {
  position: absolute; left: -.05em; top: 52vh; font-weight: 700; line-height: .95; letter-spacing: -.035em;
  font-size: clamp(56px, 8.6vw, 140px); white-space: nowrap;
}
.title__word { position: absolute; left: 0; top: 0; display: block; opacity: 0; color: var(--ink); will-change: transform, opacity, filter; }
.title__word.is-in { opacity: 1; }
.title__word .ch { display: inline-block; will-change: transform, opacity, filter; }
.title__word .ch.sp { width: .25em; }

.ctl { position: absolute; left: 0; bottom: 8vh; display: flex; align-items: center; gap: 1.6vw; }
.ctl__pager { display: flex; align-items: center; gap: 6px; margin-right: 1.4vw; }
.ctl__pager i { display: block; width: 3px; height: 3px; border-radius: 3px; background: var(--ink); transition: width .5s var(--ease), background .3s; }
.ctl__pager i.is-on { width: 12px; }
.ctl__btn {
  width: 2.2vw; height: 2.2vw; min-width: 24px; min-height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  transition: transform .4s var(--ease), background .5s;
}
.ctl__btn svg { width: 45%; height: 45%; }
.ctl__btn:hover { transform: scale(1.12); }
.ctl__btn:active { transform: scale(.94); }
.ctl__btn--prev { background: var(--ink); }
.ctl__btn--next { background: var(--accent); }

/* cards */
.cards {
  position: absolute; z-index: 12; left: 75vw; top: 26.5vh; display: flex; gap: 1.6vw; perspective: 900px;
}
.card { width: 18.75vw; height: 21vh; min-height: 130px; position: relative; flex: none; outline: 0; }
.card__inner { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.card__face {
  position: absolute; inset: 0; background: var(--card); border-radius: 6px; padding: 1.4vw 1.6vw 1.2vw;
  box-shadow: 0 10px 30px rgba(0,0,0,.05); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card__back { transform: rotateY(180deg); }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.card__top > div { display: flex; flex-direction: column; gap: 3px; }
.card__name { font-size: clamp(11px, .95vw, 15px); font-weight: 600; letter-spacing: -.01em; }
.card__sub { font-size: clamp(8px, .7vw, 11px); color: var(--mute); }
.card__price { font-size: clamp(9px, .8vw, 12px); color: var(--mute); }
.card__bot { display: flex; justify-content: space-between; align-items: center; }
.dots { display: flex; gap: 6px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c, var(--accent)); opacity: .9; }
.dots i.is-on { background: var(--accent); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--accent); }
.hex {
  width: 2vw; height: 2vw; min-width: 22px; min-height: 22px; display: grid; place-items: center; color: var(--ink);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: var(--ink); position: relative; transition: transform .35s var(--ease);
}
.hex::before { content: ''; position: absolute; inset: 1px; background: var(--card); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.hex svg { position: relative; width: 45%; height: 45%; }
.hex:hover { transform: rotate(30deg) scale(1.08); }
.hex--fill { background: var(--accent); color: #fff; }
.hex--fill::before { display: none; }
.sizes { display: flex; gap: 6px; margin-top: 2px; }
.sizes i { font-style: normal; font-size: clamp(7px, .62vw, 10px); font-weight: 500; text-transform: uppercase; width: 1.6vw; height: 1.6vw; min-width: 18px; min-height: 18px; display: grid; place-items: center; border-radius: 3px; border: 1px solid var(--line); color: var(--mute); }
.sizes i.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ico { display: flex; gap: 8px; color: #b5b5b5; }
.ico svg { width: 12px; height: 12px; }

/* next collection tile */
.nextc {
  position: absolute; z-index: 14; left: 75vw; bottom: -1vh; width: 25vw; height: 25vh; min-height: 140px; overflow: hidden; background: #111;
}
.nextc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; filter: contrast(1.05) saturate(.9); transition: transform 1s var(--ease); transform: scale(1.02); }
.nextc img[aria-hidden] { opacity: 0; }
.nextc:hover img { transform: scale(1.08); }
.nextc::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.15) 65%, transparent); }
.nextc__cap { position: absolute; left: 1.9vw; top: 40%; z-index: 2; color: #fff; display: flex; flex-direction: column; gap: 3px; }
.nextc__cap small { font-size: clamp(8px, .7vw, 11px); color: rgba(255,255,255,.55); }
.nextc__cap b { font-size: clamp(11px, .95vw, 15px); font-weight: 600; }


/* ── responsive collapse (< 900px) ─────────────────────── */
@media (max-width: 900px) {
  .nav { left: 6vw; right: 6vw; top: 5vh; gap: 4vw; }
  .nav__links { display: none; }
  .nav__search span { display: none; }
  .left { left: 6vw; width: 88vw; }
  .vid { top: 12vh; }
  .vid__thumb { width: 44vw; }
  .title { top: 62vh; font-size: clamp(64px, 20vw, 120px); left: -.04em; }
  .ctl { bottom: 4vh; }
  .ctl__btn { width: 30px; height: 30px; }
  .cards { left: 6vw; right: 6vw; top: auto; bottom: 14vh; overflow-x: auto; scrollbar-width: none; padding-right: 6vw; }
  .cards::-webkit-scrollbar { display: none; }
  .card { width: 58vw; height: 120px; }
  .nextc { display: none; }
  .stage canvas, .stage__fallback { opacity: .95; }
}

/* ── reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .pre { display: none; }
}
