/*
 * The Skin Den — shared public-site styles (v1.1 refresh, 2026-11-04).
 * Values come from tokens.css. Used by studio.html, faq.html, policy.html and 404.html.
 */

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--c-ivory); -webkit-text-size-adjust: 100%; }
/* Smooth in-page scrolling, switched on after load so deep links (studio.html#book) jump straight to their target */
@media (prefers-reduced-motion: no-preference) { html.smooth-scroll { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-charcoal);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-optical-sizing: auto;
  color: var(--c-charcoal);
  text-wrap: balance;
}
h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: var(--t-h3); line-height: 1.25; font-weight: 500; letter-spacing: -0.005em; }
p { margin: 0; }
::selection { background: var(--c-gold-soft); color: var(--c-charcoal); }
[id] { scroll-margin-top: 88px; }

/* Focus: 2px #6F5938 on light surfaces, gold on charcoal */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--c-gold); }

.skip-to-main {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--c-charcoal); color: var(--c-ivory);
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 var(--t-ui)/1 var(--font-sans); text-decoration: none;
}
.skip-to-main:focus { top: 16px; }

/* ── Glass material (v1.3) ────────────────────────────────────────────── */
/* Ivory glass tinted from the clinic's own walls. Used only where a surface floats over moving
   content: the nav capsule, the mobile book bar and the sticky treatment tabs. The fill stays
   dense enough that gold-text on it keeps 4.5:1 over the darkest band it can cross (#book). */
:root {
  --nav-h: 72px;
  --glass-fill: rgba(253, 248, 238, 0.82);
  --glass-blur: blur(20px) saturate(170%);
  --glass-edge: 0 0 0 1px rgba(42, 33, 23, 0.09);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(138, 113, 72, 0.16);
  --glass-shadow: 0 16px 36px -18px rgba(42, 33, 23, 0.32), 0 3px 10px -6px rgba(42, 33, 23, 0.12);
  /* Specular sheen: light falling on the top-left of the glass, a warm gold return along the base */
  --glass-sheen: radial-gradient(70% 160% at 16% -55%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 62%), linear-gradient(0deg, rgba(197, 160, 109, 0.12), rgba(197, 160, 109, 0) 45%);
}
@media (max-width: 900px) { :root { --nav-h: 64px; } }

.container { max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Text roles ───────────────────────────────────────────────────────── */
/* The only tracked-caps style on the site */
.label {
  margin: 0 0 16px;
  font: 600 var(--t-small)/1.4 var(--font-sans);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-gold-text);
}
.on-dark .label { color: var(--c-gold); }
.lead { font-size: var(--t-lead); line-height: 1.6; color: var(--c-charcoal-soft); }

/* ── Buttons and links ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: 500 var(--t-ui)/1.2 var(--font-sans); letter-spacing: 0.01em;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--c-charcoal); color: var(--c-ivory); }
.btn--primary:hover { background: var(--c-charcoal-soft); }
.btn--secondary { background: transparent; color: var(--c-charcoal); border-color: var(--c-charcoal); }
.btn--secondary:hover { background: rgba(42, 33, 23, 0.06); }
.btn--light { background: var(--c-ivory); color: var(--c-charcoal); }
.btn--light:hover { background: var(--c-cream); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: var(--t-meta); }

.link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--c-charcoal); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--c-gold);
  text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-decoration-color var(--d-fast) var(--ease);
}
.link:hover { text-decoration-color: var(--c-charcoal); }

/* ── Nav ──────────────────────────────────────────────────────────────── */
/* At the top of the page the nav is a flush bar. Once the page scrolls (site.js adds .nav--floating)
   its surface draws in to a floating glass capsule. Only the pseudo-element surfaces move, so the
   header keeps its height and nothing below it shifts. The .nav itself carries no filter, so the
   capsule's backdrop-filter samples the page behind it. */
