/* ==========================================================================
   immersView V2 — статический лендinг под существующий движок immers.cloud
   Свёрстан по Figma «immersView 2 → 1 вариант» (node 1:3). Светлая тема.
   ========================================================================== */

:root {
    --blue:        #0066FF;
    --blue-soft:   #4FB3FF;
    --blue-light:  #E9F5FF;
    --blue-tint:   #F8FAFF;
    --navy:        #0F2A44;
    --orange:      #FF620A;
    --ink:         #17151D;
    --muted:       #5B7A9B;
    --muted-2:     #6B7FA3;
    --slate:       #0F172A;
    --line:        #E5E9F0;
    --surface-50:  #FAFAFA;
    --surface-100: #F5F5F7;
    --surface-150: #F3F4F6;
    --surface-200: #F0F0F0;
    --mint:        #D1FAE5;
    --success:     #12B76A;
    --danger:      #E5484D;

    --radius-sm:   12px;
    --radius-md:   14px;
    --radius:      16px;
    --radius-lg:   24px;
    --radius-pill: 100px;

    --shadow-card: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
    --shadow-soft: 0 10px 15px -3px rgba(43,127,255,.2), 0 4px 6px -4px rgba(43,127,255,.2);
    --shadow-lift: 0 20px 40px -15px rgba(15,42,68,.4);

    --maxw: 1312px;
    --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-ui: 'Inter', system-ui, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: #fff;
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 40px; } }
@media (min-width: 1440px) { .container { padding: 0 64px; } }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; }

.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 88px 0; } }

/* Чередование фонов секций: 1-я белая, 2-я #E9F5FF, 3-я белая … */
main > section { background: #fff; }
main > section:nth-of-type(even) { background: var(--blue-light); }

.section-title { font-size: 28px; font-weight: 700; }
@media (min-width: 768px) { .section-title { font-size: 36px; line-height: 40px; } }
.section-head { margin-bottom: 32px; }
@media (min-width: 768px) { .section-head { margin-bottom: 44px; } }
.section-head.center { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 18px; }
@media (min-width: 768px) { .section-head p { font-size: 20px; line-height: 26px; } }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-ui); font-weight: 600; font-size: 16px; line-height: 1;
    padding: 16px 32px; border-radius: var(--radius-md);
    border: 1.5px solid transparent; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: #0057db; }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 10px 15px -3px rgba(255,98,10,.25); }
.btn-orange:hover { background: #ec580a; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-card); border-radius: var(--radius-sm); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn.is-soon {
    background: var(--surface-150); color: var(--muted-2); border-color: var(--line);
    box-shadow: none; cursor: default; pointer-events: none;
}
.btn.is-soon .soon-tag {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    background: var(--orange); color: #fff; padding: 3px 8px; border-radius: var(--radius-pill);
}

/* ---------- Иконки ---------- */
.icon-chip {
    display: grid; place-items: center;
    width: 48px; height: 48px; border-radius: 14px; background: var(--blue-light);
}
.icon-chip img { width: 20px; height: 20px; }

/* ==========================================================================
   Шапка — только лого immers.cloud
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { height: 68px; display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }

/* ==========================================================================
   Hero — двухколоночный
   ========================================================================== */
