/* Master Creations one-product landing page. Same visual system as the store redesign: a dark stage, League Gothic
   capitals, Manrope for reading, one mint accent. The light behind the product follows the color chosen.
   Motion is described in docs/animation.md. Everything is visible without it: the rules under ".motion-ok" only
   apply when the visitor has not asked for reduced motion and the script is running. */
@font-face { font-family: "Manrope"; src: url("fonts/manrope-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "League Gothic"; src: url("fonts/league-gothic.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@property --tone { syntax: "<color>"; inherits: true; initial-value: #0F7A70; }

:root {
  --bg: #0A1011; --bg-2: #0E1718; --surface: #131F20; --line: rgba(233, 243, 240, .16);
  --text: #F2F0E9; --text-2: #A9B2AE; --mint: #36D3BC; --mint-ink: #052824; --paper: #ECE9E1;
  --display: "League Gothic", "Arial Narrow", Impact, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --edge: max(var(--gutter), calc((100vw - 1840px) / 2 + 56px));
  --section: clamp(64px, 9vw, 150px);
  --top-h: 69px;
  /* Motion tokens (one language for the page) */
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-xs: 150ms; --dur-s: 300ms; --dur-m: 600ms; --dur-l: 1000ms; --dur-xl: 1400ms;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; transition: --tone var(--dur-l) ease; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 50; padding: 12px 16px; border-radius: 8px; background: var(--mint); color: var(--mint-ink); font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1840px; margin-inline: auto; padding-inline: var(--gutter); }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.link { color: var(--mint); font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
.h2 { font: 400 clamp(52px, 7.4vw, 128px)/.88 var(--display); text-transform: uppercase; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 34px; border: 1px solid transparent; border-radius: 999px; font: 700 13px/1.15 var(--body); letter-spacing: .1em; text-align: center; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: background-color var(--dur-s), color var(--dur-s), border-color var(--dur-s), transform var(--dur-xs); }
.btn:active { transform: translateY(1px); }
.btn--primary, .btn--small { background: var(--mint); color: var(--mint-ink); }
.btn--primary:hover, .btn--small:hover { background: var(--text); }
.btn--small { min-height: 44px; padding: 0 22px; font-size: 12px; }
.btn.is-out { background: none; border-color: rgba(242, 240, 233, .45); color: var(--text); }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10, 16, 17, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.top__logo img { width: 112px; border-radius: 3px; }
.top__note { margin-left: auto; font-size: 13px; color: var(--text-2); }
.top__note a { color: var(--text); font-weight: 600; text-underline-offset: 4px; }

/* ---- The story: the product on stage, with one chapter of text per fact ---- */
.story { position: relative; background: var(--bg); }
.story__pin { position: relative; overflow: clip; isolation: isolate; }
.story__light { position: absolute; inset: 0; z-index: -1; background: radial-gradient(32% 56% at 73% 48%, color-mix(in srgb, var(--tone) 72%, transparent), transparent 72%), radial-gradient(30% 40% at 4% 100%, rgba(13, 92, 87, .34), transparent 72%); }
.stage { position: relative; height: clamp(320px, 62vw, 640px); transform-origin: 50% 94%; }
.stage__turn { position: absolute; inset: 0; }
.unit { position: absolute; left: 50%; bottom: 6%; width: auto; max-width: none; height: 90%; opacity: 0; transform: translateX(-50%); filter: drop-shadow(0 34px 38px rgba(0, 0, 0, .6)); transition: opacity var(--dur-m); }
.unit.is-on:not(.unit--back) { opacity: 1; }
.stage.is-back .unit.is-on:not(.unit--back) { opacity: 0; }
.stage.is-back .unit--back.is-on { opacity: 1; }
.stage.is-turning .unit { transition: none; }
.stage__floor { position: absolute; left: 24%; right: 24%; bottom: 3.5%; height: 30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .85), transparent); }
.stage__rings, .stage__haze, .steps { display: none; }

/* Text: without motion every chapter is an ordinary block, one under another */
.chapter { padding: clamp(28px, 4vw, 56px) var(--edge); border-top: 1px solid var(--line); }
.chapter--intro { border-top: 0; padding-top: 8px; }
.hero__brand { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--text-2); margin-bottom: 14px; }
.hero__title { font: 400 min(clamp(72px, 9.4vw, 196px), 17.5vh)/.82 var(--display); text-transform: uppercase; }
.hero__title .line { display: block; }
.hero__title .line > span { display: block; }
.hero__line { margin-top: clamp(14px, 1.6vw, 24px); font: 400 clamp(26px, 2.6vw, 44px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; color: var(--mint); }
.hero__intro { margin-top: 10px; max-width: 44ch; color: var(--text-2); font-size: clamp(15px, 1.15vw, 17px); }
.figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .06em; font: 400 clamp(96px, 16vw, 320px)/.8 var(--display); text-transform: uppercase; }
.figure__unit { margin-left: .14em; font-size: .22em; letter-spacing: .03em; color: var(--mint); }
.figure__sep { font-size: .6em; color: rgba(242, 240, 233, .28); }
.chapter--timer .figure { font-size: clamp(64px, 8.6vw, 176px); }
.chapter--charging .figure { font-size: clamp(84px, 12vw, 240px); }
.chapter__text { margin-top: clamp(14px, 1.6vw, 24px); max-width: 34ch; font-size: clamp(17px, 1.45vw, 22px); line-height: 1.45; }
.levels { display: flex; gap: 8px; margin-top: clamp(14px, 1.6vw, 22px); }
.levels i { width: clamp(44px, 5vw, 76px); height: 6px; border-radius: 3px; background: var(--mint); }

/* Price, colors and the way to the store */
.buy { display: grid; gap: 14px; margin-top: clamp(16px, 1.8vw, 28px); padding-top: clamp(14px, 1.6vw, 22px); border-top: 1px solid var(--line); max-width: 560px; }
.buy__price { display: flex; align-items: baseline; gap: 12px; }
.buy__price .price { font-size: clamp(26px, 2.4vw, 36px); }
.buy__color { color: var(--text-2); }
.buy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.buy__note { font-size: 13px; color: var(--text-2); max-width: 52ch; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 10px; border: 1px solid rgba(242, 240, 233, .3); border-radius: 999px; background: none; font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color var(--dur-s), background-color var(--dur-s); }
.swatch__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(242, 240, 233, .35); }
.swatch:hover { border-color: var(--text); }
.swatch[aria-pressed="true"] { border-color: var(--mint); background: rgba(54, 211, 188, .12); }
.swatch.is-out .swatch__name { text-decoration: line-through; color: var(--text-2); }

