/* ---------- tokens ---------- */
@property --g1 { syntax: '<color>'; inherits: true; initial-value: rgba(246, 208, 232, .9); }
@property --g2 { syntax: '<color>'; inherits: true; initial-value: rgba(200, 160, 246, .8); }
@property --g3 { syntax: '<color>'; inherits: true; initial-value: rgba(214, 206, 250, .7); }

/* Layout: full-bleed product stage; copy pinned left, focused product centre, the queue drifting off to the right */
:root {
  --bg: #f8f9fc;
  --ink: #16161d;
  --muted: #74747e;
  --faint: #a9a9b3;
  --line: rgba(22, 22, 29, .12);
  --line-strong: rgba(22, 22, 29, .4);
  --glass: rgba(255, 255, 255, .18);
  --badge: rgba(255, 255, 255, .55);
  --toast-bg: #16161d;
  --toast-fg: #ffffff;
  --glow-cyan: rgba(158, 236, 246, .85);
  --glow-violet: rgba(194, 190, 250, .75);
  --glow-lilac: rgba(212, 214, 250, .6);
  --glow-sky: rgba(196, 220, 252, .8);
  --glow-tint: 1;
  --pad-x: clamp(20px, 8.7vw, 170px);
  --fs-body: clamp(10.5px, .73vw, 13.5px);
  --fs-small: clamp(9px, .625vw, 11.5px);
  --ease: cubic-bezier(.65, 0, .15, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur: 1.1s;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d12;
    --ink: #ecedf4;
    --muted: #a0a2b1;
    --faint: #6d6f7e;
    --line: rgba(236, 237, 244, .14);
    --line-strong: rgba(236, 237, 244, .45);
    --glass: rgba(12, 13, 18, .3);
    --badge: rgba(12, 13, 18, .55);
    --toast-bg: #ecedf4;
    --toast-fg: #0c0d12;
    --glow-cyan: rgba(60, 184, 206, .5);
    --glow-violet: rgba(116, 96, 226, .5);
    --glow-lilac: rgba(92, 104, 196, .4);
    --glow-sky: rgba(96, 150, 236, .7);
    --glow-tint: .5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0d12;
  --ink: #ecedf4;
  --muted: #a0a2b1;
  --faint: #6d6f7e;
  --line: rgba(236, 237, 244, .14);
  --line-strong: rgba(236, 237, 244, .45);
  --glass: rgba(12, 13, 18, .3);
  --badge: rgba(12, 13, 18, .55);
  --toast-bg: #ecedf4;
  --toast-fg: #0c0d12;
  --glow-cyan: rgba(60, 184, 206, .5);
  --glow-violet: rgba(116, 96, 226, .5);
  --glow-lilac: rgba(92, 104, 196, .4);
  --glow-sky: rgba(96, 150, 236, .7);
  --glow-tint: .5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: --g1 1.2s var(--ease), --g2 1.2s var(--ease), --g3 1.2s var(--ease);
}

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }

/* ---------- background glows ---------- */
.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.glow__layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); }

.glow__layer--list {
  background:
    radial-gradient(30% 40% at 52% 62%, var(--glow-cyan), transparent 72%),
    radial-gradient(32% 42% at 66% 38%, var(--glow-violet), transparent 72%),
    radial-gradient(26% 34% at 83% 52%, var(--glow-lilac), transparent 70%);
}
.glow__layer--detail {
  background:
    radial-gradient(28% 40% at 9% 76%, var(--g1), transparent 72%),
    radial-gradient(30% 44% at 30% 44%, var(--g2), transparent 72%),
    radial-gradient(30% 40% at 50% 26%, var(--g3), transparent 72%);
}
.glow__layer--set {
  background:
    radial-gradient(30% 36% at 46% 78%, var(--g2), transparent 72%),
    radial-gradient(26% 40% at 76% 44%, var(--glow-sky), transparent 72%),
    radial-gradient(26% 32% at 36% 34%, var(--g3), transparent 72%);
}
[data-view="list"] .glow__layer--list { opacity: 1; }
[data-view="detail"] .glow__layer--detail,
[data-view="set"] .glow__layer--set { opacity: var(--glow-tint); }

