:root {
  --bg: #0a0807;
  --bg-2: #120d0b;
  --ink: #efe6d8;
  --ink-dim: #a99d8d;
  --muted: #6f655a;
  --gold: #c8a46a;
  --gold-hi: #ecd3a0;
  --wine: #5a0f1a;
  --line: rgba(200, 164, 106, 0.22);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --caps: "Cinzel", "Times New Roman", serif;
  --sans: "Jost", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--gold-hi); font-weight: 300; }
::selection { background: var(--gold); color: var(--bg); }

/* ---------- layers ---------- */
#webgl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1px solid rgba(236, 211, 160, 0.55);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, opacity .3s;
  opacity: 0;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(200, 164, 106, 0.12); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 28px;
  transition: opacity 1s var(--ease), visibility 1s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mono { width: 46px; animation: breathe 2.4s ease-in-out infinite; }
.loader__bar { width: 160px; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .4s var(--ease); }
.loader__txt { font-family: var(--caps); font-size: 11px; letter-spacing: .4em; color: var(--ink-dim); }
@keyframes breathe { 50% { opacity: .45; transform: scale(.96); } }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--caps); font-size: 11px; letter-spacing: .38em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); opacity: .6; }
h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 5.4vw, 84px); line-height: 1.02; letter-spacing: -.01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px; font-family: var(--caps); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  border: 1px solid var(--gold); transition: background .4s var(--ease), color .4s var(--ease), border-color .4s;
  cursor: pointer; white-space: nowrap;
}
.btn--gold { background: var(--gold); color: #120d0b; }
.btn--gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn--ghost { color: var(--ink); border-color: rgba(239, 230, 216, .3); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-hi); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  transition: background .5s, padding .5s var(--ease), transform .6s var(--ease);
}
.nav.is-scrolled { background: linear-gradient(to bottom, rgba(10,8,7,.92), rgba(10,8,7,0)); padding-top: 14px; padding-bottom: 14px; }
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__mono { height: 34px; width: auto; }
.nav__word { height: 15px; width: auto; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav__links a, .nav__cta {
  font-family: var(--caps); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-dim);
  position: relative; transition: color .3s;
}
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: var(--gold); transition: right .5s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }
.nav__cta { color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.nav__burger { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; position: relative; }
.nav__burger span { position: absolute; left: 6px; right: 6px; height: 1px; background: var(--ink); transition: transform .4s var(--ease); }
.nav__burger span:first-child { top: 13px; }
.nav__burger span:last-child { top: 21px; }
.menu-open .nav__burger span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .nav__burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 45; background: rgba(10, 8, 7, .97);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px;
  opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s;
}
.menu a { font-family: var(--serif); font-size: 40px; font-weight: 300; }
.menu-open .menu { opacity: 1; visibility: visible; }

/* ---------- anchors (3D placement targets) ---------- */
.anchor { position: absolute; pointer-events: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, #000 30%, transparent 85%);
  transform: scale(1.08);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); }
.hero__inner {
  position: relative; z-index: 3; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 0 var(--gutter); max-width: 760px;
}
.hero__title { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 9vw, 150px); line-height: .92; letter-spacing: -.02em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); }
.hero__title em { padding-left: .5em; }
.hero__sub { font-family: var(--caps); font-size: 13px; letter-spacing: .5em; color: var(--ink-dim); text-transform: uppercase; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.anchor--hero { right: 6%; top: 12%; width: 38%; height: 76%; }
.hero__meta {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--caps); font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-dim); }
.hero__scroll i { width: 1px; height: 42px; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.reveal { opacity: 0; transform: translateY(24px); }

/* ---------- manifesto ---------- */
.manifesto {
  position: relative; padding: clamp(120px, 18vh, 220px) var(--gutter);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 34px;
}
.manifesto .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--gold); opacity: .6; }
.manifesto__kicker { font-size: clamp(22px, 2.2vw, 30px); font-family: var(--caps); letter-spacing: .32em; color: var(--gold-hi); }
.manifesto__text { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3.3vw, 50px); line-height: 1.28; max-width: 1100px; }
.manifesto__text .w { opacity: .14; transition: opacity .3s; }
.manifesto__mono { width: 28px; opacity: .8; margin-top: 10px; }

