/* ═══════════════════════════════════════════════
   CANDLE · clay
   A candle modelled in clay, lit inside a dark clay set: the page is
   warm cream, the set is deep plum, and the flame is the only light in
   it. Everything is puffy and over-rounded, lit from the top left, and
   every shadow carries the colour of the surface it falls from. Nothing
   here has an ink outline, a hard offset shadow or a bounce: it
   squashes, it settles.
   ═══════════════════════════════════════════════ */

@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --page: #fbf3ea;
  --page-deep: #f6e6d6;
  --wax: #fff1d6;
  --wax-sh: rgba(214, 170, 120, 0.35);
  --wax-in: rgba(200, 150, 100, 0.22);
  --peach: #ffd3b6;
  --peach-sh: rgba(214, 150, 120, 0.35);
  --peach-in: rgba(200, 130, 100, 0.22);
  --abricot: #ffb59e;
  --abricot-sh: rgba(214, 120, 95, 0.38);
  --abricot-in: rgba(200, 100, 80, 0.25);
  --ambre: #ffa62b;
  --ambre-sh: rgba(214, 125, 20, 0.38);
  --ambre-in: rgba(200, 110, 10, 0.25);
  --lavande: #b8a6ff;
  --lavande-sh: rgba(140, 120, 220, 0.35);
  --lavande-in: rgba(120, 100, 200, 0.22);
  --night: #3a1b33;
  --night-deep: #24101f;
  --night-lit: #4d2643;
  --night-sh: rgba(24, 8, 20, 0.5);
  --night-in: rgba(0, 0, 0, 0.4);
  --cream: #fff1d6;
  --cream-soft: rgba(255, 241, 214, 0.72);
  --cream-faint: rgba(255, 241, 214, 0.5);
  --raisin: #5b2e48;
  --raisin-soft: rgba(91, 46, 72, 0.8);
  --raisin-faint: rgba(91, 46, 72, 0.58);
  --brique: #b8461f;
  --light: rgba(255, 255, 255, 0.55);

  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;

  --r-card: 30px;
  --r-btn: 18px;
  --settle: cubic-bezier(0.22, 1, 0.36, 1);
  --bar-h: 84px;
}

/* the clay recipe: one outer coloured shadow, one inner shade at the
   bottom right, one inner sheen at the top left */
.clay {
  border-radius: var(--r-card);
  background: var(--wax);
  box-shadow: 8px 10px 26px var(--wax-sh), inset -6px -6px 16px var(--wax-in), inset 6px 6px 16px var(--light);
}
.clay-peach { background: var(--peach); box-shadow: 8px 10px 26px var(--peach-sh), inset -6px -6px 16px var(--peach-in), inset 6px 6px 16px var(--light); }
.clay-abricot { background: var(--abricot); box-shadow: 8px 10px 26px var(--abricot-sh), inset -6px -6px 16px var(--abricot-in), inset 6px 6px 16px var(--light); }
.clay-ambre { background: var(--ambre); box-shadow: 8px 10px 26px var(--ambre-sh), inset -6px -6px 16px var(--ambre-in), inset 6px 6px 16px var(--light); }
.clay-lavande { background: var(--lavande); box-shadow: 8px 10px 26px var(--lavande-sh), inset -6px -6px 16px var(--lavande-in), inset 6px 6px 16px var(--light); }
.clay-night {
  color: var(--cream);
  background: radial-gradient(120% 100% at 50% 0%, var(--night-lit) 0%, var(--night) 55%, var(--night-deep) 100%);
  box-shadow: 12px 16px 40px rgba(91, 46, 72, 0.3), inset -10px -10px 28px var(--night-in), inset 10px 10px 28px rgba(255, 255, 255, 0.07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.55;
  color: var(--raisin);
  background: var(--page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ambre); color: var(--raisin); }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
b, strong { font-weight: 800; }
code { font-family: var(--body); font-weight: 800; }
:focus-visible { outline: 3px solid var(--brique); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the room around the table: a warm light from the top right, where the
   set stands, and a deeper cream towards the bottom */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 78% 6%, rgba(255, 166, 43, 0.14), transparent 70%),
    linear-gradient(180deg, transparent 0%, transparent 60%, rgba(214, 150, 120, 0.1) 100%);
}

