/* Public master page (/m/{slug}) — standalone, mobile-first.
   Intentionally independent of the cabinet design-system stylesheet: this page
   is served to the open web and must stay light. */
:root {
  /* Aligned to the cabinet design system (rose / warm beige) so the public
     master page reads as the SAME brand as the landing + bot. The stylesheet
     stays structurally independent and light per the public-page brief — only
     the token VALUES are unified with the cabinet. */
  --bg: #efe9e3;
  --card: #ffffff;
  --ink: #2a2226;
  --muted: #6e5d62;
  --line: #ece5dd;
  --brand: #9d5a6c;       /* dusty mauve / rose — was copper #b07a4f */
  --brand-hi: #b97a8c;
  --brand-ink: #fff;
  --rose-soft: #f3e4e8;   /* ring / pill fill around the hero portrait */
  --rose-softer: #faf1f4; /* chip fill */
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
  --shadow-photo: 0 14px 34px rgba(120,60,80,.20), 0 4px 10px rgba(40,25,30,.10);
  --polaroid-shadow: 0 10px 20px rgba(40,30,20,.18), 0 2px 6px rgba(40,30,20,.1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Warm "tabletop" wash so the scattered polaroids read as pinned photos. */
  background:
    radial-gradient(ellipse at 20% 10%, #f4e6d3 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, #f0dde2 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
/* Content sits above the decorative polaroid layer; flex column so phones can
   reorder the gallery below the reviews (see responsive rules). */
.page { position: relative; z-index: 10; display: flex; flex-direction: column;
        max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
.muted { color: var(--muted); }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }

/* Centred "portrait card": one big circular photo, then name / rating / chips /
   address / contacts / CTA stacked and centred under it. (Redesign 2026-07-09 —
   the scattered polaroid gallery around it is intentionally left as-is.) */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  background: var(--card);
  border-radius: 22px;
  padding: 30px 22px 26px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.avatar {
  /* Big — roughly the height of a portfolio tile (owner: «на высоту плитки»).
     Explicit square width+height (not aspect-ratio) — a flex item with
     aspect-ratio mis-sizes on iOS Safari. */
  width: min(260px, 72vw); height: min(260px, 72vw);
  border-radius: 50%;
  object-fit: cover;
  /* white gap + soft rose ring around the portrait */
  box-shadow: 0 0 0 5px var(--card), 0 0 0 9px var(--rose-soft), var(--shadow-photo);
  margin-bottom: 20px;
}
.avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--brand-ink);
  font-size: 4rem; font-weight: 600; text-transform: uppercase;
}
/* Tap the round photo → view it large (see .avatar-zoom). */
.avatar--zoom { cursor: zoom-in; }
.avatar--zoom:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.avatar-zoom {
  display: none; position: fixed; inset: 0; z-index: 60;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(20, 14, 16, .82); cursor: zoom-out;
}
.avatar-zoom.is-open { display: flex; }
.avatar-zoom img {
  max-width: min(92vw, 560px); max-height: 88vh;
  border-radius: 14px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.hero h1 {
  font-size: 1.95rem; margin: 0 0 2px;
  overflow-wrap: break-word; word-break: break-word; text-wrap: balance;
}
.hero__salon { margin: 0 0 12px; }
.addr {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .95rem; color: var(--muted); margin: 0 0 18px;
}
.addr .pin { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; }
/* When the master has map coordinates the address is a link that scrolls to the
   map section below — give it a tap affordance without changing its look. */
.addr--link {
  text-decoration: none; cursor: pointer; padding: 4px 8px; border-radius: 999px;
  transition: color .15s, background .15s;
}
.addr--link:hover { color: var(--brand); background: var(--rose-softer); }
.addr--link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Extra-specialisation chips under the name (centred pills). */
.hero__tags {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 7px; margin: 0 0 12px; max-width: 520px;
}
.hero__tag {
  display: inline-block; padding: 4px 13px; border-radius: 999px;
  background: var(--rose-softer); border: 1px solid var(--rose-soft);
  color: #6c4a53; font-size: .85rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.bio { margin: 0; white-space: pre-line; }

.services { list-style: none; margin: 0; padding: 0; }
.service {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.service:last-child { border-bottom: 0; }
.service__main { display: flex; flex-direction: column; }
.service__name { font-weight: 600; }
.service__desc { font-size: .85rem; }
/* price + Book button on ONE line, right-aligned (not stacked). */
.service__meta { display: flex; flex-direction: row; align-items: center; gap: 12px; white-space: nowrap; }
.service__price { font-weight: 600; }

/* ── Polaroids ──────────────────────────────────────────────────────────
   Shared frame look, used both for the decorative background scatter and the
   gallery stack. */
.polaroid {
  background: #fdfaf5;
  padding: 12px 12px 36px;
  box-shadow: var(--polaroid-shadow);
  border-radius: 2px;
  cursor: pointer;
  will-change: transform, filter;
  /* overshoot lift; z-index drops back only after the visual settles (0.3s) */
  transition: transform 320ms cubic-bezier(.2,.9,.3,1.2), box-shadow 260ms,
              filter 320ms, z-index 0s .3s;
}
.polaroid::after {           /* subtle paper sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,.4), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0,0,0,.03), transparent 70%);
}
.polaroid-photo {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover;            /* <img> in the stack */
  background-size: cover; background-position: center;  /* div in the scatter */
  display: block; border-radius: 1px; position: relative; overflow: hidden;
}
.polaroid-caption {
  font-family: 'Caveat', cursive;
  font-size: 20px; line-height: 1; color: #3a2e2a;
  text-align: center; margin-top: 10px;
  transform: rotate(-1deg);
}
.polaroid-tape {
  position: absolute; width: 60px; height: 18px;
  top: -8px; left: 50%;
  background: rgba(212,192,130,.55);
  border: 1px solid rgba(180,158,100,.3);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* Decorative background layer: fixed, pinned to the edges, faded "behind glass".
   Float-motion JS writes --tx/--ty; --rot is the per-photo base angle (inline). */
.polaroid-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.polaroid-layer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(239,233,227,.45) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,250,245,.15) 0%, rgba(239,233,227,.25) 100%);
  -webkit-backdrop-filter: blur(1.5px) saturate(.75);
  backdrop-filter: blur(1.5px) saturate(.75);
}
.polaroid-layer .polaroid {
  position: absolute; width: 180px; pointer-events: auto;
  filter: saturate(.7) brightness(.96) opacity(.78);
  z-index: 1;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--rot, 0deg));
}
.polaroid-layer .polaroid:hover {       /* steps out of the fog */
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(0deg) scale(1.08) !important;
  box-shadow: 0 20px 38px rgba(40,30,20,.28), 0 6px 12px rgba(40,30,20,.18);
  z-index: 50 !important;
  filter: saturate(1.05) brightness(1.02) opacity(1);
  transition: transform 280ms cubic-bezier(.2,.9,.3,1.2), box-shadow 280ms,
              filter 280ms, z-index 0s;
}

