:root {
    --bg: #0c0d0c;
    --card: #141514;
    --panel: #101110;
    --line: #1c1d1c;
    --text: #eaeaea;
    --muted: #9ca3af;
    --accent: #008d18;
    --accent-2: #ffffff;
    --accent-3: #8b5cf6; /* насыщенный фиолетовый */
    --accent-4: #c084fc; /* светлее, ближе к неоновому */
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    --ff: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --sp-1: 0.5rem;
    --sp-2: 0.875rem;
    --sp-3: 1.25rem;
    --sp-4: 1.75rem;
    --sp-5: 2.25rem;
    --sp-6: 3rem;
    --sp-7: 4rem;
    --tr: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--ff);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-2);
}
.section {
    padding: var(--sp-4) 0;
}

.sections {
    padding: var(--sp-2) 0;
}
.section-head {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
}
.section-head.center {
    align-items: center;
    text-align: center;
}
.section-head h2 {
    font-weight: 800;
    font-size: 2rem;
}
@media (min-width: 768px) {
    .section-head h2 {
        font-size: 2.5rem;
    }
}
.eyebrow {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    font-size: 0.8rem;
}
.lead {
    color: var(--muted);
}
.muted {
    color: var(--muted);
}
.accent {
    color: var(--accent);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 13, 12, 0.7);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
}
.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;

    color: #ffffff;
    border-radius: 8px;
    font-weight: 900;
}
.nav {
    display: none;
    gap: 1.25rem;
}
.nav a {
    color: var(--muted);
    text-decoration: none;
    transition: var(--tr);
}
.nav a:hover {
    color: var(--accent);
}
@media (min-width: 990px) {
    .nav {
        display: flex;
    }
}
.navs {
    display: flex;
    gap: 1.25rem;
}
.navs a {
    color: var(--muted);
    text-decoration: none;
    transition: var(--tr);
}
.navs a:hover {
    color: var(--accent);
}
 
.burger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 10px;
    justify-content: center;
    align-items: center;
}
.burger span {
    width: 22px;
    height: 2px;
    background: var(--text);
}
@media (min-width: 990px) {
    .burger {
        display: none;
    }
}

.drawer {
    position: fixed;
    inset: 0 auto 0 -100%;
    width: 320px;
    background: var(--panel);
    z-index: 60;
    transition: var(--tr);
    border-right: 1px solid var(--line);
    padding: var(--sp-4);
}
.drawer.active {
    left: 0;
}
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-4);
}
.drawer-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
}
.drawer-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 10px;
    transition: var(--tr);
}
.drawer-link:hover {
    background: #171717;
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--tr);
    z-index: 55;
}
.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    align-items: center;
}
@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}
.hero-left h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0.35rem 0 var(--sp-3);
    font-weight: 800;
}
@media (min-width: 768px) {
    .hero-left h1 {
        font-size: 3rem;
    }
}
.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: var(--sp-3) 0;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    border: none; /* 💥 убираем проблему — никаких белых границ */
}

/* Основная кнопка */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #0b0b0b;
    box-shadow: 0 0 6px rgba(198, 249, 0, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 26px rgba(198, 249, 0, 0.45);
}

/* Прозрачная */
.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border: 1px solid var(--line);
}
.btn-ghost:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(198, 249, 0, 0.25);
}

.hero-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: var(--sp-3);
}
.hero-stats li {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    min-width: 120px;
}
.hero-stats .num {
    display: block;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--accent);
}
.hero-stats .label {
    color: var(--muted);
    font-size: 0.85rem;
}

.hero-right {
    display: flex;
    justify-content: center;
}

.mini-cards strong {
    display: block;
}
.mini-cards span {
    color: var(--muted);
    font-size: 0.85rem;
}