/* ── the bar: a clay tablet floating over the page ─────────── */
.bar {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: center; pointer-events: none; padding: 0 14px;
}
.bar-inner {
  pointer-events: auto;
  display: flex; align-items: center; gap: clamp(0.8rem, 2.4vw, 1.6rem);
  width: min(1180px, 100%);
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  border-radius: 24px;
  background: rgba(255, 241, 214, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 8px 10px 26px var(--wax-sh), inset -4px -4px 12px var(--wax-in), inset 4px 4px 12px var(--light);
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; transition: transform 0.5s var(--settle); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; }
.bar-links { display: flex; gap: clamp(0.6rem, 2vw, 1.2rem); }
.bar-links a {
  text-decoration: none; font-weight: 700; font-size: 0.95rem; color: var(--raisin-soft);
  padding: 0.35rem 0.7rem; border-radius: 999px; transition: background 0.25s, color 0.25s;
}
.bar-links a:hover { color: var(--raisin); background: rgba(255, 181, 158, 0.45); }
.bar-actions { display: flex; align-items: center; gap: 0.45rem; margin-left: auto; }

/* ── clay buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.35rem; border: 0; border-radius: var(--r-btn);
  font-family: var(--display); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.01em;
  text-decoration: none; color: var(--raisin);
  background: var(--peach);
  box-shadow: 6px 7px 18px var(--peach-sh), inset -5px -5px 12px var(--peach-in), inset 5px 5px 12px var(--light);
  transition: transform 0.35s var(--settle), box-shadow 0.35s var(--settle);
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(1px) scale(0.97); box-shadow: 3px 3px 10px var(--peach-sh), inset -3px -3px 8px var(--peach-in), inset 3px 3px 8px var(--light); }
.btn-ambre { background: var(--ambre); box-shadow: 6px 7px 18px var(--ambre-sh), inset -5px -5px 12px var(--ambre-in), inset 5px 5px 12px var(--light); }
.btn-ambre:active { box-shadow: 3px 3px 10px var(--ambre-sh), inset -3px -3px 8px var(--ambre-in), inset 3px 3px 8px var(--light); }
.btn-lavande { background: var(--lavande); box-shadow: 6px 7px 18px var(--lavande-sh), inset -5px -5px 12px var(--lavande-in), inset 5px 5px 12px var(--light); }
.btn-big { padding: 0.95rem 1.7rem; font-size: 1.12rem; border-radius: 22px; }
.btn-small { padding: 0.5rem 0.95rem; font-size: 0.9rem; border-radius: 14px; }
.btn .ic { width: 1.05em; height: 1.05em; }
.round {
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--peach); color: var(--raisin); text-decoration: none;
  box-shadow: 5px 5px 14px var(--peach-sh), inset -4px -4px 10px var(--peach-in), inset 4px 4px 10px var(--light);
  transition: transform 0.35s var(--settle);
}
.round:hover { transform: scale(1.08); }
.round svg { width: 18px; height: 18px; }
.round .ic-off { display: none; }
.round.off .ic-on { display: none; }
.round.off .ic-off { display: block; }
.round.off { background: var(--lavande); box-shadow: 5px 5px 14px var(--lavande-sh), inset -4px -4px 10px var(--lavande-in), inset 4px 4px 10px var(--light); }
.wallet-btn .wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--raisin-faint); }
.wallet-btn.is-on .wallet-dot { background: #6fcf97; }
.wallet-btn.is-wrong .wallet-dot { background: #e4572e; }
.wallet-btn.is-off { opacity: 0.85; }

/* ── the hero: the copy, and the set beside it ─────────────── */
main { position: relative; z-index: 1; }
#hero {
  max-width: 1240px; margin: 0 auto; padding: calc(var(--bar-h) + 2.4rem) 24px 2.5rem;
  display: grid; grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  gap: 2.4rem 3.4rem; align-items: center;
}
.copy { padding-bottom: 1rem; }
.eyebrow { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  background: var(--peach);
  box-shadow: 4px 5px 12px var(--peach-sh), inset -3px -3px 8px var(--peach-in), inset 3px 3px 8px var(--light);
}
.chip-token { background: var(--ambre); box-shadow: 4px 5px 12px var(--ambre-sh), inset -3px -3px 8px var(--ambre-in), inset 3px 3px 8px var(--light); }

