/* ============================================================
   CYBER//TYPE — Лендинг курса git (/git): src/views/git-pages.js, демонстрация — src/views/git-demo.js
   Переменные цветов и шрифты — theme.css; каркас — seo-pages.css (.seo-page), здесь — своя ширина и сетка.
   Демонстрация первого экрана оживает только на CSS (без JS); при prefers-reduced-motion — итоговый кадр.
   ============================================================ */

.git-page {
    --git-text: #dbe6ff;
    --git-muted: rgba(219, 230, 255, 0.72);
    --git-head: #f4f7fa;
    --git-card: rgba(18, 18, 26, 0.82);
    --git-line: rgba(0, 255, 200, 0.18);
    --git-display: 'Orbitron', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --git-mono: 'Share Tech Mono', ui-monospace, 'DejaVu Sans Mono', 'Consolas', monospace;
    max-width: 1180px;
    padding: 64px 28px 96px;
    color: var(--git-text);
}

.git-page h1,
.git-page h2,
.git-page h3,
.git-page h4 {
    font-family: var(--git-display);
    color: var(--git-head);
    letter-spacing: 0.3px;
}

.git-page p,
.git-page li,
.git-page dd {
    line-height: 1.6;
}

.git-page code {
    font-family: var(--git-mono);
    color: var(--primary);
}

.git-page a:focus-visible,
.git-page summary:focus-visible {
    outline: 2px solid var(--warning);
    outline-offset: 3px;
}

.git-eyebrow {
    margin: 0 0 10px;
    font-family: var(--git-mono);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--secondary);
}

.git-eyebrow::before {
    content: '// ';
    color: rgba(255, 0, 100, 0.55);
}

/* ==================== Первый экран ==================== */
.git-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: 56px;
    align-items: center;
    padding: 8px 0 40px;
}

.git-page h1 {
    margin: 0 0 20px;
    font-size: clamp(32px, 4.2vw, 50px);
    line-height: 1.1;
    color: var(--git-head);
    text-shadow: 0 0 24px rgba(0, 255, 200, 0.25);
}

.git-lead {
    max-width: 34em;
    margin: 0 0 28px;
    font-size: 18px;
    color: var(--git-text);
}

.git-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
    margin-bottom: 36px;
}

.git-page .git-cta {
    margin: 0;
    text-decoration: none;
}

.git-link {
    font-family: var(--git-mono);
    font-size: 15px;
    text-underline-offset: 4px;
}

.git-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.git-facts li {
    padding-left: 12px;
    border-left: 2px solid rgba(0, 255, 200, 0.35);
    font-size: 13px;
    line-height: 1.35;
    color: var(--git-muted);
    white-space: nowrap;
}

.git-facts strong {
    display: block;
    font-family: var(--git-display);
    font-size: 26px;
    color: var(--primary);
}

/* ==================== Терминал и граф ==================== */
.git-demo {
    margin: 0;
}

.git-term {
    overflow: hidden;
    border: 1px solid rgba(0, 255, 200, 0.35);
    border-radius: 8px;
    background: #07070c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 48px rgba(0, 255, 200, 0.08);
}

.git-term-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--git-line);
    background: rgba(0, 255, 200, 0.04);
}

.git-term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary);
}

.git-term-dot:nth-child(2) { background: var(--warning); }
.git-term-dot:nth-child(3) { background: var(--primary); }

.git-term-title {
    margin-left: 10px;
    font-family: var(--git-mono);
    font-size: 12px;
    color: var(--git-muted);
}

