/*
 * Lavendr hosted salon sites.
 *
 * One stylesheet for every site. Colors come from nine custom properties that
 * HostedSites::ColorScheme derives from two per-salon hex values and writes
 * into a <style> block in <head> — so there is no per-site CSS, ever.
 *
 * Values here are transcribed from the design mockups (Salon Templates.dc.html).
 * The `hs-` prefix keeps these away from the app's Bootstrap styles.
 */

/* ---------- fonts ---------- */

/*
 * Variable fonts: one file per family covers every weight we use, so the whole
 * type system is three requests and ~96KB. font-display: swap means text is
 * readable in a fallback face immediately rather than invisible while loading.
 */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("/fonts/mulish.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- foundations ---------- */

:root {
  --hs-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --hs-sans: "Mulish", -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
  --hs-system: -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;

  --hs-gutter: 44px;
  --hs-section-y: 82px;
  --hs-max: 1180px;

  /* Fallbacks so the page is still readable if the per-site block is missing. */
  --deep: #402c3b;
  --accent: #a78bb5;
  --page-bg: #f9f4f2;
  --surface: #ffffff;
  --ink: #402c3b;
  --muted: #8e7f88;
  --border: #e1d9da;
  --on-deep: #f2e5df;
  --footer-bg: #2b1927;
  --panel: #f4eeec;
  --accent-text: #7f658d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--hs-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Available to screen readers, invisible on screen. */
.hs-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Visible focus everywhere; salons' customers include keyboard users. */
a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- shared pieces ---------- */

/* --accent-text, not --accent: the brand accent is tuned for button fills and
   is usually too light to read at 12px. */
.hs-eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.hs-section-title {
  margin: 0;
  font-family: var(--hs-serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hs-section-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.hs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.hs-btn-primary {
  background: var(--deep);
  color: var(--on-deep);
}

.hs-btn-primary:hover {
  opacity: 0.88;
}

.hs-btn-primary:active {
  transform: translateY(1px);
}

.hs-btn-quiet {
  color: var(--ink);
  border: 1px solid var(--border);
  background: transparent;
}

.hs-btn-quiet:hover {
  border-color: var(--accent);
}

/*
 * Absent photos should read as a deliberate blank panel, never as breakage.
 * Tinted a step off the page background — matching it exactly leaves a large
 * invisible rectangle, which reads as a broken layout rather than a quiet one.
 */
.hs-image-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 240px;
}

.hs-image {
  border-radius: 4px;
  object-fit: cover;
}

/* ---------- promo ---------- */

.hs-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 11px 20px;
  background: var(--deep);
  color: var(--on-deep);
  font-size: 13px;
  text-align: center;
}

.hs-promo a {
  color: var(--on-deep);
  font-weight: 600;
}

/* ---------- nav ---------- */

.hs-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--hs-gutter);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

/* gap, not a literal space: the flex container needed for the 44px tap target
   collapses whitespace between the wordmark and its accent. */
.hs-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  min-height: 44px;
  font-family: var(--hs-serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.hs-logo em {
  font-style: italic;
  color: var(--accent);
}

.hs-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

/*
 * 44px minimum in both directions on every tap target, including on a
 * mouse-driven desktop. min-width matters for short labels like "Visit".
 */
.hs-nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 6px;
  text-decoration: none;
}

.hs-nav-links a:not(.hs-btn):hover {
  color: var(--accent-text);
}

/* Hamburger, phones only. A <details> element keeps this JavaScript-free. */
.hs-menu {
  display: none;
  position: relative;
}

.hs-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  cursor: pointer;
}

.hs-menu summary::-webkit-details-marker {
  display: none;
}

.hs-menu-icon,
.hs-menu-icon::before,
.hs-menu-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.hs-menu-icon {
  position: relative;
}

.hs-menu-icon::before,
.hs-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.hs-menu-icon::before {
  top: -7px;
}

.hs-menu-icon::after {
  top: 7px;
}

.hs-menu-sheet {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 210px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
}

.hs-menu-sheet a {
  padding: 13px 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
}

.hs-menu-sheet a:hover {
  background: var(--page-bg);
}

.hs-menu-book {
  margin-top: 6px;
  justify-content: center;
}

.hs-menu-book:hover {
  background: var(--deep);
}

/* ---------- hero ---------- */

.hs-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: var(--hs-max);
  margin: 0 auto;
  padding: 76px var(--hs-gutter);
  min-height: 520px;
}

