/* ===========================
   RESET & VARIABLES
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip link — доступность */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Глобальный focus-visible для a11y */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

:root {
    /* Colors — индиго + сланцевый */
    --primary: #4F46E5;
    --primary-blue: #4F46E5;
    --primary-light: #EEF2FF;
    --accent-green: #4F46E5;
    --secondary: #334155;
    --text-dark: #334155;
    --text-gray: #64748B;
    --white: #FFFFFF;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
    
    /* Fonts */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Lato', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    /* Один градиент на всю страницу — не обрывается блоками, идёт поверх всего */
    background: linear-gradient(180deg,
        #e8ecff 0%,
        #eef2ff 5%,
        #f4f6fc 12%,
        #f8f9fc 18%,
        #f7f8fc 26%,
        #f6f7fc 36%,
        #f6f8fc 46%,
        #f7f8fc 56%,
        #f7f9fc 66%,
        #f6f8fc 76%,
        #f6f8fc 86%,
        #f8fafc 92%,
        #fcfdfe 97%,
        #ffffff 100%);
    min-height: 100vh;
}

body.page-ready {
    opacity: 1;
}

/* До первой отрисовки анимации приостановлены (класс ставится из <head>) */
html {
    scroll-behavior: smooth;
    background-color: #f6f7fc;
}
html.loading * {
    animation-play-state: paused !important;
}

main {
    scroll-margin-top: 80px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   BUTTONS
=========================== */

.btn-primary,
.btn-secondary,
.btn-generate {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-generate {
    background: var(--accent-green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    margin-top: 20px;
}

.btn-generate:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ===========================
   HEADER
=========================== */

.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    cursor: pointer;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo svg {
    transition: var(--transition);
}

.logo:hover svg {
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-auth-wrapper {
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.4s ease-out, transform 0.35s ease-out;
}

.nav-auth-wrapper.nav-auth-ready {
    opacity: 1;
    transform: translateY(0);
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===========================
   HERO SECTION
=========================== */

.hero {
    /* Фон прозрачный — градиент идёт с body поверх всего */
    background: transparent;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

/* Тематика: строки как в тетради; затухание по краям секции */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg width='56' height='56' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 14h56M0 28h56M0 42h56' stroke='%234F46E5' stroke-opacity='0.12' stroke-width='1' fill='none'/%3E%3C/svg%3E");
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Декоративные «листы» с тематическим контентом (титул, содержание, ГОСТ) */
.deco-sheet {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation-duration: 1.6s;
    animation-timing-function: cubic-bezier(0.32, 0.72, 0.2, 1);
    animation-fill-mode: forwards;
}

.deco-sheet-inner {
    width: 100%;
    height: 100%;
    padding: 18px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.88) 100%);
    border-radius: inherit;
    border: 1px solid rgba(79, 70, 229, 0.12);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.06);
    font-family: var(--font-body);
    color: var(--text-dark);
    overflow: hidden;
}

/* Hero: один лист справа у края, чтобы не сливаться с превью документов по центру */
.deco-sheet--hero-right {
    top: 22%;
    right: 0;
    width: 260px;
    height: 340px;
    border-radius: 20px;
    transform: rotate(5deg);
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.08) 0%, rgba(99, 102, 241, 0.03) 50%, transparent 70%);
    border: 2px solid rgba(79, 70, 229, 0.18);
    box-shadow: 0 24px 48px rgba(79, 70, 229, 0.1);
}

.deco-sheet--hero-right .deco-sheet-uni {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.deco-sheet--hero-right .deco-sheet-type {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.deco-sheet--hero-right .deco-sheet-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.deco-sheet--hero-right .deco-sheet-meta {
    font-size: 10px;
    color: var(--text-gray);
    display: flex;
    gap: 12px;
}

.deco-sheet--hero-right .deco-sheet-page {
    position: absolute;
    bottom: 14px;
    right: 20px;
    font-size: 10px;
    color: var(--text-gray);
}

/* Hero: лист «Содержание» слева — только на широких экранах */
.deco-sheet--hero-left {
    top: 28%;
    left: -60px;
    width: 240px;
    height: 300px;
    border-radius: 18px;
    transform: rotate(-5deg);
    background: linear-gradient(200deg, rgba(99, 102, 241, 0.07) 0%, rgba(79, 70, 229, 0.03) 50%, transparent 70%);
    border: 2px solid rgba(79, 70, 229, 0.14);
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.07);
    animation-name: decoSheetAppearLeft;
    animation-delay: 0.35s;
}

.deco-sheet--hero-left .deco-sheet-heading {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.deco-sheet--hero-left .deco-sheet-line {
    font-size: 10px;
    color: var(--text-dark);
    line-height: 1.9;
}

/* Benefits: лист в верхней части секции справа */
.deco-sheet--benefits {
    top: 18%;
    right: 3%;
    width: 200px;
    height: 250px;
    border-radius: 14px;
    transform: rotate(4deg);
    background: linear-gradient(160deg, rgba(79, 70, 229, 0.06) 0%, rgba(99, 102, 241, 0.02) 60%, transparent 100%);
    border: 2px solid rgba(79, 70, 229, 0.15);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.06);
}
.deco-sheet--benefits.in-view {
    animation-name: decoSheetAppearRight;
    animation-delay: 0s;
}

.deco-sheet--benefits .deco-sheet-type {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.deco-sheet--benefits .deco-sheet-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
}

.deco-sheet--benefits .deco-sheet-uni {
    font-size: 9px;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.deco-sheet--benefits .deco-sheet-page {
    position: absolute;
    bottom: 12px;
    right: 18px;
    font-size: 9px;
    color: var(--text-gray);
}

/* How-works: лист слева в нижней части секции */
.deco-sheet--how-works {
    bottom: 15%;
    left: 2%;
    width: 190px;
    height: 230px;
    border-radius: 14px;
    transform: rotate(-4deg);
    background: linear-gradient(200deg, rgba(99, 102, 241, 0.06) 0%, rgba(79, 70, 229, 0.02) 55%, transparent 75%);
    border: 2px solid rgba(79, 70, 229, 0.12);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.05);
}
.deco-sheet--how-works.in-view {
    animation-name: decoSheetAppearLeft2;
    animation-delay: 0s;
}

.deco-sheet--how-works .deco-sheet-type {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.deco-sheet--how-works .deco-sheet-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}

.deco-sheet--how-works .deco-sheet-uni {
    font-size: 9px;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.deco-sheet--how-works .deco-sheet-page {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 9px;
    color: var(--text-gray);
}

/* Pricing: лист справа в верхней части секции */
.deco-sheet--pricing {
    top: 15%;
    right: 3%;
    width: 195px;
    height: 235px;
    border-radius: 14px;
    transform: rotate(5deg);
    background: linear-gradient(160deg, rgba(79, 70, 229, 0.06) 0%, rgba(99, 102, 241, 0.02) 60%, transparent 100%);
    border: 2px solid rgba(79, 70, 229, 0.12);
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.05);
}
.deco-sheet--pricing.in-view {
    animation-name: decoSheetAppearRight2;
    animation-delay: 0s;
}

.deco-sheet--pricing .deco-sheet-type {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.deco-sheet--pricing .deco-sheet-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}

.deco-sheet--pricing .deco-sheet-ref {
    font-size: 9px;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.deco-sheet--pricing .deco-sheet-page {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 9px;
    color: var(--text-gray);
}

/* Examples: лист слева в верхней части секции */
.deco-sheet--examples {
    top: 20%;
    left: 2%;
    width: 200px;
    height: 240px;
    border-radius: 14px;
    transform: rotate(-4deg);
    background: linear-gradient(200deg, rgba(99, 102, 241, 0.08) 0%, rgba(79, 70, 229, 0.03) 55%, transparent 75%);
    border: 2px solid rgba(79, 70, 229, 0.14);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.06);
}
.deco-sheet--examples.in-view {
    animation-name: decoSheetAppearLeft2;
    animation-delay: 0s;
}

.deco-sheet--examples .deco-sheet-type {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.deco-sheet--examples .deco-sheet-ref {
    font-size: 9px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.deco-sheet--examples .deco-sheet-line {
    font-size: 10px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 6px;
}

.deco-sheet-line--short {
    font-size: 9px;
    color: var(--text-gray);
}

/* Анимация появления фоновых листов: выезд из-за границы экрана + fade-in */
@keyframes decoSheetAppearLeft {
    0% { opacity: 0; transform: translateX(-140px) rotate(-5deg); }
    100% { opacity: 1; transform: translateX(0) rotate(-5deg); }
}
@keyframes decoSheetAppearRight {
    0% { opacity: 0; transform: translateX(140px) rotate(4deg); }
    100% { opacity: 1; transform: translateX(0) rotate(4deg); }
}
@keyframes decoSheetAppearLeft2 {
    0% { opacity: 0; transform: translateX(-140px) rotate(-4deg); }
    100% { opacity: 1; transform: translateX(0) rotate(-4deg); }
}
@keyframes decoSheetAppearRight2 {
    0% { opacity: 0; transform: translateX(140px) rotate(5deg); }
    100% { opacity: 1; transform: translateX(0) rotate(5deg); }
}

/* Hero: появление заголовка и подзаголовка */
@keyframes heroFadeInUp {
    0% { opacity: 0; transform: translateY(28px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Hero: появление карточки формы (лёгкий подъём + масштаб) */
@keyframes heroCardAppear {
    0% { opacity: 0; transform: translateY(32px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hero: появление элементов внутри формы */
@keyframes heroFormItemIn {
    0% { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Document preview animations */

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
    color: var(--text-dark);
    opacity: 0;
    animation: heroFadeInUp 1.05s cubic-bezier(0.32, 0.72, 0.2, 1) 0.18s forwards;
}

.highlight {
    color: var(--primary-blue);
    position: relative;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.6;
    opacity: 0;
    animation: heroFadeInUp 1.05s cubic-bezier(0.32, 0.72, 0.2, 1) 0.38s forwards;
}

/* Generator Form */

.generator-form {
    background: var(--white);
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    animation: heroCardAppear 1.1s cubic-bezier(0.32, 0.72, 0.2, 1) 0.6s forwards;
}

/* Появление полей формы и кнопки каскадом */
.generator-form > .form-group {
    opacity: 0;
    animation: heroFormItemIn 0.72s cubic-bezier(0.32, 0.72, 0.2, 1) forwards;
}
.generator-form > .form-group:nth-child(1) { animation-delay: 0.82s; }
.generator-form > .form-group:nth-child(2) { animation-delay: 0.98s; }
.generator-form > .form-row {
    opacity: 0;
    animation: heroFormItemIn 0.72s cubic-bezier(0.32, 0.72, 0.2, 1) 1.14s forwards;
}
.generator-form > .btn-generate {
    opacity: 0;
    animation: heroFormItemIn 0.72s cubic-bezier(0.32, 0.72, 0.2, 1) 1.3s forwards;
}
.generator-form > .timer-badge {
    opacity: 0;
    animation: heroFormItemIn 0.72s cubic-bezier(0.32, 0.72, 0.2, 1) 1.46s forwards;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-select,
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-row-generator {
    grid-template-columns: 1fr 1fr;
}

.timer-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--text-gray);
    font-size: 14px;
}

.timer-badge svg {
    color: var(--accent-green);
}

/* Hero Visual */

.hero-visual {
    position: relative;
    height: 450px;
    isolation: isolate;
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.02) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: auto;
}

.document-preview {
    position: absolute;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border: 1px solid var(--border-color);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
    transform-origin: center center;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.document-preview::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.document-preview::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.02) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* Hover effects removed for better UX */

.preview-1 {
    width: 210px;
    height: 280px;
    top: 25px;
    left: 140px;
    z-index: 3;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    animation-delay: 0.15s;
    animation-name: fadeInFloat1;
}

@keyframes fadeInFloat1 {
    0% {
        opacity: 0;
        transform: translateY(15px) rotate(-4deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(-4deg);
    }
}

.preview-2 {
    width: 210px;
    height: 280px;
    top: 30px;
    right: -55px;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
    animation-delay: 0.3s;
    animation-name: fadeInFloat2;
}

@keyframes fadeInFloat2 {
    0% {
        opacity: 0;
        transform: translateY(15px) rotate(4deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(4deg);
    }
}

.preview-3 {
    width: 175px;
    height: 205px;
    bottom: 35px;
    left: 58%;
    transform: translateX(-50%);
    z-index: 1;
    padding: 18px 14px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 2px solid var(--accent-green);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
    animation-delay: 0.45s;
    animation-name: fadeInFloat3;
}

@keyframes fadeInFloat3 {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) rotate(-2deg);
    }
}

.doc-university {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.doc-type {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.doc-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 20px;
    padding: 0 8px 10px;
    border-bottom: 1px solid var(--border-color);
}

.doc-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 6px;
}

.doc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 8px;
    color: var(--text-gray);
    font-weight: 500;
}

.meta-value {
    font-size: 10px;
    color: var(--text-dark);
    font-weight: 600;
}

.doc-footer {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    margin-top: auto;
    padding-top: 16px;
}

.doc-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    color: var(--primary);
}

.doc-badge svg {
    width: 14px;
    height: 14px;
}

.doc-type-small {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    color: var(--accent-green);
    margin-bottom: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
}

.doc-title-small {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: auto;
    padding: 0 4px;
}

.doc-meta-small {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-gray);
    font-weight: 600;
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.stats-card {
    position: absolute;
    bottom: 45px;
    right: -35px;
    background: linear-gradient(135deg, var(--white) 0%, #EEF2FF 100%);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(79, 70, 229, 0.2);
    padding: 20px 40px;
    text-align: center;
    border: 2px solid rgba(79, 70, 229, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
    backface-visibility: hidden;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 2px;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===========================
   BENEFITS — плоский редакционный дизайн без теней
=========================== */

.benefits {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
    padding: var(--section-padding);
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Тематика: точечная сетка; затухание по краям */
.benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(79, 70, 229, 0.14) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%);
    pointer-events: none;
}

.benefits .container {
    position: relative;
    z-index: 1;
}

.benefits-header {
    text-align: center;
    margin-bottom: 52px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.95s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.95s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.benefits.benefits-visible .benefits-header {
    opacity: 1;
    transform: scale(1);
}

.benefits .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-dark);
    line-height: 1.2;
}

.benefits .section-title .accent {
    color: var(--primary);
}

.benefits .section-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 640px;
    margin: 0 auto 0;
    line-height: 1.7;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* Плоские карточки: без теней, тонкая граница */
/* Карточки: крестообразное появление — крайние с боков, средние снизу */
.benefit-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px 28px;
    position: relative;
    border: 1px solid #e8eaed;
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 1s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.benefit-card-1 { transform: translateX(-56px); }
.benefit-card-2 { transform: translateY(40px) scale(0.94); }
.benefit-card-3 { transform: translateY(40px) scale(0.94); }
.benefit-card-4 { transform: translateX(56px); }

.benefits.benefits-visible .benefit-card {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}
.benefits.benefits-visible .benefit-card-1 { transition-delay: 0.18s; }
.benefits.benefits-visible .benefit-card-2 { transition-delay: 0.34s; }
.benefits.benefits-visible .benefit-card-3 { transition-delay: 0.5s; }
.benefits.benefits-visible .benefit-card-4 { transition-delay: 0.18s; }

/* Иконка: плоская, без теней */
.benefit-icon-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--primary);
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
}

.benefit-content {
    text-align: left;
}

.benefit-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.benefit-description {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.benefit-stat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    background: #eef2ff;
}

/* ===========================
   HOW IT WORKS — в духе benefits: минимализм, белые карточки
=========================== */

.how-works {
    padding: var(--section-padding);
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Паттерн линий с плавным затуханием вверху и внизу — переход в «Erudia в цифрах» незаметен */
.how-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='44' height='44' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 11h44M0 22h44M0 33h44' stroke='%234F46E5' stroke-opacity='0.11' stroke-width='1' fill='none'/%3E%3C/svg%3E");
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 78%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Радиальные пятна затухают у границ — не создают линию на стыке с «Erudia в цифрах» */
.how-works::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(79, 70, 229, 0.12) 0%, transparent 58%),
        radial-gradient(circle at 85% 90%, rgba(99, 102, 241, 0.1) 0%, transparent 62%);
    mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 72%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 72%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.how-works-header {
    text-align: center;
    margin-bottom: 52px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.8s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.how-works.how-works-visible .how-works-header {
    opacity: 1;
    transform: translateY(0);
}

.how-works .section-title {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.how-works .section-title .accent {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.how-works .section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 520px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 20px;
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 60px;
}

.steps-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    z-index: 1;
}

.steps-line {
    display: none;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

/* Карточки шагов: поочерёдное «приземление» сверху с лёгким отскоком */
.step-card {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 50%, #f8faff 100%);
    border-radius: 20px;
    padding: 36px 28px 32px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-52px) scale(0.94);
    transition: opacity 0.82s cubic-bezier(0.34, 1.35, 0.64, 1),
                transform 0.88s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), #818CF8, transparent);
}

.how-works.how-works-visible .step-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.how-works.how-works-visible .step-card:nth-child(1) { transition-delay: 0.15s; }
.how-works.how-works-visible .step-card:nth-child(2) { transition-delay: 0.32s; }
.how-works.how-works-visible .step-card:nth-child(3) { transition-delay: 0.5s; }
.how-works.how-works-visible .step-card:nth-child(4) { transition-delay: 0.66s; }

.step-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: #6366F1;
    margin-bottom: 20px;
    opacity: 0.9;
}

.step-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.step-content {
    text-align: center;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.3;
}

.step-description {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
}

.step-connector {
    display: none;
}

/* ===========================
   STATISTICS — в духе benefits: светлый фон, белые карточки
=========================== */

/* ===========================
   STATISTICS — Erudia в цифрах
=========================== */

.statistics {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* Точки плавно появляются к центру — без резкой полосы на границе с «Как это работает» */
.statistics::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='36' height='36' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6' cy='6' r='2' fill='%234F46E5' fill-opacity='0.06'/%3E%3Ccircle cx='24' cy='24' r='2' fill='%236366F1' fill-opacity='0.05'/%3E%3C/svg%3E");
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, transparent 0%, black 40%, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 40%, black 60%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Радиальные пятна затухают у границ — не затемняют стык с how-works */
.statistics::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 15%, rgba(79, 70, 229, 0.12) 0%, transparent 62%),
        radial-gradient(circle at 92% 85%, rgba(99, 102, 241, 0.1) 0%, transparent 62%);
    mask-image: linear-gradient(180deg, transparent 0%, black 32%, black 68%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 32%, black 68%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.statistics .container {
    position: relative;
    z-index: 1;
}

.statistics-header {
    text-align: center;
    margin-bottom: 52px;
}

.statistics .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.statistics .section-title .accent {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.statistics .section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 520px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 56px;
}

.stat-card {
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 50%, #f8faff 100%);
    border-radius: 20px;
    padding: 36px 24px 36px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    transition: opacity 0.78s cubic-bezier(0.32, 0.72, 0.2, 1), transform 0.78s cubic-bezier(0.32, 0.72, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.4), #818CF8, transparent);
}

.statistics .stats-grid.visible .stat-card {
    opacity: 1;
    transform: translateY(0);
}

.statistics .stats-grid.visible .stat-card:nth-child(1) { transition-delay: 0.12s; }
.statistics .stats-grid.visible .stat-card:nth-child(2) { transition-delay: 0.26s; }
.statistics .stats-grid.visible .stat-card:nth-child(3) { transition-delay: 0.4s; }
.statistics .stats-grid.visible .stat-card:nth-child(4) { transition-delay: 0.54s; }

.stat-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-content {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.1;
    color: var(--text-dark);
    letter-spacing: -0.03em;
}

.stat-number:not([data-suffix])::after {
    content: '+';
    margin-left: 2px;
    font-weight: 700;
    opacity: 0.7;
}

.stat-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.stat-detail {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 6px;
    line-height: 1.4;
}

/* Секция вузов */
.partners-section {
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 40px 40px 36px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.partners-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-dark);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 1s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 1s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.partners-section.partners-visible .partners-title {
    opacity: 1;
    transform: translateY(0);
}

.partners-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1s cubic-bezier(0.32, 0.72, 0.2, 1) 0.12s,
                transform 1s cubic-bezier(0.32, 0.72, 0.2, 1) 0.12s;
}
.partners-section.partners-visible .partners-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

/* Карточки вузов: поочерёдное «раскрытие» масштабом из центра */
.partner-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border-radius: 14px;
    padding: 20px 14px 18px;
    text-align: center;
    border: 1px solid rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.85s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.9s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.partners-section.partners-visible .partner-card {
    opacity: 1;
    transform: scale(1);
}
.partners-section.partners-visible .partner-card:nth-child(1) { transition-delay: 0.22s; }
.partners-section.partners-visible .partner-card:nth-child(2) { transition-delay: 0.38s; }
.partners-section.partners-visible .partner-card:nth-child(3) { transition-delay: 0.54s; }
.partners-section.partners-visible .partner-card:nth-child(4) { transition-delay: 0.38s; }
.partners-section.partners-visible .partner-card:nth-child(5) { transition-delay: 0.54s; }
.partners-section.partners-visible .partner-card:nth-child(6) { transition-delay: 0.7s; }

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.35), transparent);
}

.partner-icon {
    margin-bottom: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.partner-icon svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.partner-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.partner-full {
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.35;
    margin-bottom: 6px;
}

.partner-meta {
    font-size: 11px;
    color: var(--text-gray);
    opacity: 0.85;
    line-height: 1.3;
}

/* ===========================
   PRICING
=========================== */

.pricing {
    padding: var(--section-padding);
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Сетка затухает у границ — на стыке с «Примеры» только градиент */
.pricing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(79, 70, 229, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
    pointer-events: none;
}

.pricing-header {
    text-align: center;
    margin-bottom: 56px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.92s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.92s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.pricing.pricing-visible .pricing-header {
    opacity: 1;
    transform: translateY(0);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1140px;
    margin: 0 auto;
}

/* Карточки тарифов: центральная «всплывает» первой, боковые подъезжают с краёв */
.price-card {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 32px 24px;
    border: 1px solid rgba(79, 70, 229, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.88s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.92s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.pricing-grid .price-card:nth-child(1) { transform: translateX(-64px); }
.pricing-grid .price-card:nth-child(2) { transform: scale(0.92); }
.pricing-grid .price-card:nth-child(3) { transform: translateX(64px); }

.pricing.pricing-visible .price-card {
    opacity: 1;
    transform: translateX(0) scale(1);
}
.pricing.pricing-visible .price-card:nth-child(1) { transition-delay: 0.32s; }
.pricing.pricing-visible .price-card:nth-child(2) { transition-delay: 0.14s; }
.pricing.pricing-visible .price-card:nth-child(3) { transition-delay: 0.32s; }

.price-card-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #6366F1);
}

.price-card.popular .price-card-bar {
    background: linear-gradient(90deg, var(--primary), #6366F1);
}

.price-card.popular {
    border-color: var(--primary);
    border-width: 2px;
}

.price-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    padding: 6px 14px;
    border-radius: 50px;
}

.price-name {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.price-card.popular .price-name {
    padding-right: 110px;
}

.price-desc {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
    line-height: 1.4;
}

.price-amount {
    margin-bottom: 4px;
}

.price-value {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--text-dark);
}

.price-currency {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-gray);
}

.price-period {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.price-features {
    list-style: none;
    margin-bottom: 28px;
    flex-grow: 1;
}

.price-features li {
    font-size: 15px;
    color: var(--text-dark);
    padding: 8px 0 8px 28px;
    position: relative;
    line-height: 1.4;
}

.price-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
}

.price-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: auto;
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===========================
   EXAMPLES — профессиональный UX
=========================== */

.examples {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
    padding: var(--section-padding);
    background: transparent;
    position: relative;
}

/* Декоративное пятно + радиал в углу — поверх градиента body */
.examples::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 88% 12%, rgba(79, 70, 229, 0.1) 0%, transparent 42%),
        radial-gradient(circle at 8% 8%, rgba(79, 70, 229, 0.08) 0%, transparent 62%);
    mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 78%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 22%, black 78%, transparent 100%);
    pointer-events: none;
}

.examples .container {
    position: relative;
    z-index: 1;
}

.examples-header {
    text-align: center;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.88s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.88s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.examples.examples-visible .examples-header {
    opacity: 1;
    transform: translateY(0);
}

.examples-header .section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.examples-header .section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 560px;
    margin: 0 auto;
}

.examples-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.82s cubic-bezier(0.32, 0.72, 0.2, 1) 0.14s,
                transform 0.82s cubic-bezier(0.32, 0.72, 0.2, 1) 0.14s;
}
.examples.examples-visible .examples-filters {
    opacity: 1;
    transform: translateY(0);
}

.filter-btn {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 24px;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    border-color: rgba(79, 70, 229, 0.4);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

/* Карточки примеров: волна по диагонали при доскролле */
.example-card {
    background: linear-gradient(165deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, 0.12);
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.78s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.82s cubic-bezier(0.32, 0.72, 0.2, 1);
    position: relative;
}

.examples.examples-visible .example-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* Диагональная волна появления */
.examples.examples-visible .example-card:nth-child(1) { transition-delay: 0.18s; }
.examples.examples-visible .example-card:nth-child(2) { transition-delay: 0.28s; }
.examples.examples-visible .example-card:nth-child(3) { transition-delay: 0.38s; }
.examples.examples-visible .example-card:nth-child(4) { transition-delay: 0.28s; }
.examples.examples-visible .example-card:nth-child(5) { transition-delay: 0.38s; }
.examples.examples-visible .example-card:nth-child(6) { transition-delay: 0.48s; }
.examples.examples-visible .example-card:nth-child(7) { transition-delay: 0.48s; }
.examples.examples-visible .example-card:nth-child(8) { transition-delay: 0.58s; }

.examples-grid.examples-filter-instant .example-card {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: none;
}


/* Область превью документа */
.example-image {
    position: relative;
    height: 220px;
    background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 50%, #e0e7ff 100%);
    overflow: hidden;
}

.example-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,0.3) 100%);
    pointer-events: none;
}