.solutions {
    background: #0b0b0b;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.cards-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-3);
}
@media (min-width: 900px) {
    .cards-2col {
        grid-template-columns: 1.2fr 0.8fr;
    }
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    box-shadow: var(--shadow);
}
.card.xl h3 {
    font-size: 1.5rem;
    margin-bottom: var(--sp-3);
}
.bullets {
    display: grid;
    gap: 0.65rem;
    margin-bottom: var(--sp-3);
}
.bullets li {
    position: relative;
    padding-left: 1.1rem;
}
.bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 9px;
    color: var(--accent);
}
.chipbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.chip {
    background: #121312;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.card.photo {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.card.photo .ph {
    width: 100%;
    height: 240px;
    background: #2a2a2a;
    border-radius: 12px;
}
.card.photo .ribbon {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0b0b0b;
    font-weight: 800;
    border-radius: 9px;
    padding: 0.35rem 0.75rem;
}

.features-grid {
    margin-top: var(--sp-4);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-3);
}
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.feature {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: var(--sp-3);
}
.fi {
    font-size: 1.25rem;
    background: rgba(198, 249, 0, 0.12);
    color: var(--accent);
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.skills {
}
.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.badge {
    background: linear-gradient(180deg, #121212, #0f0f0f);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.badge::after {
    content: "";
    margin-left: 0.5rem;
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.projects {
    background: #0b0b0b;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
    margin-bottom: 50px;
}
@media (min-width: 860px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.project {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-3);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: var(--sp-3);
}
.mock {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 2;           /* контролируем пропорции вместо фикс. высоты */
    background: none;               /* на всякий */
}
.mock img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;              /* ровно заполняет карточку */
    transition: transform .4s ease, filter .4s ease;
}
.mock:hover img {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.project-meta .tag {
    display: inline-block;
    background: rgba(198, 249, 0, 0.12);
    color: var(--accent);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.project .link {
    background: transparent;
    border: none;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
}
.center {
    text-align: center;
}

.testimonials {
}
.testi-wrap {
    display: grid;
    gap: var(--sp-3);
}
@media (min-width: 860px) {
    .testi-wrap {
        grid-template-columns: repeat(3, 1fr);
    }
}
.testi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: var(--sp-3);
}
.testi p {
    color: var(--muted);
    min-height: 88px;
}
.who {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: var(--sp-2);
}
.who .ava {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: var(--sp-2);
}
.dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2a2a2a;
    border: 1px solid var(--line);
}
.dots .dot.active {
    background: var(--accent);
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    70% {
        transform: scale(1.6);
        opacity: 0;
    }
    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

.avatar-wrap {
    position: relative;
    display: inline-block;
}

li {
    list-style-type: none;
    padding: 10px;
}

.pricing {
}
.price-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
}
@media (min-width: 900px) {
    .price-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: stretch; /* растягивает все карточки */
    }
}
.price {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* растягиваем контент и кнопку */
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: var(--sp-1);
    position: relative;
    height: 100%; /* карточки одинаковой высоты */
}
.price .badge {
    position: absolute;
    top: -12px;
    right: 16px;
    background: #262626;
    padding: 0.35rem 0.7rem;
    font-weight: 800;
    border: none;
}
.price h3 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}
.money {
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--accent);
    margin: 0.5rem 0 var(--sp-3);
}
.money .rub {
    font-size: 1.2rem;
    color: var(--muted);
    margin-right: 0.25rem;
}
.price ul {
    list-style: none;
    display: grid;
    gap: 0.3rem;
    padding: 0;
    margin-bottom: 30px;
}

/* Кнопка прижата вниз */
.price a.btn {
    margin-top: auto;
    width: 100%;
}