.hero { overflow: hidden; background: #fff; }
.hero .container {
    display: grid; gap: 48px; align-items: center;
    padding-top: 56px; padding-bottom: 56px;
}
@media (min-width: 1024px) {
    .hero .container { grid-template-columns: 1fr 1fr; gap: 120px; padding-top: 88px; padding-bottom: 88px; }
}
.hero-text { max-width: 600px; }
.hero-text h1 { font-size: 34px; font-weight: 700; line-height: 1.1; }
@media (min-width: 768px) { .hero-text h1 { font-size: 44px; } }
@media (min-width: 1440px) { .hero-text h1 { font-size: 52px; line-height: 58px; } }
.hero-text h1 .accent { color: var(--blue); }
.hero-text .lead { margin-top: 24px; font-size: 16px; color: var(--muted); }
@media (min-width: 768px) { .hero-text .lead { font-size: 18px; line-height: 28px; } }
/* Кнопки hero — одинакового размера (тянутся на всю ширину колонки) */
.hero-actions { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
.hero-actions .btn { width: 100%; border-radius: var(--radius-md); }

.hero-visual { position: relative; width: 100%; max-width: 520px; margin: 0 auto; }
.hero-visual .frame { background: var(--navy); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.hero-visual .frame img { border-radius: var(--radius-sm); width: 100%; height: auto; }
.hero-visual .frame-main { padding: 8px; position: relative; margin-bottom: 46px; }
/* Ножка монитора */
.hero-visual .frame-main::after {
    content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
    width: 78px; height: 30px; background: var(--navy);
    clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
}
.hero-visual .frame-main::before {
    content: ''; position: absolute; left: 50%; top: calc(100% + 30px); transform: translateX(-50%);
    width: 170px; height: 12px; border-radius: 8px; background: var(--navy);
}
.hero-visual .frame-float {
    position: absolute; padding: 6px; border-radius: var(--radius-sm);
}
.hero-visual .frame-float img { border-radius: 10px; }
.hero-visual .float-1 { width: 26%; left: -20px; bottom: -28px; border-radius: 24px; }  /* смартфон (портрет) */
.hero-visual .float-1 img { border-radius: 18px; }
.hero-visual .float-2 { width: 44%; right: -24px; top: -28px; }    /* планшет (iPad) */
@media (max-width: 767px) { .hero-visual .frame-float { display: none; } }

/* ==========================================================================
   Сетки / карточки
   ========================================================================== */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 28px;
}
.card h3 { font-size: 20px; font-weight: 700; margin-top: 16px; }
.card p { color: var(--muted); font-size: 16px; margin-top: 8px; }

/* Сценарии — тот же контур, что и в «Качестве», но фон голубой */
.usecase {
    background: var(--blue-light); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 28px;
}
.usecase h3 { font-size: 20px; font-weight: 700; }
.usecase p { color: var(--muted); font-size: 16px; margin-top: 12px; }

/* Качество — плитки */
.tile {
    display: flex; flex-direction: column; gap: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 20px;
}
.tile p { font-size: 20px; font-weight: 700; line-height: 1.3; font-family: var(--font-display); }

/* ==========================================================================
   Шаги подключения (2 колонки: список + скриншот)
   ========================================================================== */
.howto-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .howto-grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.steps { display: grid; gap: 12px; }
.step-row {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--surface-100); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 20px;
}
.step-badge {
    flex: none; width: 44px; height: 44px; border-radius: 50%;
    background: var(--blue); color: #fff; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 20px; box-shadow: var(--shadow-soft);
}
.step-row h3 { font-size: 20px; font-weight: 700; }
.step-row p { color: var(--muted); font-size: 16px; margin-top: 4px; }
.videoguide { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 500; font-family: var(--font-ui); }
.videoguide img { width: 18px; height: 18px; }

.howto-shot {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden;
    background: var(--surface-200); border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.howto-shot img,
.howto-shot .howto-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    border-radius: inherit; display: block;
}
.howto-shot .howto-video { background: #000; }

/* Автовход — 4 карточки */
.stepcard {
    display: flex; flex-direction: column; gap: 20px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 20px;
}
.stepcard .num {
    width: 40px; height: 40px; border-radius: 50%; background: var(--blue);
    color: #fff; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; box-shadow: var(--shadow-soft);
}
.stepcard h3 { font-size: 20px; font-weight: 700; }
.stepcard p { color: var(--muted); font-size: 16px; margin-top: 8px; }

/* ==========================================================================
   Загрузки + шаги установки
   ========================================================================== */
.dl-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dl-card {
    display: flex; flex-direction: column; gap: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 32px;
}
.dl-card.primary { border-color: rgba(0,102,255,.4); box-shadow: var(--shadow-soft); }
.dl-card .dl-icon {
    display: grid; place-items: center; width: 52px; height: 52px;
    border-radius: 14px; background: var(--blue-light);
}
.dl-card .dl-icon img { width: 26px; height: 26px; }
.dl-card.soon { opacity: .9; }
.dl-card.soon .dl-icon { background: var(--surface-150); }
.dl-card h3 { font-size: 20px; font-weight: 700; }
.dl-card p { color: var(--muted); font-size: 16px; flex-grow: 1; }
.dl-card .btn { align-self: flex-start; padding: 12px 24px; }

.install-steps { margin-top: 24px; background: var(--blue-tint); border-radius: var(--radius); padding: 28px; }
.install-steps h3 { font-family: var(--font-ui); font-size: 18px; font-weight: 600; color: var(--slate); }
.install-chain { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) { .install-chain { flex-direction: row; align-items: stretch; } }
.install-chip {
    display: flex; align-items: center; gap: 12px; flex: 1;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); padding: 16px;
}
.install-chip .n {
    flex: none; width: 28px; height: 28px; border-radius: 50%;
    background: var(--blue); color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: 14px;
}
.install-chip span:last-child { font-size: 16px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { border-radius: var(--radius); background: var(--surface-50); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--line); padding: 0 24px; }
@media (min-width: 768px) { .faq-item { padding: 0 28px; } }
.faq-item:last-child { border-bottom: none; }
.faq-q {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 20px 0; cursor: pointer;
    font-family: var(--font-display); font-weight: 600; font-size: 18px;
}
.faq-q .toggle {
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--blue-light);
    display: grid; place-items: center;
    transition: transform .2s ease, background .2s ease;
}
/* Стрелка вниз «V» */
.faq-q .toggle::before {
    content: ''; width: 8px; height: 8px; margin-top: -3px;
    border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
    transform: rotate(45deg); transition: border-color .2s ease;
}
.faq-item.open .faq-q .toggle { transform: rotate(180deg); background: var(--blue); }
.faq-item.open .faq-q .toggle::before { border-color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { color: var(--muted); font-size: 16px; padding-bottom: 20px; }
.faq-a a { color: var(--blue); }

/* ==========================================================================
   CTA — светло-голубой блок
   ========================================================================== */
.cta { background: var(--blue-light); border-radius: var(--radius-lg); padding: 48px 24px; text-align: center; }
@media (min-width: 768px) { .cta { padding: 64px; } }
.cta h2 { font-size: 26px; font-weight: 700; line-height: 1.2; max-width: 780px; margin: 0 auto; }
@media (min-width: 768px) { .cta h2 { font-size: 36px; line-height: 40px; } }
.cta p { margin: 16px auto 0; max-width: 680px; color: var(--blue); font-size: 18px; line-height: 28px; }
.cta-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ==========================================================================
   Футер (самодостаточный, наши стили; данные — актуальные immers.cloud)
   ========================================================================== */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 56px 0 28px; font-family: var(--font-ui); }
