/* Лендинг Trenim: светлая редакционная вёрстка на всю ширину экрана, без сборки и библиотек */

@font-face {
    font-family: "URW Geometric";
    src: url("/fonts/URWGeometric-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "URW Geometric";
    src: url("/fonts/URWGeometric-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: "URW Geometric";
    src: url("/fonts/URWGeometric-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "URW Geometric";
    src: url("/fonts/URWGeometric-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

:root {
    /* Палитра MealPlan (www/mealplan-site), как в макете Figma «Trenim — лендинг» */
    --bg: #ffffff;
    --surface: #f2f4f8;
    --surface-strong: #ffffff;
    --ink: #111111;
    --ink-2: #333333;
    --muted: #6e6e73;
    --line: #dfe3f3;
    --violet: #5b53ff;
    --violet-ink: #ffffff;
    --orange: #fd7e14;
    --yellow: #fbc520;
    --dark: #111111;
    --success: #1f9d55;
    --danger: #dd5656;
    --danger-ink: #b83a3a; /* текст ошибок: контраст 5:1 на surface, у --danger только 3,3:1 */

    --font: "URW Geometric", "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --gutter: clamp(16px, 2.4vw, 40px);
    --gap: clamp(8px, .8vw, 14px);
    --radius: clamp(18px, 1.6vw, 28px);
    --radius-sm: 14px;
    --section: clamp(88px, 11vw, 200px);
    --header-h: 64px;

    --fs-mono: clamp(11px, .78vw, 13px);
    --fs-body: clamp(16px, 1.05vw, 19px);
    --fs-lead: clamp(24px, 2.9vw, 52px);
    --fs-h2: clamp(44px, 7.4vw, 136px);
    --fs-h3: clamp(22px, 1.8vw, 32px);

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);

    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
    margin: 0;
}

ul[role="list"],
ol[role="list"] {
    list-style: none;
    padding: 0;
}

::selection {
    background: var(--violet);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.wrap {
    width: 100%;
    max-width: 2200px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.mono {
    font-family: var(--mono);
    font-size: var(--fs-mono);
    font-weight: 400;
    letter-spacing: .02em;
    line-height: 1.5;
    text-transform: uppercase;
}

.section {
    padding-block: var(--section) 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(28px, 3.2vw, 56px);
}

.section-title {
    font-size: var(--fs-h2);
    font-weight: 500;
    line-height: .92;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.section-count {
    font-size: var(--fs-h2);
    font-weight: 400;
    line-height: .92;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.section-lead {
    max-width: 30ch;
    font-size: var(--fs-lead);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.03em;
    text-wrap: balance;
}

/* Кнопки */

.button {
    --button-bg: var(--ink);
    --button-fg: #fff;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--button-bg);
    color: var(--button-fg);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform .4s var(--ease-out), background-color .3s;
}

.button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--violet);
    transform: translateY(101%);
    transition: transform .5s var(--ease-out);
}

.button:hover::before,
.button:focus-visible::before {
    transform: none;
}

.button:active {
    transform: scale(.97);
}

.button__arrow {
    width: 18px;
    height: 18px;
    transition: transform .4s var(--ease-out);
}

.button:hover .button__arrow {
    transform: translateX(4px);
}

.button--light {
    --button-bg: var(--surface-strong);
    --button-fg: var(--ink);
}

.button--light::before {
    background: var(--yellow);
}

.button--violet {
    --button-bg: var(--violet);
}

.button--violet::before {
    background: var(--ink);
}

.button--big {
    min-height: clamp(56px, 4.4vw, 76px);
    padding: 0 clamp(24px, 2.2vw, 40px);
    border-radius: 16px;
    font-size: clamp(17px, 1.25vw, 22px);
}

.button[disabled] {
    opacity: .6;
    cursor: progress;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .3s, color .3s;
}

.pill:hover {
    background: var(--ink);
    color: #fff;
}

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stores a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .4s var(--ease-out);
}

.stores a:hover {
    transform: translateY(-3px);
}

.stores {
    --store-h: 48px;
}

/* .stores a img — специфичнее, чем .hero__media img (фото на весь блок) */
.stores a img {
    height: var(--store-h);
    width: auto;
}

/* Веб-версия MealPlan — в стиле кнопок магазинов и той же высоты */
.stores .stores__web {
    display: flex;
    align-items: center;
    gap: calc(var(--store-h) * .2);
    height: var(--store-h);
    padding: 0 calc(var(--store-h) * .32) 0 calc(var(--store-h) * .24);
    border: 1px solid rgba(255, 255, 255, .35);
    background: #000;
    color: #fff;
    font-size: calc(var(--store-h) * .4);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.01em;
    text-decoration: none;
    white-space: nowrap;
}

.stores__web svg {
    flex: none;
    width: calc(var(--store-h) * .54);
    height: calc(var(--store-h) * .54);
}

.stores__web span {
    display: grid;
    gap: 2px;
}

.stores__web small {
    font-size: calc(var(--store-h) * .2);
    font-weight: 400;
    letter-spacing: 0;
    opacity: .85;
}

/* Шапка */

.header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--header-h);
    transition: background-color .3s, box-shadow .3s;
}

.header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 1px 0 var(--line);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.6vw, 28px);
    height: 100%;
}

.logo {
    display: block;
    flex: none;
    color: var(--ink);
}

.logo svg {
    width: 118px;
    height: auto;
}

.header__clock {
    color: var(--ink-2);
}

.header__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.icon-link {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    transition: background-color .3s, color .3s;
}

.icon-link:hover {
    background: var(--ink);
    color: #fff;
}

.icon-link svg {
    width: 20px;
    height: 20px;
}

.header .button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 15px;
}

