/* =====================================================================
   MAISON NOIR — Haute Couture · Paris
   Stylesheet
   ---------------------------------------------------------------------
   TWEAK ZONE: all palette + type-scale knobs live in :root below.
   Change a couple of variables to re-skin the entire house.
   ===================================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Palette */
  --ink:        #0a0a0a;   /* near-black ground */
  --ink-soft:   #141312;   /* panels / cards */
  --bone:       #f4f1ea;   /* ivory text + light sections */
  --bone-dim:   #c9c4b8;   /* muted ivory */
  --oxblood:    #5e1f1f;   /* the single restrained accent */
  --line:       rgba(244, 241, 234, 0.16);

  /* Type families */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale (clamp: min, fluid, max) */
  --fs-mega:  clamp(4.5rem, 18vw, 17rem);   /* hero / footer wordmark */
  --fs-xl:    clamp(2.6rem, 7vw, 6rem);     /* section headlines */
  --fs-lg:    clamp(2rem, 4.5vw, 3.6rem);   /* sub headlines */
  --fs-md:    clamp(1.4rem, 2.4vw, 2.1rem); /* lede / manifesto */
  --fs-body:  clamp(1rem, 1.05vw, 1.15rem);
  --fs-label: 0.72rem;                       /* small caps labels */

  /* Spacing rhythm */
  --pad-x: clamp(1.4rem, 5vw, 6rem);
  --section-y: clamp(6rem, 14vh, 12rem);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --slow: 1.1s;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lenis sets this when smooth scroll is active */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--oxblood); color: var(--bone); }

/* Hide native cursor on desktop pointer (custom cursor takes over) */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
}

/* Visible focus for keyboard users */
:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 4px;
}

/* ---------- FAILED-IMAGE FALLBACK ----------
   Any <img> that fails its onerror gets .img-fail and becomes a
   refined oxblood→ink gradient so nothing ever looks broken.        */
.img-fail {
  background: linear-gradient(135deg, #1a1413 0%, var(--oxblood) 60%, #0a0a0a 100%);
  position: relative;
}
.img-fail::after {
  content: "MAISON NOIR";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 2rem);
  letter-spacing: 0.4em;
  color: rgba(244, 241, 234, 0.28);
}

/* small-caps editorial label, reused everywhere */
.reveal-up, .manifesto__label, .atelier__label, .editorial__label,
.contact__label, .look__label, .hero__eyebrow {
  font-family: var(--sans);
}

/* =====================================================================
   PRELOADER
   ===================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: grid; place-items: center;
}
.preloader__inner {
  width: min(90vw, 800px);
  padding: 0 var(--pad-x);
}
.preloader__wordmark {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
  font-size: clamp(3rem, 12vw, 9rem);
  letter-spacing: 0.02em;
}
.preloader__line { display: block; overflow: hidden; }
.preloader__line span { display: inline-block; } /* JS animates these */
.preloader__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 2rem;
  font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.34em;
  color: var(--bone-dim);
}
.preloader__counter { font-variant-numeric: tabular-nums; }
.preloader__bar {
  margin-top: 1rem; height: 1px; width: 100%;
  background: var(--line);
}
.preloader__bar-fill {
  display: block; height: 100%; width: 0%;
  background: var(--bone);
}

/* =====================================================================
   CUSTOM CURSOR
   ===================================================================== */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 300;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor      { width: 6px; height: 6px; background: var(--bone); }
.cursor-ring {
  width: 40px; height: 40px;
  border: 1px solid var(--bone);
  transition: width .4s var(--ease), height .4s var(--ease),
              background .4s var(--ease), opacity .3s;
}
.cursor-ring.is-hover {
  width: 70px; height: 70px;
  background: rgba(244, 241, 234, 0.12);
}
/* No custom cursor on touch / coarse pointers */
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none !important; }
}