.site-footer a { color: rgba(255,255,255,.72); transition: color .15s ease; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff; }
.footer-brand span { color: var(--blue-soft); }
.footer-tagline { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.55); }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 9px; font-size: 14px; }
.footer-col h4.mt { margin-top: 22px; }
.footer-contacts { margin-top: 22px; display: grid; gap: 14px; }
.footer-contacts .label { color: #fff; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.footer-contacts .rows { display: grid; gap: 3px; font-size: 14px; }
.footer-social { margin-top: 18px; display: flex; gap: 10px; }
.footer-social a {
    display: inline-grid; place-items: center; height: 34px; padding: 0 14px;
    border-radius: var(--radius-pill); background: rgba(255,255,255,.1); font-size: 13px; font-weight: 600; color: #fff;
}
.footer-social a:hover { background: var(--blue); }
.footer-bottom {
    margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
    display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
    font-size: 13px; color: rgba(255,255,255,.55);
}

/* ==========================================================================
   Плавающий монитор сети (переиспользован из V1)
   ========================================================================== */
.network-monitor {
    position: fixed; bottom: 20px; right: 20px; z-index: 80; width: 300px;
    max-width: calc(100vw - 32px);
    background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px);
    border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lift); font-family: var(--font-ui);
    cursor: pointer; user-select: none; overflow: hidden; transition: box-shadow .2s ease;
}
.network-monitor:hover { box-shadow: 0 24px 48px -18px rgba(15,42,68,.5); }
.monitor-header { padding: 14px 16px; }
.monitor-status { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.status-indicator {
    width: 10px; height: 10px; border-radius: 50%; background: var(--blue); flex: none;
    box-shadow: 0 0 0 4px rgba(0,102,255,.15); animation: pulse 1.5s infinite;
}
.best-server { color: var(--blue); font-weight: 600; }
.monitor-values { display: flex; gap: 10px; }
.metric {
    flex: 1; background: var(--blue-tint); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 8px 12px;
    display: flex; align-items: baseline; justify-content: space-between;
}
.metric-label { font-size: 12px; color: var(--muted-2); }
.metric-value { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.ping-value { color: var(--blue); }
.monitor-details { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.monitor-details.expanded { max-height: 320px; }
.server-list { padding: 4px 16px 16px; display: grid; gap: 6px; }
.server-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: 12px; padding: 8px 10px; background: #fff;
    border: 1px solid var(--line); border-radius: 10px;
}
.server-name { color: var(--ink); font-weight: 600; }
.server-ping { color: var(--muted); font-variant-numeric: tabular-nums; }
.good-ping { color: var(--success); }
.medium-ping { color: var(--warning, var(--orange)); }
.bad-ping { color: var(--danger); }

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,102,255,.35); }
    70%  { box-shadow: 0 0 0 8px rgba(0,102,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,102,255,0); }
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1023px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .grid-2, .grid-3, .grid-4, .dl-cards { grid-template-columns: 1fr; }
    .cta-actions .btn { width: 100%; }
}
