/* Maison VELAINE: quiet luxury concept store. A Softign concept. */

@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/cormorant-garamond-300.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/cormorant-garamond-400.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/cormorant-garamond-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin.woff2') format('woff2'); }

:root {
  --paper: #F4F1EC;
  --ink: #1A1917;
  --ink-soft: #57534D;
  --line-dark: rgba(26, 25, 23, .14);
  --line-light: rgba(244, 241, 236, .22);
  --wall: #2A211C;
  --serif: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 64px;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-focus { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--paper); color: var(--ink); font-size: 12px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* small caps labels: Inter has no true small caps, so labels are set in tracked capitals at a small size */
.caps, .eyebrow, .nav__links a, .nav__bag, .hero__label, .hero__caption, .btn, .sizes button, .focus__count, .bag__title {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 450;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.num { font-variant-numeric: lining-nums proportional-nums; font-feature-settings: 'lnum' 1, 'pnum' 1; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  color: var(--paper);
  border-bottom: 1px solid var(--line-light);
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.nav::before { /* soft scrim so the nav reads on the lit wall */
  content: ''; position: absolute; inset: 0 0 -24px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(14, 10, 8, .42), rgba(14, 10, 8, 0));
  transition: opacity .5s var(--ease);
}
.nav--light { background: var(--paper); color: var(--ink); border-color: var(--line-dark); }
.nav--light::before { opacity: 0; }
.nav__logo { text-decoration: none; display: inline-flex; align-items: baseline; gap: .55em; line-height: 1; }
.nav__maison { font: italic 400 16px/1 var(--serif); letter-spacing: .02em; opacity: .85; }
.nav__name { font: 500 19px/1 var(--serif); letter-spacing: .34em; margin-right: -.34em; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav__links a, .nav__bag { text-decoration: none; opacity: .86; transition: opacity .3s; padding: 8px 0; }
.nav__links a:hover, .nav__bag:hover, .nav__bag[aria-expanded="true"] { opacity: 1; }
.nav__bag [data-bag-count] { font-variant-numeric: lining-nums tabular-nums; }
.nav__bag.is-bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { opacity: 1; letter-spacing: .26em; } }

.bag {
  position: absolute; top: calc(var(--nav-h) + 8px); right: var(--pad);
  width: min(320px, calc(100vw - 2 * var(--pad)));
  padding: 22px 22px 18px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-dark);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35);
  font-size: 13px; line-height: 1.5;
}
.bag__title { margin: 0 0 14px; }
.bag__list { list-style: none; margin: 0; padding: 0; }
.bag__list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-dark); }
.bag__list small { display: block; color: var(--ink-soft); font-size: 11px; letter-spacing: .12em; }
.bag__list .num { font: 400 17px/1.2 var(--serif); }
.bag__empty, .bag__note { margin: 0; color: var(--ink-soft); }
.bag__total { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; }
.bag__total .num { font: 500 18px/1.2 var(--serif); }
.bag__note { margin-top: 14px; font-size: 11px; }

/* ---------- HERO: wall and rail ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden;
  background: var(--wall);
  color: var(--paper);
  isolation: isolate;
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg img { object-fit: cover; object-position: 50% 50%; max-width: none; }

.rack { position: absolute; inset: 0; z-index: 1; transform-origin: 50% 25%; will-change: transform, opacity, filter; }
.rack__track { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.rack--scroll {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rack--scroll::-webkit-scrollbar { display: none; }
.rack--scroll .rack__track { right: auto; }
.rack__snap { list-style: none; position: absolute; top: 0; width: 1px; height: 1px; pointer-events: none; }
.rack--scroll .rack__snap { scroll-snap-align: center; }

/* one garment: .g positions the 1200x1600 canvas (hook tip at 50% / 3%), .g__swing sways from the hook,
   .g__turn turns on the rail (rotateY), the two images swap at 90deg */
