/* Устара: «острый плакат». Газетная бумага, краски ризографа по мастерам, Geologica с осью резкости. */
:root {
  --paper: #f2eee4;
  --paper2: #e9e4d8;
  --ink: #1b1a19;
  --ink2: #57534d;
  --lapis: #2b4c9c;
  --cinnabar: #c4381f;
  --malachite: #13765a;
  --gamboge: #e3a31c;
  --line: rgba(27, 26, 25, .18);
  --u: 8px;
  --r: 6px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 -1.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--paper); color: var(--ink); scrollbar-color: #bdb6a7 transparent; scrollbar-width: thin; -webkit-text-size-adjust: 100%; }
body { font: 400 16px/1.45 "Geologica", system-ui, sans-serif; font-variation-settings: "SHRP" 0; min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .45; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .42 0 0 0 0 .36 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a, button, input { color: inherit; font: inherit; font-variation-settings: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; } /* заголовок окна получает фокус для чтения, рамка не нужна */
[hidden] { display: none !important; }
/* boot.js в <head> ставит html.js до отрисовки: без скриптов видна своя версия, со скриптами своя */
html:not(.js) .js-only { display: none !important; }
html.js .no-js { display: none !important; }

.sharp { font-variation-settings: "SHRP" 100; }
.ink { -webkit-mask-image: var(--grain); mask-image: var(--grain); -webkit-mask-size: 160px; mask-size: 160px; }
.lapis { --c: var(--lapis); } .cinnabar { --c: var(--cinnabar); } .malachite { --c: var(--malachite); } .gamboge { --c: var(--gamboge); }

.page { position: relative; max-width: 1440px; margin: 0 auto; padding: calc(var(--u) * 3) calc(var(--u) * 6) calc(var(--u) * 4); }
.first { min-height: calc(100vh - 24px); display: flex; flex-direction: column; }

/* шапка */
header { display: flex; align-items: center; gap: calc(var(--u) * 4); position: relative; z-index: 5; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.logo svg { width: 30px; height: 30px; }
nav { display: flex; gap: calc(var(--u) * 3); font-size: 15px; }
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.lang-b { margin-left: auto; font-size: 14px; font-weight: 600; padding: 6px 4px; }
.menu-btn { display: none; }

/* первый экран */
main { flex: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: calc(var(--u) * 6); margin-top: calc(var(--u) * 5); align-content: center; align-items: start; }
.hero { position: relative; }
/* время сверху, под ним слева мастер и кнопка, справа его лицо: цифры и портрет не пересекаются */
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "who face" "cta face"; grid-template-rows: auto 1fr; column-gap: calc(var(--u) * 3); margin-top: calc(var(--u) * 2); }
.hero-row .who { grid-area: who; }
.hero-row .face { grid-area: face; }
.hero-row .cta { grid-area: cta; align-self: start; }
.face { position: relative; width: 100%; aspect-ratio: 4 / 5; background: var(--c);
  -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; transition: opacity .2s; }
.mine { max-width: 804px; margin-top: calc(var(--u) * 4); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 16px; border-radius: var(--r); background: var(--paper2); font-size: 15px; }
.mine b { font-weight: 600; }
.mine a { font-weight: 600; text-underline-offset: 4px; }

.svc { display: flex; gap: calc(var(--u) * 3); font-size: 15px; border-bottom: 1px solid var(--line); margin-bottom: calc(var(--u) * 4); }
.svc button { padding: 0 0 10px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--ink2); white-space: nowrap; }
.svc button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); font-weight: 600; }
.svc button:hover { color: var(--ink); }
.svc small { color: var(--ink2); font-weight: 400; margin-left: 4px; }