.nav { position: sticky; top: 0; z-index: var(--z-nav); isolation: isolate; }
.nav::before, .nav::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border-radius: 0;
  transition: inset 460ms var(--ease-out), border-radius 460ms var(--ease-out), box-shadow 460ms var(--ease-out), background-color 460ms var(--ease-out), opacity 460ms var(--ease-out);
}
.nav::before {
  background-color: rgba(253, 248, 238, 0.92);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 -1px 0 var(--c-line);
}
.nav::after { background-image: var(--glass-sheen); opacity: 0; }
.nav--floating::before, .nav--floating::after {
  /* Wider on the brand side so the wordmark has air; tight on the button side so the pill sits concentric */
  inset: 6px calc(max(var(--gutter), (100% - var(--container)) / 2) - 8px) 6px calc(max(var(--gutter), (100% - var(--container)) / 2) - 24px);
  border-radius: var(--r-pill);
}
.nav--floating::before { background-color: var(--glass-fill); box-shadow: var(--glass-edge), var(--glass-rim), var(--glass-shadow); }
.nav--floating::after { opacity: 1; }
/* On glass over the charcoal booking band, the gold "by Rachel" deepens a step to hold 4.5:1 */
.nav .brand__by { transition: color 460ms var(--ease-out); }
.nav--floating .brand__by { color: #5F4B2E; }
.nav__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-block; text-decoration: none; white-space: nowrap; color: var(--c-charcoal); }
.nav__inner > .brand { padding-block: 11px; transition: translate 460ms var(--ease-out); }
.brand__name { font: 500 22px/1 var(--font-serif); letter-spacing: -0.01em; }
.brand__by { margin-left: 3px; font: italic 400 15px/1 var(--font-serif); color: var(--c-gold-text); }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 32px); margin-left: auto; }
.nav__links a {
  padding: 13px 0; border-bottom: 1px solid transparent;
  font: 500 var(--t-ui)/1 var(--font-sans); color: var(--c-charcoal-soft); text-decoration: none;
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--c-charcoal); border-bottom-color: var(--c-gold); }
.nav__cta { flex: none; margin-left: 8px; }
.nav__back { margin-left: auto; white-space: nowrap; }
@media (max-width: 480px) { .nav--sub .brand__by { display: none; } }
/* DOM order: brand, links, burger, cta */
.nav__burger {
  display: none; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px; margin-left: auto;
  background: transparent; border: 1px solid var(--c-line); border-radius: var(--r-pill);
  font: 500 var(--t-ui)/1 var(--font-sans); cursor: pointer;
  transition: border-color var(--d-fast) var(--ease);
}
.nav__burger:hover { border-color: var(--c-charcoal); }
.nav__burger svg { width: 16px; height: 16px; }
@media (max-width: 1040px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__burger + .nav__cta { margin-left: 12px; }
}
@media (max-width: 900px) {
  .nav__inner { min-height: 64px; }
  .nav__cta { display: none; }
  .nav--floating::before, .nav--floating::after { inset: 6px calc(var(--gutter) - 12px); }
  .nav--floating .nav__inner > .brand { translate: 6px 0; }
  .nav--floating .nav__burger { border-color: transparent; }
}

