/* ═══════════════════════════════════════════════════════════════
   MALANOVA® — CORREDO · DROP 001
   Art direction: votive south × Y2K futurism. Nero asfalto, osso,
   rosso votivo, zolfo. Archivo variable (wdth 62–125) + Space Mono.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --nero: #0b0b0e;
  --nero-2: #131318;
  --osso: #eae5d8;
  --osso-dim: #b9b3a4;
  --fumo: #8a8478;
  --rosso: #ff2e1a;
  --solfo: #d8ff3a;

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --wdth-tight: 62;
  --wdth-wide: 125;

  --step--1: clamp(0.66rem, 0.6rem + 0.3vw, 0.8rem);
  --step-0: clamp(0.8rem, 0.72rem + 0.4vw, 1rem);
  --step-1: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  --step-2: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  --step-3: clamp(2.4rem, 1.6rem + 4vw, 4.4rem);
  --step-4: clamp(3.6rem, 2rem + 8vw, 8rem);

  --gutter: clamp(1rem, 3vw, 2.5rem);
  --z-gl: 0;
  --z-content: 10;
  --z-topbar: 50;
  --z-grain: 60;
  --z-cursor: 90;
  --z-preloader: 100;
}

/* ── reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-width: thin;
  scrollbar-color: var(--fumo) var(--nero);
  background: var(--nero);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--nero);
  color: var(--osso);
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--rosso); color: var(--nero); }

img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
sup { font-size: 0.4em; vertical-align: super; }

.mono {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: calc(var(--z-preloader) + 1);
  padding: 0.6em 1em;
  background: var(--rosso);
  color: var(--nero);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  transform: translateY(-300%);
  transition: transform 0.2s;
}
.skip-link:focus-visible { transform: none; }

/* custom cursor active (set by JS on fine pointers) */
html.has-cursor, html.has-cursor a, html.has-cursor button,
html.has-cursor input, html.has-cursor label { cursor: none; }

/* ── GL canvas + grain ─────────────────────────────────────── */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-gl);
}
html.no-webgl #gl { display: none; }
html.no-webgl body {
  background:
    radial-gradient(120% 90% at 50% 0%, #1a1a20 0%, var(--nero) 60%),
    var(--nero);
}

.grain {
  position: fixed;
  inset: -60px;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-jitter 0.6s steps(4) infinite;
}
@keyframes grain-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-18px, 12px); }
  50% { transform: translate(14px, -20px); }
  75% { transform: translate(-8px, -14px); }
  100% { transform: translate(0, 0); }
}

/* ── preloader — garment tag ───────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  display: grid;
  place-items: center;
  background: var(--nero);
}
.tag {
  position: relative;
  width: min(320px, 82vw);
  padding: 3.2rem 1.6rem 1.6rem;
  background: var(--osso);
  color: var(--nero);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}
.tag__punch {
  position: absolute;
  top: 1.1rem; left: 50%;
  width: 14px; height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--nero);
}
.tag__brand {
  font-weight: 900;
  font-variation-settings: "wdth" 70;
  font-size: 2.2rem;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}
.tag__row { margin-bottom: 0.45rem; letter-spacing: 0.06em; }
.tag__care { color: #55524a; }
.tag__barcode {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 44px;
  margin: 1.1rem 0 0.8rem;
}
.tag__barcode i { flex: 1 0 1px; background: var(--nero); }
.tag__barcode i:nth-child(3n) { flex-basis: 3px; }
.tag__barcode i:nth-child(4n) { background: transparent; }
.tag__barcode i:nth-child(7n) { flex-basis: 5px; }
.tag__status { min-height: 1.2em; }
.tag__pct {
  margin-top: 0.6rem;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.tag__pct-sign { font-size: 0.45em; margin-left: 0.15em; }
.tag__scanline {
  position: absolute;
  left: 0; right: 0; top: -20%;
  height: 18%;
  background: linear-gradient(to bottom, transparent, rgba(255, 46, 26, 0.35), transparent);
  border-bottom: 1px solid var(--rosso);
  animation: scan 1.6s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes scan {
  0% { top: -20%; }
  100% { top: 120%; }
}

/* ── topbar ────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  mix-blend-mode: difference;
}
.topbar__brand {
  font-weight: 900;
  font-variation-settings: "wdth" 70;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.topbar__drop { color: var(--osso-dim); }
.topbar__nav { display: flex; align-items: center; gap: 1.4rem; }
.topbar__join { border-bottom: 1px solid currentColor; padding-bottom: 0.15em; }

#audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--step--1);
}
.audio-toggle__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.audio-toggle__bars i {
  width: 2px;
  height: 4px;
  background: currentColor;
  transition: height 0.25s;
}
#audio-toggle[aria-pressed="true"] .audio-toggle__bars i { animation: bars 0.7s ease-in-out infinite alternate; }
#audio-toggle[aria-pressed="true"] .audio-toggle__bars i:nth-child(2) { animation-delay: 0.15s; }
#audio-toggle[aria-pressed="true"] .audio-toggle__bars i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bars {
  from { height: 3px; }
  to { height: 12px; }
}

/* ── cursor ────────────────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  opacity: 0;
}
html.has-cursor .cursor { opacity: 1; }
.cursor__dot {
  position: fixed;
  top: -3px; left: -3px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--osso);
  mix-blend-mode: difference;
}
.cursor__ring {
  position: fixed;
  top: -18px; left: -18px;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(234, 229, 216, 0.55);
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: width 0.25s, height 0.25s, top 0.25s, left 0.25s, background-color 0.25s, border-color 0.25s;
}
.cursor__label {
  font-size: 0.7rem;
  color: var(--nero);
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor.is-hover .cursor__ring {
  width: 52px; height: 52px;
  top: -26px; left: -26px;
  border-color: var(--osso);
}
.cursor.is-plus .cursor__ring,
.cursor.is-drag .cursor__ring {
  width: 58px; height: 58px;
  top: -29px; left: -29px;
  background: var(--osso);
  border-color: var(--osso);
}
.cursor.is-plus .cursor__label,
.cursor.is-drag .cursor__label { opacity: 1; }
.cursor.is-plus .cursor__dot,
.cursor.is-drag .cursor__dot { opacity: 0; }

/* ── chapters — shared ─────────────────────────────────────── */
main { position: relative; z-index: var(--z-content); }
.chapter { position: relative; }