.contact {
}
.form {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: var(--sp-2);
}
.form .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-3);
}
@media (min-width: 860px) {
    .form .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--muted);
}
.form input,
.form textarea {
    background: #0f0f0f;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    padding: 0.4rem;
    font: inherit;
    outline: none;
    transition: var(--tr);
    margin-bottom: 10px;
}
.form input:focus,
.form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(198, 249, 0, 0.08);
}
.form .full {
    grid-column: 1/-1;
}
.checks {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}
.checks label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #121212;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
}
.form-status {
    margin-top: 0.75rem;
    color: #10cc00;
}
.logos-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.logo.ph {
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.footer {
    border-top: 1px solid var(--line);
    background: #0b0b0b;
    padding: var(--sp-4) 0;
    position: relative;
}
.foot-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
}
.foot-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.foot-links a {
    color: var(--muted);
    text-decoration: none;
}
.to-top {
    position: fixed;
    right: 36px;
    bottom: 94px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #121212;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    opacity: 0.85;
    z-index: 1111;
}
.miya-launcher i {
    font-size: 1.4rem;
    color: #ffffff;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.miya-launcher:hover i {
    transform: scale(1.1);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
/* --- Внутренний диск как на примере (тонкий контур + свечение) --- */
.hero-right .avatar {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    background: radial-gradient(60% 60% at 50% 50%, rgba(198, 249, 0, 0.15) 0%, rgba(14, 15, 14, 1) 58%, rgba(14, 15, 14, 1) 100%);
    box-shadow: 0 0 80px rgba(198, 249, 0, 0.12), /* мягкое внешнее свечение */ inset 0 0 0 2px rgba(198, 249, 0, 0.35); /* тонкий внутренний контур */
}
.hero-right .avatar::before {
    content: "";
    position: absolute;
    inset: 8%;
    /* border-radius:50%;  */
    border: 2px solid rgba(198, 249, 0, 0.28); /* еле заметное кольцо внутри */
}

/* --- Пульсирующие внешние кольца (без “основного толстого круга”) --- */

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0;
    }
    20% {
        opacity: 0.35;
    } /* плавный вход, без вспышки */
    70% {
        transform: translate(-50%, -50%) scale(1.45);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0;
    }
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 420px;
    height: 420px;
    /* border-radius: 50%; */
    border: 2px solid rgba(198, 249, 0, 0.35);
    /* ВАЖНО: базовое состояние, чтобы не мигало на первом рендере */
    transform: translate(-50%, -50%);
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
    z-index: 1;
}

.pulse-ring.ring-1 {
    animation: pulse-ring 3.6s ease-out infinite;
    animation-delay: 0.12s; /* микрозадержка на всякий */
}

.pulse-ring.ring-2 {
    width: 560px;
    height: 560px;
    border-color: rgba(198, 249, 0, 0.22);
    animation: pulse-ring 3.6s ease-out infinite 0.9s;
}

/* --- Плавающие карточки как в примере (легкое “дыхание”) --- */
@keyframes float-y {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.mini-cards {
    position: absolute;
    right: -10%;
    bottom: 8%;
    display: grid;
    gap: 0.75rem;
    z-index: 3;
}
.mini-cards li {
    animation: float-y 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
    background: var(--panel);
    border: 1px solid var(--line);
}
.mini-cards li:nth-child(2) {
    animation-delay: 0.6s;
}
.mini-cards li:nth-child(3) {
    animation-delay: 1.2s;
}

/* На очень маленьких экранах немного уменьшим визуал */
@media (max-width: 420px) {
    .hero-right .avatar {
        width: 260px;
        height: 260px;
    }
    .pulse-ring {
        width: 340px;
        height: 340px;
    }
    .pulse-ring.ring-2 {
        width: 440px;
        height: 440px;
    }
}
/* Герой не даёт уезжать ширине из-за анимаций */
.hero.section {
    overflow: hidden;
}

/* Кольца: никогда не шире экрана, плавно масштабируются */
.pulse-ring {
    width: clamp(260px, 70vw, 420px);
    height: clamp(260px, 70vw, 420px);
}
.pulse-ring.ring-2 {
    width: clamp(340px, 95vw, 560px);
    height: clamp(340px, 95vw, 560px);
}

/* На очень узких экранах слегка сжимаем композицию */
@media (max-width: 420px) {
    .hero-right .avatar {
        width: 240px;
        height: 240px;
    }
}

.card.photo .ph {
    width: 100%;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #0d0d0d; /* запасной фон */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

.card.photo .ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

.card.photo:hover .ph img {
    transform: scale(1.05);
    opacity: 0.95;
}
.gradient-icon {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--accent-3), var(--accent-4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.45));
}

.gradient-icon:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 12px rgba(192, 132, 252, 0.65));
}
/* ===== Project Modal ===== */
.proj-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.proj-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.proj-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.proj-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 92vw);
    max-height: min(88svh, 880px);
    margin: max(6svh, 48px) auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    overflow: hidden;
}
.proj-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    background: #0b0b0b;
    border-bottom: 1px solid var(--line);
}
.proj-head h3 {
    font-size: 1.25rem;
    margin: 0;
}
.proj-tag {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
}
.proj-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
}

