/* Гостевая страница extras — mobile-first, без фреймворка (ТЗ extras-phase0). */
:root {
    --bg: #f6f4ef;
    --card: #ffffff;
    --ink: #1f2421;
    --ink-soft: #4a524c;
    --accent: #2f6b4f;
    --accent-ink: #ffffff;
    --line: #e4e0d6;
    --radius: 14px;
    color-scheme: light;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Хедер */
.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0;
}
.site-header .logo { font-weight: 700; letter-spacing: .02em; }
.site-header a.phone { color: var(--accent); text-decoration: none; font-weight: 600; }

/* Hero */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 1.7rem; line-height: 1.25; margin-bottom: 10px; }
.hero p { color: var(--ink-soft); max-width: 34rem; }

/* Сетка каталога */
.catalog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px 0 8px; }
@media (min-width: 768px)  { .catalog { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .catalog { grid-template-columns: repeat(4, 1fr); } }

.card {
    background: var(--card); border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); text-align: left; padding: 0;
    transition: transform .15s ease, box-shadow .15s ease;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(31,36,33,.10); }
.card .cover { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: #ddd8cc; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name { font-weight: 650; font-size: .95rem; line-height: 1.3; }
.card .price { color: var(--accent); font-weight: 700; margin-top: auto; }
.card .note { font-size: .78rem; color: var(--ink-soft); }

/* Секции доверия */
.section { padding: 28px 0 4px; }
.section h2 { font-size: 1.25rem; margin-bottom: 14px; }
.steps { display: grid; gap: 10px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.step b { display: block; margin-bottom: 4px; }
.step span { color: var(--ink-soft); font-size: .92rem; }

.faq details {
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: 12px 14px; margin-bottom: 8px;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin-top: 8px; color: var(--ink-soft); font-size: .95rem; }

.site-footer { padding: 28px 0 40px; color: var(--ink-soft); font-size: .88rem; }
.site-footer a { color: var(--accent); }

/* Слой услуги */
.overlay {
    position: fixed; inset: 0; z-index: 40; background: var(--bg);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    display: none;
}
.overlay.open { display: block; }
.overlay .close {
    position: fixed; top: 12px; right: 12px; z-index: 45;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: rgba(31,36,33,.55); color: #fff; font-size: 1.15rem; line-height: 1;
}
.feed { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.feed img {
    scroll-snap-align: center; flex: 0 0 100%;
    aspect-ratio: 4 / 3; object-fit: cover; max-height: 60svh;
}
.dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }

.service-body { padding: 12px 16px 110px; max-width: 40rem; margin: 0 auto; }
.service-body h2 { font-size: 1.4rem; line-height: 1.25; }
.service-body .price { color: var(--accent); font-weight: 700; font-size: 1.15rem; margin: 6px 0 4px; }
.service-body .note { color: var(--ink-soft); font-size: .9rem; margin-bottom: 6px; }
.service-body h3 { font-size: 1.02rem; margin: 16px 0 8px; }
.service-body ul { padding-left: 20px; color: var(--ink-soft); }
.service-body li { margin-bottom: 5px; }
.service-body .full { color: var(--ink-soft); white-space: pre-line; }

.cta-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
    background: linear-gradient(to top, var(--bg) 70%, transparent);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    display: none;
}
.overlay.open ~ .cta-bar, .cta-bar.on { display: block; }
.cta-bar .inner { max-width: 40rem; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.cta-bar .p { font-weight: 700; color: var(--accent); white-space: nowrap; }
.btn {
    background: var(--accent); color: var(--accent-ink); border: none;
    border-radius: 999px; padding: 13px 26px; font-weight: 650; width: 100%;
}
.btn[disabled] { opacity: .6; cursor: default; }

/* Модалка заявки */
.modal-back {
    position: fixed; inset: 0; z-index: 60; background: rgba(31,36,33,.5);
    display: none; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) { .modal-back { align-items: center; } }
.modal-back.open { display: flex; }
.modal {
    background: var(--card); width: 100%; max-width: 26rem;
    border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    max-height: 92svh; overflow-y: auto; position: relative;
}
.modal .close-inline {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: var(--bg); color: var(--ink-soft); font-size: 1rem; line-height: 1;
}
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.modal h3 { margin-bottom: 2px; }
.modal .svc { color: var(--ink-soft); font-size: .92rem; margin-bottom: 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.field input[type="text"], .field input[type="tel"], .field input[type="date"], .field textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 11px 12px; font: inherit; background: var(--bg);
}
.field textarea { min-height: 70px; resize: vertical; }
.consent { display: flex; gap: 9px; align-items: flex-start; font-size: .84rem; color: var(--ink-soft); margin: 14px 0; }
.consent input { margin-top: 3px; }
.consent a { color: var(--accent); }
.form-error { color: #a4372c; font-size: .86rem; margin-bottom: 10px; display: none; }
.form-error.on { display: block; }
.done { text-align: center; padding: 22px 6px; display: none; }
.done.on { display: block; }
.done .big { font-size: 2rem; margin-bottom: 8px; }