/* the name: letters of clay that fall one by one. No tiles, no outline:
   a coloured extrusion under each glyph gives it the thickness of clay */
.title {
  font-family: var(--display); font-weight: 700; font-size: clamp(4rem, 7.8vw, 7.9rem); line-height: 0.92;
  letter-spacing: 0.005em; margin: 0 0 1.1rem -0.04em; display: flex;
}
.letter {
  display: inline-block; color: var(--raisin);
  text-shadow: 3px 5px 0 var(--abricot), 9px 14px 26px var(--abricot-sh);
  transform-origin: 50% 80%;
}
.tagline { font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 2vw, 1.72rem); line-height: 1.22; margin-bottom: 1.05rem; }
.tagline em { font-style: normal; color: var(--brique); }
.sub { font-size: 1.06rem; line-height: 1.64; color: var(--raisin-soft); margin-bottom: 1.5rem; max-width: 50ch; }
.sub b { color: var(--raisin); }
.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hint { font-size: 0.88rem; font-weight: 700; color: var(--raisin-faint); }

/* the show: the set, the hands, the notes */
.show { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; align-self: start; }   /* pinned: the set never moves, whatever the copy does */

/* the set: a dark clay box, the flame lights it from inside */
.set {
  position: relative; overflow: hidden; padding: 1.1rem 1.3rem 1.35rem;
  border-radius: 46px; color: var(--cream);
  background: radial-gradient(110% 80% at 50% 28%, var(--night-lit) 0%, var(--night) 52%, var(--night-deep) 100%);
  box-shadow: 16px 20px 48px rgba(91, 46, 72, 0.34), inset -10px -10px 30px var(--night-in), inset 10px 10px 30px rgba(255, 255, 255, 0.07);
  transition: background 1.2s;
}
.set:has(.stage.is-out) { background: radial-gradient(110% 80% at 50% 28%, #3d1d36 0%, #2b1326 52%, #1c0b18 100%); }
.set-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.1rem; }
.set-tag { font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--cream-faint); }
.stage {
  position: relative; width: min(100%, 440px); margin: 0 auto;
  aspect-ratio: 380 / 500;
  transform-origin: 50% 96%;
}
.stage svg { width: 100%; height: 100%; display: block; overflow: visible; cursor: pointer; outline: none; }
.stage svg:focus-visible { filter: drop-shadow(0 0 0 3px var(--ambre)); }
.lamp {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.95rem; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 0.92rem; color: var(--raisin);
  background: var(--wax);
  box-shadow: 4px 5px 14px var(--night-sh), inset -3px -3px 8px var(--wax-in), inset 3px 3px 8px var(--light);
  transition: background 0.4s;
}
.lamp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ambre); box-shadow: 0 0 0 3px rgba(255, 166, 43, 0.3); }
.lamp.is-hot { background: var(--ambre); }
.lamp.is-hot .lamp-dot { background: var(--raisin); box-shadow: none; }
.lamp.is-out { background: var(--lavande); }
.lamp.is-out .lamp-dot { background: var(--raisin-faint); box-shadow: none; }

/* the chips: four clay pills in a row under the candle */
.pills { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin-top: 0.3rem; }
.pill {
  position: relative; display: flex; flex-direction: column; gap: 0.05rem; min-width: 0;
  padding: 0.65rem 1rem 0.6rem; border-radius: 22px; color: var(--raisin);
  background: var(--wax);
  box-shadow: 6px 8px 20px var(--night-sh), inset -5px -5px 12px var(--wax-in), inset 5px 5px 12px var(--light);
  transform-origin: 50% 50%;
}
.pill small { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--raisin-faint); white-space: nowrap; }
.pill b { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.05; }
.pill-pot { background: var(--ambre); box-shadow: 6px 8px 20px var(--night-sh), inset -5px -5px 12px var(--ambre-in), inset 5px 5px 12px var(--light); }
.pill-burn { background: var(--abricot); box-shadow: 6px 8px 20px var(--night-sh), inset -5px -5px 12px var(--abricot-in), inset 5px 5px 12px var(--light); }
.pill-round { background: var(--lavande); box-shadow: 6px 8px 20px var(--night-sh), inset -5px -5px 12px var(--lavande-in), inset 5px 5px 12px var(--light); }
.pill.pop { animation: pop 0.42s var(--settle); }
.pill.shake { animation: shake 0.4s ease-in-out; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.14, 0.9); } 70% { transform: scale(0.96, 1.06); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px) rotate(-1.5deg); } 75% { transform: translateX(5px) rotate(1.5deg); } }
.bead {
  position: absolute; left: 50%; top: 50%; z-index: 4; width: 11px; height: 11px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--bead, var(--ambre)); pointer-events: none;
  box-shadow: inset -2px -2px 3px rgba(0, 0, 0, 0.12), inset 2px 2px 3px var(--light);
  animation: bead 0.95s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes bead { 0% { transform: translate(0, 0) scale(0.6); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; } }