/* ---- Without motion (reduced motion, or no script): an ordinary page. The product stays beside the text on
   wide screens and sits above it on narrow ones; its light belongs to the product, not to the tall section. ---- */
html:not(.motion-ok) .story__light { display: none; }
html:not(.motion-ok) .stage { background: radial-gradient(46% 46% at 50% 50%, color-mix(in srgb, var(--tone) 70%, transparent), transparent 72%); }
@media (min-width: 901px) {
  html:not(.motion-ok) .story__pin { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  html:not(.motion-ok) .chapters { grid-column: 1; grid-row: 1; }
  html:not(.motion-ok) .stage { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--top-h) + 12px); height: min(760px, calc(100svh - var(--top-h) - 100px)); }
  html:not(.motion-ok) .chapter--intro { padding-top: clamp(24px, 3vw, 48px); }
}

/* ---- With motion: the story is pinned and the scroll plays it ---- */
.motion-ok .story { height: calc(var(--chapters) * 88svh + 12svh); }
.motion-ok .story__pin { position: sticky; top: var(--top-h); height: calc(100svh - var(--top-h)); }
.motion-ok .stage { position: absolute; left: 50%; top: 3%; bottom: 12%; width: 46%; height: auto; transition: transform var(--dur-l) var(--ease-out-expo); }
.motion-ok .story[data-c="1"] .stage { transform: translateY(1%) scale(.76); }
.motion-ok .story[data-c="2"] .stage { transform: translateX(-5%) scale(.92); }
.motion-ok .story[data-c="3"] .stage { transform: scale(1.04); }
.motion-ok .story[data-c="4"] .stage { transform: scale(.98); }
.motion-ok .story[data-c="5"] .stage { transform: translateX(3%) scale(.9); }
.motion-ok .stage__turn { transform: translateX(calc(var(--mx, 0) * 12px)) scaleX(var(--sx, 1)); }
.motion-ok .chapters { position: absolute; inset: 0; pointer-events: none; }
.motion-ok .chapter { position: absolute; left: var(--edge); top: 45.5%; width: min(46vw, 700px); padding: 0; border: 0; opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 32px)); transition: opacity var(--dur-s), transform var(--dur-m) var(--ease-out-expo), visibility 0s var(--dur-s); }
.motion-ok .chapter.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(-50%); transition-delay: 120ms, 120ms, 0s; }

