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

:root {
  --bg: #a40d24;
  --fg: #ffffff;
  --fg-rgb: 255 255 255;
  --ink: #a40d24;            /* colour used on top of --fg surfaces */
  --ease: cubic-bezier(.65, .02, .2, 1);
  --dur: .85s;
  --pad: clamp(18px, 3.2vw, 48px);
}

html, body { height: 100%; margin: 0; }

body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--dur) var(--ease);
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p, h1 { margin: 0; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ───────── Hero shell ───────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.7fr) minmax(200px, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "nav   nav   nav"
    "copy  stage buy"
    "foot  foot  foot";
  gap: 0 clamp(8px, 2vw, 32px);
  background-color: var(--bg);
  color: var(--fg);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow: hidden;
  isolation: isolate;
}

.hero__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 48%, rgb(255 255 255 / .16), transparent 70%),
    radial-gradient(120% 90% at 50% 110%, rgb(0 0 0 / .28), transparent 60%),
    linear-gradient(180deg, rgb(0 0 0 / .10), transparent 30%);
}

/* ───────── Nav ───────── */
.nav {
  grid-area: nav;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 5;
}

.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand__mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--fg); color: var(--ink);
  font-weight: 700; font-size: 15px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.brand__name { font-weight: 700; letter-spacing: .01em; font-size: 19px; }

.nav__links {
  display: flex; gap: 2px; padding: 5px;
  border-radius: 999px;
  background: rgb(var(--fg-rgb) / .12);
  border: 1px solid rgb(var(--fg-rgb) / .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav__links a {
  padding: 9px 18px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  opacity: .85;
  transition: background-color .3s, color .3s, opacity .3s;
}
.nav__links a:hover { opacity: 1; background: rgb(var(--fg-rgb) / .12); }
.nav__links a.is-active { background: var(--fg); color: var(--ink); opacity: 1; }

.nav__actions { display: flex; gap: 10px; justify-self: end; }

.icon-btn {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgb(var(--fg-rgb) / .28);
  transition: background-color .3s, color .3s, transform .3s var(--ease), border-color .3s;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.icon-btn:active { transform: scale(.92); }
.icon-btn--lg { width: 52px; height: 52px; }
.icon-btn__badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--fg); color: var(--ink);
  font-size: 10px; font-weight: 700;
}
.icon-btn__badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }

/* ───────── Copy column ───────── */
.copy {
  grid-area: copy;
  align-self: center;
  max-width: 26rem;
  z-index: 4;
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgb(var(--fg-rgb) / .2); }
.headline {
  font-size: clamp(2.2rem, 4.3vw, 4rem);
  line-height: 1.02; font-weight: 600; letter-spacing: -.03em;
  text-wrap: balance;
}
.lede { margin-top: 18px; font-size: clamp(.9rem, 1.05vw, 1.02rem); line-height: 1.6; opacity: .9; max-width: 34ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li {
  padding: 7px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: rgb(var(--fg-rgb) / .1);
  border: 1px solid rgb(var(--fg-rgb) / .2);
}

.cta {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 28px; padding: 6px 6px 6px 22px;
  border-radius: 999px;
  background: var(--fg); color: var(--ink);
  font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .18);
  transition: transform .35s var(--ease), box-shadow .35s, background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cta__arrow {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--fg);
  transition: transform .35s var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cta__arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgb(0 0 0 / .24); }
.cta:hover .cta__arrow { transform: translateX(3px); }
.cta:active { transform: scale(.97); }

/* ───────── Stage (the animation) ───────── */
.stage {
  grid-area: stage;
  position: relative;
  min-height: min(62vh, 620px);
  --size: min(100%, 74vh, 700px);  /* height of the centre hoodie */   /* width of the centre hoodie */
  touch-action: pan-y;
}

.item {
  position: absolute; left: 50%; top: 50%;
  width: var(--size); aspect-ratio: 1;
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(var(--s, 1));
  opacity: var(--o, 1);
  transition:
    transform var(--dur) var(--ease),
    opacity calc(var(--dur) * .8) ease,
    filter var(--dur) var(--ease);
  will-change: transform, opacity;
  pointer-events: none;
}
.item__float { width: 100%; height: 100%; }
.item img, .item svg { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 28px 34px rgb(0 0 0 / .28)); }

/* roles */
.item[data-role="center"] { --s: 1; z-index: 3; }
.item[data-role="next"]   { --x: -37%; --y: 4%;  --s: .5; z-index: 2; filter: brightness(.94); pointer-events: auto; cursor: pointer; }
.item[data-role="prev"]   { --x: 37%;  --y: 4%;  --s: .5; z-index: 2; filter: brightness(.94); pointer-events: auto; cursor: pointer; }
.item[data-role="hide-l"] { --x: -52%; --y: 6%;  --s: .3; --o: 0; z-index: 1; }
.item[data-role="hide-r"] { --x: 52%;  --y: 6%;  --s: .3; --o: 0; z-index: 1; }