/* under the set: the hands and the notes */
.hands { display: flex; gap: 0.9rem; justify-content: center; }
.hands .btn-big { min-width: 190px; }
#buy.is-hot { animation: hot 1.6s ease-in-out infinite; }
@keyframes hot { 0%, 100% { box-shadow: 6px 7px 18px var(--ambre-sh), inset -5px -5px 12px var(--ambre-in), inset 5px 5px 12px var(--light); } 50% { box-shadow: 6px 7px 28px rgba(214, 125, 20, 0.62), inset -5px -5px 12px var(--ambre-in), inset 5px 5px 12px var(--light); } }
.buy-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--raisin); color: var(--wax); }
.notes { text-align: center; padding: 1rem 1.4rem 0.9rem; border-radius: 26px; }
.stretch-line { font-size: 0.9rem; font-weight: 800; color: var(--raisin-faint); min-height: 3.1em; transition: color 0.4s; }   /* two lines reserved: the row must never change height */
.stretch-line.is-open { color: var(--brique); }
.toy-note { font-size: 1rem; font-weight: 600; color: var(--raisin); min-height: 4.35em; margin: 0.3rem auto 0; max-width: 60ch; line-height: 1.45; }   /* three lines reserved, same reason */
.toy-model { font-size: 0.8rem; font-weight: 800; color: var(--raisin-faint); margin-top: 0.4rem; }

/* the register: a clay plate that unrolls over the set when a candle dies */
.register {
  position: absolute; left: 32px; right: 32px; bottom: 26px; z-index: 5;
  padding: 1rem 1.2rem 0.9rem; border-radius: 26px;
  background: var(--wax); color: var(--raisin);
  box-shadow: 10px 12px 30px var(--night-sh), inset -6px -6px 16px var(--wax-in), inset 6px 6px 16px var(--light);
  transform-origin: 50% 100%;
}
.register.in { animation: unroll 0.55s var(--settle); }
@keyframes unroll { from { transform: scaleY(0.4) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.register-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin-bottom: 0.4rem; }
.register-rows li { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 0.5rem; font-size: 0.9rem; font-weight: 700; padding: 0.2rem 0; }
.register-rows .register-head { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--raisin-faint); }
.register-rows .is-you { color: var(--brique); }
.register-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.5rem; font-size: 0.88rem; font-weight: 700; color: var(--raisin-soft); }

