/* ============================================================
   Память и свет — основные стили
   Сдержанный, уважительный дизайн. Две темы.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Manrope:wght@300;400;500;600;700&display=swap');

/* ---------- TOKENS ---------- */
:root {
    /* Тёмная тема — по умолчанию */
    --bg:           #14161a;
    --bg-elevated:  #1c1f24;
    --bg-card:      #21252b;
    --bg-overlay:   rgba(20, 22, 26, 0.85);

    --text:         #e8e6df;
    --text-muted:   #9a958a;
    --text-soft:    #6f6a60;

    --border:       #2c3038;
    --border-soft:  #23272d;

    --accent:       #c9a96e;       /* приглушённое золото */
    --accent-soft:  #b89558;
    --accent-bg:    rgba(201, 169, 110, 0.08);

    --danger:       #c75a5a;
    --success:      #6e9c6c;

    --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md:    0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.45);

    --radius-sm:    6px;
    --radius:       12px;
    --radius-lg:    20px;

    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body:    'Manrope', system-ui, sans-serif;

    --container:    1240px;
    --transition:   0.25s ease;
}

[data-theme="light"] {
    --bg:           #f5f3ee;
    --bg-elevated:  #fbfaf6;
    --bg-card:      #ffffff;
    --bg-overlay:   rgba(245, 243, 238, 0.9);

    --text:         #2a2722;
    --text-muted:   #5e574e;
    --text-soft:    #8a8378;

    --border:       #d8d3c8;
    --border-soft:  #e8e3d8;

    --accent:       #8a6e3a;
    --accent-soft:  #a08550;
    --accent-bg:    rgba(138, 110, 58, 0.08);

    --shadow-sm:    0 2px 8px rgba(80, 70, 50, 0.08);
    --shadow-md:    0 8px 24px rgba(80, 70, 50, 0.12);
    --shadow-lg:    0 20px 60px rgba(80, 70, 50, 0.18);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; font-weight: 600; }

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

/* ---------- HEADER ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0;
    gap: 32px;
}
.logo {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 600;
}
.logo-mark {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 1px solid var(--accent);
    display: grid; place-items: center;
    color: var(--accent);
}
.logo-text small {
    display: block; font-family: var(--font-body); font-size: 0.7rem;
    color: var(--text-muted); font-weight: 400; letter-spacing: 0.08em;
    text-transform: uppercase; margin-top: 2px;
}

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding: 4px 0;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 1px; background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.phone-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.9rem; font-weight: 500;
    transition: all var(--transition);
}
.phone-link:hover { background: var(--accent); color: var(--bg); }

.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; }
.burger span { display: block; width: 16px; height: 1px; background: currentColor; margin: 3px auto; }

/* ---------- HERO ---------- */
.hero {
    position: relative;
    padding: 100px 0 120px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, var(--accent-bg) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, var(--accent-bg) 0%, transparent 60%);
    pointer-events: none;
}
.hero-grid {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px;
    align-items: center; position: relative;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 24px;
}
.hero-eyebrow::before {
    content: ''; width: 32px; height: 1px; background: var(--accent);
}
.hero h1 { margin-bottom: 28px; }
.hero h1 em {
    font-style: italic; color: var(--accent); font-weight: 400;
}
.hero p.lead {
    font-size: 1.15rem; color: var(--text-muted);
    max-width: 540px; margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 0.95rem; font-weight: 500;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--accent); color: #14161a;
}
.btn-primary:hover { background: var(--accent-soft); color: #14161a; transform: translateY(-1px); }
.btn-ghost {
    border-color: var(--border); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

.hero-visual {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-elevated), var(--bg-card));
    display: grid; place-items: center;
}
.hero-visual::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, var(--bg-elevated) 80%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="n"><feTurbulence baseFrequency="0.85"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/></filter><rect width="200" height="200" filter="url(%23n)"/></svg>');
    opacity: 0.6;
}
.hero-visual svg { position: relative; width: 60%; height: auto; opacity: 0.5; color: var(--accent); }

.hero-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border-soft);
}
.stat-num {
    font-family: var(--font-display);
    font-size: 2.4rem; font-weight: 500;
    color: var(--accent); line-height: 1;
}
.stat-label {
    color: var(--text-muted); font-size: 0.9rem;
    margin-top: 8px;
}

/* ---------- SECTION COMMON ---------- */
section.section { padding: 100px 0; }
.section-head {
    display: flex; align-items: end; justify-content: space-between;
    gap: 32px; margin-bottom: 56px;
}
.section-eyebrow {
    font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 12px; display: block;
}
.section-head h2 { max-width: 600px; }
.section-head .link {
    color: var(--accent); font-size: 1.1rem; font-weight: 500;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 4px;
}

/* ---------- CATALOG HOMEPAGE (compact one-row demo) ---------- */
#catalog .products-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
#catalog .product-image {
    aspect-ratio: 4/3;
}
#catalog .product-body {
    padding: 12px;
    gap: 6px;
}
#catalog .product-name { font-size: 0.82rem; }
#catalog .product-price { font-size: 1.05rem; }
#catalog .product-actions .btn { padding: 8px 12px; font-size: 0.78rem; }