.git-term-screen {
    margin: 0;
    padding: 16px 20px 14px;
    min-height: 19.2em;
    font-family: var(--git-mono);
    font-size: 14px;
    line-height: 1.6;
    color: #cfe3ff;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.git-term-line { display: block; width: fit-content; max-width: 100%; }
.git-term-cmd { color: var(--git-head); }
.git-term-prompt { color: var(--primary); }
.git-term-out { color: rgba(207, 227, 255, 0.66); }
.git-term-note { color: var(--warning); }

.git-term-cursor {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    margin-left: 4px;
    vertical-align: text-bottom;
    background: var(--primary);
    animation: git-blink 1s steps(1, end) infinite;
}

.git-term-graph {
    padding: 6px 16px 10px;
    border-top: 1px dashed var(--git-line);
    background: rgba(0, 255, 200, 0.025);
}

.git-graph {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.git-graph-edge {
    stroke: rgba(0, 255, 200, 0.55);
    stroke-width: 2;
}

.git-graph-node circle {
    fill: #07070c;
    stroke: var(--primary);
    stroke-width: 2.5;
}

.git-graph-node text,
.git-graph-branch text {
    font-family: var(--git-mono);
    text-anchor: middle;
}

.git-graph-node text {
    font-size: 11px;
    fill: rgba(207, 227, 255, 0.7);
}

.git-graph-node-4 circle {
    fill: rgba(255, 0, 100, 0.25);
    stroke: var(--secondary);
}

.git-graph-ring {
    fill: none;
    stroke: var(--warning);
    stroke-width: 1.5;
    stroke-dasharray: 4 3;
    opacity: 0;
}

.git-graph-branch rect {
    fill: rgba(0, 255, 200, 0.14);
    stroke: var(--primary);
    stroke-width: 1;
}

.git-graph-branch text {
    font-size: 12px;
    fill: var(--primary);
}

.git-demo-caption {
    margin-top: 12px;
    font-size: 14px;
    color: var(--git-muted);
}

/*
 * Ход демонстрации (9 с, один раз): узлы 1–3 и метка main; commit — узел 4, main на нём; reset --hard HEAD~1 —
 * main назад, узел 4 тускнеет; reflog — узел 4 в рамке; reset --hard 8c41e0d — main снова на узле 4.
 * Без анимации (prefers-reduced-motion) виден итоговый кадр: все строки, четыре узла, main на последнем.
 */
.git-term-cmd { animation: git-type 0.7s steps(24, end) both; }
.git-term-out,
.git-term-note { animation: git-line-in 0.3s ease-out both; }
.git-step-1 { animation-delay: 1s; }
.git-step-2,
.git-step-3 { animation-delay: 1.9s; }
.git-step-4 { animation-delay: 3s; }
.git-step-5 { animation-delay: 3.9s; }
.git-step-6 { animation-delay: 5s; }
.git-step-7,
.git-step-8 { animation-delay: 5.8s; }
.git-step-9 { animation-delay: 7s; }
.git-step-10 { animation-delay: 7.9s; }
.git-step-11 { animation-delay: 8.6s; }

.git-graph-node,
.git-graph-edge,
.git-graph-branch {
    transform-box: fill-box;
    transform-origin: center;
}

.git-graph-node-1,
.git-graph-node-2,
.git-graph-node-3,
.git-graph-edge-1,
.git-graph-edge-2 { animation: git-pop 0.35s ease-out both; }
.git-graph-node-1 { animation-delay: 0.15s; }
.git-graph-edge-1 { animation-delay: 0.3s; }
.git-graph-node-2 { animation-delay: 0.35s; }
.git-graph-edge-2 { animation-delay: 0.5s; }
.git-graph-node-3 { animation-delay: 0.55s; }
.git-graph-node-4,
.git-graph-edge-3 { animation: git-lost 9s linear both; }
.git-graph-branch { animation: git-branch 9s ease-in-out both; }
.git-graph-ring { animation: git-ring 9s linear both; }

@keyframes git-type {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes git-line-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@keyframes git-pop {
    from { opacity: 0; transform: scale(0.4); }
    to { opacity: 1; transform: none; }
}

@keyframes git-lost {
    0%, 21% { opacity: 0; }
    22%, 43% { opacity: 1; }
    45%, 87% { opacity: 0.25; }
    89%, 100% { opacity: 1; }
}

@keyframes git-branch {
    0%, 6% { opacity: 0; transform: translateX(-80px); }
    7%, 21% { opacity: 1; transform: translateX(-80px); }
    23%, 43% { opacity: 1; transform: none; }
    45%, 87% { opacity: 1; transform: translateX(-80px); }
    89%, 100% { opacity: 1; transform: none; }
}

@keyframes git-ring {
    0%, 64% { opacity: 0; }
    65%, 87% { opacity: 1; }
    89%, 100% { opacity: 0; }
}

@keyframes git-blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .git-demo *,
    .git-demo *::before,
    .git-demo *::after {
        animation: none !important;
    }
}

/* ==================== Разделы ==================== */
.git-section {
    padding: 72px 0 0;
}

.git-page h2 {
    max-width: 26em;
    margin: 0 0 28px;
    font-size: clamp(24px, 2.7vw, 34px);
    line-height: 1.2;
}

.git-section-lead {
    max-width: 46em;
    margin: -12px 0 28px;
    color: var(--git-muted);
}

.git-section-note {
    margin: 20px 0 0;
    color: var(--git-muted);
}

/* Навыки */
.git-skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.git-skill {
    display: flex;
    flex-direction: column;
    padding: 22px 20px 18px;
    border: 1px solid var(--border);
    background: var(--git-card);
    transition: border-color 0.2s;
}

.git-skill:hover { border-color: rgba(0, 255, 200, 0.5); }

.git-page .git-skill h3 {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.35;
}

.git-skill p {
    margin: 0 0 14px;
    font-size: 14.5px;
    color: var(--git-muted);
}

.git-page .git-skill-cmds {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: auto 0 0;
}

.git-skill-cmds code {
    padding: 2px 7px;
    font-size: 12.5px;
    background: rgba(0, 255, 200, 0.08);
    border: 1px solid rgba(0, 255, 200, 0.16);
}

/* Как устроен курс */
.git-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.git-step {
    padding: 22px 22px 20px;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    background: var(--git-card);
}

.git-step:nth-child(2) { border-top-color: var(--warning); }
.git-step:nth-child(3) { border-top-color: var(--secondary); }

.git-step-n {
    margin: 0 0 8px;
    font-family: var(--git-mono);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}

.git-step:nth-child(2) .git-step-n { color: var(--warning); }
.git-step:nth-child(3) .git-step-n { color: var(--secondary); }

.git-page .git-step h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.git-step p:last-child {
    margin: 0;
    color: var(--git-muted);
}

.git-rules {
    margin-top: 28px;
    padding: 26px 28px;
    border: 1px solid rgba(255, 0, 100, 0.3);
    border-left: 3px solid var(--secondary);
    background: rgba(255, 0, 100, 0.04);
}

.git-page .git-rules h3 {
    margin: 0 0 18px;
    font-size: 18px;
}

.git-rules ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.git-page .git-rules h4 {
    position: relative;
    margin: 0 0 4px;
    padding-left: 18px;
    font-size: 15px;
}

.git-rules h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    background: var(--secondary);
}

.git-rules p {
    margin: 0;
    padding-left: 18px;
    font-size: 14.5px;
    color: var(--git-muted);
}

/* Программа */
.git-modules {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--git-line);
}

