/* Шаблон 1. Цвета, шрифты, скругления и тени — только из переменных схемы (schemes/*.css). */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
/* Ссылки внутри текста подчёркнуты цветом акцента, чтобы отличаться от кнопок и плашек. */
.section p a, .section li a, .section td a, .hero__lead a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-glow); text-underline-offset: 3px; transition: text-decoration-color 0.2s ease; }
.section p a:hover, .section li a:hover, .section td a:hover, .hero__lead a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Шкала заголовков: плотный интерлиньяж и лёгкое сжатие трекинга на крупных кеглях. */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.12; margin: 0 0 0.55em; letter-spacing: -0.01em; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
strong { color: var(--text); font-weight: 600; }
.container { width: min(1100px, 100% - 2rem); margin-inline: auto; }
/* Длина строки: текст в одну колонку не шире 72 символов, сетки и таблицы остаются во всю ширину. */
.section .container > p, .section .container > .list, .section .container > .footnote, .section .container > .h3, .section .container > .figure, .section__text > p, .section__text > .list, .section__text > .footnote, .section__text > .figure, .faq__answer p { max-width: 72ch; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 10; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.header__logo { display: inline-flex; align-items: center; font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; color: var(--text); }
.header__logo-img { height: 44px; width: auto; }
/* Меню без JavaScript: на десктопе видно всегда, на мобильном раскрывается скрытым чекбоксом.
   Закрытый <details> для этого не годится — он прячет содержимое независимо от CSS. */
.nav__check { display: none; }
.nav__toggle { display: none; cursor: pointer; padding: 0.4rem 0.8rem; border: 1px solid var(--border-2); border-radius: var(--radius-sm); color: var(--text); }
.nav__menu { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav__link { padding: 0.5rem 0.85rem; border-radius: 999px; color: var(--text-2); font-weight: 600; }
.nav__link:hover { color: var(--text); background: var(--bg-hover); }
.nav__link.is-active { color: var(--accent); background: var(--accent-soft); }

/* Первый экран */
.hero { padding: 3.5rem 0 2.5rem; text-align: center; background: radial-gradient(ellipse at top, var(--section-glow), transparent 60%); }
.hero__badge { display: inline-block; margin: 0 0 1.2rem; padding: 0.35rem 0.9rem; border: 1px solid var(--border-2); border-radius: 999px; color: var(--accent); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero__title { font-size: clamp(2.3rem, 5.5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 1rem; background: var(--heading-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { max-width: 40rem; margin: 0 auto 1rem; color: var(--text-2); font-size: 1.2rem; line-height: 1.55; }
.hero__media { display: block; max-width: 800px; margin: 2rem auto; }
.hero__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin: 1.5rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 2rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1.05rem; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.btn--accent { background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: 0 0 24px var(--accent-glow); }
.btn--accent:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 0 32px var(--accent-glow); }
.btn--outline { border: 1px solid var(--border-2); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); color: var(--text); background: var(--bg-hover); }
.section__buttons { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1rem; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.trust__item { padding: 0.55rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-3); color: var(--accent); font-size: 0.95rem; font-weight: 600; }

/* Оглавление: сетка карточек с иконкой */
.toc { padding: 2.5rem 0 1.5rem; }
.toc__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; padding: 0; margin: 0; list-style: none; }
.toc__link { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-3); color: var(--text-2); font-weight: 600; line-height: 1.3; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease; }
.toc__link:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--bg-hover); color: var(--text); box-shadow: var(--shadow), 0 0 20px var(--accent-glow); }
.toc__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-size: 1.25rem; font-weight: 700; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.toc__link:hover .toc__icon { background: var(--accent); color: var(--on-accent); transform: scale(1.08) rotate(3deg); }

/* Секции */
.section { position: relative; padding: 3.25rem 0; border-top: 1px solid var(--border); }
.section:nth-of-type(even) { background: var(--bg-2); }
.section__title { position: relative; padding-left: 0.9rem; font-size: 1.85rem; }
/* Вертикальная полоса слева от заголовка */
.section__title::after { content: ""; position: absolute; left: 0; top: 0.12em; bottom: 0.12em; width: 4px; border-radius: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px var(--accent-glow); }
.section--image .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.section--image-left .container { grid-template-columns: 1fr 1.2fr; }
.section--image-left .section__text { order: 2; }
/* Картинки: рамка и лёгкий подъём при наведении — картинки ведут на партнёрку */
.hero__media, .section__media, .figure { display: block; border: 1px solid var(--border-2); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.hero__media:hover, .section__media:hover, .figure:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow), 0 0 24px var(--accent-glow); }
.section__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* Картинка в тексте секции: на ширину колонки текста, в своих пропорциях */
.figure { margin: 1.5rem 0; }
.figure__img { width: 100%; }
.footnote { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border-2); color: var(--text-3); font-size: 0.92rem; }