/* Меню */

.menu {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--bg);
    color: var(--ink);
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity .4s var(--ease-out), transform .5s var(--ease-out), overlay .5s allow-discrete, display .5s allow-discrete;
}

.menu[open] {
    opacity: 1;
    transform: none;
}

@starting-style {
    .menu[open] {
        opacity: 0;
        transform: translateY(-16px);
    }
}

.menu::backdrop {
    background: transparent;
}

.menu__inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding-bottom: var(--gutter);
}

.menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.menu__list {
    display: grid;
    margin-block: auto;
    padding-block: 24px;
}

.menu__link {
    display: flex;
    align-items: baseline;
    gap: clamp(12px, 2vw, 32px);
    padding-block: clamp(4px, .6vw, 10px);
    border-bottom: 1px solid var(--line);
    font-size: clamp(36px, 6vw, 96px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.04em;
    text-decoration: none;
    transition: color .3s, padding .5s var(--ease-out);
}

.menu__link .mono {
    color: var(--muted);
}

.menu__link:hover {
    padding-left: 12px;
    color: var(--violet);
}

.menu__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Первый экран */

.hero {
    padding-top: clamp(16px, 2vw, 32px);
}

.wordmark {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    color: var(--ink);
}

.wordmark path {
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

.js .wordmark path {
    opacity: 0;
    transform: translateY(40%) rotate(-4deg);
    transition: opacity .9s var(--ease-out), transform 1.2s var(--ease-out), fill .4s;
    transition-delay: calc(var(--i) * 70ms + 100ms);
}

.js .wordmark.is-in path {
    opacity: 1;
    transform: translate(var(--dx, 0), var(--dy, 0));
}

.js .wordmark.is-ready path {
    transition: transform .9s var(--ease-out), fill .4s;
    transition-delay: 0s;
}

.wordmark path:hover {
    fill: var(--violet);
}

.hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap) var(--gutter);
    align-items: end;
    margin-top: clamp(28px, 3.4vw, 64px);
}

