/* ARL Perfume — a photographic stage (three.js) wrapped in white paper, ink and one brass line. */
:root {
  --paper: #ffffff;
  --ink: #17150f;
  --soft: #6d685f;
  --line: #e6e1d9;
  --wash: #f6f4f0;
  --brass: #a3844c;
  --night: #0d0b0e;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
main, .foot { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

.eyebrow { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--brass); }
.small { margin: 0; font-size: 13px; color: var(--soft); }
h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
h2 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.05; }
h2 em { font-style: italic; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 26px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: #3a3628; }
.btn-light { border-color: #f1ede6; color: #f1ede6; }
.btn-light:hover { background: #f1ede6; color: var(--night); }
.btn-text { padding: 8px 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; }
.btn-text-light { color: #d9d4cc; }

/* ---------- header & the back button ---------- */
.top {
  position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 76px;
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); transition: opacity .4s, transform .4s;
}
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: .18em; }
.brand-sub { font-size: 10.5px; letter-spacing: .42em; text-transform: uppercase; color: var(--soft); }
.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a, .bag { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; }
.nav a { color: var(--soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.bag { display: inline-flex; gap: 8px; align-items: center; background: none; border: 0; cursor: pointer; padding: 6px 0; }
.bag-count { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 50%; font-size: 10.5px; letter-spacing: 0; }
.bag.bump .bag-count { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.4); } }
.stage.dark ~ * .top, body:has(.stage.dark) .top { color: #f1ede6; }
body:has(.stage.dark) .nav a, body:has(.stage.dark) .brand-sub { color: #b9b2a8; }
body.flacon-open .top { opacity: 0; transform: translateY(-12px); pointer-events: none; }

.back {
  position: fixed; z-index: 40; top: 18px; left: var(--gutter); height: 44px; padding: 0 18px 0 12px;
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(23, 21, 15, .14); background: rgba(255, 255, 255, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transform: translateX(-10px); pointer-events: none; transition: opacity .4s .15s, transform .4s .15s, background .2s;
}
.back svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.back:hover { background: #fff; }
body.flacon-open .back { opacity: 1; transform: none; pointer-events: auto; }
body:has(.stage.dark) .back { background: rgba(20, 18, 22, .6); color: #f1ede6; border-color: rgba(255, 255, 255, .16); }

/* ---------- stage ---------- */
.stage { position: relative; height: 100svh; min-height: 640px; max-height: 1100px; overflow: hidden; background: #ebe5dc; transition: background .8s; }
.stage.dark { background: #29252b; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; outline: none; }
.veil { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(30, 24, 16, .16)); }
.stage-eyebrow {
  position: absolute; z-index: 5; top: 92px; left: 0; right: 0; margin: 0; text-align: center;
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--soft); transition: opacity .4s;
}
.stage.dark .stage-eyebrow { color: #a59f96; }

.arrow {
  position: absolute; z-index: 6; top: 46%; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(23, 21, 15, .16); background: rgba(255, 255, 255, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; transition: opacity .4s, background .2s, border-color .2s; color: var(--ink);
}
.arrow svg { width: 26px; stroke: currentColor; stroke-width: 1.3; fill: none; }
.arrow:hover { background: #fff; border-color: var(--ink); }
.prev { left: var(--gutter); }
.next { right: var(--gutter); }
.stage.dark .arrow { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #f1ede6; }

.caption {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 104px; display: grid; justify-items: center; gap: 4px; text-align: center;
  padding: 0 var(--gutter); pointer-events: none; transition: opacity .45s, transform .45s;
}
.caption > * { pointer-events: auto; }
.num { margin: 0; font-family: var(--display); font-style: italic; font-size: 17px; color: #7a6a4a; }
.name { font-size: clamp(42px, 5.2vw, 76px); line-height: 1; transition: opacity .25s; }
.meta { margin: 4px 0 0; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--soft); transition: opacity .25s; }
.cap-actions { display: flex; align-items: center; gap: 22px; margin-top: 14px; }
.price, .price-lg { font-family: var(--display); font-size: 22px; font-variant-numeric: lining-nums tabular-nums; }
.caption.swap .name, .caption.swap .meta, .caption.swap .num { opacity: 0; }
.stage.dark .caption { color: #f1ede6; }
.stage.dark .num { color: #ff8a3d; }
.stage.dark .meta { color: #b9b2a8; }
.stage.dark .caption .btn-solid { background: #f1ede6; color: var(--night); }

.picker {
  position: absolute; z-index: 6; left: 50%; bottom: 30px; translate: -50% 0; display: flex; gap: 4px; padding: 6px;
  border-radius: 999px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(23, 21, 15, .1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none;
  transition: opacity .4s;
}
.picker button {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: none;
  cursor: pointer; white-space: nowrap; font-size: 12px; letter-spacing: .08em; color: var(--soft); transition: background .25s, color .25s;
}
.picker i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.picker b { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 14px; }
.picker button[aria-current="true"] { background: var(--ink); color: #fff; }
.stage.dark .picker { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
.stage.dark .picker button { color: #b9b2a8; }
.stage.dark .picker button[aria-current="true"] { background: #f1ede6; color: var(--night); }
.hint {
  position: absolute; z-index: 6; right: var(--gutter); bottom: 40px; margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--soft); transition: opacity .6s;
}
.hint svg { width: 36px; stroke: currentColor; fill: none; stroke-width: 1.2; animation: nudge 2.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.hint.gone { opacity: 0; }
.stage.dark .hint { color: #a59f96; }

.stage.is-open .caption, .stage.is-open .picker, .stage.is-open .arrow, .stage.is-open .hint, .stage.is-open .stage-eyebrow { opacity: 0; pointer-events: none; }
.stage.is-open .caption { transform: translateY(16px); }
.stage.is-open .scene { cursor: default; }

.loader {
  position: absolute; z-index: 9; inset: 0; display: grid; place-content: center; gap: 14px; justify-items: center; background: #ebe5dc;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--soft); transition: opacity .9s .1s, visibility .9s .1s;
}
.loader span { width: 140px; height: 1px; background: linear-gradient(90deg, transparent, var(--brass), transparent); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.loader.done { opacity: 0; visibility: hidden; }

/* ---------- the composition panel ---------- */
.panel {
  position: absolute; z-index: 8; top: 96px; right: var(--gutter); bottom: 40px; width: min(460px, 38vw); overflow-y: auto;
  padding: 26px 28px; border-radius: 18px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(23, 21, 15, .08); box-shadow: 0 30px 60px rgba(40, 30, 20, .08);
  opacity: 0; transform: translateX(32px); pointer-events: none; transition: opacity .6s .35s, transform .8s .35s cubic-bezier(.2, .8, .2, 1);
  scrollbar-width: thin;
}
.stage.is-open .panel { opacity: 1; transform: none; pointer-events: auto; }
.stage.dark .panel { background: rgba(24, 21, 26, .82); border-color: rgba(255, 255, 255, .1); color: #f1ede6; }
.panel-name { font-size: clamp(40px, 3.8vw, 58px); line-height: 1; margin-top: 2px; }
.panel-line { margin: 12px 0 0; color: var(--soft); font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.45; }
.stage.dark .panel-line, .stage.dark .note-line, .stage.dark .facts dt { color: #b9b2a8; }
.notes { list-style: none; margin: 22px 0 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.stage.dark .notes, .stage.dark .notes li { border-color: rgba(255, 255, 255, .12); }
.notes li {
  display: grid; grid-template-columns: 82px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(12px); transition: opacity .6s, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.stage.is-open .notes li { opacity: 1; transform: none; }
.stage.is-open .notes li:nth-child(1) { transition-delay: .7s; }
.stage.is-open .notes li:nth-child(2) { transition-delay: .85s; }
.stage.is-open .notes li:nth-child(3) { transition-delay: 1s; }
.note-art { width: 82px; height: 82px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; }
.note-art img { width: 100%; height: 100%; object-fit: contain; }
.mono { width: 56px; height: 56px; border: 1px solid var(--brass); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: 28px; }
.note-tier { display: block; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--brass); }
.note-name { display: block; font-family: var(--display); font-size: 23px; line-height: 1.15; }
.note-line { display: block; font-size: 14px; color: var(--soft); line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.facts dt { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--soft); }
.facts dd { margin: 4px 0 0; font-size: 14px; }
.dots { display: inline-flex; gap: 5px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.dots i.on { background: currentColor; }
.panel-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.stage.dark .panel .btn { border-color: #f1ede6; color: #f1ede6; }
.stage.dark .panel .btn-solid { background: #f1ede6; color: var(--night); }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 10vw, 140px) var(--gutter); }
.section-head { display: grid; justify-items: center; gap: 16px; text-align: center; max-width: 720px; margin: 0 auto 56px; }
.sub { margin: 0; color: var(--soft); max-width: 56ch; }

.lib { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 34px 20px; max-width: 1280px; margin: 0 auto; }
.lib-item { display: grid; gap: 10px; text-align: left; padding: 0; border: 0; background: none; cursor: pointer; }
.lib-art { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 6px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.lib-art img { width: 90%; height: 90%; object-fit: contain; }
.lib-art .mono { width: 46%; height: 46%; font-size: clamp(28px, 2.6vw, 42px); }
.lib-item:hover .lib-art { transform: translateY(-6px); }
.lib-name { font-family: var(--display); font-size: 21px; line-height: 1.1; }
.lib-meta { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.lib-meta i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* the collab: a dark sticky stage, scroll pours the chrome */
.collab { position: relative; height: 280vh; background: var(--night); color: #f1ede6; }
.collab-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.collab-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.collab-copy {
  position: absolute; z-index: 2; top: 50%; right: var(--gutter); translate: 0 -50%; width: min(440px, 40vw); display: grid; gap: 18px;
}
.collab .eyebrow { color: #ff8a3d; }
.collab .sub { color: #b9b2a8; }
.fill { height: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.fill i { display: block; height: 100%; background: linear-gradient(90deg, #8e939c, #f4f6fa, #ff8a3d); transform-origin: 0 50%; transform: scaleX(0); }
.fill-label { margin: -8px 0 0; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: #8e8880; font-variant-numeric: tabular-nums; }
.collab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; opacity: .25; transition: opacity .6s; }
.collab.full .collab-actions { opacity: 1; }

.atelier {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: center; max-width: 1240px; margin: 0 auto;
}
.atelier-art img { width: 100%; border-radius: 14px; }
.atelier-copy { display: grid; gap: 18px; }
.atelier-row { display: flex; align-items: center; gap: 24px; }
.price-lg { margin: 0; font-size: 34px; }
.services { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.services li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.services b { display: block; color: var(--ink); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; font-size: 11.5px; margin-bottom: 2px; }

.foot { padding: 64px var(--gutter) 36px; background: var(--wash); border-top: 1px solid var(--line); display: grid; gap: 36px; }
.foot-brand .brand-mark { font-size: 46px; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 28px; }
.foot-cols p { margin: 8px 0 0; color: var(--soft); font-size: 15px; }
.letter { display: grid; gap: 10px; }
.letter-row { display: flex; gap: 8px; }
.letter input { flex: 1; min-width: 0; height: 48px; border: 1px solid #d9d4ca; background: var(--paper); padding: 0 16px; }
.foot-note { margin: 0; font-size: 12px; color: #9a958c; }

body.shot .top, body.shot .caption, body.shot .picker, body.shot .arrow, body.shot .hint, body.shot .stage-eyebrow, body.shot .veil { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .bag { margin-left: auto; }
  .stage-eyebrow { top: 80px; font-size: 10px; }
  .arrow { top: auto; bottom: 200px; width: 46px; height: 46px; }
  .caption { bottom: 96px; }
  .hint { display: none; }
  .picker { bottom: 22px; justify-content: flex-start; }
  .picker span { display: none; }
  .picker button { padding: 0 12px; }
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 56%; border-radius: 22px 22px 0 0; padding: 22px 20px 26px;
    transform: translateY(40px);
  }
  .panel-line { font-size: 17px; }
  .notes li { grid-template-columns: 66px 1fr; gap: 14px; }
  .note-art { width: 66px; height: 66px; }
  .back { top: 14px; }
  .lib { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 14px; }
  .collab-copy { top: auto; bottom: 28px; left: var(--gutter); right: var(--gutter); translate: none; width: auto; gap: 12px; }
  .collab-copy .sub { font-size: 14px; }
  .atelier { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-actions { gap: 16px; }
  .letter-row { flex-direction: column; }
  .collab h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001s !important; animation: none !important; scroll-behavior: auto !important; }
}