/* The first screen has the most on it, so in the pinned story its title is sized to the screen height */
.motion-ok .hero__title { font-size: min(clamp(72px, 9.4vw, 196px), 12.4vh); }
.motion-ok .hero__brand { margin-bottom: 10px; }
@media (max-height: 800px) and (min-width: 901px) { .motion-ok .chapter--intro .buy__note, .motion-ok .hero__intro { display: none; } }

/* Coverage: rings spread across the floor from the base of the diffuser */
.motion-ok .stage__rings { display: block; position: absolute; left: 50%; bottom: 5%; width: 0; height: 0; opacity: 0; transition: opacity var(--dur-m); }
.motion-ok .story[data-c="1"] .stage__rings { opacity: 1; }
.stage__rings span { position: absolute; left: 0; top: 0; width: clamp(520px, 86vw, 1500px); aspect-ratio: 3.6 / 1; border: 1px solid color-mix(in srgb, var(--tone) 55%, #fff 30%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 26%, transparent), transparent); transform: translate(-50%, -50%) scale(calc(var(--ring, 0) * var(--k, 1))); will-change: transform; }
.stage__rings span:nth-child(2) { --k: .64; }
.stage__rings span:nth-child(3) { --k: .34; }

/* Timer: the hours light up one after another */
.motion-ok .chapter--timer .figure__n { opacity: .26; transition: opacity var(--dur-s), color var(--dur-s); }
.motion-ok .chapter--timer .figure__n.is-lit { opacity: 1; }

/* Intensity: three strengths of haze above the diffuser; the bars count them */
.motion-ok .stage__haze { display: block; position: absolute; left: 50%; top: -6%; width: 46%; height: 34%; transform: translateX(-50%); opacity: var(--haze, .34); transition: opacity var(--dur-m); pointer-events: none; }
.stage__haze i { position: absolute; left: 30%; bottom: 0; width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 30%, rgba(255, 255, 255, .5)), transparent); filter: blur(14px); opacity: 0; animation: haze 7s linear infinite; animation-play-state: paused; }
.stage__haze i:nth-child(2) { left: 16%; animation-delay: -2.4s; animation-duration: 8s; }
.stage__haze i:nth-child(3) { left: 44%; animation-delay: -4.6s; animation-duration: 9s; }
.motion-ok .story.is-live .stage__haze i { animation-play-state: running; }
@keyframes haze { 0% { opacity: 0; transform: translateY(40%) scale(.5); } 25% { opacity: .9; } 100% { opacity: 0; transform: translateY(-150%) scale(1.5); } }
.motion-ok .levels i { background: rgba(242, 240, 233, .2); transition: background-color var(--dur-s); }
.motion-ok .story[data-level="1"] .levels i:nth-child(-n+1), .motion-ok .story[data-level="2"] .levels i:nth-child(-n+2), .motion-ok .story[data-level="3"] .levels i:nth-child(-n+3) { background: var(--mint); }