/* =====================================================================
   NAVIGATION
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1.4rem, 3vh, 2.4rem) var(--pad-x);
  transition: padding .5s var(--ease), background .5s var(--ease),
              backdrop-filter .5s var(--ease);
  mix-blend-mode: difference; /* stays legible over any image */
}
.nav.is-scrolled {
  padding-top: 1rem; padding-bottom: 1rem;
  mix-blend-mode: normal;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  letter-spacing: 0.18em;
  font-weight: 500;
}
.nav__links { display: flex; gap: clamp(1.4rem, 3vw, 3rem); }
.nav__links a {
  font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.26em;
}
/* underline-wipe hover */
.nav__links a span { position: relative; display: inline-block; }
.nav__links a span::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links a:hover span::after { transform: scaleX(1); transform-origin: left; }

/* hamburger (hidden on desktop) */
.nav__toggle {
  display: none;
  flex-direction: column; gap: 6px;
  background: none; border: none; padding: 8px;
}
.nav__toggle span {
  display: block; width: 28px; height: 1px; background: var(--bone);
  transition: transform .4s var(--ease), opacity .3s;
}
.menu-open .nav__toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-open .nav__toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* =====================================================================
   FULL-SCREEN OVERLAY MENU (mobile)
   ===================================================================== */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad-x);
  clip-path: inset(0 0 100% 0);  /* hidden; JS reveals from top */
  pointer-events: none;
}
.menu.is-open { pointer-events: auto; }
.menu__links { display: flex; flex-direction: column; gap: 0.2em; }
.menu__links a {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 11vw, 5rem);
  font-weight: 400; line-height: 1.05;
  display: flex; align-items: baseline; gap: 1rem;
  opacity: 0; /* JS staggers in */
}
.menu__index {
  font-family: var(--sans);
  font-size: var(--fs-label); letter-spacing: 0.3em;
  color: var(--oxblood);
}
.menu__foot {
  margin-top: 3rem; display: flex; flex-direction: column; gap: 0.4rem;
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.24em; color: var(--bone-dim);
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative; height: 100svh; min-height: 600px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--pad-x);
  padding-bottom: clamp(2rem, 6vh, 4rem);
  overflow: hidden;
}
.hero__media { position: absolute; inset: -10% 0; z-index: -1; will-change: transform; }
.hero__img { transform: scale(1.05); }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.1) 45%, rgba(10,10,10,0.4) 100%);
}
.hero__content { position: relative; }
.hero__eyebrow {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.34em; color: var(--bone-dim);
  margin-bottom: clamp(1rem, 2vh, 1.6rem);
}
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-mega); line-height: 0.86;
  letter-spacing: 0.01em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line span { display: inline-block; } /* JS animates */
.hero__tag {
  margin-top: clamp(1.2rem, 3vh, 2rem);
  font-family: var(--serif); font-style: italic;
  font-size: var(--fs-md); color: var(--bone-dim);
  max-width: 30ch;
}
.hero__foot {
  position: relative;
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: clamp(2rem, 6vh, 4rem);
}
.hero__scroll {
  display: flex; align-items: center; gap: 1rem;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.3em;
}
.hero__scroll-line {
  display: block; width: 60px; height: 1px;
  background: var(--bone); transform-origin: left;
  animation: scrollPulse 2.4s var(--ease) infinite;
}
@keyframes scrollPulse {
  0%,100% { transform: scaleX(0.3); opacity: .4; }
  50%     { transform: scaleX(1);   opacity: 1; }
}
.hero__season {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.3em; color: var(--bone-dim);
  text-align: right;
}

/* =====================================================================
   MANIFESTO
   ===================================================================== */