/* The in-content portfolio block is hidden on wide screens — there, the
   scattered polaroids ARE the gallery. It only appears when the viewport is
   too narrow for the scatter (≤640px), as a swipeable row. */
.sec-gallery { display: none; }
/* Gallery stack: newest on top, a centred column of polaroids. */
.gallery--polaroid { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.gallery--polaroid .polaroid {
  position: relative; width: min(300px, 86%); margin: 0;
  transform: rotate(var(--rot, 0deg));
}
.gallery--polaroid .polaroid:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 20px 38px rgba(40,30,20,.22), 0 6px 12px rgba(40,30,20,.14);
}

/* ── Zoom-view (lightbox) ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  grid-template-rows: 1fr; place-items: center; padding: 24px;
  background: rgba(20,15,18,.88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: lbFade 240ms ease;
}
.lightbox.is-open { display: grid; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lb-polaroid {
  background: #fdfaf5; padding: 18px 18px 50px; border-radius: 2px;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 10px 20px rgba(0,0,0,.3);
  max-width: min(540px, 86vw); max-height: 86vh;
  display: flex; flex-direction: column;
  transform: rotate(-1.5deg); animation: lbRise 320ms cubic-bezier(.2,.9,.3,1.1);
}
@keyframes lbRise {
  from { transform: rotate(-8deg) scale(.7); opacity: 0; }
  to   { transform: rotate(-1.5deg) scale(1); opacity: 1; }
}
.lb-polaroid .polaroid-photo { width: min(480px, 76vw); height: min(480px, 76vw); }
.lb-polaroid .polaroid-caption { font-size: 30px; margin-top: 16px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; font-size: 22px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  transition: background 160ms, transform 160ms;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 24px; right: 24px; }
.lb-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 13px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  padding: 6px 14px; border-radius: 999px;
}
@media (prefers-reduced-motion: reduce) {
  .polaroid, .lb-polaroid { animation: none; transition: none; }
}

.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr:last-child td { border-bottom: 0; }

.map { width: 100%; height: 300px; border: 0; border-radius: 12px; }
.maplink { display: inline-block; margin-top: 10px; color: var(--brand); text-decoration: none; }

/* Hero contacts — centred row of icon+label pills that wrap on narrow screens. */
.hero__contacts {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-bottom: 20px; width: 100%;
}
.hero__contacts a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 9px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
  max-width: 100%; transition: border-color .15s, color .15s;
}
.hero__contacts a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__contacts a:hover { border-color: var(--brand-hi); color: var(--brand); }
.ci { width: 20px; height: 20px; display: block; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 12px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 0;
}
.btn--book { background: var(--brand); color: var(--brand-ink); width: 100%; }
.btn--book:hover { background: var(--brand-hi); }
/* In the centred hero the CTA shouldn't stretch edge-to-edge. */
.hero .btn--book { width: min(340px, 100%); min-height: 50px; }
.book-foot { margin: 8px 0 24px; }

