/* Мой Архив Мира — стили сайта.
   Внешних ресурсов нет намеренно: страница, которая обещает «без облака»,
   не должна тянуть шрифты и счётчики с чужих серверов. */

:root {
    /* Бумага и чернила */
    --paper:       #fcfaf7;
    --paper-deep:  #f2eee7;
    --ink:         #1e2a38;
    --ink-soft:    #5b6a78;
    --seal:        #2f6152;   /* акцент: ссылки, кнопки */
    --seal-dark:   #24493e;
    --brass:       #c08a3e;   /* редкие детали */
    --rule:        #ddd5c9;

    --measure: 62ch;
    --gap: clamp(1rem, 2.5vw, 2rem);
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
    font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
    line-height: 1.65;
    font-kerning: normal;
}

h1, h2, h3 {
    line-height: 1.18;
    letter-spacing: -0.018em;
    font-weight: 600;
    margin: 0;
    text-wrap: balance;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--seal); text-underline-offset: 0.18em; }
a:hover { color: var(--seal-dark); }

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

.wrap {
    width: min(100% - 2.5rem, 68rem);
    margin-inline: auto;
}

/* ── Шапка ─────────────────────────────────────────────── */

.top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.6rem 0 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    flex-wrap: wrap;
    text-decoration: none;
    color: inherit;
}

/* Место под логотип: квадрат с инициалами, заменяется картинкой */
.mark {
    width: 2.1rem;
    height: 2.1rem;
    flex: none;
    align-self: center;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--seal);
    color: var(--seal);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.brand-name { font-weight: 600; font-size: 1.05rem; }
.brand-tag  { color: var(--ink-soft); font-size: 0.88rem; }

.langs { display: flex; gap: 0.9rem; font-size: 0.88rem; }
.langs a { color: var(--ink-soft); text-decoration: none; }
.langs a:hover { color: var(--seal); text-decoration: underline; }
.langs .current { color: var(--ink); font-weight: 600; }

/* ── Первый экран ──────────────────────────────────────── */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero h1 {
    font-size: clamp(1.9rem, 1.4rem + 1.7vw, 2.65rem);
    margin-bottom: 1.05rem;
    max-width: 17ch;
}

.hero .lead {
    font-size: 1.08em;
    color: var(--ink-soft);
    max-width: 34rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.8rem 0 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.35rem;
    background: var(--seal);
    color: var(--paper);
    text-decoration: none;
    font-weight: 500;
    border: 1.5px solid var(--seal);
    border-radius: 3px;
}
.btn:hover { background: var(--seal-dark); border-color: var(--seal-dark); color: var(--paper); }

.btn-quiet {
    background: transparent;
    color: var(--seal);
    border-color: var(--rule);
}
.btn-quiet:hover { background: transparent; color: var(--seal-dark); border-color: var(--seal); }

.note { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* Живой макет карточки контакта — то, что человек увидит в приложении */

.card {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--rule);
    padding: 1.4rem 1.5rem 1.5rem;
}

.card-name { font-size: 1.22rem; font-weight: 600; }
.card-role { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.15rem; }

.card-rows { margin-top: 1.2rem; display: grid; gap: 0.95rem; }

.row {
    display: grid;
    grid-template-columns: 1.45rem 1fr;
    gap: 0.75rem;
    align-items: start;
    padding-top: 0.95rem;
    border-top: 1px solid var(--rule);
}
.row:first-child { border-top: 0; padding-top: 0; }

.row-icon { color: var(--seal); margin-top: 0.12rem; }
.row-icon svg { display: block; width: 1.15rem; height: 1.15rem; }

.row-label {
    display: block;
    font-size: 0.74rem;
    color: var(--ink-soft);
    margin-bottom: 0.12rem;
}
.row-text { display: block; font-size: 0.95rem; }

/* ── Секции ────────────────────────────────────────────── */

section { padding: clamp(2.6rem, 5vw, 4.5rem) 0; }

.why {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper-deep);
}
.why h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.05rem); margin-bottom: 1.2rem; }
.why .last { font-size: 1.06em; }
.why .last strong { font-weight: 600; }

