/* ===== Сброс и базовые ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: #1a2b3c;
    background: #f7fafc;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0369a1; text-decoration: none; transition: color .2s; }
a:hover { color: #0c4a6e; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    position: sticky; top: 0; z-index: 100;
}
.header__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 72px;
}
.logo img { display: block; }
.nav { display: flex; gap: 26px; }
.nav a {
    color: #334155; font-weight: 500; position: relative; font-size: .95rem;
}
.nav a.active, .nav a:hover { color: #0369a1; }
.nav a.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -26px; height: 3px;
    background: #0369a1; border-radius: 2px 2px 0 0;
}
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; background: #334155; margin: 5px 0; transition: transform .3s; }

/* ===== Hero ===== */
.hero { padding: 72px 0 96px; background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%); }
.hero__inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero__text p { font-size: 1.1rem; color: #475569; margin-bottom: 1.5em; }
.hero__image { text-align: center; }
.hero__image img { max-width: 100%; animation: float 6s ease-in-out infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    background: #0369a1; color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    border: 0; cursor: pointer;
    transition: background .2s, transform .2s;
}
.btn:hover { background: #075985; color: #fff; transform: translateY(-2px); }
.btn--sm { padding: 8px 18px; font-size: .9rem; }
.btn--ghost { background: transparent; color: #334155; border: 1px solid #cbd5e1; }
.btn--ghost:hover { background: #f1f5f9; color: #1e293b; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-title { text-align: center; margin-bottom: 48px; }

/* ===== Grid ===== */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Cards (разделы и справочник) ===== */
.card, .product {
    background: #fff;
    border-radius: 14px;
    padding: 32px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: transform .3s, box-shadow .3s;
}
.card { text-align: center; color: inherit; display: block; }
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(3,105,161,.12); color: inherit; }
.card img { margin: 0 auto 16px; }
.card h3 { color: #0369a1; }
.product h3 { color: #0c4a6e; margin-bottom: 12px; font-size: 1.1rem; }
.product p { color: #475569; margin: 0; font-size: .95rem; }

/* ===== Article previews ===== */
.article-preview {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: transform .3s, box-shadow .3s;
    display: flex; flex-direction: column;
}
.article-preview:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(3,105,161,.12); }
.article-preview h3 { margin: 12px 0 8px; font-size: 1.1rem; }
.article-preview h3 a { color: #0c4a6e; }
.article-preview h3 a:hover { color: #0369a1; }
.article-preview p { color: #475569; font-size: .95rem; margin: 0; }
.tag {
    display: inline-block;
    background: #e0f2fe; color: #0369a1;
    padding: 4px 12px; border-radius: 999px;
    font-size: .8rem; font-weight: 600;
    align-self: flex-start;
}

/* ===== Page hero ===== */
.page-hero {
    background: linear-gradient(135deg, #0369a1 0%, #0c4a6e 100%);
    color: #fff; padding: 64px 0 56px;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.1rem; margin: 0; }

/* ===== About ===== */
.about { background: #fff; padding: 72px 0; }
.about__inner {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center;
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
    padding: 10px 0 10px 36px; position: relative; color: #334155;
}
.checklist li::before {
    content: "✓"; position: absolute; left: 0; top: 10px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #dcfce7; color: #16a34a;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: .85rem;
}
.about__stats { display: grid; gap: 20px; }
.stat {
    background: linear-gradient(135deg, #0369a1, #0c4a6e);
    color: #fff; padding: 24px; border-radius: 14px; text-align: center;
}
.stat strong { display: block; font-size: 2rem; line-height: 1; }
.stat span { font-size: .9rem; opacity: .85; }

/* ===== Guide ===== */
.guide { max-width: 820px; margin: 0 auto; }
.guide__step {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    margin-bottom: 20px;
    position: relative;
}
.guide__num {
    display: inline-block;
    font-size: 2rem; font-weight: 700;
    color: #0ea5e9; opacity: .35;
    line-height: 1;
    margin-bottom: 8px;
}
.guide__step h2 { font-size: 1.35rem; margin-bottom: 12px; color: #0c4a6e; }
.guide__step p { color: #475569; margin: 0; }

/* ===== FAQ ===== */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item {
    background: #fff;
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}
.faq__item[open] { box-shadow: 0 8px 20px rgba(3,105,161,.08); }
.faq__item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #0c4a6e;
    list-style: none;
    position: relative;
    padding-right: 32px;
    padding-left: 0;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+"; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem; color: #0ea5e9;
    transition: transform .2s;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { margin: 14px 0 0; color: #475569; }

/* ===== Error page ===== */
.error-page { padding: 96px 0 120px; text-align: center; }
.error-page h1 {
    font-size: clamp(4rem, 15vw, 8rem);
    margin: 0;
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
.error-page p { font-size: 1.1rem; color: #64748b; margin: 8px 0 32px; }

/* ===== Footer ===== */
.footer {
    background: #0f172a; color: #cbd5e1;
    padding: 32px 0; margin-top: 64px;
}
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer p { margin: 0; font-size: .9rem; }
.footer__legal { opacity: .65; }

/* ===== Cookie ===== */
.cookie {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    background: rgba(15, 23, 42, .96); color: #e2e8f0;
    backdrop-filter: blur(6px);
    padding: 20px;
    animation: slideUp .4s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.cookie__inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cookie p { margin: 0; flex: 1; min-width: 280px; font-size: .9rem; line-height: 1.5; }
.cookie__actions { display: flex; gap: 12px; }
.cookie .btn--sm { padding: 10px 22px; }

/* ===== Анимации появления ===== */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .hero__inner, .about__inner { grid-template-columns: 1fr; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .nav a.active::after { display: none; }
}

@media (max-width: 640px) {
    .nav {
        position: fixed; top: 72px; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 20px;
        gap: 16px; box-shadow: 0 8px 16px rgba(0,0,0,.08);
        transform: translateY(-140%); transition: transform .3s;
    }
    .nav.open { transform: translateY(0); }
    .burger { display: block; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .hero { padding: 48px 0 64px; }
    .section { padding: 48px 0; }
    .cookie__inner { flex-direction: column; align-items: stretch; }
    .cookie__actions { justify-content: flex-end; }
    .footer__inner { flex-direction: column; text-align: center; }
    .guide__step { padding: 24px; }
}