/* ---------- stage (product renders) ---------- */
.stage {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100svh;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.stage__inner {
  position: absolute;
  inset: 0;
  transition: transform 1.4s var(--ease-out);
}

.product {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform, filter, opacity;
  transition:
    transform var(--dur) var(--ease),
    filter var(--dur) var(--ease),
    opacity var(--dur) var(--ease),
    width var(--dur) var(--ease);
}
.product.no-anim { transition: none !important; }
.product__float { animation: float 7s ease-in-out infinite; }
.product img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.product:nth-child(2n) .product__float { animation-delay: -3.5s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(0, -10px, 0) rotate(-1.2deg); }
}

.set-visual {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  filter: blur(18px);
  transform: translate(-50%, -50%) scale(.92);
  transition: opacity .9s var(--ease), filter .9s var(--ease), transform 1.1s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}
[data-view="set"] .set-visual {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, -50%) scale(1);
  transition-delay: .35s;
}

.hotspots { position: absolute; left: 0; top: 0; pointer-events: none; }
[data-view="set"] .hotspots { pointer-events: auto; }
.hotspot { position: absolute; cursor: none; }
.hotspot__badge {
  position: absolute;
  display: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  place-items: center;
  font-size: 12px;
  font-weight: 300;
  transform: translate(-50%, -50%);
  background: var(--badge);
  backdrop-filter: blur(6px);
}

/* ---------- header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(clamp(22px, 6.4vh, 58px) + env(safe-area-inset-top, 0px)) var(--pad-x) 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(16px, 1.1vw, 20px);
  font-weight: 500;
  letter-spacing: -.02em;
  text-decoration: none;
}
.logo svg { fill: currentColor; margin-top: -2px; }

.nav { display: flex; gap: clamp(22px, 3vw, 46px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.nav a {
  position: relative;
  font-size: clamp(11.5px, .8vw, 14px);
  font-weight: 500;
  text-decoration: none;
}
.nav a::after,
.link-cta::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav a:hover::after,
.link-cta:hover::after,
.link-cta:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.back {
  position: absolute;
  right: var(--pad-x);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
[data-view="detail"] .nav,
[data-view="set"] .nav { opacity: 0; pointer-events: none; transform: translateY(-6px); }
[data-view="detail"] .back,
[data-view="set"] .back { opacity: 1; pointer-events: auto; transform: none; transition-delay: .3s; }

.top-line {
  position: fixed;
  top: 0;
  left: 59.5%;
  z-index: 10;
  width: 1px;
  height: clamp(24px, 4.6vh, 42px);
  background: var(--line-strong);
  transform-origin: top;
  transition: transform .8s var(--ease);
}
[data-view="detail"] .top-line,
[data-view="set"] .top-line { transform: scaleY(0); }

/* ---------- shared type ---------- */
.brand {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
}
.brand--caps { font-size: clamp(11px, .76vw, 14px); font-weight: 800; letter-spacing: .02em; }
.brand--lower { font-size: clamp(15px, 1.04vw, 19px); font-weight: 700; letter-spacing: -.03em; }
.brand--icon { font-size: clamp(8.5px, .6vw, 11px); font-weight: 800; letter-spacing: .14em; }
.brand--icon svg { flex: none; }

