/* mirvpn */

:root {
    --bg: #F4F3FA;
    --surface: #FFFFFF;
    --ink: #17122B;
    --muted: #686280;
    --line: #E1DDEE;
    --accent: #5B45E0;
    --accent-ink: #FFFFFF;
    --ok: #1F7A4D;
    --err: #B3261E;

    --night: #0F0B22;
    --night-ink: #FFFFFF;
    --night-muted: #B4ACD8;
    --night-line: rgba(255, 255, 255, 0.14);
    --night-accent: #A596FF;

    --r-s: 10px;
    --r-m: 18px;
    --r-l: 26px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F0B22;
        --surface: #1A1537;
        --ink: #EFECFA;
        --muted: #A8A1C7;
        --line: #2C2550;
        --accent: #A596FF;
        --accent-ink: #0F0B22;
        --ok: #6FD39C;
        --err: #FF8A80;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

a { color: var(--accent); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Hero */

.hero {
    position: relative;
    overflow: hidden;
    padding: calc(88px + env(safe-area-inset-top, 0px)) 0 80px;
    background:
        radial-gradient(700px 420px at 12% 0%, rgba(124, 99, 255, 0.35), transparent 70%),
        radial-gradient(800px 500px at 100% 100%, rgba(64, 120, 255, 0.22), transparent 70%),
        var(--night);
    color: var(--night-ink);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
    pointer-events: none;
}

.hero-in {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

.wordmark {
    margin: 0;
    font-size: clamp(84px, 17vw, 210px);
    font-weight: 800;
    letter-spacing: -0.07em;
    line-height: 0.95;
    padding-bottom: 0.08em;
    background: linear-gradient(180deg, #FFFFFF 30%, #C9BFFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 36px 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.intro {
    margin: 0;
    max-width: 46ch;
    color: var(--night-muted);
    font-size: 18px;
}

.countries {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 36px;
    padding: 0;
    list-style: none;
}

.countries li {
    padding: 8px 16px;
    border: 1px solid var(--night-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.cta {
    display: inline-block;
    padding: 15px 26px;
    border-radius: 999px;
    background: var(--night-ink);
    color: var(--night);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(124, 99, 255, 0.35);
}

.cta:hover { background: #E7E2FF; }

.cta:focus-visible { outline-color: var(--night-accent); }

.hero-note {
    margin: 56px 0 0;
    color: var(--night-muted);
    font-size: 14px;
}

/* Основной контент */

.block { padding: 80px 0 16px; }

.block h2 {
    margin: 0 0 28px;
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

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

.step {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    background: var(--surface);
}

.step-wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: 32px;
    align-items: start;
}

.step-wide .step-num,
.step-wide h3,
.step-wide > p:not(.desktop) { grid-column: 1; }

.step-wide .stores {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
}

.step-wide .desktop { grid-column: 1; }

.step-num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 800;
}

.step h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.step p {
    margin: 0;
    color: var(--muted);
}

.stores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.store {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
}

.store:hover { border-color: var(--accent); }

.store strong {
    display: block;
    font-size: 16px;
}

.store span {
    font-size: 14px;
    color: var(--muted);
}

.step .desktop {
    margin-top: 16px;
    font-size: 15px;
}

.help {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    margin: 0;
}

.help div {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.help dt {
    margin-bottom: 4px;
    font-weight: 700;
}

.help dd {
    margin: 0;
    color: var(--muted);
}

.footer {
    margin-top: 72px;
    padding: 28px 0 calc(48px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 15px;
}

.footer p { margin: 0 0 4px; }

@media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; }
    .step-wide { display: block; }
    .step-wide .stores { margin-top: 18px; }
    .help { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .wrap, .hero-in { padding: 0 20px; }
    .hero { padding-top: calc(56px + env(safe-area-inset-top, 0px)); padding-bottom: 56px; }
    .hero-note { margin-top: 40px; }
    .stores { grid-template-columns: 1fr; }
    .step { padding: 22px; }
    .block { padding-top: 56px; }
}

/* Лендинг целиком в тёмной теме, как первый экран */

.landing {
    overflow-x: hidden;
    --bg: #0F0B22;
    --surface: rgba(255, 255, 255, 0.045);
    --ink: #FFFFFF;
    --muted: #B4ACD8;
    --line: rgba(255, 255, 255, 0.11);
    --accent: #A596FF;
    --accent-ink: #0F0B22;
    color-scheme: dark;
    background:
        radial-gradient(900px 600px at 90% 55%, rgba(64, 120, 255, 0.12), transparent 70%),
        radial-gradient(800px 600px at 0% 85%, rgba(124, 99, 255, 0.16), transparent 70%),
        var(--night);
}

.landing .hero {
    overflow: visible;
    padding-bottom: 24px;
    background: none;
}

.landing .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(760px 480px at 12% 0%, rgba(124, 99, 255, 0.36), transparent 72%),
        radial-gradient(700px 520px at 95% 40%, rgba(64, 120, 255, 0.16), transparent 72%);
    pointer-events: none;
}

.landing .block h2 {
    background: linear-gradient(180deg, #FFFFFF 40%, #C9BFFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing .step {
    border-color: var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    backdrop-filter: blur(8px);
}

.landing .step-num {
    background: linear-gradient(135deg, #B8AAFF, #7C63FF);
    color: #0F0B22;
    box-shadow: 0 8px 24px rgba(124, 99, 255, 0.35);
}

.landing .store {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    transition: border-color 0.15s, background 0.15s;
}

.landing .store:hover {
    border-color: var(--accent);
    background: rgba(165, 150, 255, 0.1);
}

.landing a { color: var(--accent); }

.landing .cta { color: var(--night); }

.landing .help div { border-top-color: var(--line); }

.landing .footer { border-top-color: var(--line); }

/* Админка */

.admin-page .wrap { max-width: 760px; }

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 36px 0 20px;
}

.admin-title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.tab {
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.tab[aria-current="page"] {
    background: var(--accent);
    color: var(--accent-ink);
}

.panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    background: var(--surface);
}

.narrow {
    max-width: 420px;
    margin: 72px auto;
}

.narrow .admin-title { margin-bottom: 8px; }

.narrow > p { margin: 0 0 20px; color: var(--muted); }

.field { margin-bottom: 16px; }

label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}

.check input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--accent);
}

.btn {
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-quiet {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
}

.flash {
    margin-bottom: 20px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--surface);
    color: var(--ok);
    font-weight: 600;
}

.flash.is-error,
.error {
    color: var(--err);
    font-weight: 600;
}

.rows {
    margin: 0;
    padding: 0;
    list-style: none;
}

.row {
    display: grid;
    gap: 10px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.row:first-child { padding-top: 0; }

.row:last-child { border-bottom: 0; padding-bottom: 4px; }

.row-meta {
    font-size: 14px;
    color: var(--muted);
}

.link-row {
    display: flex;
    gap: 8px;
}

.link-row input {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--muted);
}

.save-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.note {
    flex: 1;
    min-width: 220px;
    margin: 0;
    font-size: 15px;
    color: var(--muted);
}

@media (max-width: 520px) {
    .link-row { flex-direction: column; }
    .panel { padding: 18px; }
}
