/* ==========================================================================
   Tokens. JS sets --accent and --glow per scent (js/variants.js); the dark
   base stays the same for every scent.
   ========================================================================== */
:root {
  --bg: #08090a;
  --bg-2: #0f1113;
  --ink: #ece8e1;
  --muted: rgba(236, 232, 225, 0.62);
  --faint: rgba(236, 232, 225, 0.38);
  --line: rgba(236, 232, 225, 0.12);
  --card: rgba(255, 255, 255, 0.035);
  --accent: #a8d8bb;
  --glow: #3f8a60;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);

  /* Layout guard. The bottle body is ~29vh wide at scale 1 (see POSES in main.js) and the pump
     nozzle reaches ~33vh when it swings sideways, so text columns next to a centred bottle get
     50vw minus that half-width minus a gap. */
  --bottle-half: 17vh;
  --gap: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.display,
.title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display {
  font-size: clamp(46px, min(5.6vw, 11vh), 108px);
  line-height: 0.95;
}
.title {
  font-size: clamp(38px, min(4.2vw, 8.5vh), 72px);
  line-height: 1;
}
.display em,
.title em {
  font-style: italic;
  color: var(--accent);
  transition: color 0.9s ease;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span {
  color: var(--faint);
}
.eyebrow .idx {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  letter-spacing: 0;
  color: var(--accent);
  transition: color 0.9s ease;
}
.lede,
.body {
  max-width: 42ch;
  margin-top: 22px;
  color: var(--muted);
  font-weight: 300;
}
.lede {
  font-size: 17px;
}
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
}

/* Word-by-word headline reveal (words are wrapped by splitWords() in main.js). */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.06em 0.1em;
  margin: 0 -0.06em -0.1em;
}
.w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease) calc(var(--i) * 70ms + var(--d, 0s));
}
.is-ready .is-in .w > span {
  transform: none;
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s);
}
.is-ready .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Buttons & links
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 18px 16px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.5s var(--ease), background-color 0.4s ease;
}
.btn:hover {
  background: var(--accent);
}
.btn-price {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 9, 10, 0.1);
  font-variant-numeric: tabular-nums;
}
.btn-block {
  width: 100%;
  justify-content: space-between;
  margin-top: 28px;
}
.link {
  position: relative;
  display: inline-flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.3s;
}
.link::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.link:hover {
  color: var(--ink);
}
.link:hover::after {
  transform: scaleX(1);
}

/* ==========================================================================
   Chrome: loader, atmosphere, nav
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: transform 1.1s var(--ease-io);
  /* Failsafe: never trap the page behind the loader if the script fails to load. */
  animation: loader-out 0.8s 6s forwards;
}
.is-ready .loader {
  transform: translateY(-100%);
}
.loader-brand {
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 180px);
  letter-spacing: 0.08em;
  color: var(--ink);
}
.loader-num {
  position: absolute;
  right: var(--pad);
  bottom: 32px;
  font-family: var(--serif);
  font-size: 56px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
@keyframes loader-out {
  to {
    transform: translateY(-100%);
  }
}

.grid-lines {
  position: fixed;
  inset: 0 var(--pad);
  z-index: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.grid-lines i {
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.045) 20%, rgba(255, 255, 255, 0.045) 80%, transparent);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#webgl {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.no-webgl #webgl {
  display: none;
}
main {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad);
  transition: padding 0.5s var(--ease), background-color 0.5s, border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding-block: 14px;
  background: rgba(8, 9, 10, 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--line);
}
.logo {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.14em;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 13px;
  color: var(--muted);
}
.nav-links a {
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--ink);
}
.bag {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  transition: border-color 0.3s;
}
.bag:hover {
  border-color: var(--faint);
}
.bag span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.9s;
}
.bag.bump span {
  animation: bump 0.5s var(--ease);
}
@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}
.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 51;
  height: 1px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
}
.hero-inner {
  position: absolute;
  inset: 0;
}
.hero-copy,
.hero-aside {
  position: absolute;
  bottom: 12vh;
  width: min(540px, calc(50vw - var(--bottle-half) - var(--pad) - var(--gap)));
}
.hero-copy {
  left: var(--pad);
}
.hero-aside {
  right: var(--pad);
  width: min(250px, calc(50vw - var(--bottle-half) - var(--pad) - var(--gap)));
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 34px;
}
.stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.stats div:last-child {
  border-bottom: 1px solid var(--line);
}
.stats dt {
  font-size: 12px;
  color: var(--muted);
}
.stats dd {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.scroll-cue i {
  position: relative;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: var(--line);
}
.scroll-cue i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: drip 2s var(--ease-io) infinite;
}
@keyframes drip {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

/* ==========================================================================
   Split sections (text left, bottle in the right half)
   ========================================================================== */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px var(--pad);
}
/* The bottle is centred at 75vw; --clear is its half-width for that section's pose. */
.col {
  width: min(500px, calc(75vw - var(--clear, 15vh) - var(--pad) - var(--gap)));
}
.ingredients,
.steps {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.ingredients li,
.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.ingredients .n,
.steps span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
  transition: color 0.9s;
}
.ingredients p,
.steps p {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
}

/* ==========================================================================
   Pinned sections
   ========================================================================== */