.proj-hero {
    height: 240px;
    background: #101010;
}
.proj-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.proj-body {
    padding: 1rem 1.1rem 1.2rem;
    overflow: auto;
    min-height: 0;
}
.proj-lead {
    color: var(--muted);
    margin-bottom: 0.8rem;
}
.proj-bullets {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}
.proj-bullets li {
    position: relative;
    padding-left: 1.1rem;
}
.proj-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.proj-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.proj-stack .chip {
    background: #121212;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    color: var(--text);
}

.proj-foot {
    display: flex;
    gap: 0.6rem;
    padding: 0.8rem 0.5rem;
    border-top: 1px solid var(--line);
    background: #0b0b0b;
}

@media (max-width: 640px) {
    .proj-dialog {
        width: calc(100vw - 20px);
        margin: 10px auto;
        max-height: calc(100svh - 20px);
        border-radius: 16px;
    }
    .proj-hero {
        height: 180px;
    }
}
/* ==== FOOTER REFINED ==== */
.footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #0b0b0b 0%, #0a0a0a 100%);
    padding: var(--sp-5) 0 var(--sp-4);
    position: relative;
}
.foot-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
    align-items: start;
}
@media (min-width: 860px) {
    .foot-wrap {
        grid-template-columns: 1.2fr 0.8fr;
    }
}
.foot-brand .brand-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}
.legal {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.92rem;
}
.legal .mono {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
    letter-spacing: 0.02em;
}
.foot-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}
@media (max-width: 859px) {
    .foot-extra {
        align-items: flex-start;
    }
}
.foot-badges .badge.ghost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
}
.foot-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.92rem;
}
.foot-links a {
    color: var(--muted);
    text-decoration: none;
    transition: var(--tr);
}
.foot-links a:hover {
    color: var(--accent);
}
.foot-links .dot {
    opacity: 0.5;
}

/* Чуть компактнее нижние отступы на очень узких экранах */
@media (max-width: 420px) {
    .footer {
        padding: var(--sp-4) 0 var(--sp-3);
    }
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 420px) {
    .topbar {
        backdrop-filter: none;
    }
    .card,
    .feature {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }
}

/* ==== Consult Popover ==== */
.consult-popover {
    position: absolute;
    inset: auto auto auto auto; /* позицию зададим из JS */
    min-width: 260px;
    background: var(--panel, #101110);
    border: 1px solid var(--line, #1c1d1c);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    padding: 6px;
    z-index: 1000;
}
.consult-popover::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 24px;
    border: 8px solid transparent;
    border-bottom-color: var(--panel, #101110);
    filter: drop-shadow(0 -1px 0 var(--line, #1c1d1c));
}
.consult-popover .cp-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: transparent;
    border: 0;
    color: var(--text, #eaeaea);
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
}
.consult-popover .cp-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.consult-popover .cp-item i {
    width: 18px;
}
@media (max-width: 560px) {
    .consult-popover {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        min-width: 0;
        padding: 8px;
        border-radius: 14px;
    }
    .consult-popover::before {
        display: none;
    }
}
/* ===== Modal ===== */
.miya-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
}
.miya-modal[hidden] {
    display: none;
}
.miya-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}
.miya-modal__dialog {
    position: relative;
    width: min(520px, 92vw);
    background: var(--panel, #101110);
    border: 1px solid var(--line, #1c1d1c);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    animation: pop 0.18s ease-out;
}
@keyframes pop {
    from {
        transform: translateY(8px);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}
.miya-modal__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
}
.miya-modal__head h3 {
    margin: 0;
    font-size: 1.1rem;
}
.miya-modal__close {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}
.miya-modal__body {
    padding: 1rem 1.1rem;
    color: var(--muted);
}
.miya-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.8rem 1.1rem;
    border-top: 1px solid var(--line);
}
.miya-modal .ok {
    color: #66e26f;
}
.miya-modal .err {
    color: #ff8a8a;
}
