/* =============================================================================
   zamer.kuhnemer.ru, версия 2 (12.10.2026) — запись на бесплатный замер.
   Первый экран — настоящая кухня фабрики; запись — в белой карточке поверх фото.
   Цвета и шрифт — как у kuhnemer.ru: тёмно-синий, жёлтый акцент, Golos Text.
   Красный — только оттиск «Принято» и текст ошибки.
   Движение: фото «садится» при загрузке, штамп ложится на талон после записи.
   ============================================================================= */

@font-face {
  font-family: "Golos";
  src: url("fonts/golos-text-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy:      #0E1A2B;
  --navy-2:    #1C2C46;
  --yellow:    #FFC933;
  --yellow-dk: #F0B610;
  --bg:        #EEF1F4;
  --card:      #FFFFFF;
  --ink:       #0E1A2B;
  --ink-2:     #4C5B74;
  --line:      #D5DCE6;
  --line-2:    #BCC6D4;
  --red:       #C9302B;
  --red-ink:   #AE231C;

  --f: "Golos", "Segoe UI", system-ui, sans-serif;
  --gut: clamp(16px, 4.4vw, 32px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
  scrollbar-color: var(--navy) var(--bg);
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--f);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--navy); color: #fff; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
p, h1, h2, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* --- Первый экран: кухня фабрики ------------------------------------------------ */
.hero {
  position: relative;
  height: clamp(250px, 40vh, 430px);
  height: clamp(250px, 40svh, 430px);
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  animation: settle 1.5s var(--ease) both;
}
@keyframes settle { from { transform: scale(1.07); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(14 26 43 / .62) 0%, rgb(14 26 43 / 0) 30%, rgb(14 26 43 / 0) 42%, rgb(14 26 43 / .86) 100%);
  pointer-events: none;
}
.brand {
  position: absolute;
  z-index: 2;
  left: max(var(--gut), env(safe-area-inset-left));
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__txt { display: grid; line-height: 1.12; }
.brand__txt b { font-size: 1.0625rem; font-weight: 800; letter-spacing: -.01em; }
.brand__txt small { font-size: .75rem; color: rgb(255 255 255 / .86); }
.hero__tag {
  position: absolute;
  z-index: 2;
  right: max(var(--gut), env(safe-area-inset-right));
  top: 21px;
  font-size: .75rem;
  line-height: 1.2;
  color: rgb(255 255 255 / .9);
}
.hero__txt {
  position: absolute;
  z-index: 2;
  left: max(var(--gut), env(safe-area-inset-left));
  right: max(var(--gut), env(safe-area-inset-right));
  bottom: 46px;
}
h1 {
  font-size: clamp(1.875rem, 8.2vw, 3.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__txt p { margin-top: 8px; max-width: 26em; font-size: .9375rem; line-height: 1.4; color: rgb(255 255 255 / .94); text-wrap: pretty; }

/* --- Запись: белая карточка поверх фото -------------------------------------------- */
.main { position: relative; z-index: 3; padding-inline: max(var(--gut), env(safe-area-inset-left)) max(var(--gut), env(safe-area-inset-right)); }
.book {
  margin-top: -30px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(14 26 43 / .07), 0 20px 34px -20px rgb(14 26 43 / .42);
}
.book__h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.018em;
}
.book__h small { font-size: .875rem; font-weight: 400; letter-spacing: 0; color: var(--ink-2); white-space: nowrap; }
.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.day, .time {
  border: 1.5px solid var(--line);
  background: var(--card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.day {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 62px;
  padding: 6px 0;
  border-radius: 14px;
}
.day__wd { font-size: .75rem; font-weight: 500; line-height: 1; color: var(--ink-2); }
.day__n { font-size: 1.3125rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.time { min-height: 46px; border-radius: 12px; font-size: 1rem; font-weight: 600; line-height: 1.1; }
@media (hover: hover) { .day:hover, .time:hover { border-color: var(--navy); } }
.day[aria-pressed="true"], .time[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.day[aria-pressed="true"] .day__wd { color: rgb(255 255 255 / .82); }
.day:disabled, .time:disabled { cursor: default; }
.book__hint { margin-top: 8px; font-size: .8125rem; line-height: 1.4; color: var(--ink-2); }

.lbl { display: block; margin-top: 14px; font-size: .875rem; font-weight: 600; line-height: 1.2; }
.in {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  padding: 10px 16px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: 600 1.25rem/1.2 var(--f);
  font-variant-numeric: tabular-nums;
  caret-color: var(--navy);
  transition: border-color .15s;
}
.in::placeholder { color: #66738C; font-weight: 400; opacity: 1; }
.in:focus-visible { border-color: var(--navy); outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 14px; }
.f.is-bad .in { border-color: var(--red); }
.err {
  position: relative;
  margin-top: 8px;
  padding-left: 1.7em;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--red-ink);
}
.err::before {
  content: "";
  position: absolute;
  left: 0;
  top: .08em;
  width: 1.2em;
  height: 1.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5 22 20.5H2Z' fill='none' stroke='%23AE231C' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M12 10v5.2M12 17.6v.4' stroke='%23AE231C' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  margin-top: 14px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--navy);
  font: 800 1.0625rem/1.1 var(--f);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 20px -12px rgb(160 116 0 / .9);
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, transform .12s, box-shadow .15s;
}
@media (hover: hover) { .go:hover { background: var(--yellow-dk); } }
.go:active { transform: translateY(1px); box-shadow: 0 6px 12px -8px rgb(160 116 0 / .9); }
.go:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 14px; }
.f.is-busy .go { cursor: progress; background: var(--yellow-dk); }
.consent { margin-top: 10px; font-size: .8125rem; line-height: 1.4; color: var(--ink-2); }
.f__fail, .f__nojs { display: none; margin-top: 12px; font-weight: 600; }
.js-fail .f__fail { display: block; }
.js-fail .go, .js-fail .consent { display: none; }
.no-js .f { display: none; }
.no-js .f__nojs { display: block; }

/* --- Талон на месте формы ------------------------------------------------------------ */
.ticket { position: relative; outline: 0; }
.ticket.is-on { animation: rise .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; translate: 0 12px; } }
.ticket__h { font-size: 1.3125rem; font-weight: 800; line-height: 1.15; letter-spacing: -.018em; }
.ticket__rows { margin-top: 16px; }
.ticket__rows div {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.ticket__rows dt { font-size: .875rem; color: var(--ink-2); }
.ticket__rows dd { font-size: 1.0625rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* линия отрыва перед памяткой */
.ticket__note { margin-top: 14px; padding-top: 14px; border-top: 2px dashed var(--line-2); font-size: .9375rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
/* оттиск стоит в правом верхнем углу талона: рядом с коротким заголовком, не поверх номера и дня */
.stamp {
  position: absolute;
  right: -4px;
  top: -8px;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 10px 5px;
  border: 3px solid var(--red);
  border-radius: 7px;
  outline: 1.5px solid var(--red);
  outline-offset: 3px;
  color: var(--red);
  text-transform: uppercase;
  rotate: -9deg;
  mix-blend-mode: multiply;
  filter: url(#ink);
  pointer-events: none;
}
.stamp b { font-size: 1.0625rem; font-weight: 800; letter-spacing: .09em; line-height: 1; }
.stamp span { font-size: .6875rem; font-weight: 700; letter-spacing: .12em; line-height: 1; font-variant-numeric: tabular-nums; }
.ticket.is-on .stamp { animation: stamp .38s .22s var(--ease) both; }
@keyframes stamp {
  from { opacity: 0; scale: 1.9; }
  45%  { opacity: 1; }
  to   { opacity: 1; scale: 1; }
}

/* --- Разделы --------------------------------------------------------------------------- */
.sec { margin-top: 38px; }
.sec__h { font-size: 1.4375rem; font-weight: 800; line-height: 1.12; letter-spacing: -.022em; text-wrap: balance; }
.sec__note { margin-top: 12px; max-width: 38em; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.bill { margin-top: 10px; }
.bill li { display: flex; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.bill li span { flex: 1; min-width: 0; }
.bill b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill__sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.bill__sum b { color: var(--yellow); font-size: 1.375rem; font-weight: 800; white-space: nowrap; }

.prints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.print:first-child { grid-column: 1 / -1; }
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; background: var(--line); }
.print:first-child img { aspect-ratio: 5 / 4; object-position: 50% 62%; }

.tt { margin-top: 8px; }
.tt div {
  display: grid;
  grid-template-columns: 7.6rem minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.tt dt { font-size: .875rem; color: var(--ink-2); }
.tt dd { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }

.ftr {
  margin-top: 40px;
  padding-block: 18px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.ftr p { max-width: 62em; }
.ftr p + p { margin-top: .6em; }
.ftr b { color: var(--ink); }
.ftr__links a { display: inline-block; margin-right: 1.2em; }
.has-bar .ftr { padding-bottom: 96px; }

/* --- Нижняя полоса на телефоне: возвращает к записи -------------------------------------- */
.bar {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px max(var(--gut), env(safe-area-inset-left)) max(10px, env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 22px -16px rgb(14 26 43 / .5);
}
.go--bar { min-height: 52px; margin-top: 0; }

/* --- Планшет ------------------------------------------------------------------------------ */
@media (min-width: 560px) {
  .hero { height: clamp(320px, 46vh, 520px); }
  .book { padding: 24px 24px 22px; }
  .days { gap: 8px; }
  .main > * { max-width: 40rem; margin-inline: auto; }
  .prints { grid-template-columns: 2fr 1fr 1fr; }
  .print:first-child { grid-column: auto; }
  .print:first-child img { aspect-ratio: 8 / 5; }
}

/* --- Широкий экран: слева кухня во всю высоту, справа запись ------------------------------- */
@media (min-width: 960px) {
  .page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
  .hero { position: sticky; top: 0; height: 100vh; height: 100svh; }
  .hero::after { background: linear-gradient(180deg, rgb(14 26 43 / .6) 0%, rgb(14 26 43 / 0) 24%, rgb(14 26 43 / 0) 52%, rgb(14 26 43 / .88) 100%); }
  .brand { left: 44px; top: 30px; }
  .brand__mark { width: 38px; height: 38px; }
  .brand__txt b { font-size: 1.25rem; }
  .brand__txt small { font-size: .8125rem; }
  .hero__tag { right: 44px; top: 40px; font-size: .8125rem; }
  .hero__txt { left: 44px; right: 44px; bottom: 52px; }
  .hero__txt p { margin-top: 14px; font-size: 1.125rem; }
  .main { padding: 44px clamp(28px, 4.6vw, 72px) 0; }
  .main > * { max-width: 34rem; margin-inline: 0; }
  .book { margin-top: 0; padding: 26px 26px 24px; }
  .book__h { font-size: 1.5rem; }
  .sec { margin-top: 52px; }
  .sec__h { font-size: 1.75rem; }
  .bar { display: none !important; }
  .has-bar .ftr { padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img, .ticket.is-on, .ticket.is-on .stamp { animation: none; }
  .go, .day, .time, .in { transition: none; }
}
