/*
 * Окошко — стили лендинга (web/landing/index.html).
 * Опирается на tokens.css и components.css; здесь только раскладка страницы
 * и части, которых нет в Mini App: макет телефона, переписка, талоны-тарифы.
 */

/* ---------- Каркас ---------- */
html { scroll-behavior: smooth; scroll-padding-top: var(--space-6); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.l-wrap { width: min(100% - var(--gutter) * 2, var(--content-max)); margin-inline: auto; }
.l-section { padding-block: var(--space-section); }
.l-section--sunken { background: var(--color-bg-sunken); }
.l-section h2, .final h2 { max-width: 15em; }
.l-lead, h2 + .o-lead { margin-top: var(--space-4); }
.l-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.l-icon { flex: none; width: 1.25em; height: 1.25em; }
.l-skip {
  position: absolute; left: var(--space-4); top: -6rem; z-index: 50; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  background: var(--color-light); color: var(--color-on-light); font-weight: var(--weight-semibold);
}
.l-skip:focus { top: var(--space-4); }

/* Линия отрыва между розовым и чернильным разделами */
.l-tear { position: relative; z-index: 1; height: 10px; background: radial-gradient(circle at 12px 0, var(--color-bg) 7px, transparent 7.6px) 0 0 / 24px 10px repeat-x; }
.l-tear--before { margin-bottom: -10px; }
.l-tear--after { margin-top: -10px; background-image: radial-gradient(circle at 12px 10px, var(--color-bg) 7px, transparent 7.6px); }
.l-tear--sunken { background-image: radial-gradient(circle at 12px 0, var(--color-bg-sunken) 7px, transparent 7.6px); }

/* ---------- Шапка ---------- */
.l-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-4); }
.l-header .o-logo svg { height: 1.375rem; }
.l-nav { display: none; }
.l-nav ul { display: flex; gap: var(--space-6); margin: 0; padding: 0; list-style: none; }
.l-nav a { display: inline-block; padding-block: var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); text-decoration: none; }
.l-nav a:hover { color: var(--color-text); text-decoration: underline; }
@media (min-width: 62rem) {
  .l-nav { display: block; }
  .l-header .o-logo svg { height: 1.625rem; }
}

/* ---------- Первый экран ---------- */
.hero { position: relative; overflow: clip; }
.hero__grid { display: grid; gap: var(--space-8); padding-top: clamp(1.25rem, 3.5vw, 3.5rem); }
.hero__title { margin-bottom: var(--space-5); }
.hero__lead { max-width: 34rem; }
.hero__actions { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.hero__note { margin: var(--space-4) 0 0; max-width: 30rem; font-size: var(--text-sm); color: var(--color-text-subtle); }
.hero__stage { position: relative; display: grid; justify-items: center; gap: var(--space-3); padding: 3.25rem 0 0; }
/* ниша-окно в стене, в ней стоит телефон; снизу подоконник */
.hero__stage::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: min(100% + var(--gutter) * 2, 31rem); transform: translateX(-50%);
  border: 1.5px solid var(--color-border); border-bottom: 0; border-radius: 999px 999px 0 0; background: var(--color-bg-sunken);
}
.hero__stage::after {
  content: ""; position: relative; width: min(100% + var(--gutter) * 2, 34rem); height: 14px; margin-top: var(--space-6);
  border-radius: 6px 6px 0 0; background: var(--color-text);
}
.hero__hint { position: relative; margin: 0; max-width: 15rem; text-align: center; font-size: var(--text-sm); line-height: 1.3; color: var(--color-text-muted); }
@media (min-width: 36rem) {
  .hero__actions { display: flex; flex-wrap: wrap; }
}
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(21rem, 0.85fr); gap: var(--space-12); align-items: end; }
  .hero__copy { align-self: center; padding-bottom: var(--space-16); }
}