/* The bar along the bottom: where you are in the story, and a way to jump */
.motion-ok .steps { display: grid; grid-template-columns: repeat(var(--chapters), minmax(0, 1fr)); gap: 10px; position: absolute; left: var(--edge); right: var(--edge); bottom: clamp(12px, 2.4vh, 26px); z-index: 4; }
.steps button { width: 100%; padding: 12px 0 4px; border: 0; border-top: 1px solid rgba(242, 240, 233, .25); background: none; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-align: left; color: var(--text-2); cursor: pointer; transition: color var(--dur-s), border-color var(--dur-s); }
.steps button:hover { color: var(--text); border-top-color: var(--text); }
.steps button[aria-current] { padding-top: 11px; border-top: 2px solid var(--mint); color: var(--text); }

/* Arrival: the title rises line by line, the diffuser comes up into the light */
@media (prefers-reduced-motion: no-preference) {
  .motion-ok .hero__title .line { overflow: hidden; padding-top: .05em; margin-top: -.05em; }
  .motion-ok .hero__title .line > span { animation: line-up var(--dur-l) var(--ease-out-expo) both; animation-delay: calc(var(--i) * 80ms + 150ms); }
  .motion-ok .stage__turn { animation: unit-in var(--dur-xl) var(--ease-out-expo) 100ms both; }
  .motion-ok .story__light { animation: bloom var(--dur-xl) ease-out both; }
  .motion-ok .hero__brand, .motion-ok .hero__line, .motion-ok .hero__intro, .motion-ok [data-buybox] { animation: fade-up var(--dur-m) var(--ease-out-expo) both; }
  .motion-ok .hero__line { animation-delay: 450ms; }
  .motion-ok .hero__intro { animation-delay: 530ms; }
  .motion-ok [data-buybox] { animation-delay: 610ms; }
}
@keyframes line-up { from { transform: translateY(108%); } }
@keyframes unit-in { from { opacity: 0; transform: translateY(8%) scale(.94); } }
@keyframes bloom { from { opacity: 0; transform: scale(.7); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }

/* Things that arrive as they are scrolled to */
.motion-ok [data-reveal] { opacity: 0; transform: translateY(26px); }
.motion-ok [data-reveal].is-in { opacity: 1; transform: none; transition: opacity var(--dur-m) var(--ease-out-expo), transform var(--dur-m) var(--ease-out-expo); transition-delay: calc(var(--d, 0) * 70ms); }
.motion-ok [data-reveal="mask"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
.motion-ok [data-reveal="mask"].is-in { clip-path: inset(0); transition: clip-path var(--dur-l) var(--ease-out-expo); }

/* The store's sentence about the waterless design: the words light up as it is scrolled through */
.statement { padding-block: var(--section); }
.statement__text { max-width: 24ch; font: 400 clamp(40px, 5.6vw, 104px)/.96 var(--display); text-transform: uppercase; text-wrap: balance; }
.motion-ok .statement__text .w { opacity: clamp(.16, calc(var(--wp, 0) * (var(--n) + 5) - var(--i)), 1); }
.statement__from { margin-top: 24px; font-size: 13px; color: var(--text-2); }
.statement__from a { color: var(--text); text-underline-offset: 4px; }

/* In the box: the store's own photo for the chosen color, kept as a photo */
.box { padding-block: var(--section); background: var(--bg-2); }
.box__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 88px); align-items: center; }
.box__photo { border-radius: 8px; overflow: hidden; background: var(--paper); }
.box__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: brightness(.94); }
.box__list { margin-top: clamp(20px, 2.4vw, 36px); border-top: 1px solid var(--line); }
.box__list li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: clamp(16px, 1.3vw, 19px); font-weight: 600; }
.box__note { margin-top: 18px; font-size: 14px; color: var(--text-2); }