.hero__lead {
    grid-column: 1 / span 8;
    font-size: var(--fs-lead);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.hero__lead em {
    font-style: normal;
    color: var(--violet);
}

.hero__actions {
    grid-column: 9 / span 4;
    display: grid;
    gap: 14px;
    justify-items: start;
}

.hero__media {
    position: relative;
    margin-top: clamp(28px, 3.4vw, 64px);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark);
    aspect-ratio: 1520 / 617;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 50% 30%;
}

.hero__badge {
    position: absolute;
    left: clamp(12px, 1.6vw, 28px);
    bottom: clamp(12px, 1.6vw, 28px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 18px;
    border-radius: 16px;
    background: color-mix(in srgb, #fff 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero__badge .stores {
    --store-h: 40px;
}

/* Бегущая строка */

.ticker {
    margin-top: var(--gap);
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
    overflow: hidden;
}

.ticker__track {
    display: flex;
    width: max-content;
    animation: ticker 38s linear infinite;
}

.ticker__item {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 14px;
    font-size: clamp(18px, 1.6vw, 28px);
    letter-spacing: -.02em;
    white-space: nowrap;
}

.ticker__item::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--orange);
    rotate: 45deg;
}

.ticker:hover .ticker__track {
    animation-play-state: paused;
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

/* Карточки */

.cards {
    display: grid;
    gap: var(--gap);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: clamp(220px, 17vw, 320px);
    padding: clamp(16px, 1.4vw, 24px);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    container-type: inline-size;
    transition: background-color .4s, color .4s, transform .6s var(--ease-out);
}

.card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
}

.card__icon svg {
    width: 34px;
    height: 34px;
}

.card__title {
    font-size: var(--fs-h3);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.card__text {
    color: var(--ink-2);
    text-wrap: pretty;
}

.card__foot {
    margin-top: auto;
}

.card--violet {
    background: var(--violet);
    color: #fff;
}

.card--orange {
    background: var(--orange);
    color: #fff;
}

.card--yellow {
    background: var(--yellow);
}

.card--dark {
    background: var(--dark);
    color: #fff;
}

.card--violet .card__text,
.card--orange .card__text,
.card--dark .card__text {
    color: rgba(255, 255, 255, .78);
}

.card--violet .card__icon,
.card--orange .card__icon,
.card--dark .card__icon {
    background: #fff;
    color: var(--ink);
}

/* Цифры */

.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    justify-content: space-between;
}

.stat__value {
    font-size: clamp(56px, 7vw, 132px);
    font-weight: 500;
    line-height: .9;
    letter-spacing: -.05em;
    font-variant-numeric: tabular-nums;
}

.stat--wide {
    grid-column: span 2;
}

/* 5 шагов */

.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.five .card {
    min-height: clamp(260px, 22vw, 400px);
}

.five .card:hover {
    background: var(--ink);
    color: #fff;
}

.five .card--violet:hover {
    background: var(--ink);
}

.five__num {
    display: flex;
    justify-content: space-between;
}

.five__title {
    margin-top: auto;
    font-size: clamp(22px, 2vw, 36px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -.03em;
    text-wrap: balance;
}

/* Что вы получаете */

.features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
    gap: clamp(16px, 2vw, 32px);
    min-height: clamp(300px, 24vw, 420px);
}

.feature__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature__body .card__text {
    margin-top: auto;
}

.feature__media {
    border-radius: calc(var(--radius) - 8px);
    overflow: hidden;
    background: var(--bg);
}

.feature__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
}

.feature:hover .feature__media img {
    transform: scale(1.06);
}

/* О проекте */

.about {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.owner {
    gap: clamp(24px, 3vw, 48px);
}

.owner__head {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 32px);
}

.owner__head picture {
    flex: none;
}

