/* Blocks of the home page (/) and the short page (/zapis), second half: quiz + form, thank-you, gallery, reviews,
   route, FAQ, sheet. */

/* ---------- Quiz ---------- */
.quiz-sec__grid { display: grid; gap: 30px; }
.quiz-sec__facts { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.quiz-sec__facts li { position: relative; padding-left: 26px; }
.quiz-sec__facts li::before {
  content: ''; position: absolute; left: 2px; top: 0.38em; width: 12px; height: 6px;
  border-left: 1.5px solid var(--sage); border-bottom: 1.5px solid var(--sage); transform: rotate(-45deg);
}
.quiz {
  position: relative; padding: 24px 18px 20px; border-radius: 32px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 14px);
}
.quiz__bar { height: 4px; margin-bottom: 16px; overflow: hidden; border-radius: 4px; background: var(--blush); }
.quiz__fill { display: block; width: var(--p, 25%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--wine)); transition: width 0.6s var(--ease); }
.quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.quiz__skip, .quiz__back { padding: 6px 0; border: 0; background: none; font: 600 13.5px/1.2 var(--sans); cursor: pointer; }
.quiz__skip { color: var(--wine); }
.quiz__back { color: var(--muted); }
.quiz__step { min-width: 0; margin: 0; padding: 0; border: 0; }
.quiz__step.is-active { animation: step-in 0.5s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } }
.quiz__q { display: block; margin: 0 0 18px; padding: 0; font: 500 clamp(25px, 5.6vw, 32px)/1.12 var(--serif); color: var(--ink); }
.quiz__summary { margin: -6px 0 16px; font-size: 13.5px; color: var(--ink-2); }
.quiz__summary b { color: var(--wine); font-weight: 600; }
.quiz__tip { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); font-size: 13.5px; color: var(--ink-2); }
.quiz__nav { display: flex; justify-content: space-between; min-height: 30px; margin-top: 12px; }
.options { display: grid; gap: 10px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option > span {
  position: relative; display: grid; align-content: center; gap: 3px; min-height: 62px; padding: 12px 16px 12px 50px;
  border: 1.5px solid var(--line-2); border-radius: 18px; background: var(--bg); transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease);
}
.option > span::before {
  content: ''; position: absolute; left: 17px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: var(--paper); transition: all 0.3s var(--ease);
}
.option b { font-size: 15.5px; font-weight: 600; }
.option i { font-size: 13px; font-style: normal; color: var(--muted); }
.option:hover > span { border-color: var(--wine-soft); transform: translateY(-1px); }
.option input:checked + span { border-color: var(--wine); background: var(--blush); }
.option input:checked + span::before { border-color: var(--wine); background: var(--wine); box-shadow: inset 0 0 0 4px var(--paper); }
.option input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
@media (min-width: 600px) {
  .quiz { padding: 34px 34px 26px; }
  .options { grid-template-columns: 1fr 1fr; }
  .options--row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) { .quiz-sec__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; } }

/* ---------- Lead form ---------- */
.lead-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lead-form .field__hint { margin-bottom: -4px; }
.lead-form .field__hint:empty { min-height: 0; margin: 0; } /* no default hint: the line appears only with an error */
.form-error { margin: 0; padding: 12px 14px; border-radius: 14px; background: #fbe9e4; color: #8e2f1d; font-size: 13.5px; line-height: 1.45; }
.form-error a { color: inherit; font-weight: 700; white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--paper) inset; -webkit-text-fill-color: var(--ink); animation: kr-autofill 0.01s;
}
@keyframes kr-autofill { from { opacity: 1; } to { opacity: 1; } }

/* ---------- Thank-you ---------- */
.done { display: grid; justify-items: center; gap: 10px; padding: 6px 0; text-align: center; }
.done__check { width: 70px; height: 70px; }
.done__check circle { fill: none; stroke: var(--gold-soft); stroke-width: 1.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: check 0.9s var(--ease) forwards; }
.done__check path { fill: none; stroke: var(--wine); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: check 0.6s var(--ease) 0.5s forwards; }
@keyframes check { to { stroke-dashoffset: 0; } }
.done__text { max-width: 30em; margin: 0; color: var(--ink-2); }
.done__more { display: grid; gap: 14px; width: 100%; margin-top: 12px; padding-top: 18px; border-top: 1px dashed var(--line-2); text-align: left; }
.done__ask { margin: 0; font-size: 14px; font-weight: 600; }
.opt { font-weight: 500; color: var(--muted); white-space: nowrap; }
/* Convenient time: four chips in one row on any phone — the time on top, the days under it. */
/* «Выходные» is twice as long as «Утро»: its chip is wider, so no label touches its border on a 320px phone. */
.segmented--times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 6px; }
.segmented--times label { display: flex; min-width: 0; }
.segmented--times span {
  flex: 1; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; min-height: 56px; padding: 8px 4px;
  text-align: center; font-size: 14px; white-space: nowrap;
}
.segmented--times small { font: 500 11.5px/1 var(--sans); color: var(--muted); transition: color 0.25s var(--ease); }
.segmented--times input:checked + span small { color: rgba(255, 255, 255, 0.78); }
@media (max-width: 359px) { .segmented--times { gap: 5px; } .segmented--times span { padding: 8px 2px; font-size: 13px; } }
.done__saved { margin: 0; color: var(--sage); font-weight: 600; text-align: center; }
.field--compact .field__box { min-height: 52px; }
.field--compact input { padding: 14px 0; font-size: 16px; }