/* Mobile drawer */
.mobile-drawer { position: fixed; inset: 0; z-index: var(--z-modal); visibility: hidden; transition: visibility 0s linear 320ms; }
.mobile-drawer.is-open { visibility: visible; transition-delay: 0s; }
.mobile-drawer__backdrop { position: absolute; inset: 0; background: rgba(42, 33, 23, 0.45); opacity: 0; transition: opacity 320ms var(--ease); }
.mobile-drawer.is-open .mobile-drawer__backdrop { opacity: 1; }
.mobile-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 400px);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 16px 24px calc(24px + var(--safe-bottom));
  background: var(--c-ivory);
  transform: translateX(100%); transition: transform 320ms var(--ease);
}
.mobile-drawer.is-open .mobile-drawer__panel { transform: none; }
.mobile-drawer__head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 24px; }
.mobile-drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid var(--c-line); cursor: pointer;
}
.mobile-drawer__close svg { width: 16px; height: 16px; }
.mobile-drawer__links a {
  display: flex; align-items: center; min-height: 56px;
  border-bottom: 1px solid var(--c-line);
  font: 400 26px/1.2 var(--font-serif); color: var(--c-charcoal); text-decoration: none;
}
.mobile-drawer__cta { margin-top: 28px; }
.mobile-drawer__footer { display: grid; gap: 2px; margin-top: auto; padding-top: 28px; font-size: var(--t-meta); color: var(--c-charcoal-soft); }
.mobile-drawer__footer a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.mobile-drawer__footer span { display: inline-flex; align-items: center; min-height: 44px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { background: var(--c-ivory); border-top: 1px solid var(--c-line); padding: clamp(56px, 6vw, 88px) 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px clamp(32px, 4vw, 64px); }
/* Editorial footer (v1.4): a large wordmark and serif column titles */
.footer__grid .brand__name { font-size: clamp(30px, 1.4vw + 22px, 40px); font-weight: 400; letter-spacing: -0.02em; }
.footer__grid .brand__by { font-size: clamp(17px, 0.4vw + 15px, 20px); }
.footer__grid .label { margin-bottom: 12px; font: 400 clamp(24px, 0.6vw + 20px, 28px)/1.2 var(--font-serif); letter-spacing: -0.01em; text-transform: none; color: var(--c-charcoal); }
.plaque {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 104px; height: 104px; margin-bottom: 20px; border-radius: 50%;
  background: var(--c-cream); border: 1.5px solid var(--c-charcoal);
  box-shadow: inset 0 0 0 6px var(--c-cream), inset 0 0 0 7px var(--c-charcoal);
  font-family: var(--font-serif); line-height: 0.95; color: var(--c-charcoal);
}
.plaque__top { font-size: 15px; font-weight: 600; }
.plaque__big { font-size: 21px; font-weight: 600; }
.plaque__sub { margin-top: 4px; font-size: 8px; font-style: italic; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-gold-text); }
.footer__desc { max-width: 34ch; margin-top: 8px; font-size: 16px; color: var(--c-charcoal-soft); }
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links li { display: flex; align-items: center; min-height: 36px; font-size: var(--t-ui); color: var(--c-charcoal-soft); }
.footer__links a { display: inline-flex; align-items: center; min-height: 36px; color: inherit; text-decoration: none; }
.footer__links a:hover { color: var(--c-charcoal); text-decoration: underline; text-decoration-color: var(--c-gold); text-underline-offset: 4px; }
.footer__bottom a { color: inherit; text-underline-offset: 3px; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--c-line);
  font-size: var(--t-meta); color: var(--c-text-muted);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__links li, .footer__links a { min-height: 44px; }
}

/* ── Cancellation tiers (booking panel and policy page) ───────────────── */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.tier { padding: 4px 20px 4px 18px; border-left: 2px solid var(--c-gold); }
.tier__h { margin: 0; font: 500 19px/1.3 var(--font-serif); color: var(--c-gold-text); }
.tier__p { margin: 4px 0 0; font-size: var(--t-ui); line-height: 1.5; color: var(--c-charcoal-soft); }
@media (max-width: 600px) {
  .tiers { grid-template-columns: 1fr; gap: 8px; }
  .tier { padding: 12px 0 12px 16px; }
}