.owner__photo {
    flex: none;
    width: clamp(96px, 9vw, 160px);
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.owner__title {
    font-size: clamp(26px, 2.6vw, 48px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.owner__list {
    display: grid;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.owner__list li {
    display: grid;
    grid-template-columns: 3.2em minmax(0, 1fr);
    gap: 12px;
    padding-block: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    font-size: clamp(16px, 1.15vw, 20px);
}

.owner__list .mono {
    color: rgba(255, 255, 255, .5);
}

.team {
    gap: clamp(20px, 2vw, 32px);
}

.team__text {
    display: grid;
    gap: 14px;
    font-size: clamp(18px, 1.4vw, 24px);
    line-height: 1.25;
    letter-spacing: -.01em;
}

.avatars {
    display: flex;
    margin-top: auto;
}

.avatars img {
    width: clamp(64px, 5.4vw, 96px);
    height: auto;
    aspect-ratio: 1;
    margin-right: -14px;
    border: 3px solid var(--violet);
    border-radius: 50%;
    object-fit: cover;
}

/* Как всё будет */

.timeline {
    border-top: 1px solid var(--line);
}

.timeline__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 5fr) minmax(0, 4fr);
    gap: var(--gutter);
    align-items: baseline;
    padding-block: clamp(20px, 2.4vw, 40px);
    border-bottom: 1px solid var(--line);
    transition: background-color .4s, color .4s, padding .6s var(--ease-out);
}

.timeline__row:hover {
    padding-inline: clamp(12px, 1.4vw, 24px);
    border-radius: var(--radius);
    background: var(--surface);
}

.timeline__num {
    color: var(--muted);
}

.timeline__title {
    font-size: clamp(28px, 4vw, 72px);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.04em;
}

.timeline__points {
    display: grid;
    gap: 6px;
    color: var(--ink-2);
    font-size: clamp(16px, 1.2vw, 21px);
}

.timeline__points li::before {
    content: "→ ";
    color: var(--violet);
}

.cta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(24px, 3vw, 48px);
}

/* Система */

.system {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system .card {
    min-height: clamp(320px, 26vw, 460px);
}

.system__value {
    font-size: clamp(64px, 8vw, 150px);
    font-weight: 500;
    line-height: .86;
    letter-spacing: -.06em;
}

.app-card {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 0;
}

.app-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: clamp(16px, 1.4vw, 24px);
}

.app-card__body p {
    font-size: clamp(16px, 1.1vw, 20px);
    line-height: 1.35;
}

.app-card__body .stores {
    margin-top: auto;
}

.app-card__phone {
    align-self: end;
    width: 100%;
    max-width: 380px;
    justify-self: center;
    transition: transform .9s var(--ease-out);
}

.app-card:hover .app-card__phone {
    transform: translateY(-12px) rotate(-2deg);
}

/* Результаты */

.results__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(20px, 2vw, 32px);
}

.carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(260px, 26vw, 460px);
    gap: var(--gap);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    cursor: grab;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.carousel.is-dragging img {
    pointer-events: none;
}

.carousel__item {
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    aspect-ratio: 448 / 374;
}

.carousel__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.carousel-nav {
    display: flex;
    gap: 8px;
}

.carousel-nav button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: background-color .3s, color .3s;
}

.carousel-nav button:hover {
    background: var(--ink);
    color: #fff;
}

.carousel-nav svg {
    width: 22px;
    height: 22px;
}

/* Вопросы */

.faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: var(--gutter);
    align-items: start;
}

.faq__aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: grid;
    gap: 40px;
}

.faq__list {
    border-top: 1px solid var(--line);
}

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

.faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: clamp(18px, 1.8vw, 28px);
    font-size: clamp(20px, 1.7vw, 30px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.02em;
    list-style: none;
    cursor: pointer;
    transition: color .3s;
}

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

.faq__item summary:hover {
    color: var(--violet);
}

.faq__plus {
    position: relative;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    transition: background-color .3s, color .3s;
}

.faq__plus::before,
.faq__plus::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 14px;
    height: 2px;
    margin: -1px 0 0 -7px;
    background: currentColor;
    transition: rotate .5s var(--ease-out);
}