.kicker { font-size: 18px; font-weight: 500; }
.big { margin-top: 4px; margin-left: -.06em; font-weight: 900; font-size: clamp(150px, 19.5vw, 290px); line-height: .8; letter-spacing: -.055em; color: var(--c, var(--lapis)); font-variant-numeric: tabular-nums; min-height: .8em; }
.who { margin-top: calc(var(--u) * 3); max-width: 380px; font-size: 22px; font-weight: 500; }
.who small { display: block; margin-top: 2px; font-size: 15px; color: var(--ink2); font-weight: 400; }
.cta { margin-top: calc(var(--u) * 3); max-width: 400px; display: flex; gap: calc(var(--u) * 2); align-items: center; flex-wrap: wrap; }
.go { background: var(--ink); color: var(--paper); padding: 18px 28px; border-radius: var(--r); font-size: 18px; font-weight: 600; }
a.go { display: inline-block; text-decoration: none; }
.go:hover { background: #33312e; }
.go:active { transform: translateY(1px); }
.link { font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.nojs-note { margin-top: calc(var(--u) * 2); max-width: 30em; color: var(--ink2); }

.later h2 { font-size: 18px; font-weight: 500; }
.tiles { margin-top: calc(var(--u) * 2); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(var(--u) * 1.5); min-height: 120px; }
.tile { position: relative; display: block; width: 100%; text-align: left; padding: 14px 16px 16px; border-radius: var(--r); color: var(--paper); isolation: isolate; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: var(--c);
  -webkit-mask-image: var(--grain); mask-image: var(--grain); -webkit-mask-size: 160px; mask-size: 160px; }
.tile:hover::before { filter: brightness(.92); }
.tile:active { transform: translateY(1px); }
.tile .mini { position: absolute; z-index: -1; right: -6px; bottom: -14px; width: 92px; aspect-ratio: 4 / 5; background: var(--ink); opacity: .82;
  -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; }
.tile.gamboge { color: var(--ink); }
.tile.gamboge .mini { opacity: .7; }
.tile .t { display: block; font-size: 52px; line-height: .95; font-weight: 900; letter-spacing: -.04em; font-variation-settings: "SHRP" 100; }
.tile .n { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; }
.tile .d { font-weight: 400; }
.more { margin-top: calc(var(--u) * 1.5); font-size: 15px; }
.crew { list-style: none; padding: 0; margin-top: calc(var(--u) * 3); display: grid; grid-template-columns: 1fr 1fr; gap: 10px calc(var(--u) * 2); font-size: 14px; color: var(--ink2); }
.crew li { display: flex; align-items: center; gap: 10px; }
.crew li::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--c); flex: none; }
.crew b { color: var(--ink); font-weight: 600; }
.crew a { text-underline-offset: 4px; text-decoration-color: rgba(27, 26, 25, .35); }
.crew a:hover { text-decoration-color: currentColor; }
.legend { margin-top: calc(var(--u) * 2); font-size: 13px; color: var(--ink2); }

/* ниже первого экрана */
.info { margin-top: calc(var(--u) * 8); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: calc(var(--u) * 6); }
.info h2 { font-size: 40px; font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variation-settings: "SHRP" 100; }
.prices { margin-top: calc(var(--u) * 3); width: 100%; border-collapse: collapse; font-size: 17px; }
.prices td { padding: 14px 0; border-top: 1px solid var(--line); }
.prices tr:last-child td { border-bottom: 1px solid var(--line); }
.prices td + td { color: var(--ink2); white-space: nowrap; padding-left: 16px; }
.prices td:last-child { text-align: right; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.where p { margin-top: calc(var(--u) * 2); max-width: 28em; }
.where p:first-of-type { margin-top: calc(var(--u) * 3); }
.demo { margin-top: calc(var(--u) * 3); padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--paper2); font-size: 14px; color: var(--ink2); max-width: 34em; }