.g {
  position: absolute; left: 0; top: 0;
  list-style: none;   /* the open piece leaves its list for the product view: no marker */
  pointer-events: none;
  visibility: hidden;
}
.g.is-ready, .rack-fallback .g { visibility: visible; }
.g__swing, .g__turn { position: absolute; inset: 0; transform-origin: 50% 3%; }
.g__swing { perspective-origin: 50% 3%; }
.g__img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  user-select: none; -webkit-user-drag: none;
  /* soft shadow cast on the wall, below and slightly right of the piece (light comes from above) */
  filter: drop-shadow(calc(var(--k, .35) * 22px) calc(var(--k, .35) * 46px) calc(var(--k, .35) * 30px) rgba(8, 5, 3, .55));
}
.g__front { opacity: 0; visibility: hidden; }
.g__hit {
  position: absolute; pointer-events: auto;
  left: var(--hs-l); top: var(--hs-t); width: var(--hs-w); height: var(--hs-h);
  -webkit-tap-highlight-color: transparent;
  border-radius: 2px;
}
.g.is-front .g__hit { left: var(--hf-l); top: var(--hf-t); width: var(--hf-w); height: var(--hf-h); }
.g__hit:focus { outline: none; }
.g__hit:focus-visible { outline: 1px solid rgba(244, 241, 236, .55); outline-offset: 10px; }
.focus .g__hit { cursor: default; }

.hero__label {
  position: absolute; left: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 2;
  margin: 0; white-space: nowrap;
  display: flex; align-items: baseline; gap: 14px;
  color: var(--paper);
  opacity: 0; visibility: hidden;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}
.hero__label-sep { width: 22px; height: 1px; background: currentColor; opacity: .5; align-self: center; }
.hero__label [data-label-price] { font: 400 17px/1 var(--serif); letter-spacing: .04em; text-transform: none; }
.hero__caption {
  position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 2;
  margin: 0; text-align: center;
  color: rgba(244, 241, 236, .62);
  pointer-events: none;
}
.show-touch { display: none; }
.touch .show-touch { display: inline; }
.touch .hide-touch { display: none; }
.js .hero__caption { opacity: 0; }
.hero__noscript { position: absolute; left: 0; right: 0; bottom: 40%; text-align: center; font: italic 22px var(--serif); }

/* ---------- ATELIER ---------- */
.atelier {
  max-width: 680px; margin: 0 auto;
  padding: clamp(96px, 14vw, 176px) 24px clamp(88px, 12vw, 150px);
  text-align: center;
}
.eyebrow { margin: 0 0 28px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 16px; }
.eyebrow::before, .eyebrow::after { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .5; }
.atelier__title {
  margin: 0 0 32px;
  font: 300 clamp(34px, 4.4vw, 56px)/1.08 var(--serif);
  letter-spacing: -.005em;
}
.atelier__text { margin: 0 auto 18px; max-width: 34em; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.atelier__facts {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
}
.atelier__facts li { padding: 22px 8px 0; font: italic 400 19px/1.3 var(--serif); }
.atelier__facts li + li { border-left: 1px solid var(--line-dark); }
.atelier__facts span { display: block; margin-bottom: 6px; font: 450 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; font-style: normal; color: var(--ink-soft); }

.footer {
  border-top: 1px solid var(--line-dark);
  padding: 30px var(--pad) calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px; letter-spacing: .06em; color: var(--ink-soft);
}
.footer p { margin: 0; }
.footer a { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; color: var(--ink); }

/* ---------- PRODUCT VIEW ---------- */
.focus { position: fixed; inset: 0; z-index: 60; color: var(--paper); }
.focus[hidden] { display: none; }
.focus__backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(16, 11, 8, .18), rgba(10, 7, 5, .55));
  opacity: 0;
}
.focus__stage { position: absolute; inset: 0; pointer-events: none; }
.focus__stage .g { visibility: visible; }

