/* Theme: DM Sans, beige + white surfaces, warm brown/black text, and one
   photo band (water photo under a dark warm overlay) at the top of every page. */

:root {
  --bg: #eaddca;
  --surface: #ffffff;
  --ink: #2a211c;
  --ink-soft: #4a3d35;
  --muted: #6b5b4f;
  --line: #e6dacb;
  --line-on-bg: rgba(42, 33, 28, 0.16);
  --brand: #2a211c;          /* selected states, primary button */
  --tint: #f5eee4;           /* soft fill on white (open calendar days) */
  --avatar-fill: #d8c6ad;
  --error: #a8322a;
  --radius: 14px;
  --hero-h: 268px;           /* one photo-band height on every page and state */
  --body: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --heading: var(--body);
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: none;  /* keep DM Sans's wider text cut at display sizes */
}

button { font: inherit; color: inherit; }

[hidden] { display: none !important; }

/* -- photo band ---------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: var(--hero-h);
  padding: 14px 16px 22px;
  background: #4b4038 url("/static/img/hero.jpg") center 40% / cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(38, 31, 25, 0.62), rgba(38, 31, 25, 0.5));
}

/* content sits centered in the space under the top bar */
.hero-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 10px;
}

@media (min-width: 640px) {
  :root { --hero-h: 300px; }
}

.kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(30px, 7.5vw, 48px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-sub {
  max-width: 34ch;
  margin: 10px auto 0;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: balance;
}

/* photo to the left of the name */
.hero-person {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  text-align: left;
}

.hero h1.provider-name { margin-top: 0; font-size: clamp(28px, 7vw, 40px); line-height: 1.1; }

.provider-credentials {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.provider-location {
  margin-top: 14px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
}

/* one row, always, so the band keeps its height */
.location-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

/* city over branch ("Dallas" / "Lakewood at Hillside") */
.location-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.2;
  color: #fff;
  cursor: pointer;
}

.chip-city,
.chip-branch {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chip-city { font-size: 11px; font-weight: 500; opacity: 0.8; }
.chip-branch { font-size: 13px; }

@media (min-width: 640px) {
  .location-chip { padding: 6px 18px; }
  .chip-city { font-size: 12px; }
  .chip-branch { font-size: 14px; }
}

@media (hover: hover) {
  .location-chip:hover { background: rgba(255, 255, 255, 0.18); }
}

.location-chip[aria-pressed="true"] {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

/* While booking the band stays exactly the same; "← All treatments" takes
   the breadcrumb's place, so every line under the band stays put. */
.is-booking .crumb { display: none; }

/* -- avatars ------------------------------------------------------------- */

.avatar {
  display: block;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--avatar-fill);
}

.avatar-lg {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

@media (min-width: 640px) {
  .avatar-lg { width: 76px; height: 76px; }
}

.avatar-xs { width: 36px; height: 36px; }
.avatar-xs.avatar-initials { font-size: 14px; font-weight: 500; }

.avatar-sm { width: 64px; height: 64px; }

.avatar-initials {
  display: grid;
  place-items: center;
  font-weight: 400;
  color: var(--ink);
}

.avatar-lg.avatar-initials { font-size: 24px; }
.avatar-sm.avatar-initials { font-size: 22px; }

/* -- page body ----------------------------------------------------------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 56px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.section-title {
  margin: 28px 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-soft);
}

.step-title {
  margin-bottom: 18px;
  font-size: clamp(26px, 6vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.step-title + .location-services > .section-title:first-child { margin-top: 0; }

.page > section:first-child > .section-title:first-child,
.location-group:first-child .section-title,
.location-services > .section-title:first-child { margin-top: 0; }

/* directory */

.location-group + .location-group { margin-top: 38px; }

.location-group .section-title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-on-bg);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.provider-list,
.service-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.provider-card {
  display: flex;
  align-items: center;
  border-radius: var(--radius);
  background: var(--surface);
}

.provider-card-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.provider-card-text { display: grid; min-width: 0; }

.provider-card-name {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
}

.provider-card-meta {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

/* provider services */

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) {
  .service-row:hover { border-color: var(--line-on-bg); }
}

.service-row:active { background: var(--tint); }

.service-text { display: grid; min-width: 0; }

.service-name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.service-meta {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

.service-arrow {
  flex: none;
  font-size: 20px;
  color: var(--muted);
}

/* booking card */

.booking-card {
  scroll-margin-top: 72px;  /* clear of the pinned context bar */
  padding: 18px clamp(16px, 4vw, 30px) 26px;
  border-radius: 18px;
  background: var(--surface);
}

/* "← All treatments": the breadcrumb's twin (same box, same place) */
.back-link {
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.booking-service {
  margin-top: 0;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.booking-service-meta {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}



/* -- misc ---------------------------------------------------------------- */

.notice {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
}

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px max(40px, env(safe-area-inset-bottom));
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}

.site-footer p + p { margin-top: 4px; }
.site-footer a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.hero a:focus-visible,
.hero button:focus-visible { outline-color: #fff; }

/* demo bookings log */

.log-table { display: grid; gap: 10px; }

.log-entry {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
}

.log-entry h3 { font-size: 17px; font-weight: 500; }
.log-entry p { margin-top: 2px; font-size: 14px; color: var(--muted); }

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line-on-bg);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.pill-link:hover { border-color: var(--ink); }

/* -- brand logo + platform comparison link -------------------------------- */

/* the logo is the way home: padded to a 44px+ tap target without moving it */
.brand-home {
  display: block;
  width: fit-content;
  margin: -13px auto;
  padding: 13px 14px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

@media (hover: hover) {
  .brand-home:hover { background: rgba(20, 16, 13, 0.25); }
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(18px, 4.2vw, 26px);
  margin: 0 auto;
  filter: brightness(0) invert(1);  /* dark transparent PNG -> white on the band */
}

/* platform booking page (left) and the other brands' directories (right) */
.hero-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.hero-bar-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(20, 16, 13, 0.28);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.hero-link:hover { background: rgba(20, 16, 13, 0.45); border-color: #fff; }

@media (max-width: 520px) {
  .hero-link .wide { display: none; }
}

/* -- breadcrumbs --------------------------------------------------------- */

.crumb,
.back-link {
  display: block;
  width: fit-content;
  padding: 8px 0;
  margin: -8px 0 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}

.crumb:hover,
.back-link:hover { color: var(--ink); }

.location-group .section-title a { color: inherit; text-decoration: none; }
.location-group .section-title a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* -- visit builder (several services back-to-back) ------------------------ */

.visit-items {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
  counter-reset: visit;
}

.visit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tint);
  counter-increment: visit;
}

.visit-item::before {
  content: counter(visit);
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.visit-item-text { display: grid; flex: 1; min-width: 0; }
.visit-item-name { font-size: 16px; font-weight: 500; }
.visit-item-meta { font-size: 14px; color: var(--muted); }

.visit-item-remove,
.add-cancel {
  flex: none;
  min-height: 36px;
  padding: 4px 10px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.visit-item-remove:hover,
.add-cancel:hover { color: var(--ink); }

/* add a service / book with someone else */
.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.visit-action {
  flex: 1 1 0;
  white-space: nowrap;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.visit-action[aria-expanded="true"] { border-color: var(--ink); background: var(--tint); }

@media (hover: hover) {
  .visit-action:hover { border-color: var(--ink-soft); }
}

.switch-list { display: grid; gap: 6px; list-style: none; }

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tint);
  color: inherit;
  text-decoration: none;
}

.switch-row:active { background: var(--line); }

@media (hover: hover) {
  .switch-row:hover { box-shadow: inset 0 0 0 1px var(--ink-soft); }
}

.switch-row-text { display: grid; flex: 1; min-width: 0; }
.switch-row-name { font-size: 16px; font-weight: 500; line-height: 1.3; }
.switch-row-meta { font-size: 14px; color: var(--muted); }

/* -- pinned context bar: who, where, what, once the band scrolls away ----- */

.context-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 20px rgba(42, 33, 28, 0.18);
  transform: translateY(-110%);
  visibility: hidden;
}

.context-bar.is-visible { transform: none; visibility: visible; }

@media (prefers-reduced-motion: no-preference) {
  .context-bar {
    transition: transform 220ms cubic-bezier(0.25, 1, 0.5, 1), visibility 0s linear 220ms;
  }
  .context-bar.is-visible {
    transition: transform 220ms cubic-bezier(0.25, 1, 0.5, 1), visibility 0s;
  }
}

.context-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 688px;
  margin: 0 auto;
}

.context-bar .avatar-xs { border: 1.5px solid rgba(255, 255, 255, 0.85); }

.context-bar-text { min-width: 0; }

.context-bar-who,
.context-bar-what {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.context-bar-who strong { font-weight: 600; }
.context-bar-who span,
.context-bar-what { color: rgba(255, 255, 255, 0.82); }

.option-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.add-title { font-size: 14px; line-height: 1.45; color: var(--muted); }

.option-panel select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
}

/* before / after the treatment the visit started with */
.add-order { min-width: 0; padding: 0; border: 0; }

.add-order-legend {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.add-order-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.add-order-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
}

.add-order-option:has(input:checked) { border-color: var(--ink); background: var(--tint); }
.add-order-option input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.add-order-option span { min-width: 0; overflow-wrap: anywhere; }

.add-actions { display: flex; align-items: center; gap: 12px; }

.add-confirm {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  cursor: pointer;
}



.crumb + .location-group .section-title { margin-top: 0; }
