/* css/apps-site.css — «Приложения и шаблоны»: токены, шапка и подвал сайта (из apps.css) + левое меню и карточки.
   Оформление приведено к главной странице (css/base.css, css/catalog.css, css/cards-and-content.css, css/opportunities-tabs.css). */
/* =========================================================
   TOKENS — те же переменные, что на about.html/subscribe.html,
   для полного визуального единства с сайтом.
========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #F6F7FB;
    --surface: #FFFFFF;
    --surface-soft: #FBFBFE;
    --ink: #14151A;
    --ink-soft: #5B5F6B;
    --ink-faint: #9AA0AE;
    --border: #E7E8F0;
    --border-soft: #F0F1F7;

    --coral: #FF4D6D;
    --coral-tint: #FFE6EB;
    --teal: #17B0A3;
    --teal-tint: #DFF6F2;
    --violet: #7C6CF0;
    --violet-tint: #EAE7FE;
    --gold: #F5A623;
    --gold-tint: #FDF0DC;

    /* радиусы как на главной: --radius-lg 28 / --radius-md 18 / --radius-sm 12 */
    --r-xl: 28px;
    --r-lg: 18px;
    --r-md: 12px;
    --r-sm: 12px;
    --icon-tint: #ECEDF4;
    --ink-muted: #6B7080;
    --coral-text: #D6304F;   /* коралловый для текста и ссылок, как на главной */

    --shadow-sm: 0 1px 2px rgba(20, 21, 26, .05);
    --shadow-md: 0 12px 30px -18px rgba(20, 21, 26, .22);   /* = --shadow-card на главной */
    --shadow-lg: 0 20px 50px -25px rgba(20, 21, 26, .25);   /* = --shadow-soft на главной */

    --ease: cubic-bezier(.16, 1, .3, 1);
}
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
h1, h2, h3, .display { font-family: 'Unbounded', sans-serif; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--coral); color: #fff; }
svg { display: block; }

/* =========================================================
   NAV (идентична about.html/subscribe.html)
========================================================= */
#nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 4vw, 56px);
    background: rgba(246, 247, 251, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}
.logo { display: flex; flex-direction: column; line-height: .78; cursor: pointer; user-select: none; }
.logo .flip {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 22px;
    transform: rotate(180deg) scaleX(-1);
    transition: transform .5s var(--ease), color .3s ease;
}
.logo:hover .flip { transform: rotate(0deg) scaleX(1); color: var(--coral); }
.logo .app {
    font-family: 'Unbounded', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--ink-soft);
    margin-top: 8px;
}
.nav-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color .2s ease;
    position: relative;
    padding: 4px 0;
    cursor: pointer;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    height: 1.5px; width: 0;
    background: var(--ink);
    transition: width .25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { width: 100%; background: var(--coral); }