.spin {
  height: 320vh;
}
.scents {
  height: 340vh;
}
.sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Both columns are vertically centred beside a centred bottle, so nothing can stack into
   anything else at short laptop heights. */
.spin-head,
.callouts {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: min(400px, calc(50vw - var(--bottle-half) - var(--pad) - var(--gap)));
}
.spin-head {
  left: var(--pad);
}
.callouts {
  left: calc(50% + var(--bottle-half) + var(--gap));
  width: min(300px, calc(50vw - var(--bottle-half) - var(--pad) - var(--gap)));
  min-height: 190px;
}
.degree {
  margin-top: 40px;
}
.degree-num {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.degree-bar {
  position: relative;
  height: 1px;
  margin: 18px 0 12px;
  background: var(--line);
}
.degree-bar i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
.degree small {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.callout {
  position: absolute;
  inset: 0 0 auto;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.callout.is-active {
  opacity: 1;
  transform: none;
}
.callout .k {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.callout h3 {
  font-size: 34px;
}
.callout p {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
}

/* Bottle sits at 25vw here, so the panel takes the right side. */
.scent-panel {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  width: min(460px, calc(75vw - var(--bottle-half) - var(--pad) - var(--gap)));
}
.scent-list {
  position: relative;
  min-height: 300px;
}
.scent {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}
.scent.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.notes {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.notes div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.notes dt {
  color: var(--faint);
}
.scent-nav {
  display: grid;
  margin-top: 12px;
}
.scent-nav button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--faint);
  transition: color 0.4s;
}
.scent-nav button span {
  font-size: 11px;
}
.scent-nav button::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.scent-nav button:hover,
.scent-nav [aria-current='true'] {
  color: var(--ink);
}
.scent-nav [aria-current='true']::after {
  transform: scaleX(1);
}

/* ==========================================================================
   Shop
   ========================================================================== */
.shop {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px var(--pad) 90px;
}
.shop-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--bottle-half) * 2) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: center;
}
.shop-intro {
  grid-column: 1;
  max-width: 420px;
}
.buy-card {
  grid-column: 3;
  justify-self: end;
  width: min(380px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.buy-name {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.buy-variant {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
}
.buy-label {
  margin: 26px 0 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.3s, color 0.3s;
}
.chip::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.chip:hover {
  color: var(--ink);
}
.chip[aria-pressed='true'] {
  border-color: var(--ink);
  color: var(--ink);
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.segmented button {
  padding: 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
  transition: background-color 0.3s, color 0.3s;
}
.segmented button[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}
.perks {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--faint);
}

/* ==========================================================================
   Footer — opaque and above the canvas, so it slides over the bottle
   ========================================================================== */
.footer {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.marquee {
  overflow: hidden;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(32px, 4vw, 56px);
  color: var(--muted);
  animation: marquee 40s linear infinite;
}
.marquee b {
  font-size: 0.4em;
  font-style: normal;
  color: var(--accent);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 72px var(--pad) 0;
}
.newsletter label {
  display: block;
  max-width: 22ch;
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.1;
}
.newsletter em {
  color: var(--accent);
}
.newsletter div {
  display: flex;
  max-width: 440px;
  border-bottom: 1px solid var(--faint);
}
.newsletter input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.newsletter input::placeholder {
  color: var(--faint);
}
.newsletter button {
  border: 0;
  background: none;
  font-size: 14px;
}
.footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.footer nav p {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer nav a:hover {
  color: var(--ink);
}
.footer-word {
  margin: 40px 0 -0.18em;
  text-align: center;
  font-family: var(--serif);
  font-size: 31vw;
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  user-select: none;
}
.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 20px var(--pad);
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 12px;
  color: var(--faint);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 22, 24, 0.9);
  backdrop-filter: blur(12px);
  font-size: 13px;
  transform: translate(-50%, 160%);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s;
}
.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ==========================================================================
   Compact layout — phones and portrait tablets. Must match compactQuery in
   main.js. The bottle sits centred in the upper half; copy sits below it on
   glass cards.
   ========================================================================== */
@media (max-width: 759px), (max-aspect-ratio: 4/5) {
  .nav {
    grid-template-columns: 1fr auto;
  }
  .nav-links,
  .grid-lines {
    display: none;
  }
  .hero {
    height: 100svh;
    min-height: 620px;
  }
  .hero-copy,
  .col,
  .callouts,
  .scent-panel,
  .buy-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(12, 13, 15, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .hero-copy {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }
  .display {
    font-size: clamp(36px, 10vw, 60px);
  }
  .lede {
    font-size: 15px;
    margin-top: 14px;
  }
  .actions {
    margin-top: 22px;
  }
  .hero-aside,
  .scroll-cue,
  .spin-head,
  .scent-nav {
    display: none;
  }
  .section {
    align-items: flex-end;
    padding: 56vh 16px 40px;
  }
  .col {
    width: 100%;
  }
  .callouts {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    min-height: 200px;
    transform: none;
  }
  .callout {
    inset: 24px;
    border-left: 0;
    padding-left: 0;
  }
  .scent-panel {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }
  .shop {
    padding: 56vh 16px 40px;
  }
  .shop-inner {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .shop-intro {
    display: none;
  }
  .buy-card {
    grid-column: 1;
    justify-self: stretch;
    width: auto;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .newsletter {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .w > span {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track,
  .scroll-cue i::after {
    animation: none;
  }
}