/* ── 01 · hero ─────────────────────────────────────────────── */
.chapter--hero {
  height: 130vh;
}
.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 var(--gutter) 2.2rem;
  overflow: hidden;
}
.hero__mark {
  align-self: center;
  justify-self: center;
  display: flex;
  font-size: clamp(4rem, 16.2vw, 19rem);
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  line-height: 0.82;
  letter-spacing: -0.01em;
  white-space: nowrap;
  user-select: none;
  margin-top: 4vh;
}
.hero__mark span { display: inline-block; will-change: transform, font-variation-settings; }
.hero__tagline {
  position: absolute;
  top: 16vh;
  left: var(--gutter);
  max-width: 30ch;
  font-size: var(--step-1);
  font-weight: 500;
  font-variation-settings: "wdth" 80;
  line-height: 1.25;
  color: var(--osso-dim);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  border-top: 1px solid rgba(234, 229, 216, 0.22);
  padding-top: 1rem;
}
.hero__coords { color: var(--fumo); }
.hero__drop { color: var(--osso); }
.hero__count { color: var(--rosso); font-weight: 700; }
.hero__count span { display: inline-block; min-width: 2ch; text-align: right; }
.hero__scrollhint {
  position: absolute;
  bottom: 6.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fumo);
  animation: hint-pulse 2.2s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.35; transform: translate(-50%, 0); }
  50% { opacity: 1; transform: translate(-50%, 8px); }
}
.hero__vertical {
  position: absolute;
  right: calc(var(--gutter) * 0.6);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  color: var(--fumo);
  letter-spacing: 0.35em;
}

/* ── marquee ───────────────────────────────────────────────── */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
  border-top: 1px solid rgba(234, 229, 216, 0.16);
  border-bottom: 1px solid rgba(234, 229, 216, 0.16);
  background: rgba(11, 11, 14, 0.55);
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  width: max-content;
}
.marquee__chunk { display: inline-block; color: var(--osso-dim); }
.marquee--drop { border-color: rgba(255, 46, 26, 0.5); background: rgba(255, 46, 26, 0.08); }
.marquee--drop .marquee__chunk {
  font-size: var(--step-2);
  font-weight: 900;
  font-variation-settings: "wdth" 68;
  color: var(--rosso);
  letter-spacing: 0.02em;
}

/* ── 02 · collection ───────────────────────────────────────── */
.chapter--collection { height: 650vh; }
.collection__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0 var(--gutter);
  overflow: hidden;
}
.collection__head {
  position: absolute;
  top: 5.5rem;
  left: var(--gutter);
}
.collection__title {
  font-size: var(--step-3);
  font-weight: 900;
  font-variation-settings: "wdth" 65;
  line-height: 0.9;
}
.collection__sub { color: var(--fumo); margin-top: 0.6rem; }
.collection__index {
  position: absolute;
  top: 5.7rem;
  right: var(--gutter);
  font-size: var(--step-2);
  color: var(--osso-dim);
}
#piece-current { color: var(--rosso); font-weight: 700; }