.page-foot { text-align: center; font-size: .85rem; padding-top: 8px; }

/* Web booking (P2) */
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.slot-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Reviews (P3) */
/* Hero rating → a small rose pill linking to the reviews section. */
.rating { margin: 0 0 12px; }
.rating a {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--rose-soft); color: #7d3b4c;
  font-weight: 600; font-size: .9rem; text-decoration: none;
  padding: 5px 13px; border-radius: 999px;
}
/* Horizontal, swipeable review tiles (works on mobile + desktop). */
.reviews {
  list-style: none; margin: 0 0 16px; padding: 2px 0 12px;
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.review {
  flex: 0 0 auto; width: min(280px, 78%);
  scroll-snap-align: start;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px;
}
.review__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.review__name { font-weight: 600; }
.review__stars { color: #e0a83b; letter-spacing: 1px; white-space: nowrap; }
.review__text { margin: 4px 0 0; }
.review-thanks {
  background: #e8f5e9; border: 1px solid #b9dcbb; color: #2e6b32;
  padding: 10px 14px; border-radius: 10px;
}
.review-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.review-form input, .review-form select, .review-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--ink);
}
.review-note { font-size: .8rem; margin: 0; }

@media (min-width: 560px) {
  .hero { padding: 34px 24px 28px; }
  .hero h1 { font-size: 2.15rem; }
}

/* Mid widths: the scatter starts to crowd the content — shrink it and drop
   all but the two "anchor" polaroids. */
/* Mid widths: the scatter just shrinks (still the gallery). */
@media (max-width: 920px) {
  .polaroid-layer .polaroid { width: 132px; }
}

/* Phones: no decorative scatter at all; the portfolio block appears below the
   reviews as a swipeable row (matching the reviews carousel). */
@media (max-width: 640px) {
  .polaroid-layer { display: none; }
  /* Reorder via flex on .page: reviews, then gallery, then footer bits. */
  #reviews   { order: 1; }
  .sec-gallery { display: block; order: 2; }
  .book-foot { order: 3; }
  .page-foot { order: 4; }
  .gallery--polaroid {
    flex-direction: row; flex-wrap: nowrap;
    align-items: flex-start; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; padding-bottom: 8px;
  }
  .gallery--polaroid .polaroid { flex: 0 0 auto; width: min(240px, 72%); scroll-snap-align: start; }
}