.focus__panel {
  position: absolute; left: 0; top: 0;
  width: min(380px, calc(100vw - 40px));
  opacity: 0;
}
.focus__panel.is-below { text-align: center; width: min(520px, calc(100vw - 40px)); }
.focus__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line-light); }
.is-below .focus__head { justify-content: center; flex-wrap: wrap; column-gap: 18px; row-gap: 2px; }
.focus__name { margin: 0; font: 300 clamp(28px, 2.6vw, 38px)/1.05 var(--serif); letter-spacing: .005em; }
.focus__price { margin: 0; font: 400 21px/1 var(--serif); letter-spacing: .03em; white-space: nowrap; }
.focus__desc { margin: 14px 0 18px; font-size: 13.5px; line-height: 1.65; color: rgba(244, 241, 236, .78); }
.focus__desc em { display: block; margin-top: 6px; font: italic 16px/1.4 var(--serif); color: rgba(244, 241, 236, .9); }
.sizes { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.sizes__row { display: flex; gap: 8px; flex-wrap: wrap; }
.is-below .sizes__row { justify-content: center; }
.sizes button {
  min-width: 46px; height: 34px; padding: 0 12px;
  border: 1px solid rgba(244, 241, 236, .32); border-radius: 17px;
  letter-spacing: .14em;
  transition: background-color .25s, color .25s, border-color .25s;
}
.sizes button:hover { border-color: rgba(244, 241, 236, .8); }
.sizes button[aria-checked="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.focus__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.is-below .focus__actions { justify-content: center; }
.btn {
  height: 46px; padding: 0 34px;
  border: 1px solid var(--paper); border-radius: 0;
  background: var(--paper); color: var(--ink);
  transition: background-color .3s, color .3s;
}
.btn:hover { background: transparent; color: var(--paper); }
.focus__hint { margin: 0; min-height: 1.4em; font-size: 12px; color: rgba(244, 241, 236, .7); }

.focus__arrow, .focus__close {
  position: absolute; z-index: 3;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line-light); border-radius: 50%;
  color: var(--paper);
  background: rgba(20, 14, 11, .25);
  opacity: 0;
  transition: border-color .3s, background-color .3s;
}
.focus__arrow:hover, .focus__close:hover { border-color: rgba(244, 241, 236, .7); background: rgba(20, 14, 11, .45); }
.focus__arrow svg, .focus__close svg { width: 20px; height: 20px; }
.focus__arrow { top: 50%; margin-top: -24px; }
.focus__arrow--prev { left: var(--pad); }
.focus__arrow--next { right: var(--pad); }
.focus__close { top: calc(var(--nav-h) + 16px); right: var(--pad); }
.focus__count { position: absolute; top: calc(var(--nav-h) + 30px); left: var(--pad); margin: 0; color: rgba(244, 241, 236, .7); opacity: 0; font-variant-numeric: lining-nums tabular-nums; }

/* paper hang-tag on a cotton string, tied to the hanger */
.tag { position: absolute; left: 0; top: 0; z-index: 2; width: 74px; pointer-events: none; transform-origin: 2px 2px; opacity: 0; visibility: hidden; }
.tag__string { display: block; width: 34px; height: 46px; color: rgba(244, 241, 236, .75); overflow: visible; }
.tag__card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: 64px; margin: -2px 0 0 4px; padding: 20px 6px 12px;
  background: linear-gradient(170deg, #F7F4EF, #ECE6DC);
  color: var(--ink);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35));
  transform: rotate(-4deg);
  transform-origin: 50% 0;
}
.tag__hole { position: absolute; top: 7px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #3a302a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.tag__brand { font: 500 7px/1 var(--sans); letter-spacing: .32em; margin-right: -.32em; }
.tag__price { margin: 10px 0 6px; font: 500 17px/1 var(--serif); letter-spacing: .01em; }
.tag__fabric { font: 400 7px/1.35 var(--sans); letter-spacing: .08em; text-align: center; color: var(--ink-soft); }

@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .nav__maison { font-size: 14px; }
  .nav__name { font-size: 16px; letter-spacing: .28em; }
  .nav__links { gap: 18px; }
  .nav__links a[href="#collection"] { display: none; }
  .focus__arrow { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; width: 42px; height: 42px; }
  .focus__desc { font-size: 13px; margin: 10px 0 14px; }
  .focus__name { font-size: 27px; }
  .btn { height: 44px; padding: 0 28px; }
  .atelier__facts { grid-template-columns: 1fr; }
  .atelier__facts li + li { border-left: 0; border-top: 1px solid var(--line-dark); margin-top: 18px; }
}

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

/* lining figures for every price: the `font` shorthand above resets font-variant-numeric, so this comes last */
.num, [data-label-price], .focus__price, .tag__price, .bag__list .num, .bag__total .num {
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: 'lnum' 1, 'pnum' 1;
}