.example-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.example-card:hover .example-overlay {
    opacity: 1;
}

.example-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.25s ease;
    transform: translateY(8px);
}

.example-card:hover .example-btn {
    transform: translateY(0);
}

.example-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.example-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    z-index: 2;
}

.example-badge.diploma,
.example-badge.article,
.example-badge.essay {
    background: var(--primary);
}

/* Документ-превью: структурированная имитация страницы */
.example-doc-preview {
    padding: 28px 24px 28px 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(79, 70, 229, 0.12);
}

.preview-header .preview-line {
    height: 6px;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.6) 0%, rgba(99, 102, 241, 0.4) 100%);
    border-radius: 3px;
    margin-bottom: 8px;
}

.preview-body {
    flex: 1;
}

.preview-body .preview-line {
    height: 5px;
    background: rgba(51, 65, 85, 0.12);
    border-radius: 3px;
    margin-bottom: 10px;
}

.preview-line.short {
    width: 35%;
}

.preview-line.medium {
    width: 60%;
}

.preview-line.long {
    width: 90%;
}

.preview-body .preview-line:last-child {
    margin-bottom: 0;
}

.example-content {
    padding: 24px 28px 28px;
}

.example-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.example-subject {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 14px;
}

.example-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
}

.meta-item svg {
    color: var(--primary);
    flex-shrink: 0;
    opacity: 0.85;
}

