/* spa_menu.css - guest spa menu, loaded by spa_menu.php.
 *
 * Every size is in rem so the A- / A+ control (which sets the root font size)
 * scales the whole menu. Light and dark themes follow the phone's setting until
 * the guest picks one; the choice is stored per device (see spa_menu.js).
 */
:root {
  --paper: #f8f5ef;
  --surface: #fffdf9;
  --ink: #1d2826;
  --body: #3d4a47;
  --muted: #6f7875;
  --rule: #e3dcd0;
  --rule-strong: #cbbfad;
  --accent: #1f5f5b;
  --accent-soft: #e4eeea;
  --brass: #9c7a45;
  --chip: #efe9de;
  --focus: #1f5f5b;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
:root[data-brand="island"] { --accent: #9e3f48; --accent-soft: #f6e6e4; --focus: #9e3f48; }

:root[data-theme="dark"] {
  --paper: #111816;
  --surface: #172120;
  --ink: #efe8dc;
  --body: #cfc8bc;
  --muted: #9aa29d;
  --rule: #2a3533;
  --rule-strong: #3d4a47;
  --accent: #86c2b6;
  --accent-soft: #1f302d;
  --brass: #c9a86e;
  --chip: #1d2927;
  --focus: #86c2b6;
  color-scheme: dark;
}
:root[data-theme="dark"][data-brand="island"] { --accent: #e8a0a2; --accent-soft: #33201f; --focus: #e8a0a2; }

/* Text size steps, set on <html data-size> by app.js. */
html { font-size: 100%; }
html[data-size="1"] { font-size: 112.5%; }
html[data-size="2"] { font-size: 125%; }
html[data-size="3"] { font-size: 140%; }
html[data-size="4"] { font-size: 160%; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: .5rem .8rem; }
.skip:focus { left: 8px; }

/* Spa logo: one white artwork file used as a mask, so it takes any colour. */
.logo { display: block; background: currentColor; -webkit-print-color-adjust: exact; print-color-adjust: exact; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
:root { --logo: url(img/tranquility.png); --logo-ratio: 900 / 201; --logo-w: 134px; }
:root[data-brand="island"] { --logo: url(img/island-spa.png); --logo-ratio: 900 / 390; --logo-w: 69px; }

/* ------------------------------------------------------------------ toolbar */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
/* The toolbar is sized in px, not rem: it must not grow when the guest makes the text larger. */
.bar-in { max-width: 58rem; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; }
.bar .logo { color: var(--ink); height: 30px; width: var(--logo-w); flex: 0 1 auto; min-width: 0; margin-right: auto; opacity: 0; transition: opacity .3s ease; }
.bar.scrolled .logo { opacity: 1; }
.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tool-group { display: flex; border: 1px solid var(--rule-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.tool {
  appearance: none; border: 0; background: none; cursor: pointer;
  min-width: 44px; height: 40px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: .01em;
}
.tool-group .tool + .tool { border-left: 1px solid var(--rule); }
.tool:hover { background: var(--accent-soft); }
.tool:disabled { opacity: .35; cursor: default; background: none; }
.tool .a-small { font: 500 15px/1 var(--serif); }
.tool .a-large { font: 500 22px/1 var(--serif); }
.tool.theme { border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); }
.tool svg { width: 17px; height: 17px; flex: none; }
.tool .icon-sun { display: none; }
:root[data-theme="dark"] .tool .icon-sun { display: block; }
:root[data-theme="dark"] .tool .icon-moon { display: none; }

/* --------------------------------------------------------------------- hero */
.hero { position: relative; min-height: min(68svh, 36rem); display: grid; align-items: end; overflow: hidden; background: #1d2826; color: #fff; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 16, 15, .05) 30%, rgba(10, 16, 15, .72) 100%); }
.hero-text { position: relative; z-index: 1; width: 100%; max-width: 58rem; margin: 0 auto; padding: 2rem 1.25rem 2.25rem; text-align: center; }
.hero .logo { color: #fff; width: min(17rem, 70%); aspect-ratio: var(--logo-ratio); margin: 0 auto; filter: drop-shadow(0 1px 12px rgba(0, 0, 0, .35)); }
:root[data-brand="island"] .hero .logo { width: min(14rem, 60%); }
.hero h1 { margin: 1.1rem 0 0; font-weight: 400; }
.hero h1 .rn { display: block; font: 500 .78rem/1.4 var(--sans); letter-spacing: .28em; text-transform: uppercase; }
.hero h1 .rn::before { content: ""; display: block; width: 2.5rem; height: 1px; margin: 0 auto .9rem; background: rgba(255, 255, 255, .7); }
.hero h1 .sm { display: block; margin-top: .3rem; font: italic 500 1.6rem/1.2 var(--serif); letter-spacing: .01em; }

/* ----------------------------------------------------------- category nav */
.cats { position: sticky; top: 56px; z-index: 15; background: var(--paper); border-bottom: 1px solid var(--rule); }
.cats-in { max-width: 58rem; margin: 0 auto; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding: .65rem 1rem; scroll-padding-inline: 1rem; }
.cats-in::-webkit-scrollbar { display: none; }
.cats-in.more-right { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); mask: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); }
.cats a {
  flex: none; padding: .45rem .9rem; border-radius: 999px; background: var(--chip);
  color: var(--body); text-decoration: none; font-size: .875rem; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent; transition: background-color .2s ease, color .2s ease;
}
.cats a:hover { color: var(--ink); border-color: var(--rule-strong); }
.cats a[aria-current="true"] { background: var(--accent); color: var(--paper); }

/* ------------------------------------------------------------------- search */
.find { max-width: 58rem; margin: 0 auto; padding: 1.75rem 1rem 0; }
.find label { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.find-box { position: relative; }
.find input {
  width: 100%; height: 3rem; padding: 0 2.75rem 0 1rem;
  font: 400 1rem/1 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: .25rem;
}
.find input::placeholder { color: var(--muted); }
.find .clear { position: absolute; right: .25rem; top: .25rem; width: 2.5rem; height: 2.5rem; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.find .clear[hidden] { display: none; }
.no-match { max-width: 58rem; margin: 2rem auto 0; padding: 0 1rem; font: italic 500 1.35rem/1.4 var(--serif); color: var(--muted); text-align: center; }

/* --------------------------------------------------------------- the menu */
main { display: block; }
.menu { max-width: 58rem; margin: 0 auto; padding: .5rem 1rem 3rem; }
.category { padding-top: 3rem; scroll-margin-top: 7rem; }
.cat-head { text-align: center; margin-bottom: 1.5rem; }
.cat-head .num { display: block; font: 500 .75rem/1 var(--sans); letter-spacing: .3em; color: var(--brass); margin-bottom: .6rem; }
.cat-head h2 { margin: 0; font: 500 2.1rem/1.1 var(--serif); color: var(--ink); letter-spacing: -.005em; }
.cat-head::after { content: ""; display: block; width: 3rem; height: 1px; margin: 1rem auto 0; background: var(--brass); }

.treatments { list-style: none; margin: 0; padding: 0; }
.tr { padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.tr:first-child { border-top: 0; }
.tr h3 { margin: 0; font: 600 1.45rem/1.2 var(--serif); color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.opt { display: inline-flex; align-items: baseline; gap: .55rem; padding: .3rem .75rem; border-radius: 999px; background: var(--accent-soft); font-size: .9rem; }
.opt .d { color: var(--muted); }
.opt .p { color: var(--accent); font-weight: 600; letter-spacing: .01em; }
.tr .desc { margin: .7rem 0 0; color: var(--body); font-size: 1rem; max-width: 40rem; }

/* Price-only categories (nails, waxing, hair): classic dotted-leader list. */
.prices { list-style: none; margin: 0 auto; padding: 0; max-width: 40rem; }
.prices li { display: flex; align-items: baseline; gap: .6rem; padding: .7rem 0; }
.prices .n { color: var(--ink); font-size: 1.02rem; min-width: 0; overflow-wrap: break-word; }
.prices .lead { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted var(--rule-strong); transform: translateY(-.3rem); }
.prices .p { color: var(--accent); font-weight: 600; white-space: nowrap; }

@media (min-width: 46rem) {
  .tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 2rem; align-items: start; }
  .tr h3 { grid-column: 1; }
  .tr .opts { grid-column: 2; grid-row: 1 / span 2; margin: .2rem 0 0; flex-direction: column; align-items: flex-end; }
  .tr .desc { grid-column: 1; }
  .cat-head h2 { font-size: 2.5rem; }
}

/* ------------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--rule); background: var(--surface); text-align: center; padding: 2.5rem 1rem calc(2.5rem + env(safe-area-inset-bottom)); }
.foot .logo { color: var(--ink); width: 11rem; aspect-ratio: var(--logo-ratio); margin: 0 auto; opacity: .85; }
:root[data-brand="island"] .foot .logo { width: 8.5rem; }
.foot p { margin: 1rem 0 0; font-size: .875rem; color: var(--muted); }
.top-link { display: inline-block; margin-top: 1.25rem; font-size: .875rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* -------------------------------------------------------------------- print */
@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --body: #222; --muted: #555; --accent: #000; --accent-soft: #fff; color-scheme: light; }
  html { font-size: 11pt !important; }
  .bar, .cats, .find, .no-match, .top-link, .hero img, .hero::after { display: none !important; }
  .hero { min-height: 0; background: none; color: #000; }
  .hero .logo { color: #000; filter: none; }
  .hero h1 .rn::before { background: #000; }
  .category { break-inside: auto; padding-top: 1.5rem; }
  .tr, .prices li { break-inside: avoid; }
  .opt { padding: 0; }
}