.hs-hero-headline {
  margin: 0 0 20px;
  font-family: var(--hs-serif);
  font-size: 62px;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.hs-headline-accent {
  font-style: italic;
  color: var(--accent);
}

.hs-hero-subhead {
  margin: 0 0 28px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 16px;
}

.hs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hs-hero-image {
  min-height: 520px;
  height: 100%;
}

/* ---------- services ---------- */

.hs-services {
  max-width: var(--hs-max);
  margin: 0 auto;
  padding: var(--hs-section-y) var(--hs-gutter);
}

.hs-section-head {
  margin-bottom: 44px;
}

.hs-services-grid {
  display: grid;
  gap: 40px 48px;
}

/* Price-free long menus fit three across; priced lists need the room for two. */
.hs-services-menu .hs-services-grid {
  grid-template-columns: repeat(3, 1fr);
}

.hs-services-priced .hs-services-grid {
  grid-template-columns: repeat(2, 1fr);
}

.hs-category-name {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--hs-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.hs-category-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: 15px;
}

.hs-item-note {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.hs-item-price {
  color: var(--muted);
  white-space: nowrap;
}

/*
 * On desktop there is room for the whole menu, so the disclosure is forced open
 * and its summary hidden. Phones get the collapsed version — see the mobile
 * block. Marking it open here rather than hiding categories keeps the full menu
 * in the HTML for search engines either way.
 */
/* Every category is a direct child of one grid, so desktop shows them all and
   hides the reveal control entirely. Phones override these. */
.hs-more-toggle,
.hs-more-menu,
.hs-more-close {
  display: none;
}

/* ---------- gallery ---------- */

.hs-gallery {
  max-width: var(--hs-max);
  margin: 0 auto;
  padding: 0 var(--hs-gutter) var(--hs-section-y);
}

.hs-gallery .hs-section-title {
  margin-bottom: 28px;
}

.hs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}

.hs-gallery-tile {
  min-height: 0;
  height: 100%;
  margin: 0;
}

.hs-gallery-tile-wide {
  grid-column: span 2;
}

/* ---------- reviews ---------- */

.hs-reviews {
  padding: var(--hs-section-y) var(--hs-gutter);
  background: var(--deep);
  color: var(--on-deep);
  text-align: center;
}

.hs-reviews .hs-eyebrow {
  color: var(--on-deep);
  opacity: 0.75;
}

/*
 * 24px, because WCAG's large-text allowance is 18.66px *and bold*, or 24px at
 * any weight. These are 400, so the smaller threshold never applied and 20px
 * still owed 4.5:1 — which the accent does not clear against the dark band.
 */
.hs-stars {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 24px;
  letter-spacing: 4px;
}

.hs-quote {
  margin: 0 auto;
  max-width: 760px;
}

.hs-quote-text {
  margin: 0 0 18px;
  font-family: var(--hs-serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1.4;
}

.hs-quote-author {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hs-reviews-grid .hs-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  max-width: var(--hs-max);
  margin: 0 auto;
}

.hs-reviews-grid .hs-quote-text {
  font-size: 22px;
}

/* ---------- about ---------- */

.hs-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: var(--hs-max);
  margin: 0 auto;
  padding: var(--hs-section-y) var(--hs-gutter);
}

.hs-about-image {
  min-height: 420px;
  height: 100%;
}

.hs-about-body {
  margin: 16px 0 0;
  color: var(--muted);
}

.hs-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin: 28px 0 0;
}

.hs-stat {
  margin: 0;
}

/* --accent-text: a pale accent at 40px still falls under the 3:1 large-text
   floor, and the figure is the whole point of a stat. */
.hs-stat-value {
  font-family: var(--hs-serif);
  font-size: 40px;
  color: var(--accent-text);
  line-height: 1;
}

.hs-stat-label {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- visit ---------- */

.hs-visit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--border);
}

.hs-visit-copy {
  padding: 70px var(--hs-gutter);
  max-width: 620px;
  margin-left: auto;
}

.hs-visit-details {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 30px 0;
}

.hs-visit-block p {
  margin: 0;
}

/* Phone and email are the two things a customer taps from a phone. */
.hs-visit-block a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.hs-visit-block a:hover {
  text-decoration-color: var(--accent);
}

.hs-visit-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hs-visit-note {
  color: var(--muted);
  font-size: 14px;
}

.hs-hours-days {
  display: inline-block;
  min-width: 96px;
  font-weight: 500;
}

.hs-map {
  width: 100%;
  min-height: 440px;
  border: 0;
  border-left: 1px solid var(--border);
}