.manifesto {
  padding: var(--section-y) var(--pad-x);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.manifesto__label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.34em; color: var(--oxblood);
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
.manifesto__text {
  font-family: var(--serif); font-weight: 300;
  font-size: var(--fs-xl); line-height: 1.18;
  max-width: 18ch;
}
.manifesto__text .m-line { display: block; overflow: hidden; }
.manifesto__sign {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.28em; color: var(--bone-dim);
}

/* =====================================================================
   COLLECTION / LOOKBOOK (horizontal scroll)
   ===================================================================== */
.collection { background: var(--ink); }
.collection__pin {
  height: 100svh; overflow: hidden;
  display: flex; align-items: center;
}
.collection__track {
  display: flex; align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding: 0 var(--pad-x);
  will-change: transform;
}
.look { flex: 0 0 auto; }

/* intro / outro text panels */
.look--intro, .look--outro {
  width: clamp(70vw, 80vw, 46rem);
  display: flex; flex-direction: column; justify-content: center;
}
.look__label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.34em; color: var(--oxblood);
  margin-bottom: 1.4rem;
}
.look__heading {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-mega); line-height: 0.9; letter-spacing: 0.01em;
}
.look__heading em { font-style: italic; color: var(--bone-dim); }
.look__lede {
  margin-top: 1.8rem; font-family: var(--serif); font-style: italic;
  font-size: var(--fs-md); color: var(--bone-dim); max-width: 24ch;
}

/* image looks */
.look__media {
  width: clamp(62vw, 50vw, 32rem);
  height: 78svh; overflow: hidden; position: relative;
}
.look__media img {
  transform: scale(1.04);
  transition: transform 1.2s var(--ease);
}
.look__media::after { /* duotone wash to unify imagery */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 55%, rgba(10,10,10,0.55) 100%);
  pointer-events: none;
}
.look:hover .look__media img { transform: scale(1.1); }
.look__caption {
  display: flex; flex-direction: column; gap: 0.3rem;
  margin-top: 1.4rem;
}
.look__no {
  font-family: var(--serif); font-style: italic;
  font-size: 1.4rem; color: var(--oxblood);
}
.look__name {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-md);
}
.look__detail {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.24em; color: var(--bone-dim);
}

/* =====================================================================
   ATELIER / SAVOIR-FAIRE
   ===================================================================== */
.atelier {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 100svh;
}
.atelier__media { position: relative; overflow: hidden; }
.atelier__media img { transform: scale(1.08); will-change: transform; }
.atelier__media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(94,31,31,0.18), rgba(10,10,10,0.35));
}
.atelier__body {
  padding: var(--section-y) var(--pad-x);
  display: flex; flex-direction: column; justify-content: center;
}
.atelier__label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.34em; color: var(--oxblood);
  margin-bottom: 1.6rem;
}
.atelier__heading {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-lg); line-height: 1.12; letter-spacing: 0.01em;
  max-width: 16ch;
}
.atelier__copy {
  margin-top: 1.8rem; max-width: 44ch; color: var(--bone-dim);
}
.atelier__copy em { font-family: var(--serif); font-style: italic; color: var(--bone); }

.stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 6vh, 4rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 5vh, 3rem);
}
.stat { display: flex; flex-direction: column; gap: 0.4rem; }
.stat__num {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1;
}
.stat__label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.24em; color: var(--bone-dim);
}

/* =====================================================================
   EDITORIAL FEATURE (full-bleed quote)
   ===================================================================== */
.editorial {
  position: relative; min-height: 110svh;
  display: grid; place-items: center;
  padding: var(--section-y) var(--pad-x);
  overflow: hidden; text-align: center;
}
.editorial__media { position: absolute; inset: -10% 0; z-index: -1; will-change: transform; }
.editorial__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,0.45) 0%, rgba(10,10,10,0.82) 100%);
}
.editorial__content { max-width: 24ch; position: relative; }
.editorial__label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.34em; color: var(--bone-dim);
  margin-bottom: 2rem;
}
.editorial__quote {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: var(--fs-xl); line-height: 1.16;
}
.editorial__by {
  margin-top: 2rem; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.3em; color: var(--bone-dim);
}

/* =====================================================================
   NEWSLETTER / CONTACT
   ===================================================================== */
