/* ============================================================
   Стили сайта-визитки. Mobile-first.
   Акцентный цвет и вся палитра — в :root, менять здесь.
   ============================================================ */

:root {
    --accent: #b3573a;          /* тёплый терракотовый — акцент кнопок и ссылок */
    --accent-dark: #96452c;     /* тот же цвет темнее, для hover */
    --accent-soft: #f6e8e2;     /* очень светлый оттенок акцента, для фонов */
    --max-color: #6b46c1;       /* фирменный фиолетовый мессенджера MAX */
    --max-color-dark: #59379f;
    --bg: #ffffff;
    --bg-alt: #faf6f1;          /* светло-бежевый фон чередующихся секций */
    --text: #2b2825;
    --text-muted: #6f6a63;
    --border: #e8e2d9;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(60, 45, 30, 0.08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PT Sans", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

h1 { font-size: 1.9rem; line-height: 1.25; }
h2 { font-size: 1.6rem; margin-bottom: 0.75em; }
h3 { font-size: 1.15rem; }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-note { color: var(--text-muted); max-width: 640px; margin-bottom: 28px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-max { background: var(--max-color); color: #fff; }
.btn-max:hover { background: var(--max-color-dark); }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}
.logo {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
}
.logo-sub {
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.main-nav { display: none; }
.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
}
.main-nav a:hover { color: var(--accent); }
.header-phone {
    display: none;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* Бургер (мобильное меню) */
.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}
.burger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    box-shadow: var(--shadow);
}
.main-nav.open a { padding: 12px 0; font-size: 1.1rem; border-bottom: 1px solid var(--border); }
.main-nav.open a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(100deg, rgba(32, 23, 16, 0.82) 0%, rgba(32, 23, 16, 0.55) 70%, rgba(32, 23, 16, 0.45) 100%),
                url('../img/hero.jpg') center 65% / cover no-repeat;
    color: #fff;
    padding: 72px 0 64px;
}
.hero h1 { max-width: 640px; }
.hero-subtitle {
    max-width: 560px;
    margin: 18px 0 28px;
    font-size: 1.1rem;
    opacity: 0.92;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 32px;
    font-size: 0.95rem;
    opacity: 0.9;
}
.hero-badges li::before { content: "✓ "; color: #ffcfa8; }

/* ---------- О мастере ---------- */
.about-grid { display: grid; gap: 32px; }
.about-photo img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    object-fit: cover;
}
.about-name { font-size: 1.2rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.about-text p { margin-bottom: 12px; }
.about-facts {
    list-style: none;
    margin-top: 20px;
    display: grid;
    gap: 10px;
}
.about-facts li {
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: 12px 16px;
}

/* ---------- Услуги ---------- */
.services-grid { display: grid; gap: 20px; }
.service-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.service-card p { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; }
.service-price { font-weight: 700; font-size: 1.15rem; color: var(--accent); }
.service-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.service-link:hover { color: var(--accent-dark); }

/* ---------- Галерея ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery-item {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-alt);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item.hidden { display: none; }
.gallery-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 24px 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 0.82rem;
}

/* ---------- Отзывы ---------- */
.reviews-grid { display: grid; gap: 20px; }
.review-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.review-text { flex-grow: 1; }
.review-footer { display: flex; align-items: center; gap: 12px; }
.review-author { display: flex; flex-direction: column; }
.review-author span { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Контакты ---------- */
.contacts { background: var(--accent-soft); text-align: center; }
.contacts-inner { max-width: 680px; }
.contacts p { margin-bottom: 8px; }
.contacts-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 28px 0 20px;
}
.contacts-area { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Футер ---------- */
.site-footer {
    background: #2b2825;
    color: #b9b3aa;
    padding: 28px 0;
    font-size: 0.9rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 12px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { color: #b9b3aa; text-decoration: underline; }
.footer-nav a:hover { color: #fff; }

/* ---------- Лайтбокс ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(20, 15, 10, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure {
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox figcaption { color: #ddd; font-size: 0.95rem; text-align: center; }
.lightbox button {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 12px;
    line-height: 1;
    opacity: 0.8;
}
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 12px; right: 16px; font-size: 2.6rem; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   Планшет
   ============================================================ */
@media (min-width: 640px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.9rem; }
    .services-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { grid-template-columns: 1fr 1fr; }
    .contacts-actions { flex-direction: row; justify-content: center; }
    .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
    .footer-nav { flex-direction: row; gap: 20px; }
}

/* ============================================================
   Десктоп
   ============================================================ */
@media (min-width: 960px) {
    .burger { display: none; }
    .main-nav { display: flex; gap: 26px; }
    .header-phone { display: block; }
    .hero { padding: 110px 0 96px; }
    .about-grid { grid-template-columns: 5fr 7fr; align-items: center; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .reviews-grid { grid-template-columns: repeat(3, 1fr); }
    .section { padding: 80px 0; }
}