.git-module {
    border-bottom: 1px solid var(--git-line);
}

.git-module summary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 20px;
    align-items: center;
    gap: 16px;
    padding: 16px 6px;
    cursor: pointer;
    list-style: none;
}

.git-module summary::-webkit-details-marker { display: none; }

.git-module summary::after {
    content: '+';
    font-family: var(--git-mono);
    font-size: 20px;
    line-height: 1;
    text-align: center;
    color: var(--primary);
    transition: transform 0.2s;
}

.git-module details[open] summary::after { transform: rotate(45deg); }

.git-module summary:hover { background: rgba(0, 255, 200, 0.04); }

.git-module-n {
    font-family: var(--git-display);
    font-size: 15px;
    color: var(--primary);
}

.git-module-title {
    font-size: 16.5px;
    color: var(--git-head);
}

.git-module-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.git-module-free {
    padding: 2px 8px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #07070c;
    background: var(--primary);
}

.git-module-levels {
    font-size: 13.5px;
    color: var(--git-muted);
    white-space: nowrap;
}

.git-module-body {
    padding: 0 6px 20px 66px;
}

.git-module-body p {
    margin: 0 0 12px;
    color: var(--git-text);
}

.git-module-kinds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.git-module-kinds li {
    padding: 3px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    color: var(--git-muted);
}

.git-module-kinds strong { color: var(--primary); }

.git-page .git-module-range {
    margin: 0;
    font-size: 13px;
    color: rgba(219, 230, 255, 0.55);
}

/* Бесплатно и платно */
.git-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.git-plan {
    display: flex;
    flex-direction: column;
    padding: 28px 28px 26px;
    border: 1px solid var(--border);
    background: var(--git-card);
}

.git-plan-free {
    border-color: rgba(0, 255, 200, 0.55);
    box-shadow: 0 0 36px rgba(0, 255, 200, 0.08);
}