.collection__pieces { position: absolute; inset: 0; pointer-events: none; }
.piece {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.4rem 3rem;
  align-items: end;
  opacity: 0;
  visibility: hidden;
}
.piece.is-active { pointer-events: auto; }
.piece__name {
  grid-row: span 3;
  font-size: var(--step-4);
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  line-height: 0.85;
  letter-spacing: -0.01em;
  overflow: hidden;
}
.piece__name span { display: inline-block; will-change: transform; }
.piece__kind { color: var(--rosso); }
.piece__spec { color: var(--osso-dim); max-width: 42ch; line-height: 1.7; text-transform: none; }
.piece__price {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--osso);
  display: flex;
  align-items: baseline;
  gap: 1.2em;
}
.piece__sku { font-size: 0.55em; font-weight: 400; color: var(--fumo); letter-spacing: 0.2em; }
.collection__hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fumo);
  opacity: 0.6;
}

/* ── 03 · lookbook ─────────────────────────────────────────── */
.chapter--lookbook { /* pinned by GSAP, height stays 100vh */ height: 100vh; }
.lookbook__viewport {
  position: relative;
  height: 100vh;
  overflow: hidden;
  padding: 0 var(--gutter);
}
.lookbook__head {
  position: absolute;
  top: 5.5rem;
  left: var(--gutter);
  z-index: 2;
}
.lookbook__title {
  font-size: var(--step-3);
  font-weight: 900;
  font-variation-settings: "wdth" 65;
  line-height: 0.9;
}
.lookbook__sub { color: var(--fumo); margin-top: 0.6rem; }
.lookbook__track {
  position: absolute;
  left: 0;
  bottom: 3rem;
  display: flex;
  width: max-content;
  will-change: transform;
}
.look {
  width: 100vw;
  padding: 0 var(--gutter);
  display: flex;
  align-items: flex-end;
}
.look figcaption { max-width: 46ch; }
.look__num { color: var(--rosso); margin-bottom: 0.5rem; }
.look__name {
  font-size: var(--step-3);
  font-weight: 900;
  font-variation-settings: "wdth" 64;
  line-height: 0.9;
}
.look__en { color: var(--osso-dim); margin-top: 0.6rem; }
.lookbook__progress {
  position: absolute;
  bottom: 1.1rem;
  right: var(--gutter);
  color: var(--fumo);
}
#look-current { color: var(--rosso); font-weight: 700; }

/* ── 04 · interlude ────────────────────────────────────────── */
.chapter--interlude { height: 250vh; }
.interlude__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.interlude__word {
  position: absolute;
  font-size: clamp(4rem, 17vw, 20rem);
  font-weight: 100;
  font-variation-settings: "wdth" 120, "wght" 100;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(234, 229, 216, 0.28);
  user-select: none;
  white-space: nowrap;
}
.interlude__caption {
  position: absolute;
  bottom: 3rem;
  left: var(--gutter);
  color: var(--osso-dim);
  line-height: 1.9;
}

/* ── 05 · manifesto ────────────────────────────────────────── */
.chapter--manifesto {
  padding: 24vh var(--gutter) 22vh;
}
.manifesto__label { color: var(--rosso); margin-bottom: 3rem; }
/* Each line is a single non-wrapping poster line — sizes tuned per line
   length so the block reads as one composition. nowrap also makes the
   variable-font hover jitter reflow-free. */
.manifesto__lines { max-width: 100%; }
.mline {
  font-size: clamp(2.4rem, 7vw, 7.6rem);
  font-weight: 900;
  font-variation-settings: "wdth" 63;
  line-height: 0.96;
  margin-bottom: 0.3em;
  overflow: hidden;
  white-space: nowrap;
}
.mline--m { font-size: clamp(1.6rem, 5.6vw, 6rem); }
.mline--s { font-size: clamp(1.1rem, 4.1vw, 4.4rem); }
.mline--xl { font-size: clamp(3rem, 9.8vw, 10.4rem); }
.mline span { display: inline-block; will-change: transform, font-variation-settings; }
.mline--red { color: var(--rosso); }
.manifesto__sign {
  margin-top: 4rem;
  color: var(--fumo);
  border-top: 1px solid rgba(234, 229, 216, 0.2);
  padding-top: 1.2rem;
  max-width: 44rem;
}

