/* ====== Reset & base ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: #1a1f2e;
    line-height: 1.6;
    background: #ffffff;
    overflow-x: hidden;             /* защита от горизонтального скролла */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; } /* когда открыто мобильное меню */
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* iOS safe-area: уважаем «чёлку» и нижний home-indicator */
@supports (padding: max(0px)) {
    .header { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    .footer-bottom .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}

/* ====== Header ====== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #eef1f6;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
    color: #0d6efd;
    flex-shrink: 0;
    min-width: 0;
}
.logo-icon { font-size: 24px; line-height: 1; }
.logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-text strong { color: #1a1f2e; font-weight: 800; }

.nav {
    display: flex;
    gap: 28px;
    flex: 1;
    justify-content: center;
}
.nav a {
    font-size: 15px;
    color: #4a5568;
    transition: color 0.2s;
}
.nav a:hover { color: #0d6efd; }

.phone {
    font-size: 17px;
    font-weight: 700;
    color: #1a1f2e;
    white-space: nowrap;
    flex-shrink: 0;
}
.phone:hover { color: #0d6efd; }

/* ====== Burger button (скрыт на десктопе) ====== */
.burger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.burger span {
    display: block;
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #1a1f2e;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s, top 0.25s;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }
.burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ====== Hero ====== */
.hero {
    background:
        linear-gradient(135deg, rgba(13, 110, 253, 0.92) 0%, rgba(58, 134, 255, 0.92) 100%),
        radial-gradient(circle at 80% 20%, #ffffff33 0%, transparent 50%);
    color: #fff;
    padding: 96px 0 110px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "❄";
    position: absolute;
    font-size: 400px;
    color: rgba(255, 255, 255, 0.05);
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
}
.hero-inner { position: relative; max-width: 720px; }
.hero h1 {
    font-size: clamp(28px, 5.5vw, 52px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    text-wrap: balance;
}
.h1-accent { display: inline; }
.hero-sub {
    font-size: clamp(15px, 2.4vw, 19px);
    opacity: 0.95;
    margin-bottom: 36px;
    max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-points {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 500;
}

/* ====== Buttons ====== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    text-align: center;
    min-height: 48px;                 /* тач-таргет ≥ 44pt */
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: #0d6efd; }
.btn-primary:hover { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }
.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

/* ====== Sections ====== */
.section { padding: 90px 0; }
.section-alt { background: #f7faff; }
.section-title {
    font-size: clamp(26px, 4.5vw, 38px);
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    text-wrap: balance;
}
.section-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: clamp(15px, 2.2vw, 17px);
    max-width: 620px;
    margin: 0 auto 48px;
}

/* ====== Services cards ====== */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 48px;
}
.card {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 16px;
    padding: 36px 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(13, 110, 253, 0.08); }
.card-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #e8f1ff 0%, #d6e7ff 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: #6b7280; font-size: 15px; }

/* ====== Benefits ====== */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 48px;
    text-align: center;
}
.benefit {
    padding: 24px 12px;
}
.benefit-num {
    display: block;
    font-size: clamp(34px, 5.5vw, 44px);
    font-weight: 800;
    color: #0d6efd;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}
.benefit p { color: #4a5568; font-size: 15px; }

/* ====== Brands ====== */
.brands {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.brand {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    padding: 24px 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 0.3px;
    transition: color 0.2s, border-color 0.2s;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand:hover { color: #0d6efd; border-color: #0d6efd; }

/* ====== Footer ====== */
.footer {
    background: #0f1729;
    color: #cbd5e1;
    padding: 60px 0 0;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col p, .footer-col li { font-size: 14px; margin-bottom: 8px; color: #94a3b8; }
.footer-col .logo { color: #fff; margin-bottom: 14px; }
.footer-col .logo-text strong { color: #fff; }
.footer-phone {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    word-break: break-word;
}
.footer-phone:hover { color: #5aa0ff; }
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 20px 0;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

/* ====================================================================
   RESPONSIVE
   Брейкпоинты:
     1024 — небольшие ноуты / горизонтальный планшет
      900 — основной mobile (бургер-меню)
      600 — крупный телефон
      380 — узкие телефоны (iPhone SE 1, Galaxy S мини)
   ==================================================================== */

/* ≤1024 — сжимаем типографику и паддинги, но десктоп-сетка остаётся */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .header-inner { gap: 16px; }
    .nav { gap: 20px; }
    .phone { font-size: 16px; }
    .section { padding: 72px 0; }
    .footer-inner { gap: 28px; }
}

/* ≤900 — мобильное меню-«шторка», одна колонка в hero-points */
@media (max-width: 900px) {
    .header-inner { height: 64px; gap: 12px; }

    .phone { display: none; }                 /* телефон уезжает в mobile-меню */

    .burger { display: block; }              /* показываем бургер */

    /* Мобильная навигация: выезжающая панель сверху */
    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);     /* dvh — корректно с мобильной адресной строкой */
        background: #fff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 20px 24px 32px;
        box-shadow: 0 20px 40px rgba(15, 23, 41, 0.08);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s, opacity 0.2s;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 99;                     /* под хедером (100), над контентом */
    }
    .nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav a {
        font-size: 17px;
        padding: 16px 0;
        border-bottom: 1px solid #eef1f6;
        color: #1a1f2e;
    }
    .nav a:last-child { border-bottom: 0; }

    /* Телефон-CTA внутри мобильного меню */
    .nav .mobile-phone {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 20px;
        padding: 16px;
        background: #0d6efd;
        color: #fff;
        border-radius: 10px;
        font-size: 17px;
        font-weight: 700;
        text-align: center;
    }

    .hero { padding: 56px 0 72px; }
    .hero::before { font-size: 260px; right: -80px; }
    .section { padding: 56px 0; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .services { gap: 16px; margin-top: 32px; }
    .card { padding: 28px 22px; }
    .benefits { gap: 12px; margin-top: 32px; }
}

/* ≤600 — крупный телефон: паддинги/шрифты ещё компактнее */
@media (max-width: 600px) {
    .container { padding: 0 18px; }
    .hero { padding: 48px 0 64px; }
    .hero::before { font-size: 200px; right: -100px; }
    .hero-points { gap: 14px; }
    .hero-points li { font-size: 14px; }
    .section { padding: 48px 0; }
    .section-subtitle { margin-bottom: 32px; }
    .brands { gap: 12px; }
    .brand { padding: 18px 10px; font-size: 15px; }
    .footer { padding: 48px 0 0; }
    .footer-phone { font-size: 20px; }
}

/* ≤380 — узкие телефоны (iPhone SE и т.п.) */
@media (max-width: 380px) {
    .container { padding: 0 14px; }
    .logo { font-size: 17px; gap: 6px; }
    .logo-icon { font-size: 22px; }
    .logo-text { font-size: 15px; }
    .hero h1 { font-size: 26px; }
    .hero-sub { font-size: 14px; }
    .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-actions .btn { width: 100%; }
    .section-title { font-size: 24px; }
    .card { padding: 24px 18px; }
    .card h3 { font-size: 18px; }
    .benefit p { font-size: 14px; }
    .footer-phone { font-size: 18px; }
}

/* Показываем мобильный телефон в шторке только на мобильных */
.mobile-phone { display: none; }

/* Предпочитает пользователь меньше анимаций */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