.git-page .git-plan h3 {
    margin: 0 0 6px;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--git-muted);
}

.git-page .git-plan-price {
    margin: 0 0 18px;
    font-family: var(--git-display);
    font-size: 34px;
    line-height: 1.2;
    color: var(--primary);
}

.git-plan-full .git-plan-price { color: var(--git-head); }

.git-plan ul {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.git-plan li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 22px;
    color: var(--git-text);
}

.git-plan li::before {
    content: '>';
    position: absolute;
    left: 2px;
    color: var(--primary);
}

.git-plan .git-cta {
    align-self: flex-start;
    margin-top: auto;
}

/* Достижения */
.git-badges {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.git-badge {
    --tier: #cd7f32;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: center;
    column-gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    background: var(--git-card);
}

.git-badge-silver { --tier: #c8d2e6; }
.git-badge-gold { --tier: #ffcc00; }

.git-badge-medal {
    position: relative;
    grid-row: 1 / span 3;
    width: 64px;
    height: 64px;
    border: 3px solid var(--tier);
    border-radius: 50%;
    box-shadow: 0 0 22px color-mix(in srgb, var(--tier) 35%, transparent), inset 0 0 14px color-mix(in srgb, var(--tier) 30%, transparent);
}

/* Внутри медали — три коммита на ветке */
.git-badge-medal::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    top: 50%;
    height: 2px;
    background: var(--tier);
}

.git-badge-medal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--tier);
    box-shadow: -14px 0 0 var(--tier), 14px 0 0 var(--tier);
}

.git-page .git-badge-tier {
    margin: 0 0 2px;
    align-self: end;
    font-size: 12.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--tier);
}

.git-page .git-badge h3 {
    margin: 0;
    font-size: 17px;
}

.git-page .git-badge-text {
    align-self: start;
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--git-muted);
}

/* Вопросы и ответы */
.git-faq {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.git-faq-item {
    padding: 20px 22px;
    border: 1px solid var(--border);
    background: var(--git-card);
}

.git-faq dt {
    margin: 0 0 8px;
    font-family: var(--git-display);
    font-size: 16px;
    color: var(--git-head);
}

.git-faq dd {
    margin: 0;
    font-size: 14.5px;
    color: var(--git-muted);
}

/* Финальный призыв */
.git-final {
    margin-top: 80px;
    padding: 48px 32px;
    text-align: center;
    border: 1px solid rgba(0, 255, 200, 0.4);
    background:
        radial-gradient(circle at 15% 0%, rgba(0, 255, 200, 0.12), transparent 55%),
        radial-gradient(circle at 85% 100%, rgba(255, 0, 100, 0.12), transparent 55%),
        rgba(10, 10, 15, 0.85);
}

.git-page .git-final h2 {
    max-width: none;
    margin: 0 0 12px;
}

.git-final p {
    margin: 0 0 24px;
    color: var(--git-text);
}

.git-page .git-final-note {
    margin: 18px 0 0;
    font-size: 13px;
    color: var(--git-muted);
}

/* ==================== Адаптивность ==================== */
@media (max-width: 980px) {
    .git-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .git-steps,
    .git-badges {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .git-page {
        padding: 56px 16px 64px;
    }

    .git-lead { font-size: 16px; }

    .git-actions .git-cta {
        width: 100%;
        text-align: center;
    }

    .git-skill { padding: 18px 16px 16px; }

    .git-facts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 18px;
    }

    .git-term-screen {
        min-height: 0;
        padding: 14px 14px 12px;
        font-size: 12.5px;
    }

    .git-section { padding-top: 56px; }

    .git-rules {
        padding: 22px 18px;
    }

    .git-rules ul,
    .git-faq {
        grid-template-columns: minmax(0, 1fr);
    }

    .git-module summary {
        grid-template-columns: 34px minmax(0, 1fr) 20px;
        gap: 6px 10px;
        padding: 14px 2px;
    }

    .git-module summary::after {
        grid-column: 3;
        grid-row: 1;
    }

    .git-module-meta {
        grid-column: 2;
        gap: 12px;
    }

    .git-module-body {
        padding: 0 2px 18px 44px;
    }

    .git-plan { padding: 22px 20px; }
    .git-page .git-plan-price { font-size: 28px; }

    .git-final {
        margin-top: 56px;
        padding: 36px 18px;
    }
}