/* ---------- composition ---------- */
.composition { position: relative; height: 420vh; }
.composition__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.composition__pin::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 40% 55% at 50% 55%, rgba(90, 15, 26, .35), transparent 70%);
}
.composition__head { position: absolute; top: 15vh; left: var(--gutter); display: grid; gap: 20px; }
.composition__head h2 { font-size: clamp(36px, 4.2vw, 68px); }
.tiers { position: absolute; left: var(--gutter); bottom: 12vh; list-style: none; display: grid; gap: 22px; }
.tier { display: grid; gap: 2px; padding-left: 20px; border-left: 1px solid var(--line); opacity: .32; transition: opacity .6s, border-color .6s; }
.tier.is-active { opacity: 1; border-color: var(--gold); }
.tier.is-done { opacity: .6; }
.tier__label { font-family: var(--caps); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.tier__notes { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.anchor--fill { left: 35%; width: 30%; top: 14%; height: 74%; }
.readout { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); text-align: right; display: grid; gap: 10px; justify-items: end; width: min(340px, 28vw); }
.readout__note { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(40px, 4.4vw, 72px); line-height: 1; color: var(--gold-hi); transition: opacity .4s, transform .4s var(--ease); }
.readout__note.swap { opacity: 0; transform: translateY(12px); }
.readout__sub { font-family: var(--caps); font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-dim); }
.readout__meter { width: 100%; height: 1px; background: var(--line); margin-top: 22px; }
.readout__meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--wine), var(--gold)); margin-left: auto; }
.readout__ml { font-family: var(--caps); font-size: 11px; letter-spacing: .28em; color: var(--ink-dim); }
.readout__ml span { color: var(--ink); font-size: 18px; }

/* ---------- collection ---------- */
.collection { position: relative; height: 400vh; }
.collection__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 44%) 1fr; overflow: hidden; }
.collection__pin::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 36% 50% at 72% 55%, rgba(200, 164, 106, .09), transparent 70%);
}
.collection__info { position: relative; z-index: 3; padding: 15vh 0 9vh var(--gutter); display: flex; flex-direction: column; gap: 26px; }
.count { margin-left: auto; color: var(--ink-dim); letter-spacing: .2em; }
.count b { color: var(--ink); font-weight: 400; }
.perfumes { display: grid; flex: 1; }
.perfume { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 16px; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.perfume.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .15s; }
.perfume h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(46px, 5.6vw, 92px); line-height: .95; }
.perfume__tag { font-family: var(--caps); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.perfume__desc { color: var(--ink-dim); max-width: 520px; font-size: 15px; }
.notes { display: grid; gap: 0; max-width: 520px; margin-top: 6px; border-top: 1px solid var(--line); }
.notes div { display: grid; grid-template-columns: 90px 1fr; padding: 11px 0; border-bottom: 1px solid var(--line); }
.notes dt { font-family: var(--caps); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.notes dd { font-family: var(--serif); font-size: 20px; }
.perfume__sign { font-family: var(--serif); font-style: italic; color: var(--gold-hi); font-size: 19px; }
.collection__foot { display: flex; justify-content: space-between; align-items: center; max-width: 520px; }
.spec { font-family: var(--caps); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.dots { display: flex; gap: 12px; }
.dots button { width: 28px; height: 2px; border: 0; background: var(--line); cursor: pointer; transition: background .4s, width .4s var(--ease); padding: 0; }
.dots button.is-active { background: var(--gold); width: 52px; }
.collection__stage { position: relative; }
.anchor--carousel { left: 8%; right: 8%; top: 18%; height: 62%; }
.collection__hint { position: absolute; bottom: 7vh; left: 50%; transform: translateX(-50%); font-family: var(--caps); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }

/* ---------- editorial ---------- */
.editorial { position: relative; padding: clamp(120px, 20vh, 240px) var(--gutter) clamp(80px, 12vh, 160px); background: var(--bg); }
.quote { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 4.6vw, 76px); line-height: 1.15; text-align: center; max-width: 1200px; margin: 0 auto clamp(90px, 14vh, 180px); }
.quote span { font-style: italic; color: var(--gold-hi); }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px); align-items: start; }
.g { display: grid; gap: 14px; }
.g figcaption { font-family: var(--caps); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-dim); }
.g__img { overflow: hidden; }
.g__img img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.g--a { grid-column: 1 / span 5; }
.g--a .g__img { aspect-ratio: 4 / 5; }
.g--b { grid-column: 7 / span 6; margin-top: 22vh; }
.g--b .g__img { aspect-ratio: 4 / 5; }
.g--c { grid-column: 3 / span 6; margin-top: -6vh; }
.g--c .g__img { aspect-ratio: 4 / 5; }

/* ---------- projects ---------- */
.projects { position: relative; padding: clamp(100px, 16vh, 200px) var(--gutter); background: var(--bg-2); display: grid; gap: clamp(90px, 16vh, 200px); }
.projects__head { display: grid; gap: 22px; }
.project { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 110px); align-items: center; }
.project--rev .project__img { order: 2; }
.project--rev .project__img img { filter: brightness(.8) sepia(.12); }
.project__img { overflow: hidden; aspect-ratio: 4 / 5; max-height: 82vh; }
.project__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.project__body { display: grid; gap: 22px; max-width: 520px; }
.project__no { font-family: var(--caps); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.project h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 4.4vw, 72px); line-height: 1; }
.project p { color: var(--ink-dim); }