.title {
  margin: 0 0 clamp(16px, 3vh, 28px);
  font-size: clamp(28px, 2.55vw, 52px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.05;
}
.title--md { font-size: clamp(28px, 2.55vw, 52px); }
.reg { font-size: .45em; vertical-align: .95em; margin-left: .06em; letter-spacing: 0; }

.lead, .copy {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 2.05;
  color: var(--muted);
}

.link-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.link-cta::after { right: 21px; }
.link-cta svg { transition: transform .45s var(--ease); }
.link-cta:hover svg { transform: translate(2px, -2px); }

/* ---------- panels ---------- */
main { position: relative; z-index: 5; }

.panel {
  position: fixed;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
}
[data-view="list"] .panel--list,
[data-view="detail"] .panel--detail,
[data-view="set"] .panel--set { visibility: visible; }

/* children fade/slide in with a stagger when their panel becomes active */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
[data-view="list"] .panel--list .reveal,
[data-view="detail"] .panel--detail .reveal,
[data-view="set"] .panel--set .reveal {
  opacity: 1;
  transform: none;
  transition-delay: calc(.45s + var(--i, 0) * .07s);
}

.intro, .pager, .detail, .set, .buy { pointer-events: auto; }

/* list */
.intro {
  position: absolute;
  left: var(--pad-x);
  top: 46.5%;
  width: clamp(290px, 20vw, 390px);
  transform: translateY(-50%);
}
.intro .title { white-space: nowrap; }
.intro .lead { margin-bottom: clamp(22px, 4.4vh, 40px); max-width: clamp(275px, 19vw, 370px); }

.pager {
  position: absolute;
  right: var(--pad-x);
  bottom: 10.6vh;
  display: flex;
  align-items: center;
  gap: 18px;
}
.counter { margin: 0; font-size: clamp(10px, .7vw, 12.5px); color: var(--faint); letter-spacing: .04em; }
.counter strong { font-size: clamp(14px, 1vw, 18px); font-weight: 600; color: var(--ink); letter-spacing: 0; }
.pager__btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 15px;
  display: none;
}

/* detail */
.detail {
  position: absolute;
  left: 50.8%;
  right: var(--pad-x);
  top: 19.5vh;
  max-width: clamp(620px, 43vw, 820px);
}
.detail .brand { margin-bottom: 4px; }
.copy { column-count: 2; column-gap: clamp(28px, 4vw, 60px); }

.specs {
  position: relative;
  margin-top: clamp(30px, 8.5vh, 80px);
  height: clamp(88px, 6.2vw, 116px);
  overflow: hidden;
  cursor: none;
  outline: none;
}
.specs:focus-visible { box-shadow: 0 0 0 1px var(--line); border-radius: 4px; }
.specs__group {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.specs__group.is-active { opacity: 1; transform: none; transition-delay: .2s; }
.specs__group.is-leaving { opacity: 0; transform: translateX(-60px); transition-delay: 0s; }
.spec__label { font-size: var(--fs-body); font-weight: 600; letter-spacing: -.01em; }
.spec__bar {
  position: relative;
  height: 2px;
  margin: 9px 0 10px;
  max-width: 150px;
  background: var(--line);
  overflow: hidden;
}
.spec__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}
.specs__group.is-active .spec__bar::after { animation: progress var(--spec-dur, 5s) linear forwards; }
.specs.is-paused .spec__bar::after { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.spec__value { font-size: clamp(10px, .7vw, 13px); line-height: 1.8; color: var(--muted); }

.detail__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(24px, 6vh, 56px);
  padding-top: clamp(26px, 5.5vh, 50px);
  border-top: 1px solid var(--line);
}

/* set */
.set {
  position: absolute;
  left: var(--pad-x);
  top: 19.5vh;
  width: clamp(250px, 17vw, 330px);
}
.set .title { margin-bottom: clamp(18px, 3.6vh, 32px); }
.set__list { margin: 0; padding: 0; list-style: none; counter-reset: item; }
.set__list li {
  position: relative;
  margin-bottom: clamp(16px, 3.6vh, 32px);
  counter-increment: item;
  transition: opacity .4s var(--ease);
}
.set__list li::before {
  content: counter(item) '.';
  position: absolute;
  left: -18px;
  top: 0;
  font-size: var(--fs-body);
  font-weight: 600;
}
.set__list h3 { margin: 0 0 6px; font-size: var(--fs-body); font-weight: 600; letter-spacing: -.01em; }
.set__list p { margin: 0; font-size: clamp(10px, .7vw, 13px); line-height: 2; color: var(--muted); max-width: clamp(160px, 11.5vw, 220px); }
.set__list.has-focus li { opacity: .35; }
.set__list.has-focus li.is-focus { opacity: 1; }