.example-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
}

.example-cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.example-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 65%);
    animation: exampleRotate 25s linear infinite;
}

@keyframes exampleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cta-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 8px;
    transition: var(--transition);
}


.cta-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.3;
}

.cta-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 50px;
    border: 2px solid var(--white);
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.cta-button:hover {
    background: transparent;
    color: var(--white);
    transform: scale(1.05);
}

.cta-stats {
    display: flex;
    gap: 32px;
    margin-top: 8px;
}

.cta-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.cta-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

/* ===========================
   FAQ
=========================== */

.faq {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
    padding: var(--section-padding);
    background: transparent;
    position: relative;
}

.faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.2) 50%, transparent 100%);
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.88s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.88s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.faq.faq-visible .faq-header {
    opacity: 1;
    transform: translateY(0);
}

.faq-header-content {
    flex: 1;
}

.faq-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.faq-search {
    position: relative;
    width: 320px;
    margin-top: 28px;
}

.faq-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--white);
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.faq-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

/* Категории FAQ: выезд слева */
.faq-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 100px;
    height: fit-content;
}
.faq-category {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.68s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.72s cubic-bezier(0.32, 0.72, 0.2, 1),
                border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.faq.faq-visible .faq-category {
    opacity: 1;
    transform: translateX(0);
}
.faq.faq-visible .faq-category:nth-child(1) { transition-delay: 0.14s; }
.faq.faq-visible .faq-category:nth-child(2) { transition-delay: 0.26s; }
.faq.faq-visible .faq-category:nth-child(3) { transition-delay: 0.38s; }
.faq.faq-visible .faq-category:nth-child(4) { transition-delay: 0.5s; }

.faq-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
}