/* ── the clay candle, in the SVG ───────────────────────────── */
.floor { fill: url(#floor-grad); }
.floor-shadow { fill: var(--night-deep); opacity: 0.7; }
.saucer { fill: url(#saucer-grad); }
.saucer-dark { fill: #7a3a33; opacity: 0.85; }
.saucer-in { fill: #9c5445; }
.mark { stroke: rgba(255, 236, 214, 0.2); stroke-width: 2.5; stroke-linecap: round; }
.mark-long { stroke: rgba(255, 236, 214, 0.42); stroke-width: 3; }
.lead { stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 7; }
.lead-zone { stroke: rgba(184, 166, 255, 0.5); }
.lead-cap { stroke: rgba(255, 166, 43, 0.5); }
.zone-label { font-family: var(--display); font-weight: 600; font-size: 12px; fill: rgba(200, 188, 255, 0.85); letter-spacing: 0.04em; transition: fill 0.5s; }
.cap-label { font-family: var(--display); font-weight: 600; font-size: 12px; fill: var(--ambre); letter-spacing: 0.06em; }
.cap { transform-box: fill-box; transform-origin: 50% 100%; }
.cap.hit { animation: capHit 0.5s ease-in-out; }
@keyframes capHit { 0%, 100% { transform: none; } 30% { transform: translateY(-4px) rotate(-6deg); } 65% { transform: translateY(2px) rotate(4deg); } }

.wax-body { fill: url(#wax-cyl); }
.wax-vert { fill: url(#wax-vert-grad); }
.wax-foot { fill: url(#wax-cyl); }
.wax-shine { fill: url(#shine-grad); }
.base-shadow { opacity: 0.9; }
.band { fill: url(#band-grad); opacity: 0.8; transition: opacity 0.6s; }
.stage.is-low .band { animation: bandBreath 2.2s ease-in-out infinite; }
@keyframes bandBreath { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
.stage.is-low .zone-label { fill: #d9cfff; }
.top-face { fill: url(#face-grad); }
.top-rim { fill: rgba(120, 70, 45, 0.38); }
.top-lip { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 2.5; }
.pool-edge { fill: rgba(150, 90, 60, 0.24); }
.pool { fill: url(#pool-grad); }
.pool-shine { fill: rgba(255, 255, 255, 0.78); }
.splat { fill: rgba(255, 255, 255, 0.55); opacity: 0; transform-box: fill-box; transform-origin: center; }
.splat.go { animation: splat 0.5s ease-out; }
@keyframes splat { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.6); } }
.wick { fill: none; stroke: #2a1420; stroke-width: 4.2; stroke-linecap: round; }
.ember { fill: url(#ember-grad); transition: opacity 0.8s; animation: emberGlow 1.3s ease-in-out infinite; }
@keyframes emberGlow { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.drop-body { fill: #ffe6c2; stroke: rgba(200, 150, 100, 0.25); stroke-width: 2; }
.drop-shine { fill: rgba(255, 255, 255, 0.75); }
.drip-shadow { stroke: rgba(150, 90, 60, 0.32); stroke-width: 16; stroke-linecap: round; }
.drip-body { stroke: #fff3dc; stroke-width: 14; stroke-linecap: round; }
.drip-hi { stroke: rgba(255, 255, 255, 0.7); stroke-width: 4; stroke-linecap: round; }

/* the flame: a drop of amber clay that leans and breathes while lit, and
   the light it throws on the wall */
.flame-size { transform-box: fill-box; transform-origin: 50% 100%; }
.flame-leap { transform-box: fill-box; transform-origin: 50% 100%; }
.flame-leap.leap { animation: leap 0.5s var(--settle); }
@keyframes leap { 0% { transform: scale(1); } 35% { transform: scale(1.35, 1.5); } 100% { transform: scale(1); } }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.9s ease-in-out infinite; }
@keyframes flicker {
  0%, 100% { transform: skewX(0) scale(1, 1); }
  30% { transform: skewX(-4deg) scale(0.96, 1.06); }
  60% { transform: skewX(3deg) scale(1.04, 0.95); }
}
.flame-aura { fill: url(#flame-aura); }
.flame-outer { fill: url(#flame-body); }
.flame-inner { fill: url(#flame-core); opacity: 0.95; }
.flame-blue { fill: url(#blue-grad); }
.glow { opacity: 1; transition: opacity 0.8s; animation: breathe 3.4s ease-in-out infinite; }
.halo { opacity: 1; transition: opacity 0.8s; animation: breathe 2.6s ease-in-out infinite reverse; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.82; } }
.smoke circle { fill: #d4caff; opacity: 0; transform-box: fill-box; transform-origin: center; }
.stage.is-low .flame { animation-duration: 0.9s; }
.stage.is-low .glow { animation: none; opacity: 0.6; }
.stage.is-low .halo { animation: none; opacity: 0.75; }
.stage.is-dying .flame { animation: writhe 1s ease-in-out forwards; }
@keyframes writhe {
  0% { transform: skewX(0) scale(1); }
  25% { transform: skewX(-14deg) scale(0.9, 1.25); }
  50% { transform: skewX(12deg) scale(0.8, 0.7); }
  75% { transform: skewX(-8deg) scale(0.6, 0.5); }
  100% { transform: skewX(0) scale(0.2, 0.05); opacity: 0.2; }
}
.stage.is-dying .glow, .stage.is-dying .halo { animation: none; opacity: 0.3; }
.stage.is-out .flame { opacity: 0; animation: none; }
.stage.is-out .ember { opacity: 0; animation: none; }
.stage.is-dying .ember { animation: none; opacity: 0.5; }
.stage.is-out .glow, .stage.is-out .halo { animation: none; opacity: 0; }
.stage.is-out .smoke circle { animation: puff 2.6s ease-out forwards; }
.stage.is-out .smoke .p2 { animation-delay: 0.35s; }
.stage.is-out .smoke .p3 { animation-delay: 0.7s; }
@keyframes puff { 0% { opacity: 0; transform: translateY(0) scale(0.4); } 15% { opacity: 0.5; } 100% { opacity: 0; transform: translateY(-140px) scale(2.1); } }
.stage.lit .flame { animation: relight 0.7s var(--settle), flicker 1.9s ease-in-out 0.7s infinite; }
@keyframes relight { 0% { transform: scale(0, 0); } 60% { transform: scale(1.25, 1.4); } 100% { transform: scale(1); } }
.stage.squash { animation: squash 0.42s var(--settle); }
@keyframes squash { 0% { transform: scale(1); } 35% { transform: scale(1.05, 0.93); } 70% { transform: scale(0.98, 1.03); } 100% { transform: scale(1); } }
.stage.shrug { animation: shrug 0.45s ease-in-out; }
@keyframes shrug { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2deg) translateY(2px); } 65% { transform: rotate(1.6deg); } }

/* ── the entrance: the bar drops, the letters fall, the candle surges,
      the chips bloom. CSS only, started by a class on the body ────── */
.bar-inner, .letter, .set, .stage, .pill, .copy > .eyebrow, .copy > .tagline, .copy > .sub, .copy > .actions, .copy > .hint, .hands, .notes { opacity: 0; }
body.is-in .bar-inner { animation: dropIn 0.7s var(--settle) forwards; }
body.is-in .letter { animation: fallIn 0.8s cubic-bezier(0.34, 1.3, 0.64, 1) forwards; animation-delay: calc(0.25s + var(--i) * 45ms); }
body.is-in .copy > .eyebrow { animation: riseIn 0.6s var(--settle) 0.15s forwards; }
body.is-in .copy > .tagline { animation: riseIn 0.6s var(--settle) 0.75s forwards; }
body.is-in .copy > .sub { animation: riseIn 0.6s var(--settle) 0.9s forwards; }
body.is-in .copy > .actions { animation: riseIn 0.6s var(--settle) 1.05s forwards; }
body.is-in .copy > .hint { animation: riseIn 0.6s var(--settle) 1.2s forwards; }
body.is-in .set { animation: riseIn 0.7s var(--settle) 0.3s forwards; }
body.is-in .stage { animation: surge 0.9s cubic-bezier(0.34, 1.35, 0.64, 1) 0.7s forwards; }
body.is-in .pill { animation: bloom 0.6s cubic-bezier(0.34, 1.45, 0.64, 1) forwards; }
body.is-in .pill-wick { animation-delay: 1.5s; }
body.is-in .pill-pot { animation-delay: 1.62s; }
body.is-in .pill-burn { animation-delay: 1.74s; }
body.is-in .pill-round { animation-delay: 1.86s; }
body.is-in .hands { animation: riseIn 0.6s var(--settle) 1.5s forwards; }
body.is-in .notes { animation: riseIn 0.6s var(--settle) 1.7s forwards; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fallIn { from { opacity: 0; transform: translateY(-260px) rotate(-18deg) scale(1.1); } 70% { transform: translateY(6px) rotate(3deg) scale(1.02, 0.94); } to { opacity: 1; transform: none; } }
@keyframes surge { from { opacity: 0; transform: translateY(240px) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes bloom { from { opacity: 0; transform: scale(0) rotate(18deg); } to { opacity: 1; transform: none; } }
/* once everything has landed, the animations are released so that the
   chips can pop and the stage can squash freely */
body.is-set .bar-inner, body.is-set .letter, body.is-set .set, body.is-set .stage, body.is-set .pill,
body.is-set .copy > *, body.is-set .hands, body.is-set .notes { opacity: 1; animation: none; }
body.is-set .stage.squash { animation: squash 0.42s var(--settle); }
body.is-set .stage.shrug { animation: shrug 0.45s ease-in-out; }
body.is-set .pill.pop { animation: pop 0.42s var(--settle); }
body.is-set .pill.shake { animation: shake 0.4s ease-in-out; }
body.is-set #buy.is-hot { animation: hot 1.6s ease-in-out infinite; }

/* ── below the set: how it works, the law ─────────────────── */
.section { position: relative; max-width: 1180px; margin: 0 auto; padding: 5.5rem 24px 1rem; }
.section-head { margin-bottom: 2.4rem; text-align: center; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1.05; }
.section-sub { font-size: 1.1rem; font-weight: 700; color: var(--raisin-soft); margin-top: 0.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; align-items: stretch; }
.card { position: relative; padding: 1.7rem 1.5rem 1.7rem; border-radius: var(--r-card); }
.card-num { position: absolute; top: 1.15rem; right: 1.25rem; font-family: var(--display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.06em; color: var(--raisin-faint); }
.puck {
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; border-radius: 32px; margin-bottom: 1.15rem;
  background: var(--peach);
  box-shadow: 6px 8px 18px var(--peach-sh), inset -5px -5px 12px var(--peach-in), inset 5px 5px 12px var(--light);
  transition: transform 0.5s var(--settle);
}
.card:hover .puck { transform: translateY(-4px) rotate(-3deg); }
.puck-abricot { background: var(--abricot); box-shadow: 6px 8px 18px var(--abricot-sh), inset -5px -5px 12px var(--abricot-in), inset 5px 5px 12px var(--light); }
.puck-ambre { background: var(--ambre); box-shadow: 6px 8px 18px var(--ambre-sh), inset -5px -5px 12px var(--ambre-in), inset 5px 5px 12px var(--light); }
.puck-lavande { background: var(--lavande); box-shadow: 6px 8px 18px var(--lavande-sh), inset -5px -5px 12px var(--lavande-in), inset 5px 5px 12px var(--light); }
.card-art { display: block; width: 64px; height: 64px; }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.18; margin-bottom: 0.6rem; }
.card p { font-size: 1rem; line-height: 1.58; color: var(--raisin-soft); }
.card p b { color: var(--raisin); }
.laws { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 980px; margin: 0 auto; }
.law { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.2rem 1rem 1rem; border-radius: 999px; }
.law-tag {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 0.92rem; color: var(--raisin);
  background: var(--ambre);
  box-shadow: 3px 4px 10px var(--ambre-sh), inset -3px -3px 8px var(--ambre-in), inset 3px 3px 8px var(--light);
}
.law p { font-size: 1rem; font-weight: 600; line-height: 1.42; padding-top: 0.55rem; }
.law-note { margin-top: 1.8rem; font-weight: 700; color: var(--raisin-soft); text-align: center; }
.law-note a { color: var(--brique); }

.reveal { opacity: 0; transform: translateY(22px) scale(0.98); transition: opacity 0.7s var(--settle), transform 0.7s var(--settle); }
.reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2) { transition-delay: 0.08s; } .cards .reveal:nth-child(3) { transition-delay: 0.16s; } .cards .reveal:nth-child(4) { transition-delay: 0.24s; }
.laws .reveal:nth-child(2) { transition-delay: 0.06s; } .laws .reveal:nth-child(3) { transition-delay: 0.12s; } .laws .reveal:nth-child(4) { transition-delay: 0.18s; } .laws .reveal:nth-child(5) { transition-delay: 0.24s; } .laws .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ── the footer: the set again, seen from the room ────────── */
.footer {
  max-width: 1180px; margin: 5rem auto 2.5rem; padding: 2.6rem 24px 2.3rem; text-align: center; border-radius: 46px;
  color: var(--cream);
  background: radial-gradient(110% 120% at 50% 0%, var(--night-lit) 0%, var(--night) 55%, var(--night-deep) 100%);
  box-shadow: 12px 16px 40px rgba(91, 46, 72, 0.3), inset -10px -10px 28px var(--night-in), inset 10px 10px 28px rgba(255, 255, 255, 0.07);
}
.footer-logo { width: 72px; height: 72px; margin-bottom: 0.6rem; filter: drop-shadow(0 0 18px rgba(255, 166, 43, 0.45)); }
.footer-line { font-family: var(--display); font-weight: 700; font-size: 1.45rem; margin-bottom: 0.8rem; }
.footer-links { display: flex; justify-content: center; gap: 1.6rem; margin-bottom: 1rem; font-weight: 800; }
.footer-links a { text-decoration: none; color: var(--ambre); }
.footer-links a:hover { text-decoration: underline; }
.footer-small { font-size: 0.86rem; font-weight: 600; color: var(--cream-soft); max-width: 70ch; margin: 0 auto; line-height: 1.55; }
.footer-small code { color: var(--cream); }

/* ── the law page ─────────────────────────────────────────── */
.docs { max-width: 1180px; margin: 0 auto; padding: calc(var(--bar-h) + 3rem) 24px 2rem; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.6rem; align-items: start; }
.docs-body { min-width: 0; }
.toc { position: sticky; top: calc(var(--bar-h) + 1.2rem); padding: 1.2rem 1.1rem; border-radius: var(--r-card); }
.toc h2 { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin-bottom: 0.6rem; }
.toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.15rem; }
.toc a { display: block; padding: 0.3rem 0.6rem; border-radius: 999px; text-decoration: none; font-size: 0.9rem; font-weight: 700; color: var(--raisin-soft); transition: background 0.25s, color 0.25s; }
.toc a:hover, .toc a.active { background: rgba(255, 166, 43, 0.35); color: var(--raisin); }
.docs-body > h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.02; margin-bottom: 1rem; }
.docs-body > .lead { font-size: 1.1rem; font-weight: 600; color: var(--raisin-soft); margin-bottom: 1rem; max-width: 70ch; line-height: 1.6; }
.callout { padding: 1rem 1.2rem; border-radius: 22px; font-weight: 700; margin: 0 0 1rem; }
.docs-body section { padding: 1.6rem 1.5rem; border-radius: var(--r-card); margin-bottom: 1.3rem; scroll-margin-top: calc(var(--bar-h) + 1rem); }
.docs-body section h2 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; margin-bottom: 0.7rem; }
.docs-body section p { font-size: 1.02rem; line-height: 1.62; color: var(--raisin-soft); margin-bottom: 0.75rem; }
.docs-body section p:last-child { margin-bottom: 0; }
.docs-body section p b, .docs-body section li b { color: var(--raisin); }
.docs-body section ul { display: flex; flex-direction: column; gap: 0.5rem; }
.docs-body section li { font-size: 1rem; line-height: 1.5; color: var(--raisin-soft); padding: 0.55rem 0.8rem; border-radius: 16px; background: rgba(255, 255, 255, 0.45); }
.docs-body section li b:first-child { display: inline-block; min-width: 2.2em; color: var(--brique); }
.params { width: 100%; border-collapse: separate; border-spacing: 0 0.4rem; font-size: 0.96rem; }
.params th { text-align: left; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--raisin-faint); padding: 0 0.7rem; }
.params td { padding: 0.55rem 0.7rem; background: rgba(255, 255, 255, 0.5); }
.params td:first-child { border-radius: 14px 0 0 14px; font-weight: 800; }
.params td:last-child { border-radius: 0 14px 14px 0; font-weight: 800; color: var(--brique); }
.table-wrap { overflow-x: auto; }
.bullets { padding-left: 1.2rem; list-style: disc; }
.bullets li { background: none; padding: 0.15rem 0; }
.faq details { padding: 0.75rem 1rem; border-radius: 20px; background: rgba(255, 255, 255, 0.5); margin-bottom: 0.5rem; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.02rem; }
.faq details p { margin-top: 0.5rem; }

/* ── smaller windows: the set stacks under the copy ───────── */
@media (max-width: 1000px) {
  #hero { grid-template-columns: 1fr; gap: 2rem; padding-top: calc(var(--bar-h) + 1.6rem); }
  .copy { text-align: center; padding-bottom: 0; }
  .eyebrow, .actions, .title { justify-content: center; }
  .sub { margin-left: auto; margin-right: auto; }
  .laws { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .bar-links { display: none; }
  .title { font-size: clamp(3.4rem, 17vw, 5rem); }
  .set { padding: 1rem 1rem 1.1rem; border-radius: 36px; }
  .set-tag { display: none; }
  .pills { grid-template-columns: repeat(2, 1fr); }
  .hands { flex-direction: column; }
  .register { left: 12px; right: 12px; }
  .register-rows li { grid-template-columns: 1.4fr 1fr 1fr 1fr; font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-inner, .letter, .set, .stage, .pill, .copy > *, .hands, .notes { opacity: 1; animation: none !important; }
  .flame, .glow, .halo, .band, .ember, .reveal { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