.faq__plus::after {
    rotate: 90deg;
}

.faq__item[open] .faq__plus {
    background: var(--ink);
    color: #fff;
}

.faq__item[open] .faq__plus::before {
    rotate: 45deg;
}

.faq__item[open] .faq__plus::after {
    rotate: 135deg;
}

.faq__answer {
    display: grid;
    gap: 10px;
    max-width: 62ch;
    padding-bottom: clamp(18px, 1.8vw, 28px);
    color: var(--ink-2);
    font-size: clamp(16px, 1.15vw, 20px);
}

.faq__item[open] .faq__answer {
    animation: answer .6s var(--ease-out);
}

@keyframes answer {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Заявка */

.signup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 80px);
    padding: clamp(20px, 3vw, 56px);
    border-radius: var(--radius);
    background: var(--dark);
    color: #fff;
}

.signup__intro {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.signup__title {
    font-size: clamp(48px, 6.6vw, 124px);
    font-weight: 500;
    line-height: .9;
    letter-spacing: -.05em;
}

.signup__title span {
    color: var(--yellow);
}

.signup__text {
    max-width: 34ch;
    color: rgba(255, 255, 255, .72);
    font-size: clamp(18px, 1.4vw, 24px);
    line-height: 1.3;
}

.signup__facts {
    display: grid;
    gap: 10px;
    margin-top: auto;
    color: rgba(255, 255, 255, .6);
}

.signup__facts li {
    display: flex;
    gap: 10px;
}

.signup__facts li::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: .45em;
    border-radius: 2px;
    background: var(--orange);
}

.form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    padding: clamp(16px, 1.8vw, 28px);
    border-radius: calc(var(--radius) - 6px);
    background: var(--surface);
    color: var(--ink);
}

.form__title {
    grid-column: 1 / -1;
    margin-bottom: 6px;
    font-size: var(--fs-h3);
    font-weight: 500;
    letter-spacing: -.02em;
}

.field {
    position: relative;
    display: grid;
}

.field--wide {
    grid-column: 1 / -1;
}

.field input {
    width: 100%;
    height: 60px;
    padding: 22px 16px 6px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--surface-strong);
    font-size: 17px;
    transition: border-color .3s, box-shadow .3s;
}

.field input:hover {
    border-color: var(--line);
}

.field input:focus {
    border-color: var(--violet);
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent);
}

.field label {
    position: absolute;
    top: 20px;
    left: 17px;
    color: var(--muted);
    font-size: 17px;
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform .3s var(--ease-out), color .3s;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    color: var(--ink-2);
    transform: translateY(-11px) scale(.72);
}

.field input:user-invalid,
.field input[aria-invalid="true"] {
    border-color: var(--danger);
}

.field input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent);
}

/* Ошибка под полем: текст приходит из проверки в браузере или из ответа сервера */
.field__error {
    padding: 6px 4px 0;
    color: var(--danger-ink);
    font-size: 13px;
    line-height: 1.35;
    animation: answer .4s var(--ease-out);
}

.field__error[hidden] {
    display: none;
}

.form__wide {
    grid-column: 1 / -1;
}

.check:has(input[aria-invalid="true"]) input {
    outline: 2px solid var(--danger);
    outline-offset: 2px;
}

.field__toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.field__toggle:hover {
    color: var(--ink);
}

.field__toggle svg {
    width: 22px;
    height: 22px;
}

.field__hint {
    padding: 6px 4px 0;
    color: var(--muted);
    font-size: 13px;
}

.segmented {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-strong);
    margin: 0;
}

.segmented legend {
    float: left;
    grid-column: 1 / -1;
    padding: 6px 12px 2px;
    color: var(--muted);
    font-size: 13px;
}

.segmented label {
    position: relative;
    display: grid;
    place-items: center;
    height: 44px;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color .3s, color .3s;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented label:has(input:checked) {
    background: var(--ink);
    color: #fff;
}

.segmented label:has(input:focus-visible) {
    outline: 2px solid var(--violet);
}

.check {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 4px;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--violet);
}