.faq-category svg {
    flex-shrink: 0;
    color: var(--text-gray);
    transition: color 0.3s ease;
}

.faq-category span:first-of-type {
    flex: 1;
}

.category-count {
    font-size: 13px;
    color: var(--text-gray);
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 50px;
    min-width: 28px;
    text-align: center;
}

.faq-category:hover {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.05);
}

.faq-category.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.faq-category.active svg {
    color: var(--white);
}

.faq-category.active .category-count {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Вопросы FAQ: выезд справа поочерёдно */
.faq-item {
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    padding-left: 80px;
    opacity: 0;
    transform: translateX(36px);
    transition: opacity 0.68s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.72s cubic-bezier(0.32, 0.72, 0.2, 1),
                border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq.faq-visible .faq-item {
    opacity: 1;
    transform: translateX(0);
}
.faq.faq-visible .faq-item:nth-child(1) { transition-delay: 0.16s; }
.faq.faq-visible .faq-item:nth-child(2) { transition-delay: 0.28s; }
.faq.faq-visible .faq-item:nth-child(3) { transition-delay: 0.4s; }
.faq.faq-visible .faq-item:nth-child(4) { transition-delay: 0.52s; }
.faq.faq-visible .faq-item:nth-child(5) { transition-delay: 0.64s; }
.faq.faq-visible .faq-item:nth-child(6) { transition-delay: 0.76s; }

.faq-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.faq-item.active {
    border-color: var(--primary-blue);
}

.faq-number {
    position: absolute;
    left: 24px;
    top: 28px;
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    color: #f3f4f6;
    line-height: 1;
    transition: all 0.3s ease;
}

.faq-item.active .faq-number {
    color: var(--primary-blue);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 24px 0;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question-icon {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.05);
}

.faq-question span {
    flex: 1;
}

.faq-toggle-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--text-gray);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 600px;
}

