/*
Theme Name: HostVPN
Template: twentytwentyfive
Description: Тема сайта hostpn.ru в стиле кабинета HostVPN (тёмная, индиго, Manrope).
Version: 1.2
Text Domain: hostvpn
*/

:root {
    --hv-bg: #030712;
    --hv-surface: #111827;
    --hv-border: rgba(55, 65, 81, 0.6);
    --hv-text-2: #9ca3af;
    --hv-accent: #6366f1;
    --hv-accent-hover: #4f46e5;
}

body {
    background:
        radial-gradient(60% 40% at 15% 0%, rgba(99, 102, 241, 0.14), transparent 60%),
        radial-gradient(50% 40% at 90% 30%, rgba(139, 92, 246, 0.07), transparent 60%),
        var(--hv-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

/* шапка */
.hv-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hv-border);
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}
.hv-header .wp-block-site-title a { color: #f9fafb; text-decoration: none; font-weight: 800; }
.hv-header .wp-block-site-logo img { border-radius: 50%; }
.hv-header .wp-block-navigation a { color: #d1d5db; text-decoration: none; font-weight: 600; }
.hv-header .wp-block-navigation a:hover { color: #fff; }

/* кнопки */
.wp-element-button,
.wp-block-button__link {
    background: var(--hv-accent);
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
    transition: background 0.15s ease, transform 0.15s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover { background: var(--hv-accent-hover); transform: translateY(-1px); }
.wp-block-button.is-style-outline > .wp-block-button__link {
    background: transparent;
    border: 1px solid var(--hv-border);
    color: #f9fafb;
    box-shadow: none;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--hv-accent); }

/* карточки */
.hv-card {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--hv-border);
    border-radius: 16px;
    padding: 24px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    height: 100%;
}
.hv-card h3 { margin-top: 0; }
.hv-card p { color: var(--hv-text-2); }
.hv-card .wp-block-buttons { margin-top: 12px; }

.hv-price { font-size: 2rem; font-weight: 800; color: #f9fafb; margin: 4px 0 !important; }
.hv-price small { font-size: 1rem; color: var(--hv-text-2); font-weight: 600; }
.hv-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc !important;
    font-size: 0.8rem;
    font-weight: 700;
}

/* первый экран */
.hv-hero { padding-top: 72px !important; padding-bottom: 56px !important; text-align: center; }
.hv-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; letter-spacing: -0.02em; }
.hv-hero p { color: var(--hv-text-2); font-size: 1.15rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.hv-hero .wp-block-buttons { justify-content: center; }

.hv-section { padding-top: 40px !important; padding-bottom: 40px !important; }
.hv-section > h2 { text-align: center; }
.hv-muted { color: var(--hv-text-2); }

/* шаги инструкции */
.hv-steps { counter-reset: step; list-style: none; padding-left: 0; }
.hv-steps > li {
    counter-increment: step;
    position: relative;
    padding: 14px 16px 14px 60px;
    margin-bottom: 12px;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--hv-border);
    border-radius: 14px;
}
.hv-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* записи блога */
.wp-block-latest-posts.is-grid li,
.hv-posts .wp-block-post {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--hv-border);
    border-radius: 16px;
    padding: 20px;
}
.wp-block-latest-posts__post-title { font-weight: 700; color: #f9fafb; text-decoration: none; }
.wp-block-latest-posts__post-date { color: var(--hv-text-2); }

/* подвал */
.hv-footer {
    border-top: 1px solid var(--hv-border);
    margin-top: 48px;
    padding-top: 40px !important;
    padding-bottom: 32px !important;
}
.hv-footer a { color: #d1d5db; text-decoration: none; }
.hv-footer a:hover { color: #fff; }
.hv-footer ul { list-style: none; padding-left: 0; }
.hv-footer li { margin-bottom: 6px; }

/* ---------- типографика ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol { color: #d1d5db; }
.wp-block-post-content strong { color: #f9fafb; font-weight: 700; }
.wp-block-post-content > h2 { margin-top: 2.2em; }
.wp-block-post-title { margin-bottom: 0.6em; }
::selection { background: rgba(99, 102, 241, 0.35); color: #fff; }

/* ---------- плавность ---------- */
:root { --hv-ease: cubic-bezier(0.22, 1, 0.36, 1); }

a { transition: color 0.2s var(--hv-ease), opacity 0.2s var(--hv-ease); }
.wp-element-button,
.wp-block-button__link {
    transition: background-color 0.25s var(--hv-ease), transform 0.25s var(--hv-ease),
        box-shadow 0.25s var(--hv-ease), border-color 0.25s var(--hv-ease);
}
.wp-element-button:hover,
.wp-block-button__link:hover { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
.wp-element-button:active,
.wp-block-button__link:active { transform: translateY(0) scale(0.98); }

.hv-card,
.hv-steps > li,
.wp-block-latest-posts.is-grid li {
    transition: transform 0.35s var(--hv-ease), border-color 0.35s var(--hv-ease),
        box-shadow 0.35s var(--hv-ease), background-color 0.35s var(--hv-ease);
}
.hv-card:hover,
.wp-block-latest-posts.is-grid li:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.12);
}
.hv-steps > li:hover { border-color: rgba(99, 102, 241, 0.4); }

.hv-header { transition: padding 0.3s var(--hv-ease), background-color 0.3s var(--hv-ease), box-shadow 0.3s var(--hv-ease); }
.hv-header.is-scrolled {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    background: rgba(3, 7, 18, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

:focus-visible { outline: 2px solid #818cf8; outline-offset: 3px; border-radius: 6px; }

/* появление при прокрутке (включается скриптом, без JS всё видно сразу) */
.hv-motion .hv-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--hv-ease), transform 0.7s var(--hv-ease);
    transition-delay: var(--hv-delay, 0ms);
    will-change: opacity, transform;
}
.hv-motion .hv-reveal.is-visible { opacity: 1; transform: none; }
.hv-motion .hv-card.hv-reveal.is-visible:hover { transform: translateY(-4px); transition-delay: 0ms; }

/* мягкая смена страниц */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.28s; animation-timing-function: var(--hv-ease); }

/* мобильное меню — плавное открытие */
.wp-block-navigation__responsive-container.is-menu-open {
    background: rgba(3, 7, 18, 0.97) !important;
    backdrop-filter: blur(14px);
    animation: hv-fade 0.25s var(--hv-ease);
}
@keyframes hv-fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* документы в подвале */
.hv-legal { font-size: 0.85rem; line-height: 1.8; }
.hv-legal a { color: var(--hv-text-2); }
.hv-legal a:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 781px) {
    .hv-hero { padding-top: 40px !important; }
    /* шапка в одну строку: логотип слева, меню и «Купить» справа */
    .hv-header .alignwide { flex-wrap: nowrap !important; gap: 8px; }
    .hv-header .alignwide > .wp-block-group { flex-wrap: nowrap !important; gap: 10px; }
    .hv-header .wp-block-site-title { font-size: 1.05rem; }
    .hv-header .wp-block-site-logo img { width: 32px !important; height: 32px !important; }
    .hv-header .wp-block-button__link { padding: 8px 14px; font-size: 0.9rem; }
}