.buy {
  position: absolute;
  right: var(--pad-x);
  bottom: 18vh;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: clamp(20px, 4.4vh, 40px);
  border-top: 1px solid var(--line);
  min-width: 260px;
  justify-content: flex-end;
}
.price { font-size: clamp(26px, 2.4vw, 36px); font-weight: 300; letter-spacing: -.02em; }

/* ---------- footer ---------- */
.footer {
  position: fixed;
  left: var(--pad-x);
  bottom: calc(9.6vh + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  font-size: var(--fs-small);
  color: var(--faint);
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  pointer-events: none;
  will-change: transform;
}
.cursor::before {
  content: '';
  position: absolute;
  left: -21px;
  top: -21px;
  width: 42px;
  height: 42px;
  border: 1.2px solid var(--ink);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(3px);
  transform: scale(0);
  transition: transform .35s var(--ease);
}
.cursor.is-on::before { transform: scale(1); }
.cursor__arrow,
.cursor__num {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  opacity: 0;
  transition: opacity .25s, rotate .4s var(--ease);
}
.cursor__num { font-size: 18px; font-weight: 300; line-height: 1; }
.cursor__label {
  position: absolute;
  left: 30px;
  top: 14px;
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s, transform .4s var(--ease);
}
.cursor[data-mode="next"] .cursor__arrow,
.cursor[data-mode="prev"] .cursor__arrow { opacity: 1; }
.cursor[data-mode="prev"] .cursor__arrow { rotate: 180deg; }
.cursor[data-mode="num"] .cursor__num { opacity: 1; }
.cursor[data-mode="num"] .cursor__label { opacity: 1; transform: none; }
body.cursor-hidden { cursor: none; }

/* ---------- first paint: hold everything back until the renders are decoded ---------- */
.is-loading .reveal { opacity: 0 !important; transform: translateY(18px) !important; transition: none !important; }
.is-loading .product { opacity: 0 !important; }
.is-loading .top-line { transform: scaleY(0); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--toast-bg);
  color: var(--toast-fg);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- touch devices: no custom cursor, visible pager ---------- */
@media (hover: none) {
  .cursor { display: none; }
  .pager__btn { display: grid; place-items: center; }
  .specs { cursor: pointer; }
  .hotspot__badge { display: grid; }
}

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  :root { --pad-x: 20px; }
  body { overflow-x: hidden; overflow-y: auto; }

  .stage { height: 58svh; }
  .glow { position: absolute; bottom: auto; height: 72svh; }
  .nav { display: none; }
  .top-line { display: none; }
  .header { padding-top: 22px; }

  .panel { position: relative; inset: auto; display: none; padding: calc(58svh + 4px) var(--pad-x) 32px; }
  [data-view="list"] .panel--list,
  [data-view="detail"] .panel--detail,
  [data-view="set"] .panel--set { display: block; }

  .intro, .detail, .set, .pager, .buy {
    position: static;
    width: auto;
    max-width: none;
    transform: none;
  }
  .intro .title { white-space: normal; }
  .intro .lead { max-width: 52ch; }
  .pager { margin-top: 28px; justify-content: space-between; }
  .pager__btn { display: grid; place-items: center; }
  .copy { column-count: 1; }
  .specs { height: auto; min-height: 150px; }
  .specs__group { grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .set__list { padding-left: 18px; }
  .set__list p { max-width: none; }
  .buy { margin-top: 28px; justify-content: space-between; min-width: 0; }
  .footer { position: static; padding: 0 var(--pad-x) 28px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: .01s; }
  .product__float { animation: none; }
  .reveal, .specs__group, .set-visual, .glow__layer { transition-duration: .01s !important; transition-delay: 0s !important; }
}