/* Элементы */
.list { padding: 0; margin: 0 0 1.2rem; list-style: none; }
.list li { position: relative; padding-left: 1.4rem; margin: 0.5rem 0; }
.list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 8px var(--accent-glow); }
.list--steps { counter-reset: step; }
.list--steps li { counter-increment: step; padding-left: 2.6rem; margin: 0.7rem 0; }
.list--steps li::before { content: counter(step); top: 0.05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.9rem; text-align: center; line-height: 1.9rem; box-shadow: none; }
/* Таблица: скруглённая рамка с золотой кромкой сверху, шапка капителью, подсветка строки под курсором */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow); }
.table-wrap::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { padding: 0.9rem 1.25rem; text-align: left; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; color: var(--text); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)), color-mix(in srgb, var(--accent) 6%, var(--bg-2))); border-bottom: 2px solid var(--accent); }
.table td { padding: 0.9rem 1.25rem; text-align: left; vertical-align: middle; color: var(--text-2); border-bottom: 1px solid var(--border); }
.table td:first-child { color: var(--text); font-weight: 600; }
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg) 55%, var(--bg-2)); }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent) 9%, var(--bg-2)); }
.table tr:last-child td { border-bottom: 0; }
/* Парные карточки: золотая кромка сверху, при наведении рамка и свечение */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.card { position: relative; overflow: hidden; padding: 1.35rem 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-3); box-shadow: var(--shadow); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0.7; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow), 0 0 20px var(--accent-glow); }
.card__title { color: var(--text); font-size: 1.15rem; margin-bottom: 0.4rem; }
.card p { color: var(--text-2); }
.card p:last-child { margin: 0; }
.h3 { margin-top: 1.4rem; color: var(--text); }

/* Другие страницы и FAQ */
.links__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.link-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-3); color: var(--text); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.link-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); }
.link-card__label { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.link-card__desc { color: var(--text-2); font-size: 0.95rem; }
.faq__item { border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--bg-3); margin: 0.6rem 0; transition: border-color 0.2s ease; }
.faq__item[open], .faq__item:hover { border-color: var(--accent); }
.faq__item summary { cursor: pointer; padding: 1rem 1.3rem; font-weight: 600; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq__item[open] summary::after { content: "–"; }
.faq__answer { padding: 0 1.3rem 1rem; color: var(--text-2); }
.faq__answer p:last-child { margin: 0; }

/* Футер */
.footer { padding: 3rem 0 2rem; border-top: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); font-size: 0.95rem; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer__logo-img { height: 40px; width: auto; margin-bottom: 0.8rem; }
.footer__brand-name { margin: 0 0 0.8rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--text); }
.footer__age { display: flex; gap: 1rem; align-items: flex-start; }
.age { flex: none; padding: 0.3rem 0.6rem; border: 2px solid var(--accent); border-radius: var(--radius-sm); color: var(--accent); font-weight: 800; }
.footer h3 { font-size: 1rem; color: var(--text); margin-bottom: 0.6rem; }
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links li { margin: 0.25rem 0; }
.footer__links a { color: var(--text-2); }
.footer__links a:hover { color: var(--accent); }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0.5rem 0 1.5rem; list-style: none; }
.pill { padding: 0.35rem 0.8rem; border: 1px solid var(--border-2); border-radius: 999px; background: var(--bg-3); color: var(--text); font-size: 0.85rem; }
.footer__copy { margin: 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--text-3); }

/* Мобильная планка: две кнопки внизу экрана, всегда на виду; на десктопе её нет. Страница
   получает нижний отступ на её высоту, чтобы футер не прятался под ней. */
.mobile-bar { display: none; }

@media (max-width: 900px) {
  body { padding-bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom)); background: var(--bg-2); border-top: 1px solid var(--border); box-shadow: var(--shadow-up); }
  .mobile-bar__btn { padding: 0.7rem 0.6rem; font-size: 0.92rem; line-height: 1.2; text-align: center; }
  .nav__toggle { display: inline-block; }
  .nav__menu { display: none; }
  .nav__check:checked ~ .nav__menu { display: flex; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; padding: 1rem; background: var(--bg-2); border-bottom: 1px solid var(--border); }
  .section--image .container, .section--image-left .container { grid-template-columns: 1fr; }
  .section--image-left .section__text { order: 0; }
  .footer__top { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
  .hero { padding: 2.5rem 0 2rem; }
}

/* Движение только по действию пользователя; кому оно мешает — отключаем целиком. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .toc__link:hover, .card:hover, .link-card:hover, .hero__media:hover, .section__media:hover, .figure:hover, .btn--accent:hover, .toc__link:hover .toc__icon { transform: none; }
}
