/* Секции главной страницы. Общая обвязка (шапка, подвал, кнопки, модалки) - в ui.css. */

/* ============ первый экран ============ */
.hm-hero {
    padding: 76px 0 68px;
    background: var(--hm-surface);
}

.hm-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}

.hm-hero h1 {
    margin-top: 16px;
    font-size: 47px;
    line-height: 1.09;
    letter-spacing: -.028em;
    font-weight: 700;
    text-wrap: balance;
}

.hm-hero__sub {
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--hm-ink-2);
    max-width: 34em;
}

.hm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hm-hero__note {
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--hm-ink-3);
}

/* ============ схема: запрос -> СМС ============ */
.hm-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hm-flow__card {
    width: 100%;
    max-width: 330px;
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: 11px;
    padding: 14px 16px;
    box-shadow: var(--hm-shadow);
}

.hm-flow__head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hm-ink-2);
    margin-bottom: 10px;
}

.hm-flow__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hm-signal);
    flex: none;
}

.hm-flow__code {
    font-family: var(--hm-mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--hm-ink);
    white-space: nowrap;
    overflow-x: auto;
}

.hm-flow__code .hm-k { color: var(--hm-brand); }
.hm-flow__code .hm-s { color: var(--hm-signal); }
.hm-flow__code .hm-m { color: var(--hm-ink-3); }

.hm-flow__pipe {
    position: relative;
    width: 2px;
    height: 60px;
    background: linear-gradient(var(--hm-border), var(--hm-border-strong));
}

.hm-flow__pipe::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    border-radius: 50%;
    background: var(--hm-brand);
    box-shadow: 0 0 0 4px var(--hm-brand-glow);
    animation: hm-travel 5s cubic-bezier(.5, 0, .5, 1) infinite;
}

@keyframes hm-travel {
    0%        { transform: translateY(0); opacity: 0; }
    4%        { opacity: 1; }
    15%, 100% { transform: translateY(53px); opacity: 0; }
}

.hm-phone {
    width: 218px;
    border-radius: 26px;
    border: 1px solid var(--hm-border-strong);
    background: var(--hm-surface);
    padding: 8px;
    box-shadow: var(--hm-shadow-lift);
}

.hm-phone__screen {
    background: var(--hm-surface-2);
    border-radius: 19px;
    padding: 10px 10px 16px;
    min-height: 178px;
    display: flex;
    flex-direction: column;
}

.hm-phone__notch {
    width: 46px;
    height: 4px;
    border-radius: 4px;
    background: var(--hm-border-strong);
    margin: 0 auto 8px;
}

.hm-phone__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--hm-mono);
    font-size: 9px;
    color: var(--hm-ink-3);
    padding: 0 4px 8px;
}

.hm-phone__from {
    font-size: 11px;
    font-weight: 600;
    color: var(--hm-ink-2);
    padding: 0 4px 8px;
    border-bottom: 1px solid var(--hm-border);
    margin-bottom: 10px;
}

.hm-bubble {
    background: var(--hm-brand);
    color: var(--hm-on-brand);
    font-size: 12.5px;
    line-height: 1.45;
    padding: 9px 12px;
    border-radius: 13px 13px 13px 4px;
    max-width: 92%;
    animation: hm-pop 5s cubic-bezier(.2, .8, .2, 1) infinite;
}

@keyframes hm-pop {
    0%, 14%   { transform: translateY(6px) scale(.96); opacity: 0; }
    24%, 100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Отчёт о доставке приходит на такт позже сообщения, а не висит на пустом экране. */
.hm-bubble__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--hm-ink-3);
    margin-top: 7px;
    padding-left: 3px;
    animation: hm-receipt 5s ease-out infinite;
}

@keyframes hm-receipt {
    0%, 30%   { opacity: 0; }
    42%, 100% { opacity: 1; }
}

.hm-bubble__tick {
    color: var(--hm-signal);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .hm-flow__pipe::after {
        animation: none;
        opacity: 1;
        transform: translateY(26px);
    }
    .hm-bubble {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .hm-bubble__meta {
        animation: none;
        opacity: 1;
    }
}

/* ============ счётчики ============ */
.hm-strip {
    border-top: 1px solid var(--hm-border);
    border-bottom: 1px solid var(--hm-border);
    background: var(--hm-surface-2);
    padding: 26px 0;
}

.hm-strip__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: center;
}

.hm-strip__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hm-strip__n {
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--hm-ink);
}

.hm-strip__t {
    font-size: 13.5px;
    color: var(--hm-ink-2);
}

/* ============ почему своя SIM ============ */
.hm-why {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 38px;
    border: 1px solid var(--hm-border);
    border-radius: 11px;
    background: var(--hm-surface);
    overflow: hidden;
}

.hm-why__col {
    padding: 26px 24px;
    border-right: 1px solid var(--hm-border);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.hm-why__col:last-child {
    border-right: 0;
}

.hm-why__tag {
    font-family: var(--hm-mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--hm-signal);
}

.hm-why__col h3 {
    font-size: 16.5px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.hm-why__col p {
    font-size: 14.5px;
    line-height: 1.58;
    color: var(--hm-ink-2);
}

/* Шаги запуска (.hm-steps) переехали в ui.css: тем же списком показывает установку
   страница приложения. */

/* ============ интеграции ============ */
.hm-integ {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

/* ============ финальный призыв ============ */
.hm-final {
    background: var(--hm-final-bg);
    padding: 60px 0 66px;
    text-align: center;
}

.hm-final h2 {
    color: #fff;
    font-size: 31px;
    line-height: 1.2;
    letter-spacing: -.022em;
    font-weight: 700;
    text-wrap: balance;
}

.hm-final p {
    margin: 13px auto 0;
    max-width: 38em;
    color: var(--hm-final-sub);
    font-size: 16px;
    line-height: 1.6;
}

.hm-final__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hm-final .hm-btn--primary,
.hm-final a.hm-btn--primary {
    background: #fff;
    border-color: #fff;
    color: var(--hm-final-bg);
}

.hm-final .hm-btn--primary:hover,
.hm-final a.hm-btn--primary:hover {
    background: #DDEBF5;
    border-color: #DDEBF5;
    color: var(--hm-final-bg);
}

.hm-final .hm-btn--ghost,
.hm-final a.hm-btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
}

.hm-final .hm-btn--ghost:hover,
.hm-final a.hm-btn--ghost:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
}

/* ============ адаптив ============ */
@media (max-width: 992px) {
    .hm-hero__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hm-hero h1 { font-size: 38px; }
}

@media (max-width: 768px) {
    .hm-hero { padding: 44px 0; }
    .hm-hero h1 { font-size: 31px; }
    .hm-hero__sub { font-size: 16px; }
    .hm-hero__actions .hm-btn { flex: 1 1 auto; }
    .hm-final h2 { font-size: 24px; }

    .hm-strip__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .hm-strip__item {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
    }
    .hm-strip__n {
        font-size: 22px;
        flex: none;
    }

    .hm-why { grid-template-columns: 1fr; }
    .hm-why__col {
        border-right: 0;
        border-bottom: 1px solid var(--hm-border);
    }
    .hm-why__col:last-child { border-bottom: 0; }
}
