:root {
    --bg: #fbf6ee;
    --surface: #ffffff;
    --text: #2d2a26;
    --muted: #7a746b;
    --line: #ece4d6;
    --green: #2f7d5b;
    --green-dark: #276b4e;
    --green-soft: #e3f1ea;
    --apricot: #f2a65a;
    --apricot-soft: #fdeedd;
    --apricot-ink: #9a5a1c;
    --danger: #c8433b;
    --radius: 24px;
    --shadow: 0 18px 40px rgba(94, 72, 40, 0.1), 0 2px 6px rgba(94, 72, 40, 0.06);
    --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui,
        -apple-system, Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

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

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: radial-gradient(640px 420px at 92% -8%, var(--apricot-soft), transparent 70%),
        radial-gradient(560px 420px at -12% 34%, var(--green-soft), transparent 70%),
        var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-wrap: break-word;
}

.wrap {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
}

code {
    padding: 2px 7px;
    font-family: var(--mono);
    font-size: 0.88em;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 8px;
}

/* ── Шапка ─────────────────────────────────────────────────────── */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-block: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    font-size: 22px;
    background: var(--green);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(47, 125, 91, 0.3);
}

.nav__links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.nav__link {
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.nav__link:hover {
    color: var(--text);
    background: var(--surface);
}

.nav__link.is-active {
    color: var(--green);
    background: var(--green-soft);
}

/* ── Кнопки ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    background: var(--green);
    border: none;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(47, 125, 91, 0.28);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: progress;
    opacity: 0.75;
    transform: none;
}

.btn--small {
    padding: 9px 18px;
    font-size: 15px;
    box-shadow: none;
}

/* ── Главная ───────────────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
    padding-block: 36px 60px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--apricot-ink);
    background: var(--apricot-soft);
    border-radius: 999px;
}

.hero h1 {
    margin-top: 18px;
    font-size: clamp(34px, 5.2vw, 56px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.hero h1 em {
    font-style: normal;
    color: var(--green);
}

.hero__lead {
    margin-top: 18px;
    max-width: 52ch;
    font-size: 18px;
    color: var(--muted);
}

.perks {
    list-style: none;
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

.perk {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.perk__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    font-size: 22px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.perk strong {
    display: block;
    font-size: 16.5px;
}

.perk span {
    font-size: 15px;
    color: var(--muted);
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ── Форма ─────────────────────────────────────────────────────── */
.login {
    padding: 36px 32px;
    scroll-margin-top: 20px;
}

.login__emoji {
    font-size: 40px;
    line-height: 1;
}

.login h2 {
    margin-top: 12px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.login__sub {
    margin-top: 4px;
    color: var(--muted);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.field__wrap {
    position: relative;
}

.field__input {
    width: 100%;
    padding: 14px 18px;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 16px;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.field__input::placeholder {
    color: #b3ab9f;
}

.field__input:focus {
    background: #fff;
    border-color: var(--green);
    box-shadow: 0 0 0 5px var(--green-soft);
}

.field__wrap .field__input {
    padding-right: 56px;
}

.field__toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 17px;
    background: transparent;
    border: none;
    border-radius: 12px;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
}

.field__toggle:hover,
.field__toggle.is-active {
    opacity: 1;
    background: var(--green-soft);
}

.form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 14.5px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

.link {
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.note {
    min-height: 22px;
    font-size: 14.5px;
    text-align: center;
    color: var(--muted);
}

.note.is-error {
    color: var(--danger);
}

.login__foot {
    margin-top: 20px;
    padding-top: 18px;
    font-size: 14.5px;
    text-align: center;
    color: var(--muted);
    border-top: 1px dashed var(--line);
}

/* ── Шаги ──────────────────────────────────────────────────────── */
.section-title {
    margin-bottom: 20px;
    font-size: clamp(24px, 3.4vw, 34px);
    letter-spacing: -0.02em;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 64px;
}

.step {
    padding: 26px 24px;
}

.step__num {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    font-weight: 800;
    color: #fff;
    background: var(--apricot);
    border-radius: 50%;
}

.step h3 {
    margin-top: 14px;
    font-size: 18px;
}

.step p {
    margin-top: 4px;
    font-size: 15px;
    color: var(--muted);
}

.step a {
    color: var(--green);
    font-weight: 700;
}

/* ── Внутренние страницы ───────────────────────────────────────── */
.page-head {
    max-width: 760px;
    padding-block: 28px 36px;
}

.page-head h1 {
    margin-top: 16px;
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.page-head p {
    margin-top: 14px;
    font-size: 18px;
    color: var(--muted);
}

.addr {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 32px;
    padding: 18px 22px;
    color: #1f5a41;
    background: var(--green-soft);
    border-radius: 18px;
}

.addr code {
    padding: 6px 12px;
    font-size: 15px;
    font-weight: 700;
    background: #fff;
    border-radius: 10px;
    word-break: break-all;
}

.devices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.device {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 26px 24px;
}

.device__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.device__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 26px;
    background: var(--apricot-soft);
    border-radius: 18px;
}

.device h2 {
    font-size: 20px;
    line-height: 1.25;
}

.device__hint {
    font-size: 13.5px;
    color: var(--muted);
}

.device ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: step;
}

.device li {
    position: relative;
    padding-left: 36px;
    font-size: 15px;
    counter-increment: step;
}

.device li::before {
    content: counter(step);
    position: absolute;
    top: 1px;
    left: 0;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 13px;
    font-weight: 800;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 50%;
}

.tip {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;
    padding: 22px 24px;
    background: var(--apricot-soft);
    border-radius: 20px;
}

.tip__icon {
    font-size: 26px;
    line-height: 1;
}

.tip strong {
    display: block;
}

.guards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 20px;
    margin-bottom: 52px;
}

.guard {
    padding: 26px 22px;
}

.guard__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 24px;
    background: var(--green-soft);
    border-radius: 18px;
}

.guard h2 {
    margin-top: 14px;
    font-size: 18px;
}

.guard p {
    margin-top: 6px;
    font-size: 15px;
    color: var(--muted);
}

.faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 820px;
    margin-bottom: 52px;
}

.faq details {
    padding: 0 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(94, 72, 40, 0.04);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    font-size: 17px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    font-size: 20px;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 50%;
    transition: transform 0.2s;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    padding-bottom: 18px;
    color: var(--muted);
}

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 56px;
    padding: 30px 32px;
    color: #fff;
    background: var(--green);
    border-radius: var(--radius);
}

.cta p {
    font-size: 22px;
    font-weight: 800;
}

.cta .btn {
    color: var(--green);
    background: #fff;
    box-shadow: none;
}

.cta .btn:hover {
    background: var(--green-soft);
}

.footer {
    padding-block: 26px 34px;
    font-size: 14px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

/* ── Адаптив ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
        padding-top: 16px;
    }

    .steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .wrap {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .login {
        padding: 28px 20px;
    }

    .device,
    .guard,
    .step {
        padding: 22px 18px;
    }

    .cta {
        padding: 24px 20px;
    }

    .tip {
        padding: 18px;
    }
}

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