.scenario {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.6rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(2.2rem, 4vw, 3.4rem) 0;
    border-bottom: 1px solid var(--rule);
}
.scenario:last-of-type { border-bottom: 0; }
.scenario:nth-child(even) .scenario-text { order: 2; }

.scenario h3 {
    font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
    margin-bottom: 0.9rem;
}

/* Заглушки скриншотов: форма рамки говорит, какая это платформа */

.shot {
    background: #fff;
    border: 1px solid var(--rule);
    display: grid;
    place-items: center;
    padding: 1.5rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}
.shot-phone {
    border-radius: 18px;
    width: min(13rem, 100%);
    aspect-ratio: 9 / 16;
    margin-inline: auto;
    border-width: 6px;
    border-color: var(--ink);
}
.shot-desktop {
    border-radius: 5px;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-width: 1px;
    border-top-width: 1.5rem;
    border-top-color: var(--ink);
}

/* ── Платформа и расширения ────────────────────────────── */

.platform { background: var(--paper-deep); border-top: 1px solid var(--rule); }
.platform h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.05rem); margin-bottom: 1.1rem; }
.platform .lead { max-width: var(--measure); color: var(--ink-soft); }

.exts {
    list-style: none;
    margin: 2rem 0 1.8rem;
    padding: 0;
    display: grid;
    gap: 1.15rem;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}
.exts li {
    border-left: 2px solid var(--brass);
    padding-left: 0.95rem;
}
.exts b { font-weight: 600; display: block; margin-bottom: 0.2rem; }
.exts span { color: var(--ink-soft); font-size: 0.95rem; }

.platform-footer { display: flex; gap: 1.2rem; align-items: baseline; flex-wrap: wrap; }
.platform-footer p { margin: 0; }

/* ── Приватность: единственный инверсный блок ──────────── */

.privacy { background: var(--ink); color: var(--paper); }
.privacy h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: 1.1rem; }
.privacy p { color: #d6dde4; }

/* ── Скачивание ────────────────────────────────────────── */

.download h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.05rem); margin-bottom: 1.6rem; }

.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
}
.dl-label { font-weight: 600; margin-bottom: 0.8rem; }
.dl-line { display: flex; gap: 0.6rem; align-items: baseline; margin-bottom: 0.5rem; }
.dl-os { font-size: 1.05rem; }
.dl-state { color: var(--ink-soft); font-size: 0.9rem; }
.dl-hint { font-size: 0.88rem; margin-top: 0.6rem; }

/* ── Подвал ────────────────────────────────────────────── */

footer {
    border-top: 1px solid var(--rule);
    padding: 2rem 0 2.6rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.foot-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
footer a { color: var(--ink-soft); }

/* ── Узкие экраны ──────────────────────────────────────── */

@media (max-width: 54rem) {
    .hero { grid-template-columns: 1fr; }
    .hero .card { max-width: 26rem; }
    .scenario { grid-template-columns: 1fr; }
    .scenario:nth-child(even) .scenario-text { order: 0; }
    .shot-desktop { aspect-ratio: 16 / 11; }
}

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

/* ── Галерея кадров ────────────────────────────────────── */

.shot-wrap { display: grid; gap: 0.85rem; justify-items: center; width: 100%; }

.shot { position: relative; overflow: hidden; }
.shot:focus-visible { outline-offset: 4px; }

.frame {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease;
}
.frame.is-on { opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
    .frame { transition: none; }
}

.dots { display: flex; gap: 0.45rem; }
.dots button {
    width: 0.55rem;
    height: 0.55rem;
    padding: 0;
    border: 1px solid var(--ink-soft);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.dots button[aria-selected="true"] { background: var(--seal); border-color: var(--seal); }
.dots button:hover { border-color: var(--seal); }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ── Страница-заглушка магазина ────────────────────────── */

.soon {
    padding: clamp(4rem, 12vh, 9rem) 0 clamp(3rem, 8vh, 6rem);
    max-width: 40rem;
}
.soon h1 {
    font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.5rem);
    margin-bottom: 1.2rem;
}
.soon .lead { font-size: 1.08em; color: var(--ink-soft); }
.soon-back { margin-top: 2rem; }