/* The last word: where to buy */
.final { position: relative; padding-block: var(--section); background: radial-gradient(60% 90% at 80% 0%, color-mix(in srgb, var(--tone) 42%, transparent), transparent 70%), var(--bg); }
.final__in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 88px); align-items: end; }
.final__title { font: 400 clamp(60px, 9.4vw, 184px)/.84 var(--display); text-transform: uppercase; text-wrap: balance; }
.final .buy { margin-top: 0; padding-top: 0; border-top: 0; }

/* Footer and the bar that follows the page */
.foot { padding-block: 32px calc(40px + 76px); border-top: 1px solid var(--line); background: #05090A; color: var(--text-2); font-size: 14px; }
.foot__in { display: grid; gap: 14px; }
.foot__in > p:first-child a { color: var(--text); font-weight: 700; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot__links a { display: inline-block; padding: 6px 0; text-decoration: none; }
.foot__links a:hover { color: var(--mint); }
.foot__fine { font-size: 12.5px; max-width: 70ch; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(10, 16, 17, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.motion-ok .bar { animation: bar-in var(--dur-m) var(--ease-out-expo); }
@keyframes bar-in { from { transform: translateY(100%); } }
.bar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.bar__name { display: grid; line-height: 1.3; font-size: 14px; }
.bar__name > span { color: var(--text-2); }

@media (max-width: 900px) {
  .hero__title { font-size: clamp(60px, 17vw, 124px); }
  .hero__title .line { display: inline-block; vertical-align: bottom; }
  .box__grid, .final__in { grid-template-columns: 1fr; align-items: start; }
  .top__note { display: none; }
  .top__in .btn { margin-left: auto; }
  .story__light { background: radial-gradient(64% 34% at 50% 24%, color-mix(in srgb, var(--tone) 72%, transparent), transparent 72%); }
  /* Pinned on a phone: the product in the upper part of the screen, the text below it */
  .motion-ok .stage { left: 0; top: 1%; bottom: auto; width: 100%; height: 43%; }
  .motion-ok .story[data-c="1"] .stage { transform: translateY(0) scale(.8); }
  .motion-ok .story[data-c="2"] .stage, .motion-ok .story[data-c="5"] .stage { transform: scale(.92); }
  .motion-ok .chapter { left: var(--gutter); right: var(--gutter); top: auto; bottom: 62px; width: auto; transform: translateY(24px); }
  .motion-ok .chapter.is-active { transform: none; }
  .motion-ok .hero__title { font-size: clamp(56px, 16vw, 116px); }
  .motion-ok .hero__brand, .motion-ok .hero__intro, .motion-ok .chapter .buy__note, .motion-ok .chapter .link { display: none; }
  .motion-ok .chapter .buy { gap: 10px; margin-top: 12px; padding-top: 12px; }
  .motion-ok .chapter .swatches { flex-wrap: nowrap; gap: 6px; }
  .motion-ok .chapter .swatch { min-height: 44px; padding: 0 10px 0 7px; gap: 6px; font-size: 13px; }
  .motion-ok .chapter .swatch__dot { width: 18px; height: 18px; }
  .motion-ok .chapter .btn { width: 100%; min-height: 52px; }
  .motion-ok .hero__line { margin-top: 8px; font-size: 22px; }
  .figure { font-size: clamp(84px, 30vw, 170px); }
  .chapter--timer .figure { font-size: clamp(54px, 15.5vw, 110px); }
  .chapter--charging .figure { font-size: clamp(72px, 23vw, 140px); }
  .motion-ok .steps { left: var(--gutter); right: var(--gutter); gap: 5px; bottom: 14px; }
  .motion-ok .steps button { min-height: 28px; padding: 0; }
  .motion-ok .steps button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stage__rings span { width: 150vw; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .motion-ok .stage { height: 38%; }
  .motion-ok .hero__line { display: none; }
}
@media (max-width: 560px) {
  .buy__actions .btn { width: 100%; }
  .bar__in .btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