/* ---------- Макет телефона с примером записи ---------- */
.phone {
  position: relative; width: min(100%, 21.5rem); border: 9px solid #06231B; border-radius: 2.5rem; background: var(--color-bg); overflow: hidden;
  box-shadow: 0 0 0 1.5px rgba(249, 230, 225, 0.22), 0 30px 70px -24px rgba(0, 0, 0, 0.7), 0 34px 90px -30px rgba(255, 210, 63, 0.35);
}
.phone__bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.7rem 1rem 0.55rem; border-bottom: 1px solid var(--color-border);
  background: var(--color-surface); font-size: var(--text-xs); color: var(--color-text-muted);
}
.phone__bar b { color: var(--color-text); font-weight: var(--weight-semibold); }
.phone__bar i { justify-self: end; width: 4px; height: 4px; margin-right: 12px; border-radius: 50%; background: currentColor; box-shadow: 6px 0 0 currentColor, 12px 0 0 currentColor; }
.phone__screen { display: flex; flex-direction: column; min-height: 30.5rem; }
.demo { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-3) 0; }
.demo__master { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); }
.demo__master p { margin: 0; line-height: 1.25; }
.demo__master b { display: block; font: 800 var(--display-xs)/1.1 var(--font-display); }
.demo__master p span { font-size: var(--text-xs); color: var(--color-text-muted); }
.demo__avatar { display: grid; place-items: center; width: 2.5rem; height: 2.875rem; padding-top: 0.3rem; border-radius: var(--radius-window); background: var(--color-accent); color: var(--color-on-accent); font: 800 1.25rem/1 var(--font-display); }
.demo__label { margin: var(--space-2) 0 0; color: var(--color-text-subtle); }
.demo__services .o-row { min-height: 3.25rem; padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.demo .o-days { margin-inline: -4px; }
.demo .o-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo__bar { margin: auto calc(var(--space-3) * -1) 0; }
.demo--done { justify-content: center; gap: var(--space-4); padding-bottom: var(--space-4); }
.demo__ticket { animation: l-print var(--dur-slow) var(--ease-out) both; }
.demo__done-title { margin: var(--space-4) 0 var(--space-2); }
.demo__done-title:focus-visible { outline-offset: 4px; }
.demo__done-text { margin: 0 0 var(--space-1); font-size: var(--text-sm); color: var(--color-text-muted); }
.demo__done-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.demo__fine { margin: 0; text-align: center; font-size: var(--text-xs); color: var(--color-text-subtle); }
@keyframes l-print { from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); } to { clip-path: inset(0 0 -30% 0); transform: none; } }

/* ---------- Переписка против ссылки ---------- */
.versus { --sill-color: var(--color-text); display: grid; gap: var(--space-5); margin-top: var(--space-10); padding-inline: 0; }
.versus__old {
  padding: var(--space-6) var(--space-5); border-radius: var(--radius-lg);
  background: repeating-linear-gradient(180deg, var(--color-bg-sunken) 0 11px, var(--slot-busy-stripe) 11px 13px);
}
.chat { display: grid; gap: var(--space-2); margin: var(--space-5) 0; padding: 0; list-style: none; }
.chat li { max-width: 86%; padding: 0.6rem 0.85rem; border-radius: 1.1rem; font-size: 0.9375rem; line-height: 1.4; }
.chat__in { justify-self: start; border-bottom-left-radius: 0.3rem; background: var(--color-surface-raised); }
.chat__out { justify-self: end; border-bottom-right-radius: 0.3rem; background: var(--color-accent-soft); }
.chat li.chat__gap { justify-self: center; padding: 0.3rem 0.8rem 0.2rem; border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-text-muted); font: 700 var(--text-xs)/1.2 var(--font-display); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.versus__sum { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: 1.35; text-wrap: balance; }
.versus__new {
  display: grid; justify-items: center; align-content: center; gap: var(--space-5); padding: 5.5rem var(--space-5) var(--space-8); text-align: center;
  position: relative; margin-bottom: 14px; border-radius: 14rem 14rem 0 0; background: var(--color-light); color: var(--color-on-light);
}
/* подоконник: цвет берём снаружи блока, чтобы он был виден в обеих темах */
.versus__new::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: -14px; height: 14px; border-radius: 0 0 6px 6px; background: var(--sill-color); }
.versus__link { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0.8rem 1.25rem; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-on-accent); font-weight: var(--weight-semibold); }
.taps { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.taps li { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.35rem 0.9rem 0.35rem 0.35rem; border-radius: var(--radius-pill); background: var(--color-surface-raised); font-size: 0.9375rem; font-weight: var(--weight-semibold); }
.taps .o-num { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding-top: 0.1rem; border-radius: 50%; background: var(--color-accent); color: var(--color-on-accent); font-size: 1.0625rem; }
.versus__stamp { margin: 0; font-size: var(--display-sm); }
.versus__new h3 { font-size: var(--display-md); }
.versus__new .versus__sum { max-width: 24rem; }
@media (min-width: 52rem) {
  .versus { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .versus__old { padding: var(--space-8); }
}

/* ---------- Три шага: один талон с линиями отрыва ---------- */
.steps { display: grid; margin: var(--space-10) 0 0; padding: 0; list-style: none; border-radius: var(--radius-lg); background: var(--color-surface-raised); box-shadow: var(--shadow-2); }
.steps__item { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-3); padding: var(--space-6) var(--space-5) var(--space-8); }
.steps__item + .steps__item { border-top: 2px dashed var(--color-border-strong); }
.steps__item + .steps__item::before, .steps__item + .steps__item::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-bg-sunken); }
.steps__item + .steps__item::before { left: -10px; }
.steps__item + .steps__item::after { right: -10px; }
.steps__item p { margin: 0; color: var(--color-text-muted); }
.steps__n { display: grid; place-items: center; width: 3rem; height: 3.5rem; padding-top: 0.4rem; border-radius: var(--radius-window); background: var(--color-light); color: var(--color-on-light); font-size: 1.875rem; line-height: 1; }
.steps__art { margin: var(--space-3) 0 0; font-size: var(--text-sm); }
.steps__art--list { padding: 0; list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-muted); overflow: hidden; }
.steps__art--list li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 0.55rem 0.8rem; }
.steps__art--list li + li { border-top: 1px solid var(--color-border); }
.steps__art--list .o-num { font-size: var(--text-md); white-space: nowrap; }
.steps__item p.steps__art--link { justify-self: start; display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.65rem 1rem; border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-pill); color: var(--color-text); font-weight: var(--weight-semibold); }
.steps__item p.steps__art--note { padding: 0.7rem 0.9rem; border-radius: 1.1rem 1.1rem 1.1rem 0.3rem; background: var(--color-accent-soft); color: var(--color-text); }
.steps__art--note b { display: block; }
@media (min-width: 56rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps__item { padding: var(--space-8) var(--space-6); }
  .steps__item + .steps__item { border-top: 0; border-left: 2px dashed var(--color-border-strong); }
  .steps__item + .steps__item::before { left: -11px; top: -10px; }
  .steps__item + .steps__item::after { left: -11px; right: auto; top: auto; bottom: -10px; }
}

