/* ========================================
   MAISON VEIL — style.css
   ======================================== */

/* --- Custom Properties --- */
:root {
  --offwhite: #F5F2EE;
  --charcoal: #1A1A1A;
  --warmblack: #0D0D0D;
  --gold: #B8975A;
  --stone: #9E9689;
  --white: #FFFFFF;
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-drift: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  overflow: hidden;
  scroll-behavior: auto;
}

html.loaded {
  overflow: auto;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  background: var(--warmblack);
  color: var(--offwhite);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ========================================
   PRELOADER
   ======================================== */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--warmblack);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-drift);
}

#preloader.done {
  opacity: 0;
  pointer-events: none;
}

.preloader__wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.4em;
  color: var(--offwhite);
  display: flex;
  transition: opacity 0.5s var(--ease-drift);
}

.preloader__wordmark.fading {
  opacity: 0;
}

.preloader__wordmark span {
  opacity: 0;
  animation: letterIn 0.4s var(--ease-luxury) forwards;
}

@keyframes letterIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.preloader__track {
  width: 120px;
  height: 1px;
  background: rgba(184, 151, 90, 0.15);
  margin-top: 32px;
  overflow: hidden;
}

.preloader__bar {
  width: 0%;
  height: 100%;
  background: var(--gold);
  transition: width 0.3s var(--ease-drift);
}

.preloader__pct {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  color: var(--stone);
  letter-spacing: 0.2em;
  margin-top: 16px;
  transition: opacity 0.5s var(--ease-drift);
}

.preloader__pct.fading {
  opacity: 0;
}

@keyframes barPulse {
  0% { opacity: 1; box-shadow: 0 0 6px rgba(184, 151, 90, 0.5); }
  100% { opacity: 0.2; box-shadow: none; }
}

.preloader__track.pulse {
  animation: barPulse 0.6s var(--ease-drift) forwards;
}

/* ========================================
   FLOATING NAV
   ======================================== */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 48px;
  transition: border-color 0.6s var(--ease-drift);
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  border-bottom-color: rgba(184, 151, 90, 0.08);
}

#nav.scrolled .nav__link {
  opacity: 0.4;
}

.nav__left,
.nav__right {
  display: flex;
  gap: 32px;
  flex: 1;
}

.nav__right {
  justify-content: flex-end;
}

.nav__logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--offwhite);
  text-transform: uppercase;
  flex-shrink: 0;
  padding: 0 48px;
}

.nav__link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--stone);
  transition: opacity 0.6s var(--ease-drift);
}

.nav__link:hover {
  color: var(--offwhite);
}

/* ========================================
   SECTION 1: HERO
   ======================================== */

.section--hero {
  position: relative;
  height: 100vh;
  background: var(--warmblack);
  overflow: hidden;
}

.hero__text {
  position: absolute;
  bottom: 10vh;
  left: 8vw;
}

.hero__text.animate .hero__line1,
.hero__text.animate .hero__line2,
.hero__text.animate .hero__sub {
  opacity: 1;
  transform: translateY(0);
}

.hero__line1,
.hero__line2 {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 11vw;
  line-height: 0.95;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s var(--ease-luxury), transform 1s var(--ease-luxury);
}

.hero__line1 {
  color: var(--offwhite);
  letter-spacing: 0.05em;
}

.hero__line2 {
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.08em;
  transition-delay: 0.2s;
}

.hero__sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--stone);
  margin-top: 24px;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s var(--ease-luxury) 0.4s, transform 1s var(--ease-luxury) 0.4s;
}

.hero__scroll-label {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: right center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--stone);
}

.hero__gold-line {
  position: absolute;
  bottom: 60px;
  left: 60px;
  width: 80px;
  height: 1px;
  background: var(--gold);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: var(--stone);
  opacity: 0.4;
  animation: scrollPulse 2s var(--ease-drift) infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translateX(-50%) scaleY(1); opacity: 0.4; }
  50% { transform: translateX(-50%) scaleY(0.5); opacity: 0.15; }
}