.faq-answer p {
    padding: 0 24px 0 0;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.faq-meta {
    display: flex;
    gap: 8px;
    padding: 0 24px 24px 0;
    flex-wrap: wrap;
}

.faq-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 14px;
    border-radius: 50px;
}

.faq-cta {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.82s cubic-bezier(0.32, 0.72, 0.2, 1) 0.56s,
                transform 0.82s cubic-bezier(0.32, 0.72, 0.2, 1) 0.56s;
}
.faq.faq-visible .faq-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Внутри блока CTA: поочерёдное появление иконки, заголовка, текста и кнопки */
.faq-cta .faq-cta-icon,
.faq-cta h3,
.faq-cta p,
.faq-cta .btn-primary {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.58s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.58s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.faq.faq-visible .faq-cta .faq-cta-icon { opacity: 1; transform: translateY(0); transition-delay: 0.62s; }
.faq.faq-visible .faq-cta h3             { opacity: 1; transform: translateY(0); transition-delay: 0.76s; }
.faq.faq-visible .faq-cta p              { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }
.faq.faq-visible .faq-cta .btn-primary   { opacity: 1; transform: translateY(0); transition-delay: 1.04s; }

.faq-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    animation: rotate 25s linear infinite;
}

.faq-cta-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    position: relative;
    z-index: 1;
}