footer { margin-top: calc(var(--u) * 6); padding-top: calc(var(--u) * 2); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px calc(var(--u) * 3); font-size: 14px; color: var(--ink2); }
footer a, footer button { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
footer .brand { color: var(--ink2); }

/* окно записи */
dialog { margin: auto; border: 0; padding: 0; color: var(--ink); background: var(--paper); border-radius: 10px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 30px 80px rgba(27, 26, 25, .35); }
dialog::backdrop { background: rgba(27, 26, 25, .45); }
.sheet { padding: calc(var(--u) * 3); }
.sheet-top { display: flex; align-items: center; gap: 12px; }
.sheet-top h2 { font-size: 22px; font-weight: 700; }
.x { margin-left: auto; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; padding: 6px 2px; }
.row { margin-top: calc(var(--u) * 2.5); }
.row-h { font-size: 13px; color: var(--ink2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 12px; border: 1.5px solid rgba(27, 26, 25, .35); border-radius: var(--r); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.chip:disabled { opacity: .4; cursor: default; }
.chip small { opacity: .7; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.time { position: relative; padding: 10px 10px 9px 14px; border-radius: var(--r); background: var(--paper2); text-align: left; overflow: hidden; }
.time::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.time b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.time small { display: block; font-size: 12px; color: var(--ink2); }
.time:hover { background: #e0dacd; }
.empty { color: var(--ink2); font-size: 15px; }
.empty button { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.sum { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: end; margin-top: calc(var(--u) * 2); }
.sum .t { font-size: 72px; font-weight: 900; line-height: .85; letter-spacing: -.05em; color: var(--c); font-variation-settings: "SHRP" 100; }
.sum p { font-size: 15px; color: var(--ink2); }
.sum p b { display: block; color: var(--ink); font-size: 18px; font-weight: 600; }
.field { display: block; margin-top: calc(var(--u) * 2); }
.field span { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; }
.field input { width: 100%; padding: 13px 14px; font-size: 17px; border: 1.5px solid rgba(27, 26, 25, .45); border-radius: var(--r); background: #fbf9f4; }
.field input:focus { outline: 3px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.field .tel { display: flex; margin: 0; font-size: inherit; color: inherit; align-items: center; border: 1.5px solid rgba(27, 26, 25, .45); border-radius: var(--r); background: #fbf9f4; }
.tel:focus-within { outline: 3px solid var(--ink); border-color: var(--ink); }
.tel b { padding-left: 14px; font-weight: 500; color: var(--ink2); font-size: 17px; }
.field .tel input { flex: 1; min-width: 0; width: auto; border: 0; background: none; outline: none !important; }
.err { margin-top: 6px; font-size: 14px; color: var(--cinnabar); min-height: 0; }
.note { margin-top: calc(var(--u) * 2); font-size: 13px; color: var(--ink2); }
.act { margin-top: calc(var(--u) * 3); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.act .go { padding: 15px 24px; font-size: 17px; }
.done h3 { font-size: 56px; font-weight: 900; letter-spacing: -.04em; line-height: .9; font-variation-settings: "SHRP" 100; margin-top: calc(var(--u) * 2); }
.done .lead { margin-top: calc(var(--u) * 2); font-size: 19px; max-width: 26em; }
.code { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 600; }

/* страница «Моя запись» */
.my { margin-top: calc(var(--u) * 5); max-width: 760px; }
.my h1 { font-size: clamp(48px, 7vw, 88px); font-weight: 900; line-height: .9; letter-spacing: -.04em; font-variation-settings: "SHRP" 100; }
.card { position: relative; margin-top: calc(var(--u) * 4); padding: calc(var(--u) * 3); border-radius: 10px; background: var(--paper2); overflow: hidden; isolation: isolate; }
.card .face { position: absolute; top: auto; bottom: -40px; right: -20px; width: 220px; opacity: .9; }
.card .t { font-size: clamp(88px, 12vw, 150px); font-weight: 900; line-height: .8; letter-spacing: -.055em; color: var(--c); font-variation-settings: "SHRP" 100; position: relative; z-index: 1; }
.card .what { position: relative; z-index: 1; margin-top: calc(var(--u) * 2); font-size: 19px; max-width: 24em; }
.card .what small { display: block; color: var(--ink2); font-size: 15px; margin-top: 4px; }
.card .flag { position: relative; z-index: 1; margin-top: calc(var(--u) * 2); font-weight: 600; }
.card .act { position: relative; z-index: 1; }
.card.cancelled .t { color: var(--ink2); text-decoration: line-through; text-decoration-thickness: 6px; }
.btn2 { padding: 12px 16px; border: 1.5px solid var(--ink); border-radius: var(--r); font-size: 15px; font-weight: 500; text-decoration: none; display: inline-block; background: var(--paper); }
.btn2:hover { background: #fff; }
.ask { position: relative; z-index: 1; margin-top: calc(var(--u) * 2); padding: 12px 14px; border-radius: var(--r); background: var(--paper); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.policy { margin-top: calc(var(--u) * 4); font-size: 14px; color: var(--ink2); max-width: 34em; }

/* мастера: портрет растром и всё о мастере рядом, зигзагом */
.masters-h { margin-top: calc(var(--u) * 5); font-size: clamp(64px, 11vw, 160px); font-weight: 900; line-height: .85; letter-spacing: -.05em; }
.barber { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: calc(var(--u) * 6); align-items: end; margin-top: calc(var(--u) * 8); padding-bottom: calc(var(--u) * 6); border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.barber.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.barber.flip .big-face { order: 2; }
.barber .big-face { position: relative; top: auto; right: auto; width: 100%; max-width: 460px; justify-self: center; }
.barber h2 { font-size: clamp(64px, 9vw, 132px); font-weight: 900; line-height: .85; letter-spacing: -.05em; color: var(--c); }
.barber.gamboge h2 { color: #b67d06; }
.barber .role { margin-top: calc(var(--u) * 1.5); font-size: 20px; font-weight: 600; }
.barber .text { margin-top: calc(var(--u) * 2); max-width: 30em; font-size: 18px; }
.barber .sched, .barber .does { margin-top: calc(var(--u) * 1.5); color: var(--ink2); max-width: 34em; }
.barber .does::before { content: "Услуги: "; }
html[lang="en"] .barber .does::before { content: "Services: "; }
.barber .slots { margin-top: calc(var(--u) * 3); }
.barber .chip small { margin-left: 2px; }
.barber .go { margin-top: calc(var(--u) * 2.5); }
.barber:target h2 { text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 12px; }
.page > .demo { margin-top: calc(var(--u) * 6); }

@media (max-width: 900px) {
  main, .info { grid-template-columns: minmax(0, 1fr); gap: calc(var(--u) * 5); }
}
@media (max-width: 760px) {
  .barber, .barber.flip { grid-template-columns: minmax(0, 1fr); gap: calc(var(--u) * 2); margin-top: calc(var(--u) * 5); padding-bottom: calc(var(--u) * 4); }
  .barber.flip .big-face { order: 0; }
  .barber .big-face { max-width: 300px; justify-self: start; }
  .barber .text { font-size: 17px; }
  .page { padding: calc(var(--u) * 2) calc(var(--u) * 2.5) calc(var(--u) * 4); }
  .first { min-height: 0; }
  header nav { display: none; position: absolute; top: 52px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  header nav.open { display: flex; }
  header nav a { padding: 12px 0; font-size: 17px; }
  .lang-b { margin-left: auto; }
  .menu-btn { display: block; font-size: 15px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: var(--r); }
  main { margin-top: calc(var(--u) * 3); }
  .svc { gap: 14px; font-size: 14px; }
  .svc small { display: none; }
  .big { font-size: 112px; }
  .hero-row { grid-template-columns: minmax(0, 1fr) 42vw; grid-template-areas: "who face" "cta cta"; grid-template-rows: auto auto; column-gap: 12px; margin-top: 12px; }
  .hero-row .face { margin-right: -20px; }
  .cta { max-width: none; }
  .who { font-size: 19px; }
  .who small { font-size: 14px; }
  .cta { margin-top: 16px; }
  .go { width: 100%; text-align: center; }
  .tile .t { font-size: 42px; }
  .tile .mini { width: 74px; }
  .info h2 { font-size: 32px; }
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .sheet { padding: calc(var(--u) * 2.5) calc(var(--u) * 2.5) calc(var(--u) * 3); }
  .sum .t { font-size: 56px; }
  .done h3 { font-size: 44px; }
  .act .go { width: 100%; }
  /* время и лицо рядом, не друг на друге */
  .card .t { font-size: 72px; }
  .card .face { top: 20px; bottom: auto; right: 12px; width: 92px; }
  .card .what { max-width: 64%; }
  .mine { margin-top: calc(var(--u) * 2.5); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