.hero__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
}

/* ========================================
   SECTION 2: SCROLL ANIMATION
   ======================================== */

.section--scroll {
  height: 500vh;
  position: relative;
}

.scroll__sticky {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  will-change: transform;
}

#scroll-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.scroll__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(13,13,13,0.6) 100%);
  pointer-events: none;
}

.scroll__overlay {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s var(--ease-drift);
  pointer-events: none;
}

.scroll__overlay--studio {
  top: 12vh;
  left: 8vw;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--stone);
}

.scroll__overlay--crafted {
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 2.5vw;
  color: var(--offwhite);
}

.scroll__overlay--belongs {
  top: 50%;
  right: 8vw;
  transform: translateY(-50%);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--stone);
}

.scroll__overlay--title {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 6vw;
  color: var(--offwhite);
  letter-spacing: 0.1em;
  text-align: center;
}

.scroll__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: var(--gold);
  opacity: 0.6;
}

/* ========================================
   SECTION 3: PRODUCT REVEAL
   ======================================== */

.section--product {
  background: var(--offwhite);
  display: grid;
  grid-template-columns: 58fr 42fr;
  min-height: 100vh;
}

.product__image {
  position: relative;
  overflow: hidden;
}

.product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 7vw 8vh 5vw;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 1s var(--ease-luxury), transform 1s var(--ease-luxury);
}

.product__info.reveal {
  opacity: 1;
  transform: translateX(0);
}

.product__eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--stone);
}

.product__name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 3.5vw;
  color: var(--charcoal);
  letter-spacing: 0.06em;
  margin-top: 16px;
  line-height: 1.1;
}

.product__sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--stone);
  margin-top: 8px;
}

.product__divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 40px 0;
}

.product__desc {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.9;
  max-width: 420px;
}

.product__price {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.8vw;
  color: var(--charcoal);
  margin-top: 40px;
}

.product__cta {
  display: inline-block;
  margin-top: 32px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
  padding: 16px 32px;
  transition: background 0.6s var(--ease-luxury), color 0.6s var(--ease-luxury);
  align-self: flex-start;
}

.product__cta:hover {
  background: var(--charcoal);
  color: var(--offwhite);
}

/* ========================================
   SECTION 4: MANIFESTO
   ======================================== */

.section--manifesto {
  background: var(--charcoal);
  padding: 15vh 0;
  display: flex;
  justify-content: center;
}

.manifesto__inner {
  max-width: 700px;
  text-align: center;
  padding: 0 32px;
}

.manifesto__quote {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 3.5vw;
  color: var(--offwhite);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.manifesto__word {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s var(--ease-luxury);
}

.manifesto__word.reveal {
  clip-path: inset(0 0% 0 0);
}

.manifesto__line {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 48px auto;
}

.manifesto__credit {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--stone);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 2;
}

/* ========================================
   SECTION 5: ATELIER STRIP
   ======================================== */

.section--atelier {
  background: var(--offwhite);
  position: relative;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.atelier__bg-text {
  position: absolute;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 20vw;
  color: var(--stone);
  opacity: 0.08;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.atelier__stats {
  display: flex;
  align-items: center;
  gap: 6vw;
  position: relative;
  z-index: 1;
}

.atelier__block {
  text-align: center;
}

.atelier__number {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 6vw;
  color: var(--gold);
  line-height: 1;
}

.atelier__label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--stone);
  margin-top: 16px;
  max-width: 200px;
}

.atelier__divider {
  width: 1px;
  height: 40px;
  background: var(--charcoal);
  opacity: 0.15;
}

/* ========================================
   SECTION 6: CTA
   ======================================== */

.section--cta {
  background: var(--warmblack);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-image: radial-gradient(ellipse at center, rgba(184,151,90,0.06) 0%, transparent 70%);
}

.cta__inner {
  max-width: 500px;
  padding: 0 32px;
}