.faq-cta h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.faq-cta p {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.faq-cta .btn-primary {
    position: relative;
    z-index: 1;
}

/* ===========================
   FOOTER
=========================== */

/* Sticky CTA Bar */
.cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 12px 0;
}
.cta-bar.visible {
    transform: translateY(0);
}
.cta-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.cta-bar-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}
.cta-bar-btn {
    text-decoration: none;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .cta-bar-inner {
        flex-direction: column;
        gap: 12px;
    }
    .cta-bar-text {
        font-size: 15px;
    }
}

.footer {
    background: linear-gradient(180deg, #1e1b4b 0%, #334155 100%);
    color: var(--white);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.footer-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.footer-decoration-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-blue);
    top: -100px;
    right: -100px;
}

.footer-decoration-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-green);
    bottom: -50px;
    left: -50px;
}

.footer-decoration-3 {
    width: 250px;
    height: 250px;
    background: var(--primary-blue);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.footer > .container {
    position: relative;
    z-index: 1;
}

/* Блоки футера: появление снизу каскадом */
.footer-newsletter {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px;
    margin: 60px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.92s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.92s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.footer.footer-visible .footer-newsletter {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.12s;
}

.footer-main {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.88s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.88s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.footer.footer-visible .footer-main {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.28s;
}

.footer-trust {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.82s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.82s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.footer.footer-visible .footer-trust {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.46s;
}

.footer-bottom {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.78s cubic-bezier(0.32, 0.72, 0.2, 1),
                transform 0.78s cubic-bezier(0.32, 0.72, 0.2, 1);
}
.footer.footer-visible .footer-bottom {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.newsletter-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.newsletter-icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.newsletter-text h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.newsletter-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.newsletter-input {
    flex: 1;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.newsletter-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* Main Footer */
.footer-main {
    padding-bottom: 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 48px;
}

.footer-about {
    max-width: 380px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-logo svg {
    filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3));
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    line-height: 1.7;
    font-size: 15px;
}

.footer-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 28px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* Footer Columns */
.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column h4 svg {
    color: var(--primary-blue);
    flex-shrink: 0;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-column ul li a svg {
    color: var(--accent-green);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-column ul li a:hover svg {
    opacity: 1;
    transform: translateX(0);
}

/* Contact List */
.contact-list li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 0;
}

.contact-item svg {
    color: var(--primary-blue) !important;
    opacity: 1 !important;
    transform: none !important;
    flex-shrink: 0;
}

.contact-item:hover {
    padding-left: 0 !important;
}

.working-hours {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.working-hours svg {
    color: var(--accent-green);
    flex-shrink: 0;
}

/* Trust Badges */
.footer-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.trust-badge svg {
    color: var(--primary-blue);
    flex-shrink: 0;
}

.trust-badge div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trust-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.trust-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0;
}

.footer-legal {
    flex: 1;
}

.footer-legal p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-links a:hover::after {
    width: 100%;
}

/* Back to Top Button */
.back-to-top {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

/* На средних экранах скрываем левый лист, чтобы не перегружать hero */
@media (max-width: 1500px) {
    .deco-sheet--hero-left {
        display: none;
    }
}

@media (max-width: 1024px) {
    .hero {
        min-height: auto;
        padding: 50px 0 70px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        display: none;
    }
    
    .deco-sheet {
        display: none;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .benefit-card {
        padding: 28px 20px;
    }
    
    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-bottom: 60px;
    }
    
    .stat-card {
        padding: 28px 20px;
    }
    
    .stat-number {
        font-size: 44px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .footer-newsletter {
        flex-direction: column;
        padding: 36px;
        gap: 28px;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        max-width: 100%;
    }
    
    .footer-trust {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .faq-wrapper {
        grid-template-columns: 200px 1fr;
        gap: 32px;
    }
    
    .faq-category {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-buttons {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 28px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .benefit-card {
        padding: 32px 24px 28px;
    }
    
    .benefit-icon-wrapper {
        justify-content: center;
    }
    
    .benefit-icon {
        width: 48px;
        height: 48px;
    }
    
    .benefit-content {
        text-align: center;
    }
    
    .benefit-title {
        font-size: 18px;
    }
    
    .benefit-description {
        font-size: 14px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .example-image {
        height: 200px;
    }
    
    .example-content {
        padding: 20px 22px 24px;
    }
    
    .examples-filters {
        gap: 8px;
    }
    
    .filter-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .cta-title {
        font-size: 20px;
    }
    
    .cta-description {
        font-size: 14px;
    }
    
    .cta-stats {
        gap: 24px;
    }
    
    .cta-stat-value {
        font-size: 24px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .step-card {
        padding: 32px 24px 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .partners-logos {
        flex-direction: column;
    }
    
    .footer-newsletter {
        padding: 32px 24px;
        gap: 24px;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .newsletter-text h3 {
        font-size: 20px;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .newsletter-button {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-trust {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .trust-badge {
        padding: 16px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .footer-legal {
        order: 2;
    }
    
    .back-to-top {
        order: 1;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .faq-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .faq-search {
        width: 100%;
        margin-top: 0;
    }
    
    .faq-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .faq-categories {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }
    
    .faq-category {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .faq-item {
        padding-left: 60px;
    }
    
    .faq-number {
        left: 16px;
        font-size: 24px;
    }
    
    .faq-question {
        font-size: 16px;
        padding: 20px 20px 20px 0;
    }
    
    .faq-question-icon {
        width: 40px;
        height: 40px;
    }
    
    .faq-cta {
        padding: 36px 24px;
    }
    
    .faq-cta h3 {
        font-size: 22px;
    }
    
    .faq-cta-icon {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .generator-form {
        padding: 24px;
    }
    
    .step-card {
        padding: 24px 16px;
    }
    
    .step-icon {
        width: 56px;
        height: 56px;
    }
    
    .step-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .step-title {
        font-size: 18px;
    }
    
    .step-description {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 48px;
    }
    
    .stat-card {
        padding: 24px 20px;
    }
    
    .stat-icon {
        width: 64px;
        height: 64px;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .partners-section {
        padding: 32px 20px;
    }
    
    .partners-title {
        font-size: 20px;
        margin-bottom: 32px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .partner-card {
        padding: 20px 12px;
    }
    
    .partner-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .partner-name {
        font-size: 16px;
    }
    
    .partner-full {
        font-size: 11px;
    }
    
    .partner-meta {
        font-size: 10px;
    }
    
    .faq-category {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .faq-item {
        padding-left: 50px;
    }
    
    .faq-number {
        left: 12px;
        font-size: 20px;
    }
    
    .faq-question {
        font-size: 15px;
        padding: 18px 16px 18px 0;
    }
    
    .faq-question-icon {
        width: 36px;
        height: 36px;
    }
    
    .faq-question-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
    
    .faq-cta {
        padding: 32px 20px;
    }
    
    .faq-cta h3 {
        font-size: 20px;
    }
    
    .faq-cta p {
        font-size: 14px;
    }
    
    .footer-newsletter {
        padding: 24px 20px;
    }
    
    .newsletter-icon {
        width: 56px;
        height: 56px;
    }
    
    .newsletter-text h3 {
        font-size: 18px;
    }
    
    .newsletter-text p {
        font-size: 14px;
    }
    
    .footer-logo {
        font-size: 22px;
    }
    
    .footer-stats {
        gap: 24px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .trust-badge {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }
    
    .trust-title {
        font-size: 13px;
    }
    
    .footer-legal p {
        font-size: 13px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
}

/* ===========================
   UTILITY
=========================== */
.hidden {
    display: none !important;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* ===========================
   AUTH MODAL
=========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    color: var(--text-gray);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

.modal-auth {
    padding: 32px 28px 28px;
}

.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-tab {
    padding: 10px 20px;
    border: none;
    background: var(--bg-light);
    color: var(--text-gray);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-tab:hover {
    color: var(--text-dark);
}

.modal-tab.active {
    background: var(--primary-blue);
    color: var(--white);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modal-auth-hint {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

/* Structure modal */
.modal-structure {
    max-width: 560px;
    padding: 32px 28px 28px;
}

.structure-modal-hint {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.structure-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    max-height: 320px;
    overflow-y: auto;
}

.structure-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light, #f8fafc);
    border: 2px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    transition: var(--transition);
}

.structure-item:hover {
    border-color: #cbd5e1;
}

.structure-item.dragging {
    opacity: 0.6;
}

.structure-item-handle {
    cursor: grab;
    color: var(--text-gray);
    padding: 4px;
    flex-shrink: 0;
}

.structure-item-handle:active {
    cursor: grabbing;
}

.structure-item-number {
    font-weight: 700;
    color: var(--text-gray);
    min-width: 24px;
    flex-shrink: 0;
}

.structure-item-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    padding: 4px 0;
}

.structure-item-input:focus {
    outline: none;
}

.structure-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 20px;
    cursor: pointer;
}

.structure-disclaimer input {
    margin-top: 3px;
    flex-shrink: 0;
}

.btn-structure-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.auth-form-error {
    font-size: 14px;
    color: #dc2626;
    margin-bottom: 12px;
    min-height: 20px;
}

.auth-form button[type="submit"] {
    margin-top: 8px;
}

.auth-form-footer {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary);
}

.credentials-display {
    margin-bottom: 24px;
}

.credential-row {
    margin-bottom: 16px;
}

.credential-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.credential-value-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.credential-value-wrap input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: monospace;
    background: var(--bg-light);
}

.btn-copy {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Nav user (logged in) */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-email {
    font-size: 14px;
    color: var(--text-gray);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    padding: 8px 16px;
    font-size: 14px;
}

/* Кнопка «Личный кабинет» в шапке — лаконичная, в стиле навигации */
.nav-cabinet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
    background: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
}
.nav-cabinet-btn:hover {
    background: rgba(79, 70, 229, 0.12);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}
.nav-cabinet-btn svg {
    flex-shrink: 0;
}

/* Generator result / status */
.generator-result {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.generator-status {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.generator-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.generator-download-btn {
    cursor: pointer;
}

/* Generating overlay — светлый экран при генерации структуры/проекта */
.generating-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.generating-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.generating-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.generating-wavy-icon {
    color: #8B7EC8;
}

.generating-wavy-icon .wavy-path {
    stroke-dasharray: 12 24;
    animation: generating-wavy-flow 1.2s linear infinite;
}

@keyframes generating-wavy-flow {
    to { stroke-dashoffset: -72; }
}

.generating-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #8B7EC8;
    margin: 0;
}

/* Окно ожидания с шагами — генерация документа */
.generating-overlay-simple {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generating-overlay-steps {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.generating-overlay-steps.hidden {
    display: none !important;
}

.generating-steps-modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
    max-width: 520px;
    width: 100%;
    padding: 32px 28px;
}

.generating-steps-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
    text-align: center;
}

.generating-steps-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0 0 24px;
    text-align: center;
}

.generating-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generating-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: background 0.2s, border-color 0.2s;
}

.generating-step.active {
    background: #EEF2FF;
    border-color: #C7D2FE;
}

.generating-step.done {
    background: #EEF2FF;
    border-color: #C7D2FE;
}

.generating-step-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
}

.generating-step.active .generating-step-icon,
.generating-step.done .generating-step-icon {
    color: var(--primary-blue);
}

.generating-step.done .generating-step-icon {
    color: var(--primary);
}

.generating-step-body {
    flex: 1;
    min-width: 0;
}

.generating-step-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.generating-step-desc {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.4;
}

.generating-step-status {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-status-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.generating-step.done .gen-status-check {
    display: flex !important;
}

.generating-step.done .gen-status-spinner {
    display: none !important;
}

.gen-status-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: gen-spin 0.8s linear infinite;
}

.generating-step.done .generating-step-status .gen-status-spinner,
.generating-step.pending .generating-step-status .gen-status-spinner {
    border-color: #e2e8f0;
    border-top-color: #cbd5e1;
}

.generating-step.active .generating-step-status .gen-status-spinner {
    border-color: #C7D2FE;
    border-top-color: var(--primary-blue);
}

@keyframes gen-spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 10px;
    background: var(--text-dark);
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
