/*
 * Оформлення сайту-візитівки.
 *
 * Сторінку відкривають з реклами, майже завжди з телефона й часто на
 * мобільному інтернеті. Звідси все інше:
 *
 *   — Спочатку телефон. Широкий екран отримує додаткові колонки, а не
 *     окремий макет: підтримувати два макети означає ламати один із них.
 *   — Перший екран не залежить від сервера. Фото, обіцянка й кнопка вже в
 *     розмітці; дані лише доповнюють сторінку.
 *   — Кнопка не менша за 56px, текст не менший за 16px. Аудиторія салону —
 *     дорослі жінки, і дрібний шрифт коштує тут реальних записів.
 *
 * Палітра та сама, що в Mini App: людина з реклами йде в Telegram і має
 * потрапити наче в те саме місце, а не до іншого салону.
 */

:root {
    --bg: #fdfbfa;
    --surface: #ffffff;
    --text: #191317;
    --text-muted: #6f6469;

    --accent: #b8446a;
    --accent-dark: #963355;
    --accent-soft: #fbeef2;
    --accent-contrast: #ffffff;

    --border: rgba(25, 19, 23, 0.09);

    --radius-sm: 14px;
    --radius: 20px;
    --radius-lg: 28px;

    --shadow: 0 1px 2px rgba(25, 19, 23, 0.05), 0 6px 20px rgba(25, 19, 23, 0.07);
    --shadow-lifted: 0 2px 4px rgba(25, 19, 23, 0.06), 0 16px 38px rgba(25, 19, 23, 0.14);

    --wrap: 640px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #161214;
        --surface: #221c20;
        --text: #f4eff1;
        --text-muted: #a99ea3;

        --accent: #e58aa8;
        --accent-dark: #f0a5be;
        --accent-soft: rgba(229, 138, 168, 0.14);
        --accent-contrast: #2a1019;

        --border: rgba(255, 255, 255, 0.1);

        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
        --shadow-lifted: 0 2px 4px rgba(0, 0, 0, 0.45), 0 16px 38px rgba(0, 0, 0, 0.5);
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Атрибут hidden ховає елемент лише стилем браузера — будь-яке власне
   display його перебиває. Тому закріплюємо явно. */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.locked {
    overflow: hidden;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

p {
    margin: 0;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

.muted {
    color: var(--text-muted);
}

/* ─── Кнопки ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: var(--shadow-lifted);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.btn-quiet {
    background: var(--accent-soft);
    color: var(--accent-dark);
    box-shadow: none;
}

.btn-block {
    width: 100%;
}

/* ─── Перший екран ──────────────────────────────────────────────────────── */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 88svh;
    padding: 96px 0 36px;
    padding-top: max(96px, env(safe-area-inset-top));
    overflow: hidden;
}

/*
 * Фото на весь екран із затемненням знизу.
 *
 * Градієнт тут не прикраса, а умова читабельності: без нього білий текст
 * лягає на світлі ділянки фото й зникає рівно там, де стоїть обіцянка.
 */
.hero-photo {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
            to bottom,
            rgba(14, 10, 18, 0.2) 0%,
            rgba(14, 10, 18, 0.62) 46%,
            rgba(14, 10, 18, 0.92) 100%
        ),
        url('/assets/hero.jpg');
    background-size: cover;
    /* Кадр квадратний, екран телефона — вузький і високий. Зсув угору
       лишає руку у видимій частині, а текст лягає на темну тканину. */
    background-position: 56% 32%;
}

.hero-body {
    position: relative;
    color: #ffffff;
}

.hero-kicker {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.hero h1 {
    font-size: clamp(30px, 8vw, 44px);
    font-weight: 700;
}

.hero-lead {
    margin-top: 14px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    text-wrap: pretty;
}

.promo {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
}

/* Другорядна дія на темному фоні: скло замість білої плашки, щоб не
   сперечатися з головною кнопкою за увагу. */
.hero-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.trust-chip {
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    backdrop-filter: blur(6px);
}

/* ─── Розділи ───────────────────────────────────────────────────────────── */

.section {
    padding: 44px 0;
}

.section-tinted {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section h2 {
    font-size: 26px;
    margin-bottom: 6px;
}

.section-note {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 15px;
}

.section h2 + .reasons,
.section h2 + .steps,
.section h2 + div {
    margin-top: 20px;
}

/* ─── «Вам до нас, якщо» ────────────────────────────────────────────────── */

.reasons {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reason {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.section-tinted .reason {
    background: var(--bg);
}

.reason-icon {
    font-size: 22px;
    line-height: 1.3;
}

/* ─── Галерея ───────────────────────────────────────────────────────────── */

/*
 * На телефоні — стрічка з прилипанням, на широкому екрані — сітка.
 *
 * Горизонтальна стрічка виграє на мобільному не через моду: вона показує
 * «далі є ще», не займаючи екран, і дає роздивитись роботу великою.
 */
.gallery {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 4px 20px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.tile {
    position: relative;
    flex: 0 0 min(74vw, 300px);
    aspect-ratio: 1;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--accent-soft);
    box-shadow: var(--shadow);
    scroll-snap-align: center;
    cursor: pointer;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 14px 12px;
    background: linear-gradient(to top, rgba(20, 12, 16, 0.85), transparent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

/* ─── Фото на весь екран ────────────────────────────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: rgba(12, 8, 10, 0.94);
    overflow-y: auto;
}

.lightbox img {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius);
}

.lightbox-caption {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: grid;
    gap: 10px;
    color: #ffffff;
    text-align: center;
}

.lightbox-caption .muted {
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-close {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.tag {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
}

/* ─── Ціни ──────────────────────────────────────────────────────────────── */

.price-group + .price-group {
    margin-top: 26px;
}

.price-group-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.price-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.price-left {
    display: grid;
    gap: 3px;
}

.price-name {
    font-weight: 600;
}

.price-desc,
.price-meta {
    font-size: 15px;
    color: var(--text-muted);
}

.price-value {
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
}

/* ─── Майстри ───────────────────────────────────────────────────────────── */

.master-list {
    display: grid;
    gap: 14px;
}

.master {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}

.master-avatar {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 26px;
    font-weight: 700;
}

.master-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-body {
    display: grid;
    gap: 4px;
    align-content: start;
}

.master-body h3 {
    font-size: 19px;
}

.master-facts {
    font-size: 15px;
    color: var(--text-muted);
}

/* ─── Кроки ─────────────────────────────────────────────────────────────── */

.steps {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 18px 18px 18px 60px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    counter-increment: step;
}

.section-tinted .step {
    background: var(--bg);
}

.step::before {
    content: counter(step);
    position: absolute;
    left: 18px;
    top: 18px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 700;
    font-size: 16px;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.step p {
    color: var(--text-muted);
    font-size: 16px;
}

/* ─── Відгуки ───────────────────────────────────────────────────────────── */

.review-list {
    display: grid;
    gap: 12px;
}

.review {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}

.review-stars {
    font-size: 14px;
    letter-spacing: 1px;
}

.review-text {
    font-size: 16px;
}

.review .muted {
    font-size: 15px;
}

/* ─── Питання ───────────────────────────────────────────────────────────── */

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    padding: 4px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.section-tinted .faq-item {
    background: var(--bg);
}

.faq-item summary {
    padding: 14px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '＋';
    float: right;
    color: var(--accent);
    font-weight: 400;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding-bottom: 16px;
    color: var(--text-muted);
}

/* ─── Де ми ─────────────────────────────────────────────────────────────── */

.where-address {
    font-size: 18px;
    font-weight: 600;
}

.where-subtitle {
    margin-top: 22px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.hours-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.hours-row.is-off {
    color: var(--text-muted);
}

.where-links {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

/* ─── Фінал і підвал ────────────────────────────────────────────────────── */

.final-cta {
    text-align: center;
    padding-bottom: 56px;
}

.final-cta .section-note {
    margin-left: auto;
    margin-right: auto;
    max-width: 420px;
}

.final-note {
    margin-top: 14px;
    font-size: 16px;
    color: var(--text-muted);
}

.final-note a {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.footer {
    padding: 26px 0 calc(96px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
}

.footer-links {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.footer a {
    color: var(--text-muted);
}

/* ─── Панель унизу ──────────────────────────────────────────────────────── */

.sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
}

.sticky-bar .btn-primary {
    flex: 1;
}

.sticky-call {
    flex: 0 0 56px;
    width: 56px;
    padding: 0;
    font-size: 22px;
}

/* ─── Згода на аналітику ────────────────────────────────────────────────── */

/*
 * Показується лише тоді, коли власниця підключила Meta Pixel. Без згоди
 * жоден сторонній скрипт не вантажиться — рекламна статистика не варта
 * того, щоб стежити за людиною без її відома.
 */
.consent {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 70;
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lifted);
    font-size: 15px;
}

.consent-actions {
    display: flex;
    gap: 10px;
}

.consent-actions .btn {
    flex: 1;
    min-height: 48px;
    font-size: 16px;
}

/* ─── Текстова сторінка (політика конфіденційності) ─────────────────────── */

.doc h1 {
    font-size: 30px;
    margin-bottom: 6px;
}

.doc h2 {
    font-size: 20px;
    margin-top: 28px;
    margin-bottom: 8px;
}

.doc p {
    color: var(--text-muted);
    text-wrap: pretty;
}

.doc a {
    color: var(--accent);
    font-weight: 600;
}

/* ─── Широкий екран ─────────────────────────────────────────────────────── */

/*
 * Ширший екран не отримує іншого макета — лише більше колонок там, де
 * вміст від цього виграє. Рекламу дивляться і з ноутбука, і сторінка не
 * має виглядати телефоном, розтягнутим на весь монітор.
 */
@media (min-width: 720px) {
    :root {
        --wrap: 900px;
    }

    .hero {
        min-height: 76svh;
    }

    .hero-lead {
        max-width: 34ch;
        font-size: 20px;
    }

    .hero-actions {
        flex-direction: row;
    }

    .hero-actions .btn {
        min-width: 220px;
    }

    .section {
        padding: 64px 0;
    }

    .section h2 {
        font-size: 32px;
    }

    .reasons,
    .steps,
    .master-list,
    .review-list,
    .faq-list {
        grid-template-columns: 1fr 1fr;
    }

    .gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding-left: 20px;
        padding-right: 20px;
        max-width: var(--wrap);
        margin-left: auto;
        margin-right: auto;
        overflow: visible;
    }

    .tile {
        flex: initial;
    }

    .price-list {
        columns: 2;
        column-gap: 40px;
    }

    .price-group {
        break-inside: avoid;
    }

    .price-group + .price-group {
        margin-top: 0;
        padding-top: 26px;
    }

    .where-links {
        grid-template-columns: 1fr 1fr;
    }

    .sticky-bar {
        justify-content: center;
    }

    .sticky-bar .btn-primary {
        flex: 0 0 320px;
    }

    .consent {
        left: auto;
        right: 20px;
        max-width: 420px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