.form__honeypot {
    position: absolute;
    left: -9999px;
}

.form__errors {
    grid-column: 1 / -1;
    padding: 12px 16px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--danger) 10%, #fff);
    color: var(--danger-ink);
    font-size: 15px;
}

.form__errors:empty {
    display: none;
}

.form .button {
    grid-column: 1 / -1;
    margin-top: 6px;
}

.form__legal {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.form__legal a {
    color: inherit;
}

.done {
    display: grid;
    gap: 18px;
    align-content: center;
    justify-items: start;
    padding: clamp(20px, 2.4vw, 40px);
    border-radius: calc(var(--radius) - 6px);
    background: var(--yellow);
    color: var(--ink);
    animation: done .8s var(--ease-out);
}

.done[hidden] {
    display: none;
}

.done__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--ink);
    color: var(--yellow);
}

.done__icon svg {
    width: 34px;
    height: 34px;
}

.done__title {
    font-size: clamp(36px, 3.6vw, 64px);
    font-weight: 500;
    line-height: .95;
    letter-spacing: -.04em;
}

.done p {
    max-width: 36ch;
    font-size: clamp(17px, 1.2vw, 21px);
}

@keyframes done {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.98);
    }
}

/* Приложение */

.app-band {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--gutter);
    align-items: end;
    padding: clamp(20px, 3vw, 56px) clamp(20px, 3vw, 56px) 0;
    border-radius: var(--radius);
    background: var(--violet);
    color: #fff;
    overflow: hidden;
}

.app-band__body {
    display: grid;
    gap: 24px;
    padding-bottom: clamp(20px, 3vw, 56px);
}

.app-band__phone {
    justify-self: center;
    width: 100%;
    max-width: 415px;
}

/* Подвал */

.footer {
    margin-top: var(--section);
    padding-block: clamp(32px, 4vw, 64px) var(--gutter);
    border-top: 1px solid var(--line);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gutter);
}

.footer__col {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer__col .mono {
    margin-bottom: 6px;
    color: var(--muted);
}

.footer__col a {
    width: fit-content;
    text-decoration: none;
    transition: color .3s;
}

.footer__col a:hover {
    color: var(--violet);
}

.footer .wordmark {
    margin-top: clamp(48px, 6vw, 112px);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: var(--gutter);
    color: var(--muted);
}

/* Плавающая кнопка */

.float-cta {
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 16px;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 24px);
    transition: opacity .4s, transform .6s var(--ease-out);
}

.float-cta.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.float-cta a {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 11px;
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
    transition: background-color .3s;
}

.float-cta a:hover {
    background: rgba(255, 255, 255, .12);
}

.float-cta .float-cta__main {
    background: var(--violet);
}

.float-cta .float-cta__main:hover {
    background: var(--orange);
}

/* Cookie */

.cookie {
    position: fixed;
    left: var(--gutter);
    bottom: var(--gutter);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: min(520px, calc(100% - var(--gutter) * 2));
    padding: 14px 14px 14px 18px;
    border-radius: 16px;
    background: var(--surface-strong);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
    font-size: 14px;
    line-height: 1.4;
}

.cookie[hidden] {
    display: none;
}

.cookie .button {
    min-height: 40px;
    flex: none;
}

/* Статьи и политика */

.article {
    max-width: 880px;
    margin-inline: auto;
    padding-top: clamp(32px, 5vw, 96px);
    font-size: clamp(17px, 1.15vw, 20px);
    line-height: 1.6;
}