/* ---------- Gallery: the room, the cosmetics ---------- */
.gallery {
  display: flex; gap: 14px; padding: 0 var(--gutter) 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__item { position: relative; flex: 0 0 64vw; max-width: 320px; aspect-ratio: 4 / 5; align-self: center; margin: 0; overflow: hidden; border-radius: 24px; box-shadow: var(--shadow-sm); scroll-snap-align: center; }
.gallery__item--tall { flex-basis: 74vw; max-width: 380px; aspect-ratio: 3 / 4; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 253, 251, 0.9); font-size: 12.5px; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (min-width: 960px) {
  .gallery { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr 1.2fr; align-items: center; max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter); overflow: visible; }
  .gallery__item, .gallery__item--tall { max-width: none; }
}

/* ---------- Reviews ---------- */
.reviews__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(30px, 5vw, 56px); }
.reviews__head .section__head { margin-bottom: 0; }
.rating { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform 0.35s var(--ease); }
.rating:hover { transform: translateY(-2px); }
.rating .stars { font-size: 19px; }
.rating__meta { display: grid; gap: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.reviews__grid { column-gap: 18px; }
.review { position: relative; margin: 0 0 16px; padding: 44px 22px 18px; break-inside: avoid; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); }
.review::before { content: '“'; position: absolute; top: 8px; left: 20px; font: 500 64px/1 var(--serif); color: var(--gold-soft); }
.review blockquote { position: relative; margin: 0 0 14px; font-size: 15px; line-height: 1.6; }
.review figcaption { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.review figcaption b { font-weight: 700; color: var(--ink); }
.review.is-more { display: none; }
.reviews.is-open .review.is-more { display: block; animation: rise 0.6s var(--ease); }
.reviews__more { display: flex; margin: 10px auto 0; }
.reviews.is-open .reviews__more { display: none; }
@media (min-width: 720px) { .reviews__grid { columns: 2; } }
@media (min-width: 1080px) { .reviews__grid { columns: 3; } }

/* ---------- Route ---------- */
.route__steps { display: flex; gap: 14px; margin: 0; padding: 0 var(--gutter) 8px; overflow-x: auto; list-style: none; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.route__steps::-webkit-scrollbar { display: none; }
.route__step { position: relative; flex: 0 0 62vw; max-width: 280px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow-sm); scroll-snap-align: start; }
.route__step img { width: 100%; height: 100%; object-fit: cover; }
.route__step span {
  position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 14px; background: rgba(255, 253, 251, 0.92); font-size: 13.5px; font-weight: 600; line-height: 1.25;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.route__step b { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--wine); color: #fff; font-size: 13px; }
@media (min-width: 960px) {
  .route__steps { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter); overflow: visible; }
  .route__step { max-width: none; }
}

/* ---------- FAQ ---------- */
.faq__grid { display: grid; gap: 24px; }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 0; cursor: pointer; list-style: none;
  font: 500 23px/1.2 var(--serif); color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ''; flex: none; width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 50%; transition: transform 0.4s var(--ease), background-color 0.3s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 10v12M10 16h12' stroke='%237a1f35' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.faq__item[open] summary::after { transform: rotate(45deg); background-color: var(--blush); }
.faq__item p { max-width: 40em; margin: -4px 0 22px; color: var(--ink-2); }
.faq__item[open] p { animation: rise 0.5s var(--ease); }
@media (min-width: 960px) { .faq__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; } }

/* ---------- Bottom sheet ---------- */
.sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: 520px; max-height: 94svh; margin: 0 auto; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--ink); }
.sheet::backdrop { background: rgba(42, 27, 31, 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet[open]::backdrop { animation: fade 0.4s var(--ease); }
.sheet.is-closing::backdrop { opacity: 0; transition: opacity 0.3s; }
@keyframes fade { from { opacity: 0; } }
.sheet__panel {
  position: relative; max-height: 94svh; overflow: auto; padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: var(--paper); box-shadow: 0 -20px 60px -20px rgba(42, 27, 31, 0.4);
}
.sheet[open] .sheet__panel { animation: sheet-up 0.55s var(--ease); }
.sheet.is-closing .sheet__panel { animation: sheet-down 0.3s var(--ease) forwards; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
.sheet__grip { display: block; width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: var(--line-2); }
.sheet__close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg-2); cursor: pointer; }
.sheet__close svg { width: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
.sheet__body { display: grid; gap: 10px; }
.sheet__body .h3 { margin: 2px 0; padding-right: 36px; }
.sheet__price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.sheet__price b { font-size: 32px; font-weight: 600; color: var(--wine); }
.sheet__price s { font-size: 17px; color: var(--muted); }
.sheet__price .offer__off { align-self: center; }
.sheet__note { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (min-width: 600px) {
  .sheet { inset: 0; height: fit-content; margin: auto; }
  .sheet__panel { padding: 30px 34px 30px; border-radius: 30px; }
  .sheet[open] .sheet__panel { animation: pop 0.45s var(--ease); }
  .sheet.is-closing .sheet__panel { animation: pop-out 0.25s var(--ease) forwards; }
  .sheet__grip { display: none; }
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(10px) scale(0.98); } }