/* ---------- boutique ---------- */
.boutique { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; text-align: center; padding: 120px var(--gutter); }
.boutique__bg { position: absolute; inset: 0; }
.boutique__bg img { width: 100%; height: 120%; object-fit: cover; filter: brightness(.38) saturate(.75) sepia(.25); }
.boutique::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,8,7,.35), rgba(10,8,7,.92) 75%); }
.boutique__inner { position: relative; z-index: 2; display: grid; gap: 26px; justify-items: center; max-width: 720px; }
.boutique__mono { width: 34px; }
.boutique p { color: var(--ink-dim); }
.invite { display: flex; width: 100%; max-width: 560px; border: 1px solid var(--line); background: rgba(10,8,7,.5); backdrop-filter: blur(6px); }
.invite input { flex: 1; min-width: 0; background: none; border: 0; padding: 0 20px; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.invite input::placeholder { color: var(--muted); }
.invite__ok { opacity: 0; transition: opacity .6s; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold-hi) !important; }
.invite__ok.is-on { opacity: 1; }

/* ---------- footer ---------- */
.footer { background: #070605; padding: 90px var(--gutter) 40px; display: grid; grid-template-columns: auto 1fr; gap: 60px; border-top: 1px solid var(--line); }
.footer__logo { width: 190px; height: auto; }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); justify-content: end; gap: 40px; }
.footer__cols h4 { font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer__cols a { display: block; color: var(--ink-dim); font-size: 14px; padding: 3px 0; transition: color .3s; }
.footer__cols a:hover { color: var(--ink); }
.footer__legal { grid-column: 1 / -1; padding-top: 30px; border-top: 1px solid rgba(200,164,106,.1); font-family: var(--caps); font-size: 10px; letter-spacing: .26em; color: var(--muted); text-transform: uppercase; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .readout { width: 34vw; }
}
@media (max-width: 760px) {
  .nav__word { height: 12px; }
  .nav__mono { height: 28px; }
  .hero__inner { justify-content: flex-end; padding-bottom: 120px; gap: 20px; }
  .hero__title { font-size: clamp(48px, 15vw, 80px); }
  .hero__sub { font-size: 11px; letter-spacing: .4em; }
  .anchor--hero { right: 0; left: 18%; top: 9%; width: auto; height: 46%; }
  .hero__meta span:first-child, .hero__meta span:last-child { display: none; }
  .hero__meta { justify-content: center; }
  .btn { padding: 14px 20px; letter-spacing: .22em; }

  .composition__head { top: 11vh; }
  .composition__head h2 { font-size: 34px; }
  .anchor--fill { left: 22%; width: 56%; top: 30%; height: 42%; }
  .tiers { bottom: 5vh; gap: 10px; }
  .tier__notes { font-size: 17px; }
  .readout { top: auto; bottom: 6vh; transform: none; width: 44vw; gap: 4px; }
  .readout__note { font-size: 30px; }
  .readout__sub { display: none; }
  .readout__meter { margin-top: 8px; }

  .collection__pin { grid-template-columns: 1fr; grid-template-rows: 40% 60%; }
  .collection__stage { grid-row: 1; }
  .collection__info { grid-row: 2; padding: 0 var(--gutter) 5vh; gap: 12px; }
  .anchor--carousel { left: 10%; right: 10%; top: 26%; height: 72%; }
  .collection__hint { display: none; }
  .perfume { gap: 8px; }
  .perfume h3 { font-size: 40px; }
  .perfume__desc { font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .notes div { grid-template-columns: 64px 1fr; padding: 6px 0; }
  .notes dd { font-size: 16px; }
  .perfume__sign { display: none; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .g--a { grid-column: 1 / -1; }
  .g--b { grid-column: 1 / span 1; margin-top: 0; }
  .g--c { grid-column: 2 / span 1; margin-top: 12vh; }

  .project, .project--rev { grid-template-columns: 1fr; }
  .project--rev .project__img { order: 0; }
  .invite { flex-direction: column; }
  .invite input { padding: 16px 18px; }
  .footer { grid-template-columns: 1fr; gap: 40px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); justify-content: start; }
}
@media (min-width: 761px) and (max-height: 820px) {
  .collection__info { padding-top: 12vh; gap: 16px; }
  .perfume { gap: 10px; }
  .perfume h3 { font-size: clamp(44px, 4.6vw, 64px); }
  .perfume__desc { font-size: 14px; line-height: 1.6; }
  .perfume__sign { display: none; }
  .notes div { padding: 7px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}