/* ── 06 · drop / footer ────────────────────────────────────── */
.chapter--drop {
  display: flex;
  flex-direction: column;
  min-height: 130vh;
}
.drop__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh var(--gutter) 8vh;
}
.drop__title {
  font-size: var(--step-4);
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  line-height: 0.88;
}
.drop__sub {
  margin-top: 1.6rem;
  font-size: var(--step-1);
  font-variation-settings: "wdth" 80;
  color: var(--osso-dim);
  line-height: 1.4;
}
.drop__form { margin-top: 3.5rem; max-width: 44rem; }
.drop__form label { display: block; color: var(--fumo); margin-bottom: 0.8rem; }
.drop__row {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.drop__row input {
  flex: 1 1 16rem;
  background: transparent;
  border: 1px solid rgba(234, 229, 216, 0.35);
  color: var(--osso);
  padding: 1.1em 1.2em;
  font-size: var(--step-0);
  letter-spacing: 0.05em;
}
.drop__row input::placeholder { color: var(--fumo); }
.drop__row input:focus-visible { border-color: var(--rosso); outline-offset: 0; }
.drop__cta {
  position: relative;
  padding: 1.1em 2.4em;
  background: var(--rosso);
  color: var(--nero);
  font-weight: 900;
  font-variation-settings: "wdth" 70;
  font-size: var(--step-1);
  letter-spacing: 0.02em;
  overflow: hidden;
  will-change: transform;
}
.drop__cta:hover { background: var(--solfo); }
.drop__cta-label { display: inline-block; will-change: transform; }
.drop__note { margin-top: 1rem; color: var(--fumo); min-height: 1.4em; }
.drop__note.is-ok { color: var(--solfo); }

.footer {
  padding: 3rem var(--gutter) 2.2rem;
  border-top: 1px solid rgba(234, 229, 216, 0.16);
  display: grid;
  gap: 2rem;
}
.footer__barcode {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 54px;
  position: relative;
  max-width: 30rem;
}
.footer__barcode i { flex: 1 0 1px; background: var(--osso); opacity: 0.85; }
.footer__barcode i:nth-child(3n) { flex-basis: 3px; }
.footer__barcode i:nth-child(4n) { background: transparent; }
.footer__barcode i:nth-child(7n) { flex-basis: 5px; }
.footer__barcode i:nth-child(11n) { background: var(--rosso); }
.footer__serial {
  position: absolute;
  left: 0;
  bottom: -1.4rem;
  color: var(--fumo);
  font-size: 0.62rem;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin-top: 1rem;
}
.footer__nav a { border-bottom: 1px solid rgba(234, 229, 216, 0.3); padding-bottom: 0.2em; }
.footer__nav a:hover { color: var(--rosso); border-color: var(--rosso); }
.footer__legal { color: var(--fumo); line-height: 1.9; }

/* ── noscript ──────────────────────────────────────────────── */
.noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: var(--z-preloader);
  background: var(--osso);
  color: var(--nero);
  padding: 1.2rem 1.4rem;
  line-height: 1.8;
}

/* ═══ responsive ════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero__tagline { top: 14vh; }
}

@media (max-width: 820px) {
  .topbar__drop { display: none; }
  .hero__mark { font-size: clamp(3rem, 17.5vw, 9rem); margin-top: 0; }
  .hero__tagline { position: static; order: -1; margin-top: 14vh; max-width: 26ch; }
  .hero__stage { grid-template-rows: auto 1fr auto; }
  .hero__vertical { display: none; }
  .hero__scrollhint { bottom: 7.5rem; }
  .piece { grid-template-columns: 1fr; bottom: 4rem; gap: 0.5rem; }
  .piece__name { grid-row: auto; font-size: clamp(2.6rem, 15vw, 6rem); }
  .piece__spec { max-width: 100%; }
  .collection__index { top: auto; bottom: 1.1rem; right: var(--gutter); font-size: var(--step-1); }
  .collection__hint { display: none; }
  .look figcaption { max-width: 100%; }
  .interlude__caption { right: var(--gutter); }
  .manifesto__lines { max-width: 100%; }
  .chapter--manifesto { padding-top: 18vh; padding-bottom: 16vh; }
  .drop__cta { flex: 1 1 100%; }
}

@media (max-width: 560px) {
  .topbar { padding: 0.85rem 1rem; }
  .audio-toggle__label { display: none; }
  .drop__title { font-size: clamp(2.6rem, 14vw, 5rem); }
  .footer__nav { gap: 1.2rem; }
}

/* ═══ reduced motion ════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .tag__scanline { animation-duration: 3.5s; }
  .hero__scrollhint { animation: none; opacity: 0.7; }
  #audio-toggle[aria-pressed="true"] .audio-toggle__bars i { animation: none; height: 8px; }
  .cursor { display: none; }
  html.has-cursor, html.has-cursor a, html.has-cursor button,
  html.has-cursor input, html.has-cursor label { cursor: auto; }
}