.contact {
  background: var(--bone); color: var(--ink);
  padding: var(--section-y) var(--pad-x);
}
.contact ::selection { background: var(--oxblood); color: var(--bone); }
.contact__inner { max-width: 64rem; margin: 0 auto; text-align: center; }
.contact__label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.34em; color: var(--oxblood); margin-bottom: 1.4rem;
}
.contact__heading {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-xl); line-height: 1.05;
}
.contact__copy {
  margin: 1.6rem auto 0; max-width: 42ch;
  color: rgba(10, 10, 10, 0.66);
}
.contact__form {
  display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-end;
  justify-content: center;
  max-width: 40rem; margin: clamp(2.5rem, 6vh, 4rem) auto 0;
}
.field { position: relative; flex: 1 1 16rem; text-align: left; }
.field input {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(10,10,10,0.25);
  padding: 0.8rem 0; font-family: var(--sans); font-size: 1.1rem;
  color: var(--ink);
}
.field input:focus { outline: none; }
.field label {
  position: absolute; left: 0; top: 0.8rem;
  font-size: 1.1rem; color: rgba(10,10,10,0.5);
  pointer-events: none; transition: transform .4s var(--ease), font-size .4s var(--ease);
  transform-origin: left;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-1.6rem) scale(0.7);
  color: var(--oxblood);
}
.field__line {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.field input:focus ~ .field__line { transform: scaleX(1); }

.contact__msg {
  flex-basis: 100%; font-size: var(--fs-label);
  text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--oxblood); min-height: 1.2em; margin-top: 0.4rem;
}

.contact__details {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; text-align: left;
  margin-top: clamp(3rem, 8vh, 5rem);
  border-top: 1px solid rgba(10,10,10,0.18);
  padding-top: clamp(2rem, 5vh, 3rem);
}
.contact__detail { display: flex; flex-direction: column; gap: 0.7rem; }
.contact__d-label {
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.28em; color: var(--oxblood);
}
.contact__detail span:last-child { color: rgba(10,10,10,0.7); line-height: 1.5; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-block; align-self: flex-start;
  font-size: var(--fs-label); text-transform: uppercase;
  letter-spacing: 0.26em; padding: 1.1rem 2.2rem;
  border: 1px solid currentColor; position: relative; overflow: hidden;
  margin-top: 2rem;
}
.btn span, .btn { z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--bone);
  transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1;
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: translateY(0); }
.btn--solid {
  background: var(--ink); color: var(--bone); border-color: var(--ink);
  margin-top: 0; flex: 0 0 auto;
}
.btn--solid::before { background: var(--oxblood); }
.btn--solid:hover { color: var(--bone); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { background: var(--ink); padding: var(--section-y) var(--pad-x) 2.5rem; }
.footer__top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 2rem;
  border-bottom: 1px solid var(--line); padding-bottom: clamp(2rem, 5vh, 3.5rem);
}
.footer__wordmark {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-mega); line-height: 0.8; letter-spacing: 0.01em;
}
.footer__nav { display: flex; flex-direction: column; gap: 0.6rem; text-align: right; }
.footer__nav a {
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.26em;
  color: var(--bone-dim); transition: color .3s;
}
.footer__nav a:hover { color: var(--bone); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 2.5rem;
  font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--bone-dim);
}
.footer__social { display: flex; gap: 1.6rem; }
.footer__social a:hover { color: var(--bone); }

/* =====================================================================
   SCROLL-REVEAL BASE STATES (JS toggles these in)
   These are *initial* states; GSAP animates to visible.
   If JS/CDN fails, the .no-js fallback below shows everything.
   ===================================================================== */
.reveal-up { opacity: 0; transform: translateY(30px); }
.reveal-lines .word { display: inline-block; overflow: hidden; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .atelier { grid-template-columns: 1fr; }
  .atelier__media { height: 70svh; }

  .contact__details { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 600px) {
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 1.4rem; }
  .hero__season { text-align: left; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__nav { text-align: left; }
  .look__media { width: 80vw; height: 64svh; }
}

/* =====================================================================
   REDUCED MOTION + NO-JS GRACEFUL DEGRADATION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up { opacity: 1; transform: none; }
  .hero__img, .atelier__media img, .look__media img { transform: none; }
}

/* If JS never runs, reveal everything so content is never hidden. */
.no-js .reveal-up { opacity: 1; transform: none; }
.no-js .preloader { display: none; }
.no-js .hero__title .line span,
.no-js .manifesto__text .m-line,
.no-js .preloader__line span { transform: none; opacity: 1; }
.no-js .menu__links a { opacity: 1; }