.cta__eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--stone);
  margin-bottom: 32px;
}

.cta__headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 7vw;
  color: var(--offwhite);
  line-height: 1.15;
}

.cta__headline--gold {
  color: var(--gold);
}

.cta__body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--stone);
  line-height: 1.8;
  margin-top: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.cta__button {
  display: inline-block;
  margin-top: 40px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 18px 48px;
  transition: background 0.7s var(--ease-luxury), color 0.7s var(--ease-luxury);
}

.cta__button:hover {
  background: var(--gold);
  color: var(--warmblack);
}

.cta__email {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--stone);
  letter-spacing: 0.2em;
  margin-top: 24px;
}

/* ========================================
   SECTION 7: FOOTER
   ======================================== */

.section--footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(184, 151, 90, 0.04);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}

.footer__logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--stone);
}

.footer__copy {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--stone);
}

.footer__social {
  display: flex;
  gap: 20px;
}

.footer__icon {
  color: var(--stone);
  transition: color 0.4s var(--ease-drift);
}

.footer__icon:hover {
  color: var(--offwhite);
}

/* ========================================
   CUSTOM CURSOR (desktop only)
   ======================================== */

@media (pointer: fine) {
  body.cursor-active {
    cursor: none;
  }

  body.cursor-active a,
  body.cursor-active button {
    cursor: none;
  }

  #cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--offwhite);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-luxury),
                height 0.3s var(--ease-luxury),
                background 0.3s var(--ease-luxury),
                border-color 0.3s var(--ease-luxury);
    will-change: transform;
  }

  #cursor.hovering {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--gold);
  }

  #cursor.scrolling {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid var(--stone);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cursor__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--stone);
    opacity: 0;
    transition: opacity 0.3s var(--ease-drift);
    white-space: nowrap;
  }

  #cursor.scrolling .cursor__text {
    opacity: 1;
  }
}

@media (pointer: coarse) {
  #cursor {
    display: none;
  }
}

/* ========================================
   MOBILE RESPONSIVE (< 768px)
   ======================================== */

@media (max-width: 767px) {
  .nav__left,
  .nav__right {
    display: none;
  }

  #nav {
    padding: 20px 24px;
  }

  .hero__line1,
  .hero__line2 {
    font-size: 16vw;
  }

  .hero__text {
    left: 6vw;
    bottom: 12vh;
  }

  .hero__scroll-label {
    display: none;
  }

  .hero__gold-line {
    left: 24px;
    bottom: 40px;
    width: 50px;
  }

  .section--scroll {
    height: auto;
  }

  .scroll__sticky {
    position: relative;
    height: auto;
  }

  #scroll-canvas {
    display: none;
  }

  .scroll__vignette,
  .scroll__overlay,
  .scroll__progress {
    display: none;
  }

  .section--scroll video {
    display: block;
    width: 100%;
    height: auto;
  }

  .section--product {
    grid-template-columns: 1fr;
  }

  .product__image {
    aspect-ratio: 3/4;
  }

  .product__info {
    padding: 8vh 6vw;
  }

  .product__name {
    font-size: 8vw;
  }

  .product__price {
    font-size: 5vw;
  }

  .manifesto__quote {
    font-size: 7vw;
  }

  .section--atelier {
    height: auto;
    padding: 10vh 0;
  }

  .atelier__stats {
    flex-direction: column;
    gap: 6vh;
  }

  .atelier__divider {
    width: 40px;
    height: 1px;
  }

  .atelier__number {
    font-size: 12vw;
  }

  .atelier__bg-text {
    font-size: 30vw;
  }

  .cta__headline {
    font-size: 12vw;
  }

  .footer__inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 0 24px;
  }
}

/* ========================================
   REDUCED MOTION (accessibility)
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__scroll-indicator {
    animation: none;
    opacity: 0.4;
  }

  .manifesto__word {
    clip-path: none;
  }

  .product__info {
    opacity: 1;
    transform: none;
  }
}
