/* Qelivon — страница приложения и политика конфиденциальности.
   Палитра взята из приложения: тёмная «эспрессо» полка, тёплая бумага, ember #C44830. */

:root {
    color-scheme: light dark;

    --ember: #c44830;
    --ember-hover: #a83a25;
    --ember-on: #ffffff;

    --bg: #faf3e8;
    --bg-alt: #f2e8d8;
    --surface: #fffaf1;
    --text: #2a1a12;
    --text-soft: #6b5546;
    --line: rgba(42, 26, 18, 0.12);
    --shadow: 0 18px 40px -18px rgba(42, 26, 18, 0.35);

    --wood-light: #d9a46c;
    --wood-mid: #b9814a;
    --wood-dark: #8a5a2f;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Fraunces', 'New York', 'Iowan Old Style', Georgia, serif;

    --container: 1120px;
    --radius: 20px;
    --radius-sm: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ember: #e0644a;
        --ember-hover: #ec7a62;
        --ember-on: #1f140e;

        --bg: #1f140e;
        --bg-alt: #281a12;
        --surface: #30211a;
        --text: #faf3e8;
        --text-soft: #c4b3a1;
        --line: rgba(250, 243, 232, 0.14);
        --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ember); text-underline-offset: 3px; }
a:hover { color: var(--ember-hover); }

:focus-visible {
    outline: 3px solid var(--ember);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--ember);
    color: var(--ember-on);
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}
.header-nav a:hover,
.header-nav a[aria-current='page'] { color: var(--text); background: var(--bg-alt); }

.lang-toggle {
    margin-left: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.lang-toggle:hover { background: var(--bg-alt); }

/* ---------- Buttons ---------- */

.store-badge { display: inline-block; line-height: 0; border-radius: 8px; }
.store-badge img { height: 52px; width: auto; }

.store-soon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--text-soft);
    font-weight: 500;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    border-radius: 14px;
    background: var(--bg-alt);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}
.btn-link:hover { color: var(--text); background: var(--line); }

/* ---------- Hero ---------- */

.hero {
    padding: 72px 0 0;
    background:
        radial-gradient(900px 420px at 80% 0%, color-mix(in srgb, var(--ember) 16%, transparent), transparent 70%),
        var(--bg);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: 40px;
}

.hero-copy { padding-bottom: 72px; }

.hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--ember);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 600;
}

.lead {
    margin: 0 0 32px;
    max-width: 34em;
    color: var(--text-soft);
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
}

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.hero-meta {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: var(--text-soft);
    font-size: 0.9375rem;
}
.hero-meta li::before { content: '✓'; margin-right: 8px; color: var(--ember); font-weight: 700; }

.hero-shot { display: flex; justify-content: center; align-self: end; }

.phone {
    position: relative;
    width: min(100%, 320px);
    border-radius: 44px 44px 0 0;
    background: #120b07;
    padding: 10px 10px 0;
    box-shadow: var(--shadow);
}
.phone img { border-radius: 34px 34px 0 0; width: 100%; }

.phone-full { border-radius: 44px; padding: 10px; }
.phone-full img { border-radius: 34px; }

/* Доска полки под героем и между разделами */
.shelf-board {
    height: 22px;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.28), transparent 38%, rgba(0, 0, 0, 0.18)),
        linear-gradient(90deg, var(--wood-mid), var(--wood-light) 30%, var(--wood-mid) 60%, var(--wood-dark));
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

/* ---------- Sections ---------- */

section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }

.section-head { max-width: 40em; margin-bottom: 48px; }
.section-head h2 { margin: 0 0 14px; font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 600; }
.section-head p { margin: 0; color: var(--text-soft); }

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.feature h3 { margin: 0 0 10px; font-size: 1.3125rem; font-weight: 600; }
.feature p { margin: 0; color: var(--text-soft); font-size: 1rem; }

.feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--ember) 14%, transparent);
    color: var(--ember);
}
.feature-icon svg { width: 24px; height: 24px; }

/* Форматы */
.format-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.format-list li {
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
}
.format-list li.rare { border-color: var(--ember); color: var(--ember); }
.note { margin: 20px 0 0; color: var(--text-soft); font-size: 0.9375rem; }

/* Скриншоты */
.shots {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 8px 24px 28px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.shots li { flex: 0 0 min(260px, 70vw); scroll-snap-align: center; }
.shots figure { margin: 0; }
.shots figcaption { margin-top: 12px; color: var(--text-soft); font-size: 0.9375rem; text-align: center; }

/* Цены */
.pricing {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.plan {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.plan.featured { border: 2px solid var(--ember); }
.plan h3 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 600; }
.plan .tagline { margin: 0 0 20px; color: var(--text-soft); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 28px; font-size: 1rem; }
.plan li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.5em;
    width: 8px;
    height: 13px;
    border: solid var(--ember);
    border-width: 0 2.5px 2.5px 0;
    transform: translateY(-30%) rotate(40deg);
}

/* Вопросы */
.faq { max-width: 52em; display: grid; gap: 12px; }
.faq details {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.faq summary {
    padding: 18px 22px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--ember); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--text-soft); }

/* Приватность — плашка */
.privacy-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: 40px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.privacy-band h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2rem); }
.privacy-band p { margin: 0; color: var(--text-soft); }

/* ---------- Footer ---------- */

.site-footer {
    padding: 40px 0 56px;
    border-top: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.9375rem;
}
.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 32px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- Политика ---------- */

.legal { padding: 64px 0 96px; }
.legal-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 88px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.9375rem;
}
.toc h2 { margin: 0 0 10px; font-family: var(--font-body); font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--ember); }

.legal-doc { max-width: 46em; }
.legal-doc h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; }
.legal-doc .updated { margin: 0 0 32px; color: var(--text-soft); font-size: 0.9375rem; }
.legal-doc h2 { margin: 48px 0 12px; font-size: 1.5rem; font-weight: 600; scroll-margin-top: 88px; }
.legal-doc p, .legal-doc li { color: var(--text); }
.legal-doc ul { padding-left: 1.3em; display: grid; gap: 8px; }

.summary {
    margin: 0 0 8px;
    padding: 24px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--ember);
    background: color-mix(in srgb, var(--ember) 8%, var(--surface));
}
.summary h2 { margin: 0 0 10px; font-size: 1.25rem; }
.summary ul { margin: 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; background: var(--surface); }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--bg-alt); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.contact-box {
    margin-top: 16px;
    padding: 24px 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

/* ---------- Язык ---------- */
html[data-lang='en'] [lang='ru'],
html[data-lang='ru'] [lang='en'] { display: none !important; }

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
    .hero { padding-top: 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 8px; }
    .hero-copy { padding-bottom: 32px; }
    .features { grid-template-columns: 1fr; }
    .pricing { grid-template-columns: 1fr; }
    .privacy-band { grid-template-columns: 1fr; padding: 28px; }
    .legal-grid { grid-template-columns: 1fr; gap: 24px; }
    .toc { position: static; }
    section { padding: 64px 0; }
}

@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .header-nav a.hide-sm { display: none; }
    .store-badge img { height: 48px; }
}

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