/* ============================================================
   КРИТИЧЕСКИЙ CSS — для быстрой отрисовки
   ============================================================ */

/* Базовые сбросы */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0b0d12;
    color: #f5f6f8;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Основной контейнер */
.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: transparent;
    position: relative;
    z-index: 1;
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px) + 10px);
}

/* Цвета */
:root {
    --accent: #ff7a1a;
    --accent-2: #ffb13c;
    --text: #f5f6f8;
    --text-dim: #a7adb8;
    --page-bg: #0b0d12;
    --card-bg: rgba(255,255,255,0.055);
    --card-border: rgba(255,255,255,0.09);
    --line: rgba(255,255,255,0.10);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --nav-h: 74px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
}

/* Базовые стили для кнопок */
.btn {
    min-height: 52px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    font-size: 15.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #ff7a1a, #ffb13c);
    color: #231400;
    box-shadow: 0 8px 20px rgba(255,122,26,0.35);
}
.btn-outline {
    background: transparent;
    color: #f5f6f8;
    border: 1.5px solid rgba(255,255,255,0.28);
}

/* Хедер */
.topbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 8px 16px;
    background: #1a1a2e;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 72px;
    gap: 8px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-shrink: 0;
}
.brand-mark {
    width: 75px;
    height: 75px;
    border-radius: 13px;
    background: linear-gradient(145deg, #ff7a1a, #ffb13c);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.brand-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}
.brand-name {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: #ffffff;
    letter-spacing: -0.5px;
}
.brand-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.brand-phone {
    font-size: 13px;
    font-weight: 700;
    color: #f97316;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}
.brand-phone i {
    font-size: 12px;
    color: #f97316;
}

/* Бургер-меню */
.burger {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
}

/* Хлебные крошки */
.breadcrumbs {
    padding: 12px 18px 0;
    font-size: 12px;
    color: #a7adb8;
}
.breadcrumbs a {
    color: #ff7a1a;
    text-decoration: none;
}
.breadcrumbs span {
    margin: 0 6px;
}

/* Hero */
.hero {
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding: 28px 18px 32px;
    position: relative;
}
.hero h1 {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.28;
    color: #f5f6f8;
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}
.hero .hero-sub {
    color: #a7adb8;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 20px;
    position: relative;
    z-index: 1;
}
.hero-prices {
    display: flex;
    gap: 20px;
    background: transparent;
    border: none;
    padding: 12px 0;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.hero-price-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.hero-price-label {
    font-size: 12px;
    color: #a7adb8;
    font-weight: 500;
}
.hero-price-value {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #f5f6f8;
}
.hero-price-divider {
    width: 1px;
    background: rgba(255,255,255,0.10);
}
.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}
.hero-features span {
    font-size: 13px;
    color: #a7adb8;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-features span i {
    color: #ff7a1a;
    font-size: 14px;
}

/* Секции */
.section {
    padding: 32px 18px 16px;
}
.section-title {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 21px;
    margin: 0 0 6px;
    color: #f5f6f8;
}
.section-sub {
    color: #a7adb8;
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Калькулятор */
.calc-card {
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px;
    padding: 20px;
}
.calc-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 14px 0 16px;
}
.calc-total .lbl {
    font-size: 13px;
    color: #9aa0ac;
    font-weight: 600;
}
.calc-total .val {
    font-family: 'Unbounded', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 24px;
}
.calc-total .val span {
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #9aa0ac;
    font-weight: 600;
}

/* Боттом-навигация */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-width: 480px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    background: rgba(20,23,29,0.6);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-top: 1px solid rgba(255,255,255,0.10);
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
}
.nav-btn {
    min-height: 52px;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
}
.nav-btn i {
    font-size: 18px;
}
.nav-btn.call {
    background: #3fae6a;
}
.nav-btn.tg {
    background: #27a5e7;
}
.nav-btn.max {
    background: linear-gradient(135deg, #4A90E2, #9B59D6);
}
.nav-btn.order {
    background: linear-gradient(135deg, #ff7a1a, #ffb13c);
    color: #231400;
}

/* Медиа-запросы */
@media (max-width: 480px) {
    .brand-mark { width: 75px; height: 75px; }
    .brand-name { font-size: 15px; }
    .brand-sub { font-size: 10px; }
    .brand-phone { font-size: 11px; }
    .brand-phone i { font-size: 10px; }
    .topbar { padding: 6px 12px; min-height: 64px; }
}
@media (max-width: 400px) {
    .hero h1 { font-size: 21px; }
    .hero-prices { flex-direction: column; gap: 10px; padding: 12px 0; }
    .hero-price-divider { display: none; }
    .section { padding: 24px 14px 12px; }
    .section-title { font-size: 18px; }
    .calc-total .val { font-size: 20px; }
}
@media (max-width: 380px) {
    .brand-phone { font-size: 10px; }
    .brand-phone i { display: none; }
    .brand-name { font-size: 13px; }
    .brand-mark { width: 45px; height: 45px; }
}
/* ============================================================
   ПРЕДОТВРАЩЕНИЕ СМЕЩЕНИЯ ОТ ШРИФТОВ
   ============================================================ */

/* Резервные шрифты с одинаковой шириной */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-display: swap;
}

/* Для Unbounded (заголовки) — резервный шрифт */
h1, h2, h3, h4, .brand-name, .section-title, .hero h1 {
    font-family: 'Unbounded', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-display: swap;
}

/* Предотвращаем смещение — резервируем место под шрифты */
.brand-name, .section-title, .hero h1, .hero-price-value, .calc-total .val {
    line-height: 1.3;
    min-height: 1.3em;
}

/* Фиксируем высоту для элементов, которые могут измениться */
.hero-prices {
    min-height: 80px;
}

.calc-card {
    min-height: 400px;
}