/* ---------- footer ---------- */

.hs-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 44px var(--hs-gutter);
  background: var(--footer-bg);
  color: var(--on-deep);
  font-size: 13px;
}

.hs-footer-name {
  font-family: var(--hs-serif);
  font-size: 20px;
}

.hs-footer-social {
  display: flex;
  gap: 12px;
}

.hs-footer-social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
}

.hs-footer-meta {
  opacity: 0.75;
}

/* ---------- sticky book bar (phones only) ---------- */

.hs-book-bar {
  display: none;
}

/* ---------- phones ---------- */

@media (max-width: 860px) {
  :root {
    --hs-gutter: 20px;
    --hs-section-y: 56px;
  }

  .hs-nav-links {
    display: none;
  }

  .hs-menu {
    display: block;
  }

  .hs-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 48px;
    min-height: 0;
    text-align: center;
  }

  .hs-hero-headline {
    font-size: 40px;
  }

  .hs-hero-subhead {
    margin-inline: auto;
  }

  .hs-hero-actions {
    justify-content: center;
  }

  .hs-hero-image {
    min-height: 320px;
    order: 2;
  }

  /*
   * A real photo is worth the scroll on a phone; an empty panel is not. Salons
   * without photos get a tighter hero instead of 320px of nothing between the
   * Book button and the menu. Desktop keeps the panel, where it balances the
   * split layout rather than delaying content.
   */
  .hs-hero > .hs-image-panel {
    display: none;
  }

  .hs-section-title {
    font-size: 32px;
  }

  .hs-services-menu .hs-services-grid,
  .hs-services-priced .hs-services-grid {
    grid-template-columns: 1fr;
  }

  /*
   * Eight stacked categories is several screens of scrolling before a visitor
   * reaches anything else, so phones see two and reveal the rest on demand.
   * The categories stay in one grid — only their visibility changes — so the
   * desktop columns are unaffected.
   */
  .hs-category-extra {
    display: none;
  }

  .hs-more-toggle:checked ~ .hs-services-grid .hs-category-extra {
    display: block;
  }

  .hs-more-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  /* Keyboard users get the same focus ring as every other control, since the
     checkbox itself is off-screen rather than display:none. */
  .hs-more-toggle:focus-visible ~ .hs-more-menu {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }

  .hs-more-toggle:checked ~ .hs-more-menu .hs-more-open,
  .hs-more-menu .hs-more-close {
    display: none;
  }

  .hs-more-toggle:checked ~ .hs-more-menu .hs-more-close {
    display: inline;
  }

  .hs-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .hs-quote-text {
    font-size: 22px;
  }

  .hs-about,
  .hs-visit {
    grid-template-columns: 1fr;
  }

  .hs-about-image {
    min-height: 280px;
  }

  .hs-visit-copy {
    padding: 48px var(--hs-gutter);
    margin-left: 0;
  }

  .hs-map {
    min-height: 300px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  /* Book and call stay in thumb reach the whole way down the page. */
  .hs-book-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 22px));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--border);
  }

  .hs-book-bar-cta {
    flex: 1;
  }

  .hs-book-bar-call {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--ink);
  }

  /* Keep the sticky bar from covering the last of the footer. */
  .hs-footer {
    padding-bottom: 96px;
  }
}

/* ---------- tablets ---------- */

/*
 * Between these widths a single column wastes most of the screen — an iPad in
 * portrait was showing the phone layout at 768px wide. Tablets get the
 * two-column structure back, but keep the phone's touch affordances: they are
 * touch devices, so the sticky Book bar and the collapsed menu still earn
 * their place, and the hero photo still stacks rather than halving.
 */
@media (min-width: 620px) and (max-width: 860px) {
  :root {
    --hs-gutter: 40px;
    --hs-section-y: 68px;
  }

  .hs-services-menu .hs-services-grid,
  .hs-services-priced .hs-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hs-visit {
    grid-template-columns: 1fr 1fr;
  }

  .hs-visit-copy {
    padding: 56px var(--hs-gutter);
  }

  .hs-map {
    min-height: 100%;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .hs-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 170px;
  }

  .hs-hero-headline {
    font-size: 52px;
  }

  .hs-section-title {
    font-size: 38px;
  }

  /* Two categories still preview, but they now sit side by side, so the
     disclosure does not need to span the full width. */
  .hs-more-menu > summary {
    max-width: 320px;
    margin-inline: auto;
  }
}

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