/* ---------- Что умеет бот ---------- */
.bot { display: grid; gap: var(--space-10); }
.bot__master { margin: var(--space-8) 0 0; max-width: 27rem; padding: var(--space-4); border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-md); font-size: 0.9375rem; color: var(--color-text-muted); }
.bot__master b { display: block; margin-bottom: var(--space-1); color: var(--color-text); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline > li { position: relative; padding: 0 0 var(--space-8) 2rem; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: ""; position: absolute; left: 6px; top: 1.1rem; bottom: -0.2rem; border-left: 2px dashed var(--color-border-strong); }
.timeline > li:last-child::before { display: none; }
.timeline > li::after { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 17px; border-radius: 999px 999px 3px 3px; background: var(--color-light); }
.timeline__when { margin: 0 0 var(--space-3); padding-top: 0.2rem; color: var(--color-text-muted); }
.timeline__pro { margin-left: var(--space-2); padding: 0.15rem 0.4rem 0.05rem; border-radius: var(--radius-xs); background: var(--color-light); color: var(--color-on-light); }
.msg { max-width: 27rem; padding: 0.8rem 0.9rem 0.7rem; border-radius: 0.35rem 1.15rem 1.15rem 1.15rem; background: var(--color-surface-raised); font-size: 0.9375rem; line-height: 1.45; }
.msg p { margin: 0 0 var(--space-2); }
.msg__keys { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.4rem; margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.msg__keys li { padding: 0.5rem 0.3rem 0.45rem; border-radius: var(--radius-sm); background: var(--color-bg); text-align: center; font-size: var(--text-xs); font-weight: var(--weight-semibold); }
@media (min-width: 62rem) {
  .bot { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: var(--space-16); }
  .bot__copy { align-self: start; position: sticky; top: var(--space-10); }
}

/* ---------- Кабинет мастера ---------- */
.cabinet { display: grid; gap: var(--space-10); }
.plain { margin: var(--space-8) 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--color-border-strong); }
.plain li { padding: var(--space-3) 0; border-top: 1px solid var(--color-border-strong); color: var(--color-text-muted); }
.plain b { color: var(--color-text); font-weight: var(--weight-semibold); }
.cabinet__try { margin: var(--space-5) 0 0; }
.cabinet__try a { display: inline-block; padding-block: var(--space-3); font-weight: var(--weight-semibold); }
.cabinet__screen { margin: 0; min-width: 0; }
.cabinet__panel { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface-muted); box-shadow: var(--shadow-3); }
.cabinet__panel .o-day { width: 4.4rem; cursor: default; }
.cabinet__panel .o-row { padding-inline: var(--space-3); }
@media (max-width: 30rem) {
  .cabinet__panel .o-row { grid-template-columns: auto minmax(0, 1fr); row-gap: var(--space-2); }
  .cabinet__panel .o-row .o-badge { grid-column: 2; justify-self: start; }
  .cabinet__panel .o-row > span:empty { display: none; }
}
.cabinet__screen figcaption { margin-top: var(--space-4); text-align: center; font-size: var(--text-sm); color: var(--color-text-subtle); }
@media (min-width: 62rem) {
  .cabinet { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: var(--space-16); align-items: center; }
}