/* ── Mobile book bar (≤900px): a floating glass tray ──────────────────── */
/* Its controls are solid, so their contrast never depends on what scrolls beneath the glass. */
.bookbar {
  --bookbar-away: translateY(calc(100% + 16px + var(--safe-bottom)));
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: var(--z-elev);
  display: none; gap: 8px; max-width: 480px; margin-inline: auto; padding: 8px;
  border-radius: var(--r-pill);
  background: var(--glass-sheen), rgba(253, 248, 238, 0.66);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-rim), var(--glass-shadow);
  transform: var(--bookbar-away); transition: transform 460ms var(--ease-out);
}
.bookbar .btn { flex: 1; }
.bookbar__wa {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--c-ivory); border: 1px solid var(--c-line); color: #1E7A45;
  transition: transform 160ms var(--ease-out);
}
.bookbar__wa:active { transform: scale(0.94); }
.bookbar__wa svg { width: 24px; height: 24px; }
body.past-hero .bookbar { transform: none; }
body.at-booking .bookbar, body.cookie-open .bookbar { transform: var(--bookbar-away); }
@media (max-width: 900px) {
  .bookbar { display: flex; }
  body.has-bookbar .footer { padding-bottom: calc(104px + var(--safe-bottom)); }
}

/* Desktop WhatsApp button (hidden on mobile, where the bottom bar has it) */
.wa-fab {
  position: fixed; right: 24px; bottom: calc(24px + var(--safe-bottom)); z-index: var(--z-elev);
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff; text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(42, 33, 23, 0.45);
  transition: opacity var(--d-base) var(--ease);
}
.wa-fab svg { width: 26px; height: 26px; }
body.at-booking .wa-fab, body.at-footer .wa-fab, body.cookie-open .wa-fab { opacity: 0; pointer-events: none; }
@media (max-width: 900px) { .wa-fab { display: none; } }

/* ── Cookie note: slim, non-blocking bar ──────────────────────────────── */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-overlay);
  padding: 14px 0 calc(14px + var(--safe-bottom));
  background: var(--c-ivory); border-top: 1px solid var(--c-line);
  box-shadow: 0 -12px 32px -24px rgba(42, 33, 23, 0.35);
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--d-base) var(--ease), transform var(--d-base) var(--ease);
}
.cookie[hidden] { display: none; }
.cookie.is-visible { opacity: 1; transform: none; }
.cookie__inner { display: flex; align-items: center; gap: 16px 32px; }
.cookie__text { flex: 1; font-size: var(--t-meta); line-height: 1.5; color: var(--c-charcoal-soft); }
.cookie__title { margin-right: 6px; font: italic 500 15px/1 var(--font-serif); color: var(--c-charcoal); }
.cookie__text a { color: var(--c-gold-text); text-decoration: underline; text-underline-offset: 3px; }
.cookie__actions { display: flex; flex: none; gap: 8px; }
.cookie__actions .btn { min-height: 44px; padding: 0 18px; font-size: var(--t-meta); }
@media (max-width: 700px) {
  .cookie__inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .cookie__text { font-size: var(--t-small); }
  .cookie__actions .btn { flex: 1; }
}

/* ── Reveal: content comes into focus once, as it first enters view ─────── */
/* Hidden start states apply only after site.js has its observer running (html.reveal-ready) and only
   when motion is welcome, so content is never hidden without JS or under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  /* The transition lives on the revealed state only, so hiding at setup is instant (no fade-out) */
  .reveal-ready [data-reveal].is-revealed {
    transition: opacity 900ms var(--ease-out), filter 900ms var(--ease-out), translate 900ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal-ready [data-reveal]:not(.is-revealed) { opacity: 0; filter: blur(6px); translate: 0 14px; }
}
@media print { [data-reveal] { opacity: 1 !important; filter: none !important; translate: none !important; } }

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
  }
  .btn:active, .bookbar__wa:active { transform: none; }
  .nav--floating .nav__inner > .brand { translate: none; }
}

/* ── Reduced transparency / more contrast: glass becomes a solid surface ── */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .nav::before, .nav--floating::before { background-color: var(--c-ivory); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav::after { display: none; }
  .bookbar { background: var(--c-ivory); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .nav--floating::before, .bookbar { box-shadow: 0 0 0 1px var(--c-charcoal), var(--glass-shadow); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav--floating::before { background-color: rgba(253, 248, 238, 0.96); }
  .bookbar { background: rgba(253, 248, 238, 0.96); }
}