.article h1 {
    margin-bottom: clamp(24px, 3vw, 48px);
    font-size: clamp(40px, 5vw, 84px);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.article h2,
.article h3,
.article h4 {
    margin: 1.6em 0 .5em;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.article h2 {
    font-size: clamp(28px, 2.6vw, 44px);
}

.article h3 {
    font-size: clamp(22px, 1.9vw, 32px);
}

.article h4 {
    font-size: clamp(19px, 1.4vw, 24px);
}

.article p,
.article ul,
.article ol {
    margin-bottom: 1em;
    color: var(--ink-2);
}

.article ol,
.article ul {
    padding-left: 1.2em;
}

.article li + li {
    margin-top: .35em;
}

.article a {
    color: var(--violet);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

.article .button {
    color: #fff;
}

.article__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(32px, 4vw, 64px);
    padding: clamp(20px, 2.4vw, 40px);
    border-radius: var(--radius);
    background: var(--surface);
}

.article__cta p {
    margin: 0;
    color: var(--ink);
    font-size: clamp(22px, 2vw, 34px);
    line-height: 1.1;
    letter-spacing: -.02em;
}

.page-404 {
    display: grid;
    place-items: center;
    gap: 24px;
    min-height: 70vh;
    text-align: center;
}

.page-404__code {
    font-size: clamp(120px, 26vw, 420px);
    font-weight: 500;
    line-height: .8;
    letter-spacing: -.07em;
}

/* Появление при прокрутке */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

@supports (animation-timeline: view()) {
    .hero__media img {
        animation: hero-zoom linear both;
        animation-timeline: view();
        animation-range: exit 0% exit 100%;
    }

    @keyframes hero-zoom {
        to {
            transform: scale(1.18) translateY(6%);
        }
    }
}

/* Адаптив: точки как в макете — Desktop 1440, Tablet 1024, Tablet 768, Mobile 390 */

@media (max-width: 1279px) {
    .header__clock {
        display: none;
    }

    /* Шаги 3 + 2 */
    .five {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .five .card {
        grid-column: span 2;
        min-height: clamp(200px, 22vw, 280px);
    }

    .five .card:nth-child(n + 4) {
        grid-column: span 3;
    }

    /* Карточки «Что вы получаете» — вертикальные, фото под текстом */
    .feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature__media {
        aspect-ratio: 16 / 9;
    }

    .timeline__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .timeline__points {
        grid-column: auto;
    }

    /* Две карточки в ряд, приложение — на всю ширину */
    .system {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-card {
        grid-column: 1 / -1;
    }

    .faq {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(28px, 4vw, 48px);
    }

    .faq__aside {
        position: static;
    }
}

@media (max-width: 1023px) {
    .hero__lead,
    .hero__actions {
        grid-column: 1 / -1;
    }

    /* Шаги 2 + 2 + 1 */
    .five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .five .card,
    .five .card:nth-child(n + 4) {
        grid-column: auto;
    }

    .five .card:last-child {
        grid-column: 1 / -1;
    }

    /* «2 500+» на всю ширину, под ней две карточки */
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about,
    .signup,
    .app-band {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-band__phone {
        max-width: 360px;
    }

    .footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    :root {
        --header-h: 58px;
    }

    .header__clock,
    .header .icon-link,
    .header .button {
        display: none;
    }

    .logo svg {
        width: 104px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-head .section-count {
        display: none;
    }

    .hero__media {
        aspect-ratio: 354 / 326;
    }

    .hero__badge {
        right: 12px;
        padding: 10px;
    }

    .hero__badge > .mono {
        display: none;
    }

    .stats,
    .five,
    .features,
    .system,
    .footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat--wide,
    .app-card,
    .five .card:last-child {
        grid-column: auto;
    }

    .feature,
    .app-card,
    .app-band {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature__media {
        aspect-ratio: 320 / 224;
    }

    .timeline__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .timeline__points {
        grid-column: auto;
    }

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

    .cookie {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }

    .js [data-reveal],
    .js .wordmark path {
        opacity: 1;
        transform: none;
    }
}

.grecaptcha-badge {
    visibility: hidden;
}

.article ol[role="list"] {
    padding-left: 0;
}