.lang-switch { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.heart-nav {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface);
    color: var(--ink-soft); transition: all .2s ease; flex: none;
}
.heart-nav svg { width: 16px; height: 16px; }
.heart-nav:hover { border-color: var(--coral); color: var(--coral); }
.lang-btn {
    border: none; background: transparent; padding: 6px 15px; border-radius: 999px;
    font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--ink-soft);
    font-family: 'Inter', sans-serif; transition: background .2s ease, color .2s ease;
}
.lang-btn.active { background: var(--ink); color: #fff; }
.lang-btn:hover:not(.active) { background: var(--border-soft); }
.btn-primary {
    display: inline-flex; align-items: center; justify-content:center; gap: 8px;
    padding: 14px 26px; border-radius: 999px; border: none;
    background: var(--ink); color: #fff; font-weight: 700; font-size: 14px;
    cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}
.btn-primary:hover { background: var(--coral); transform: translateY(-1px); }
.btn-outline {
    display: inline-flex; align-items: center; justify-content:center; gap: 8px;
    padding: 14px 26px; border-radius: 999px; border: 1.5px solid var(--border);
    background: transparent; color: var(--ink); font-weight: 700; font-size: 14px;
    cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap;
    transition: border-color .2s ease;
}
.btn-outline:hover { border-color: var(--ink); }

@media (max-width: 760px) {
    .nav-links { gap: 12px 16px; font-size: 12.5px; }
    .nav-link { font-size: 12.5px; }
}

/* ===== Прототип: каркас «левое меню + контент» поверх стилей сайта (apps.css) ===== */
:root { color-scheme: light; }
.shell {
    display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 32px;
    padding: 34px clamp(20px, 4vw, 56px) 70px; align-items: start;
}
.side {
    position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 24px; padding: 12px; display: flex; flex-direction: column;
    max-height: calc(100vh - 116px); overflow-y: auto;
}
.side-toggle { display: none; }
.side-label {
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-faint); padding: 10px 8px 6px;
}
.side-sep { display: none; }
.side-sep + .side-label { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 18px; }
.side-item {
    display: flex; align-items: center; gap: 12px; padding: 7px 6px 7px 8px; border-radius: 16px;
    font-size: 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer; border: 0; background: none;
    font-family: 'Inter', sans-serif; text-align: left; width: 100%; transition: .15s ease;
}
.side-ic {
    width: 36px; height: 36px; border-radius: 11px; background: var(--icon-tint);
    display: flex; align-items: center; justify-content: center; flex: none;
}
.side-ic svg { width: 18px; height: 18px; }
.side-item > span:not(.side-ic):not(.soon) { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-item:hover { background: var(--bg); color: var(--ink); }
.side-item.active { background: var(--violet-tint); color: #5847c9; }
.side-item.active .side-ic { background: #fff; }
.side-item .soon {
    margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; flex: none; margin-right: 4px;
    background: var(--bg); color: var(--ink-soft); white-space: nowrap;
}
.side-item.active .soon { background: #fff; color: #5847c9; }

.panel { min-width: 0; min-height: 70vh; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 28px; }
.crumbs a { cursor: pointer; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { color: var(--ink-faint); }
.crumbs .cur { color: var(--ink); font-weight: 600; }

.page-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; text-wrap: balance; }
.lead { color: var(--ink-soft); font-size: 16.5px; line-height: 1.65; max-width: 62ch; }
/* заголовок страницы — как .listing-head на главной (css/catalog.css) */
.listing-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 14px; }
.listing-head h1 { font-size: clamp(28px, 3.4vw, 40px); }
.listing-head p { color: var(--ink-soft); margin-top: 6px; font-size: 14px; }
.listing-head + .sec { margin-top: 0; }
.sec { margin-top: clamp(40px, 5vw, 64px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(19px, 2vw, 24px); }
.sec-link { font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.sec-link:hover { color: var(--coral); }
.sec-sub { color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; max-width: 70ch; }

.tabs-big { display: flex; gap: 28px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs-big span { font-family: 'Unbounded', sans-serif; font-size: clamp(22px, 3vw, 36px); font-weight: 600; }

/* карточки — оформление и сетка как на главной: радиус 18, рамка 1px, без тени в покое, hover: -5px + --shadow-card.
   Высота выровнена: заголовок резервирует 2 строки, описание — 4, ряд чипов и ряд кнопок — всегда занимают место,
   поэтому все карточки на странице одной высоты независимо от длины текста (тот же приём, что у .case-card-title). */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: stretch; }
.grid.apps { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
    display: flex; flex-direction: column; height: 100%; transition: transform .2s ease, box-shadow .2s ease;
    min-width: 0;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card .cover { position: relative; aspect-ratio: 16 / 10; background: var(--border-soft); border-bottom: 1px solid var(--border); overflow: hidden; cursor: pointer; }
.card .cover svg { width: 100%; height: 100%; }
.badge {
    position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}
.badge.dev { background: var(--gold-tint); color: #9a6406; }
.card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .name {
    font-family: 'Unbounded', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.3; cursor: pointer;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
    overflow-wrap: break-word; hyphens: auto;
}
.card .desc {
    color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; flex: 1; min-height: 6.2em;
    display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: break-word; hyphens: auto;
}
/* действие в карточке — как .case-card-foot / .case-card-cta на главной: лёгкая ссылка со стрелкой;
   padding-top даёт дополнительный воздух между тарифами (чипами) и действием.
   Когда в карточке два действия (шаблоны), у каждого свой цвет и своя стрелка: «Открыть» — коралловый, «Демо» — синий.
   Подсвечивается только та ссылка, на которую наведён курсор. */
.card .acts { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; min-height: 38px; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.6; color: var(--ink-soft); transition: color .2s ease; }
.card-cta svg { width: 13px; height: 13px; stroke-width: 2; flex: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-cta:not(.open):not(.demo) { color: var(--coral-text); }
.card:hover .card-cta:not(.open):not(.demo) svg { transform: translateX(3px); }
.card-cta.open { color: var(--coral-text); }
.card-cta.open:hover { color: #A8213B; }
.card-cta.demo { color: #2B5FC7; }
.card-cta.demo:hover { color: #1B438F; }
.card-cta.open:hover svg, .card-cta.demo:hover svg { transform: translateX(3px); }
.card .acts > .dev-note { font-size: 12.5px; line-height: 1.6; color: var(--ink-muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card .chips { min-height: 26px; align-content: flex-start; }

/* hero страницы приложения */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero .stack { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-big { padding: 15px 28px; font-size: 14.5px; }
.status-chip { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--teal-tint); color: #0c7a70; }
.status-chip.dev { background: var(--gold-tint); color: #9a6406; }
.hero-card { box-shadow: var(--shadow-lg); }
.hero-card:hover { transform: none; box-shadow: var(--shadow-lg); }
.hero-card .name, .hero-card .desc { display: block; min-height: 0; overflow: visible; }
.hero-card .acts { min-height: 0; }
.hero-card .cover { aspect-ratio: 16 / 11; cursor: default; }

/* преимущества */
.adv { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.adv-item { padding: 24px; border-radius: var(--r-lg); background: var(--surface-soft); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.adv-ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.adv-ico svg { width: 22px; height: 22px; }
.adv-item:nth-child(3n+1) .adv-ico { background: var(--coral-tint); color: var(--coral); }
.adv-item:nth-child(3n+2) .adv-ico { background: var(--violet-tint); color: var(--violet); }
.adv-item:nth-child(3n) .adv-ico { background: var(--teal-tint); color: var(--teal); }
.adv-item h3 { font-size: 15px; line-height: 1.35; }
.adv-item p { font-size: 13.5px; color: var(--ink-soft); }

/* тарифы */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table.plans { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.plans th, table.plans td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--border-soft); }
table.plans th:first-child, table.plans td:first-child { text-align: left; font-weight: 600; }
table.plans tr:last-child td { border-bottom: 0; }
table.plans thead th { background: var(--surface-soft); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.yes { color: var(--teal); font-weight: 800; }
.no { color: var(--ink-faint); }
.demo { color: var(--violet); font-weight: 700; font-size: 12.5px; }

/* форма «оповестить» */
.notify {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px);
    display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-md); width: 100%;
}
.notify h3 { font-size: 18px; line-height: 1.3; }
.notify p { color: var(--ink-soft); font-size: 14px; }
.notify .row { display: flex; gap: 10px; flex-wrap: wrap; }
.notify input[type=email] {
    flex: 1 1 220px; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1.5px solid var(--border);
    font: 500 14px 'Inter', sans-serif; background: var(--surface-soft); color: var(--ink); outline: none; transition: border-color .2s ease;
}
.notify input[type=email]:focus { border-color: var(--ink); }
.notify input.err { border-color: var(--coral); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.consent a { text-decoration: underline; }
.form-msg { font-size: 13px; color: var(--coral); font-weight: 600; min-height: 1em; }
.notify.done { background: var(--teal-tint); border-color: transparent; box-shadow: none; }
.notify.done h3 { color: #0c5f57; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.mock-banner {
    margin-top: 48px; padding: 14px 18px; border: 1.5px dashed var(--border); border-radius: var(--r-md);
    font: 500 12px/1.6 'JetBrains Mono', monospace; color: var(--ink-soft); background: var(--surface-soft);
}
.mock-banner b { color: var(--ink); }

.note-tpl { margin-top: 22px; padding: 16px 20px; border-radius: var(--r-md); background: var(--violet-tint); color: #4a3dc4; font-size: 14px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.note-tpl span { max-width: 62ch; }

@media (max-width: 980px) {
    .shell { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 16px; }
    .side-toggle {
        display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 18px; border-radius: 20px;
        border: 1px solid var(--border); background: var(--surface); font: 700 14px 'Inter', sans-serif; color: var(--ink); cursor: pointer;
    }
    .side { position: static; max-height: none; display: none; border-radius: 20px; }
    .side.open { display: flex; }
    .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.panel > .sec:first-child { margin-top: 0; }

/* ===== Боевая версия: добавки ===== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chip { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--border-soft); color: var(--ink-soft); }
.chip.plan-free { background: var(--teal-tint); color: var(--teal); }
.chip.plan-pro { background: var(--violet-tint); color: var(--violet); }
.chip.plan-super { background: var(--gold-tint); color: var(--gold); }
a.lang-btn, span.lang-btn { display: inline-block; text-decoration: none; }
a.side-item { text-decoration: none; }
.card .name a { color: inherit; }
.card .name a:hover { color: var(--coral); }
a.cover { display: block; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cover svg { display: block; }
.hero-card .name { font-family: 'Unbounded', sans-serif; font-size: 15px; font-weight: 700; line-height: 1.3; }
.note-tpl a { text-decoration: underline; }
.side-col { min-width: 0; align-self: stretch; }
@media (max-width: 980px) { .side-col { display: contents; } }
.btn-primary, .btn-outline { text-decoration: none; }
.panel > .sr-only + .sec { margin-top: 0; }