/* ---------- Тарифы ---------- */
.pricing { display: grid; gap: var(--space-10); }
.plans { --ticket-cut: var(--color-bg-sunken); display: grid; gap: var(--space-6); align-items: start; }
.plan .o-ticket__body { padding: var(--space-6) var(--space-6) var(--space-5); }
.plan .o-ticket__stub { padding: var(--space-5) var(--space-6) var(--space-6); }
.plan__price { margin: var(--space-3) 0 var(--space-5); font-size: var(--text-lg); color: var(--color-text-muted); }
.plan__price .o-num { display: block; font-size: var(--display-lg); font-weight: 800; line-height: 1; color: var(--color-text); }
.plan__rub { margin: calc(var(--space-2) * -1) 0 var(--space-5); font-size: var(--text-sm); }
.plan__also { margin: 0 0 var(--space-3); font-weight: var(--weight-semibold); }
.plan__trial { margin: var(--space-3) 0 0; font-size: var(--text-sm); line-height: 1.45; }
.plan--pro { background: var(--color-light); color: var(--color-on-light); box-shadow: var(--shadow-2), var(--shadow-light); }
.plan--pro .plan__price { color: var(--color-on-light); }
.ticks { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0.3rem; top: 0.2em; width: 0.45rem; height: 0.85rem; border: solid var(--color-success); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
@media (min-width: 52rem) {
  .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: var(--space-6); }
  .plan--pro { transform: rotate(1.2deg); margin-top: calc(var(--space-4) * -1); }
}

@media (min-width: 72rem) {
  .pricing { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); gap: var(--space-12); }
  .pricing__copy { align-self: start; position: sticky; top: var(--space-10); }
}

/* ---------- Вопросы ---------- */
.faq { display: grid; gap: var(--space-8); }
.faq__list { border-top: 2px solid var(--color-text); }
.faq details { border-bottom: 1px solid var(--color-border-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3.75rem; padding: var(--space-4) 0; font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 1rem; height: 1rem; transition: transform var(--dur-base) var(--ease-out);
  background: linear-gradient(currentColor, currentColor) center / 100% 2.5px no-repeat, linear-gradient(currentColor, currentColor) center / 2.5px 100% no-repeat;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 var(--space-5); max-width: 60ch; color: var(--color-text-muted); }
@media (min-width: 62rem) {
  .faq { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-16); }
  .faq h2 { align-self: start; position: sticky; top: var(--space-10); }
}

/* ---------- Финал: большое светящееся окно ---------- */
.final { padding-top: var(--space-section); }
.final .l-wrap::after { content: ""; display: block; max-width: 49rem; height: 14px; margin-inline: auto; border-radius: 0 0 6px 6px; background: var(--color-text); }
.final__window {
  max-width: 45rem; margin-inline: auto; padding: clamp(5.5rem, 15vw, 9.5rem) clamp(1.5rem, 6vw, 4rem) var(--space-12); text-align: center;
  border-radius: 24rem 24rem 0 0; background: var(--color-light); color: var(--color-on-light);
}
.final__window h2 { margin-inline: auto; }
.final__window p { max-width: 34ch; margin: var(--space-4) auto 0; font-size: var(--text-lg); line-height: 1.45; }
.final__actions { display: grid; justify-items: center; gap: var(--space-2); margin-top: var(--space-8); }
.final__second { display: inline-block; padding: var(--space-3); color: var(--color-on-light); font-weight: var(--weight-semibold); }

/* ---------- Подвал ---------- */
.l-footer { display: grid; gap: var(--space-3); padding-block: var(--space-12) var(--space-8); font-size: var(--text-sm); color: var(--color-text-muted); }
.l-footer p { margin: 0; }
.l-footer ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); margin: 0; padding: 0; list-style: none; }
.l-footer li a { display: inline-block; padding-block: var(--space-3); color: var(--color-text); }
.l-footer .o-logo svg { height: 1.375rem; }
@media (min-width: 52rem) {
  .l-footer { grid-template-columns: auto 1fr auto; align-items: center; column-gap: var(--space-8); }
  .l-footer__copy { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .demo__ticket { animation: none; }
  .plan--pro { transform: none; }
}

.plan__more { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--color-text-muted); }
