/* AvaWear — Numéro: a clear shop with a magazine's voice. Paper ground, one serif for the voice, one sans for the shop. */
:root {
  --paper: #f6f4f0;
  --well: #ece8e1;      /* image wells */
  --ink: #171513;
  --muted: #6f6862;
  --sold: #a39d96;
  --line: rgba(23, 21, 19, 0.14);
  --bronze: #8a6248;    /* the last piece, only */

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --m: clamp(16px, 3vw, 48px);
  --gap: clamp(12px, 1.6vw, 24px);
  --section: clamp(88px, 10vw, 160px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.h2 { font: 500 clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem)/1 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.5; max-width: 44ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  font: 500 15px/1 var(--sans); letter-spacing: 0.01em;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: #3a3430; border-color: #3a3430; }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- Header: links / wordmark / actions ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 64px; padding: 0 var(--m);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
.top-links, .top-actions { display: flex; gap: 28px; font-size: 14px; }
.top-actions { justify-content: flex-end; align-items: center; }
.top a { text-decoration: none; }
.top-links a:hover, .top-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wordmark { font: 600 26px/1 var(--serif); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.cart { font-variant-numeric: tabular-nums; }
.cart-n { display: inline-block; }
.cart-n.bump { animation: bump 420ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }

/* ---------- Cover ---------- */
.cover { position: relative; }
.cover-pic img { width: 100%; height: min(88svh, 56.25vw); min-height: 520px; object-fit: cover; object-position: 72% 30%; }
.cover-text {
  position: absolute; inset: 0 auto 0 0; width: min(54%, 760px);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding: 0 var(--m);
}
.issue { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.masthead { font: 800 clamp(4rem, 1rem + 9.2vw, 10.5rem)/0.82 var(--serif); letter-spacing: -0.03em; text-transform: uppercase; margin-left: -0.04em; }
.coverline { font: italic 400 clamp(1.5rem, 1rem + 1.4vw, 2.5rem)/1.1 var(--serif); }
.cover-sub { max-width: 36ch; color: #2d2925; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Drop 01: the grid ---------- */
.drop { padding: var(--section) var(--m) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-note { color: var(--muted); font-size: 14px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) var(--gap); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0;
  background: var(--well); cursor: pointer; overflow: hidden;
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 400ms var(--ease), transform 700ms var(--ease); }
.m-worn { object-fit: cover; object-position: center 20%; }
.m-pack { object-fit: contain; padding: 14%; opacity: 0; transform: scale(0.97); }
@media (hover: hover) {
  .card-media:hover .m-worn { opacity: 0; }
  .card-media:hover .m-pack { opacity: 1; transform: none; }
}
.card-info { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-top: 14px; flex: 1; align-content: start; }
.card-info h3 { font: 500 16px/1.3 var(--sans); }
.card-name { padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.card-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.price { font-variant-numeric: tabular-nums; }
.dots { grid-column: 1 / -1; display: flex; gap: 8px; }
.dots button, .sheet-colours button {
  width: 18px; height: 18px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--c); border: 1px solid rgba(23, 21, 19, 0.25);
  transition: transform 160ms var(--ease);
}
.dots button:hover { transform: scale(1.15); }
.last-note { grid-column: 1 / -1; color: var(--bronze); font-size: 14px; font-weight: 500; }
.card .add { grid-column: 1 / -1; margin-top: 8px; align-self: end; }
.add {
  width: 100%; min-height: 46px; border-radius: 0; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 14px/1 var(--sans);
  transition: background-color 180ms var(--ease), transform 160ms var(--ease);
}
.add:hover:not(:disabled) { background: #3a3430; }
.add:active:not(:disabled) { transform: scale(0.98); }
.add:disabled { cursor: not-allowed; background: transparent; color: var(--sold); border-color: rgba(23, 21, 19, 0.16); }
.card.is-gone .last-note { color: var(--muted); }

/* ---------- Edito ---------- */
.edito {
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: var(--section) var(--m) 0;
}
.edito-pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 15%; background: var(--well); }
.edito-text { display: grid; gap: 28px; }
.rules { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 560px; }
.rules > div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rules dt { font: italic 400 20px/1.2 var(--serif); }
.rules dd { color: #3a3430; }

/* ---------- Numéro 02 ---------- */
.next {
  display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: var(--section) var(--m) 0;
}
.next-text { display: grid; gap: 24px; justify-items: start; }
.count { display: flex; flex-wrap: wrap; gap: 4px 28px; color: var(--muted); font-size: 14px; }
.count span { display: inline-flex; align-items: baseline; gap: 8px; }
.count b { font: 500 clamp(2.75rem, 1.6rem + 3.4vw, 4.75rem)/1 var(--serif); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.count-done { font: italic 400 24px/1.3 var(--serif); }
.next-pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--well); }

/* ---------- Waitlist ---------- */
.join { padding: var(--section) var(--m); display: grid; justify-items: center; text-align: center; gap: 18px; }
.join .lead { color: #3a3430; }
.wl { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 12px; align-items: end; width: min(100%, 860px); margin-top: 16px; text-align: left; }
.inp { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.inp em { font-style: normal; color: var(--muted); font-weight: 400; }
.inp input {
  height: 50px; padding: 0 14px; border: 1px solid rgba(23, 21, 19, 0.28); border-radius: 0; background: #fffdfa;
  font: 400 16px/1 var(--sans); color: var(--ink);
}
.inp input:focus { outline: none; border-color: var(--ink); }
.inp input[aria-invalid="true"] { border-color: #a3261b; }
.wl-msg { grid-column: 1 / -1; min-height: 1.5em; font-weight: 500; text-align: center; }
.wl-msg.err { color: #a3261b; }
.wl .btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 80px) var(--m) 28px; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-mark { margin-bottom: 12px; }
.foot-line { color: var(--muted); max-width: 34ch; }
.foot nav { display: grid; gap: 8px; align-content: start; font-size: 14px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-h { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.foot-mail { color: var(--muted); user-select: all; }
.legal { margin-top: 48px; font-size: 13px; color: var(--muted); }

/* ---------- Product sheet (injected by core.js) ---------- */
.sheet {
  width: min(1040px, calc(100% - 32px)); max-height: min(720px, calc(100svh - 48px));
  padding: 0; border: 0; border-radius: 0; background: var(--paper); color: var(--ink);
  display: none; grid-template-columns: 1.1fr 1fr; overflow: auto;
  box-shadow: 0 30px 80px rgba(23, 21, 19, 0.25);
}
.sheet[open] { display: grid; animation: sheet-in 320ms var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } }
.sheet::backdrop { background: rgba(23, 21, 19, 0.45); }
.sheet-x { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; z-index: 1; }
.sheet-pic { background: var(--well); display: grid; place-items: center; padding: 8%; min-height: 420px; }
.sheet-pic img { max-height: 520px; width: auto; object-fit: contain; }
.sheet-info { display: grid; align-content: start; gap: 14px; padding: 48px clamp(24px, 4vw, 48px) 36px; }
.sheet-name { font: 500 clamp(1.75rem, 1.3rem + 1.2vw, 2.5rem)/1.05 var(--serif); letter-spacing: -0.01em; padding-right: 32px; }
.sheet-price { font-size: 18px; font-variant-numeric: tabular-nums; }
.sheet-colours { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sheet-colours button { width: 26px; height: 26px; }
.sheet-colours button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.sheet-colour-name { margin-left: 6px; color: var(--muted); font-size: 14px; }
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.size { height: 42px; border: 1px solid rgba(23, 21, 19, 0.28); background: #fffdfa; font: 500 14px/1 var(--sans); cursor: pointer; }
.size:disabled { color: var(--sold); text-decoration: line-through; background: transparent; border-color: rgba(23, 21, 19, 0.12); cursor: not-allowed; }
.size.is-ok { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sheet-desc { color: #3a3430; max-width: 46ch; }
.sheet-msg { min-height: 1.4em; color: var(--bronze); font-weight: 500; }
.sheet-wl { font-size: 14px; }

/* ---------- Entrances ---------- */
.js [data-rv] { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-rv].in { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover-text { width: 62%; }
  .top-links { gap: 18px; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  .top { grid-template-columns: auto 1fr; height: 56px; }
  .top-links { display: none; }
  .wordmark { font-size: 22px; }
  .top-actions { gap: 18px; }
  .cover-pic img { height: auto; min-height: 0; aspect-ratio: 4 / 5; object-position: center top; }
  .cover-text { position: static; width: auto; padding: 24px var(--m) 0; gap: 14px; }
  .masthead { position: absolute; top: 4.5vw; left: 0; right: 0; text-align: center; font-size: 19vw; margin: 0; }
  .issue { order: -1; }
  .cover-actions .btn { flex: 1 1 auto; }
  .grid { gap: 32px 12px; }
  .card-info { grid-template-columns: 1fr; }
  .card-info h3 { font-size: 15px; }
  .edito, .next { grid-template-columns: 1fr; }
  .next-pic { order: -1; }
  .rules > div { grid-template-columns: 1fr; gap: 4px; }
  .wl { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > div:first-child { grid-column: 1 / -1; }
  .sheet { width: 100%; max-width: 100%; max-height: 92svh; margin: auto 0 0; grid-template-columns: 1fr; }
  .sheet[open] { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
  .sheet-pic { min-height: 0; padding: 10% 18%; }
  .sheet-pic img { max-height: 36svh; }
  .sheet-info { padding: 24px 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rv] { transform: none; transition: opacity 300ms linear; }
  .card-media img, .sheet[open] { transition: none; animation: none; }
}

/* ---------- the fitting room (every piece opens here) ---------- */
.cab {
  width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #1c0b0d; color: var(--ink); overflow: hidden;
  display: none; grid-template-columns: 1fr min(440px, 38vw);
}
.cab[open] { display: grid; animation: cab-in 420ms var(--ease); }
@keyframes cab-in { from { opacity: 0; } }
.cab::backdrop { background: #1c0b0d; }
.cab-stage { position: relative; overflow: hidden; }
.cab-back { position: absolute; inset: -40px; background: #1c0b0d center / cover no-repeat; filter: blur(38px) brightness(0.4); transform: scale(1.1); }
.cab-booth { position: absolute; top: 50%; left: 50%; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; transform: translate(-50%, -50%); box-shadow: 0 0 120px rgba(0, 0, 0, 0.6); }
.cab-booth > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.cab-booth > .on { opacity: 1; }
.cab-booth .still { transition: opacity 400ms var(--ease); }
.cab-info {
  position: relative; overflow: auto; background: var(--paper);
  display: grid; align-content: start; gap: 14px; padding: 56px clamp(24px, 3vw, 44px) 32px;
}
.cab-x { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; }
.cab-kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cab-name { font: 500 clamp(2rem, 1.4rem + 1.4vw, 2.75rem)/1.02 var(--serif); letter-spacing: -0.01em; }
.cab-price { font-size: 18px; font-variant-numeric: tabular-nums; }
.cab-colours { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cab-colours button { width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); border: 1px solid rgba(23, 21, 19, 0.25); cursor: pointer; }
.cab-colours button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.cab-colour-name { color: var(--muted); font-size: 14px; margin-left: 4px; }
.cab-pack { margin-left: auto; width: 76px; height: 76px; object-fit: contain; background: var(--well); padding: 6px; }
.cab-sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cab-desc { color: #3a3430; }
.cab-msg { min-height: 1.4em; color: var(--bronze); font-weight: 500; }
.cab-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.cab-nav button { padding: 0; border: 0; background: none; cursor: pointer; font: 500 14px/1.4 var(--sans); }
.cab-nav button:hover { text-decoration: underline; text-underline-offset: 4px; }
.cab-wl { font-size: 14px; }
.next-vid { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--well); display: block; }

@media (max-width: 720px) {
  .cab { grid-template-columns: 1fr; grid-template-rows: 62svh auto; overflow: auto; }
  .cab-booth { height: 100%; }
  .cab-info { overflow: visible; padding: 28px 20px 40px; }
  .cab-x { position: fixed; top: 10px; right: 10px; background: rgba(246, 244, 240, 0.9); border-radius: 50%; z-index: 2; }
}
@media (prefers-reduced-motion: reduce) { .cab[open] { animation: none; } }

/* daylight booth: the room is light now, like the photographs */
.cab { background: #ece6dd; }
.cab::backdrop { background: #ece6dd; }
.cab-back { filter: blur(40px) brightness(1.02) saturate(0.9); opacity: 0.9; }
.cab-booth { box-shadow: 0 30px 80px rgba(60, 45, 30, 0.18); }
.cab-booth canvas { opacity: 1; display: block; }

/* ---------- home: la cabine d'Ava ---------- */
/* text on the left, the booth as a full-height panel running to the right edge of the screen */
.hero-cab {
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(24px, 4vw, 72px); align-items: center;
  padding-left: var(--m); min-height: calc(100svh - 64px);
}
.hc-text { display: grid; gap: 18px; justify-items: start; max-width: 560px; padding-block: 32px; }
.hc-text .masthead { font-size: clamp(3.5rem, 1rem + 5.6vw, 7.5rem); }
.hc-booth-wrap { margin: 0; position: relative; align-self: stretch; min-height: 560px; }
.hc-booth { position: absolute; inset: 0; background: #ece6dd; }
.hc-booth canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the picker: a frosted glass rail on the wall to the right of the booth */
.hc-pick {
  position: absolute; right: clamp(16px, 2vw, 32px); top: 50%; translate: 0 -50%;
  display: grid; gap: 4px; padding: 8px;
  background: color-mix(in srgb, #fbf8f3 52%, transparent); border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 50px rgba(70, 50, 30, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.hc-pick button {
  position: relative; display: grid; justify-items: center; gap: 2px; width: 76px; padding: 6px 4px 8px; cursor: pointer;
  border: 0; background: transparent; border-radius: 0; font: 500 11px/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.hc-pick img { width: 54px; height: 54px; object-fit: contain; transition: transform 300ms var(--ease); }
.hc-pick button:hover { color: var(--ink); }
.hc-pick button:hover img { transform: translateY(-2px); }
.hc-pick button:active img { transform: scale(0.96); }
.hc-pick button[aria-checked="true"] { color: var(--ink); background: rgba(255, 255, 255, 0.6); }
/* the one futuristic detail of the rail: a hairline of light on the piece she wears */
.hc-pick button::after { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: linear-gradient(transparent, #fff3df, transparent); box-shadow: 0 0 8px #ffe9c4; opacity: 0; transition: opacity 300ms var(--ease); }
.hc-pick button[aria-checked="true"]::after { opacity: 1; }
.hc-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 0; border-block: 1px solid var(--line); width: 100%; font-size: 14px; color: var(--muted); }
.hc-k { width: 100%; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.hc-now strong { color: var(--ink); font: italic 500 clamp(1.3rem, 1rem + 0.6vw, 1.6rem)/1.2 var(--serif); }
.hc-see { margin-left: auto; padding: 0; border: 0; background: none; color: var(--ink); font: 500 14px/1 var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (max-width: 900px) {
  .hero-cab { grid-template-columns: 1fr; min-height: 0; padding-right: var(--m); gap: 0; }
  .hc-booth-wrap { order: -1; margin-inline: calc(-1 * var(--m)); min-height: 0; display: grid; }
  .hc-booth { position: relative; height: min(70svh, 125vw); }
  .hc-pick { position: static; translate: none; grid-auto-flow: column; justify-content: center; padding: 6px; border-inline: 0; box-shadow: none; }
  .hc-pick button { width: 72px; }
  .hc-pick img { width: 44px; height: 44px; }
  .hc-pick button::after { left: 18%; right: 18%; top: auto; bottom: 0; width: auto; height: 1px; background: linear-gradient(90deg, transparent, #fff3df, transparent); }
  .hc-text { justify-items: center; text-align: center; margin: 0 auto; padding-top: 24px; }
  .hc-text .masthead { position: static; font-size: clamp(3.2rem, 15vw, 6rem); text-align: center; margin: 0; }
  .hc-now { justify-content: center; }
  .hc-see { margin-left: 0; }
}
