/* Anita — the shared second layer. Each variant maps its own tokens onto --x-*: ink, ground, soft ground, accent,
   accent text, corner radius and display face. */

/* ---------- palette picker ---------- */
.pal-btn { position: fixed; z-index: 40; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 10px;
  border: 0; border-radius: 999px; background: var(--x-ink); color: var(--x-bg); font: 600 .9375rem/1 var(--x-text); cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22); transition: transform .3s var(--ease); }
.pal-btn:hover { transform: translateY(-2px); }
.pal-btn[hidden] { display: none; }
.pal-btn.pal-hello { animation: hello 1.2s var(--ease) 2; }
@keyframes hello { 0%, 100% { transform: none; } 30% { transform: translateY(-6px) scale(1.04); } 60% { transform: none; } }
.pal-dots { display: inline-flex; }
.pal-dots i, .pal-sw i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--x-ink); display: block; }
.pal-dots i + i { margin-left: -7px; }
.pal-sheet { border: 0; padding: 22px 18px 18px; width: min(440px, calc(100vw - 24px)); margin: auto auto 12px; border-radius: 24px;
  background: var(--x-bg); color: var(--x-ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.pal-sheet[open] { animation: sheet .45s var(--ease) both; }
.pal-sheet::backdrop { background: rgba(10, 10, 12, .45); backdrop-filter: blur(3px); }
@keyframes sheet { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.pal-h { font: 600 1.375rem/1.1 var(--x-display); margin: 0 4px 14px; }
.pal-list { display: grid; gap: 8px; }
.pal-opt { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 14px; border: 1.5px solid var(--x-line); border-radius: 16px; background: none; color: inherit;
  font: 500 1.0625rem/1.2 var(--x-text); text-align: left; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.pal-opt:hover { border-color: var(--x-ink); }
.pal-opt[aria-checked="true"] { border-color: var(--x-ink); background: var(--x-soft); }
.pal-opt[aria-checked="true"]::after { content: "✓"; margin-left: auto; font-weight: 700; }
.pal-sw { display: inline-flex; }
.pal-sw i + i { margin-left: -6px; }
.pal-close { width: 100%; min-height: 50px; margin-top: 14px; border: 0; border-radius: var(--x-r); background: var(--x-ink); color: var(--x-bg); font: 600 1rem var(--x-text); cursor: pointer; }
.pal-sheet :focus-visible { outline: 2px solid var(--x-ink); outline-offset: 2px; }
.demo-pal { flex: none; min-height: 40px; padding: 0 12px; border: 1.5px solid currentColor; border-radius: var(--x-r); background: none; color: inherit; font: 600 .8125rem var(--x-text); cursor: pointer; }
.demo { flex-wrap: wrap; }
.demo p { flex: 1 1 100%; }
body { transition: background-color .5s var(--ease), color .5s var(--ease); }

/* ---------- booking: days and hours as buttons ---------- */
.when { display: grid; gap: 8px; min-width: 0; }
.when-l { font: 600 .875rem/1.2 var(--x-text); color: inherit; margin-top: 4px; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 66px; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; scrollbar-width: thin; }
.day { scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 82px; border: 1.5px solid var(--x-line);
  border-radius: calc(var(--x-r) * .6 + 6px); background: none; color: var(--x-ink); font: 400 .8125rem/1.1 var(--x-text); cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.day b { font: 600 1.5rem/1 var(--x-display); }
.day small { font-size: .75rem; text-transform: capitalize; }
.hours { display: flex; flex-wrap: wrap; gap: 8px; }
.hour { min-height: 46px; min-width: 76px; padding: 0 14px; border: 1.5px solid var(--x-line); border-radius: calc(var(--x-r) * .6 + 6px); background: none; color: var(--x-ink);
  font: 500 1rem var(--x-text); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.day:hover, .hour:hover { border-color: var(--x-ink); }
.day:active, .hour:active { transform: scale(.95); }
.day[aria-checked="true"], .hour[aria-checked="true"] { background: var(--x-ink); border-color: var(--x-ink); color: var(--x-bg); }

/* ---------- the headline, word by word ---------- */
.words .w { display: inline-block; opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(6px);
  animation: word .9s var(--ease) calc(var(--i) * 90ms + 150ms) forwards; }
@keyframes word { to { opacity: 1; transform: none; filter: none; } }
.hero picture, .hero-pic { will-change: transform; }

/* ---------- the word strip ---------- */
.strip { overflow: hidden; background: var(--x-acc); color: var(--x-acc-ink); padding: 16px 0; white-space: nowrap; }
.strip-run { display: inline-flex; animation: run 32s linear infinite; }
.strip-run > span { padding-right: 1.2em; font: 500 clamp(1.25rem, 1rem + 1.2vw, 2rem)/1 var(--x-display); }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- "suits your skin" badge on the picked treatment ---------- */
.badge { position: absolute; z-index: 2; top: 14px; left: 14px; padding: 8px 12px; border-radius: var(--x-r); background: var(--x-acc); color: var(--x-acc-ink);
  font: 600 .8125rem/1 var(--x-text); opacity: 0; transform: translateY(-8px) scale(.96); transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none; }
.is-picked .badge { opacity: 1; transform: none; }

/* ---------- rail progress ---------- */
.rail-bar { height: 4px; margin: 18px var(--m) 0; border-radius: 4px; background: var(--x-line); overflow: hidden; }
.rail-bar i { display: block; height: 100%; border-radius: 4px; background: var(--x-ink); transition: transform .15s linear; }

/* ---------- answers open smoothly where the browser can animate details ---------- */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .qa details::details-content { height: 0; overflow: clip; transition: height .45s var(--ease), content-visibility .45s allow-discrete; }
  .qa details[open]::details-content { height: auto; }
}
.field[hidden] { display: none; }

/* ---------- the before/after skin lens on each treatment (shared/skin.js) ---------- */
.lens { position: absolute; z-index: 3; top: 12px; right: 12px; width: clamp(150px, 56%, 260px); aspect-ratio: 1; cursor: ew-resize; touch-action: pan-y;
  -webkit-tap-highlight-color: transparent; user-select: none; }
.lens canvas { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .92), 0 16px 40px rgba(0, 0, 0, .4); }
.lens:focus-visible { outline: none; }
.lens:focus-visible canvas { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--x-ink), 0 16px 40px rgba(0, 0, 0, .4); }
.lens-tags { position: absolute; inset: 0; pointer-events: none; display: flex; justify-content: space-between; align-items: flex-start; padding: 20% 15% 0; }
.lens-tags span { padding: 4px 8px; border-radius: 999px; background: rgba(20, 16, 12, .55); color: #fff; font: 600 .6875rem/1 var(--x-text); letter-spacing: .04em; backdrop-filter: blur(4px); }
.lens-cap { position: absolute; right: 0; top: calc(100% + 8px); width: max-content; max-width: 150%; margin: 0; padding: 6px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .95); color: #1c1a17; font: 500 .8125rem/1.25 var(--x-text); text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.lens-cap i { font-style: normal; color: #2f6b45; font-weight: 700; padding: 0 2px; }
.lens-off { display: none; }

/* on a phone the colour button is a small round dot, so it does not sit on the text; the word stays for screen readers */
@media (max-width: 699px) {
  .pal-btn { width: 48px; padding: 0; justify-content: center; right: 12px; bottom: 12px; }
  .pal-btn .pal-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pal-dots i { width: 18px; height: 18px; }
  footer, .footer { padding-bottom: 84px; }
}