/* ---------- SERVICES ---------- */
.services-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    padding: 36px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity var(--transition);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.service-card:hover::after { opacity: 1; }
.service-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    display: grid; place-items: center;
    margin-bottom: 24px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { margin-bottom: 12px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }
.service-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 20px; color: var(--accent);
    font-size: 0.9rem; font-weight: 500;
}

/* ---------- CATALOG / PRODUCTS ---------- */
.catalog-tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 6px; background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 999px; width: fit-content;
}
.catalog-tabs button {
    padding: 8px 18px; border-radius: 999px;
    font-size: 0.9rem; color: var(--text-muted);
    transition: all var(--transition);
}
.catalog-tabs button:hover { color: var(--text); }
.catalog-tabs button.active {
    background: var(--accent); color: #14161a;
}

.products-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex; flex-direction: column;
}
.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.product-image {
    aspect-ratio: 1/1.15;
    background: var(--bg-elevated);
    position: relative;
    overflow: hidden;
}
.product-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.product-card:hover .product-image img { transform: scale(1.04); }
.product-image-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: var(--text-soft);
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
}
.product-image-placeholder svg { width: 40%; max-width: 80px; opacity: 0.4; }
.product-body {
    padding: 20px;
    display: flex; flex-direction: column; gap: 10px;
    flex: 1;
}
.product-name { font-size: 1rem; font-weight: 500; color: var(--text); }
.product-price {
    font-family: var(--font-display);
    font-size: 1.3rem; font-weight: 600; color: var(--accent);
}
.product-actions { margin-top: auto; padding-top: 12px; }
.product-actions .btn {
    width: 100%; justify-content: center; padding: 12px 18px; font-size: 0.85rem;
}

/* ---------- REVIEWS ---------- */
.reviews-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.review-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    position: relative;
}
.review-quote {
    font-family: var(--font-display);
    font-size: 4rem; line-height: 1; color: var(--accent);
    opacity: 0.4; position: absolute; top: 12px; right: 24px;
}
.review-text {
    color: var(--text); font-size: 1rem; line-height: 1.7;
    margin-bottom: 20px; font-style: italic;
}
.review-author {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-muted); font-size: 0.9rem;
}
.review-author::before {
    content: ''; width: 24px; height: 1px; background: var(--accent);
}
.review-stars { color: var(--accent); margin-bottom: 16px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid var(--border-soft);
}
.faq-item summary {
    padding: 24px 0; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    gap: 24px;
    font-size: 1.1rem; font-weight: 500;
    list-style: none;
    transition: color var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-icon {
    width: 28px; height: 28px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: grid; place-items: center;
    flex-shrink: 0;
    transition: all var(--transition);
}
.faq-item[open] .faq-icon {
    transform: rotate(45deg); border-color: var(--accent); color: var(--accent);
}
.faq-answer {
    padding: 0 0 24px;
    color: var(--text-muted);
    max-width: 720px;
}

/* ---------- CONTACT FORM ---------- */
.contact-section {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}
.contact-grid {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px;
}
.contact-info p { color: var(--text-muted); margin-bottom: 32px; max-width: 420px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.contact-list li {
    display: flex; align-items: start; gap: 16px;
}
.contact-list .icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 50%; background: var(--accent-bg); color: var(--accent);
    display: grid; place-items: center;
}
.contact-list strong { display: block; margin-bottom: 4px; }
.contact-list span { color: var(--text-muted); font-size: 0.95rem; }

.form-card {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}
.form-card h3 { margin-bottom: 8px; }
.form-card .form-sub { color: var(--text-muted); margin-bottom: 28px; font-size: 0.95rem; }
.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin-bottom: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
    font-size: 0.8rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.form-field input,
.form-field textarea,
.form-field select {
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color var(--transition);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none; border-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-disclaimer {
    font-size: 0.8rem; color: var(--text-soft);
    margin-top: 12px;
}

.alert {
    padding: 14px 18px; border-radius: var(--radius-sm);
    margin-bottom: 20px; font-size: 0.9rem;
}
.alert-success { background: rgba(110, 156, 108, 0.12); color: var(--success); border: 1px solid rgba(110, 156, 108, 0.3); }
.alert-error   { background: rgba(199, 90, 90, 0.12); color: var(--danger); border: 1px solid rgba(199, 90, 90, 0.3); }

/* ---------- FOOTER ---------- */
.site-footer {
    margin-top: auto;
    padding: 64px 0 32px;
    background: var(--bg);
    border-top: 1px solid var(--border-soft);
}
.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px; margin-bottom: 48px;
}
.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 20px; font-weight: 600;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-about p { color: var(--text-muted); font-size: 0.95rem; max-width: 320px; }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    display: flex; justify-content: space-between;
    color: var(--text-soft); font-size: 0.85rem;
    flex-wrap: wrap; gap: 12px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
    .nav { display: none; }
    .nav.open {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg-elevated);
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 16px;
    }
    .burger { display: grid; place-items: center; }
    .phone-link span { display: none; }
    .phone-link { width: 38px; height: 38px; padding: 0; justify-content: center; }
    .hero { padding: 60px 0 80px; }
    section.section { padding: 64px 0; }
    .section-head { flex-direction: column; align-items: start; }
    .services-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .reviews-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 24px; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 0.7s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