.item[data-role="center"] .item__float { animation: float 5.5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-2.2%) rotate(-.6deg); } }

.stage__shadow {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--size) * .36); height: calc(var(--size) * .035);
  transform: translate(-50%, calc(var(--size) * .5));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .45), transparent);
  animation: shadow 5.5s ease-in-out infinite;
}
@keyframes shadow { 50% { opacity: .6; scale: .86 1; } }

/* ───────── Buy column ───────── */
.buy {
  grid-area: buy;
  align-self: center; justify-self: end;
  display: grid; gap: 26px; justify-items: end; text-align: right;
  z-index: 4;
}
.price { display: grid; justify-items: end; gap: 4px; }
.price__now { font-size: clamp(2.2rem, 3.8vw, 3.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.price__was { font-size: 1rem; opacity: .7; text-decoration: line-through; }
.price__save {
  margin-top: 8px; padding: 5px 11px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid rgb(var(--fg-rgb) / .3);
}
.label { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .85; margin-bottom: 10px; }

.sizes { display: flex; gap: 8px; justify-content: flex-end; }
.sizes button {
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 11px; font-weight: 600;
  border: 1px solid rgb(var(--fg-rgb) / .25);
  transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.sizes button:hover { background: rgb(var(--fg-rgb) / .14); }
.sizes button[aria-checked="true"] { background: var(--fg); color: var(--ink); transform: scale(1.08); }

.swatches { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.swatches button {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12), 0 2px 6px rgb(0 0 0 / .2);
  outline: 1.5px solid transparent; outline-offset: 3px;
  transition: transform .35s var(--ease), outline-color .35s;
}
.swatches button:hover { transform: scale(1.15); }
.swatches button[aria-checked="true"] { outline-color: var(--fg); transform: scale(1.15); }

/* ───────── Footer row ───────── */
.foot {
  grid-area: foot;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  z-index: 4;
}
.arrows { display: flex; gap: 10px; }
.tagline { text-align: center; font-size: 12px; line-height: 1.5; opacity: .85; white-space: pre-line; }
.counter {
  justify-self: end;
  display: grid; grid-template-columns: auto 110px auto; align-items: end; gap: 4px 12px;
}
.counter__name { grid-column: 1 / -1; justify-self: end; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.counter__now { font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.counter__bar { height: 2px; margin-bottom: 8px; background: rgb(var(--fg-rgb) / .25); border-radius: 2px; overflow: hidden; }
.counter__bar i { display: block; height: 100%; width: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); }
.counter__total { font-size: 11px; opacity: .7; margin-bottom: 3px; font-variant-numeric: tabular-nums; }

/* ───────── Text swap + load-in ───────── */
.swap { display: inline-block; transition: opacity .28s ease, transform .28s var(--ease), filter .28s ease; }
.swap.is-out { opacity: 0; transform: translateY(10px); filter: blur(4px); }

.reveal { opacity: 0; transform: translateY(18px); }
.is-ready .reveal {
  opacity: 1; transform: none;
  transition: opacity .8s ease calc(var(--d) * 80ms + 100ms), transform .9s var(--ease) calc(var(--d) * 80ms + 100ms);
}
.stage.reveal { transform: scale(.9); }

/* ───────── Tablet / mobile ───────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto minmax(300px, 1fr) auto auto;
    grid-template-areas:
      "nav   nav"
      "copy  copy"
      "stage stage"
      "buy   buy"
      "foot  foot";
    gap: 18px 12px;
  }
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .copy { max-width: none; margin-top: 8px; }
  .lede, .chips { display: none; }
  .cta { margin-top: 18px; }
  .stage { min-height: 44vh; --size: min(104vw, 48vh); }
  .buy { justify-self: stretch; grid-template-columns: auto 1fr; align-items: end; justify-items: start; text-align: left; gap: 14px 16px; }
  .price { justify-items: start; grid-row: span 2; }
  .buy .picker { justify-self: end; text-align: right; }
  .foot { grid-template-columns: auto 1fr; }
  .tagline { display: none; }
  .icon-btn--lg { width: 46px; height: 46px; }
}

@media (max-width: 420px) {
  .sizes button { width: 34px; height: 34px; }
  .counter { grid-template-columns: auto 70px auto; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: .01s; }
  .item[data-role="center"] .item__float, .stage__shadow { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
