/* Конкретерм: посадочная страница. Цвета и шрифт из брендбука (design/brand/README.md). */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --night: #0F2640;
  --signal: #2F6BFF;
  --signal-hover: #1F57E6;
  --alarm: #E5484D;
  --bg: #EEF2F7;
  --surface: #FFFFFF;
  --surface-2: #F6F8FB;
  --text: #0F2640;
  --muted: #4A5B70;
  --line: #D5DDE8;
  --chip: #E3E9F2;
  --alarm-bg: #FDECEC;
  --alarm-text: #B4262B;
  --shadow: 0 24px 60px -28px rgba(15, 38, 64, .35);
  --link: #2F6BFF;
  --radius: 16px;
  --radius-s: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1A2D;
    --surface: #10243B;
    --surface-2: #132A44;
    --text: #E8EEF6;
    --muted: #A3B2C6;
    --line: #22405F;
    --chip: #1B3655;
    --alarm-bg: #3A1A22;
    --alarm-text: #FF8A8D;
    --signal-hover: #5287FF;
    --link: #7FA6FF;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1A2D; --surface: #10243B; --surface-2: #132A44; --text: #E8EEF6; --muted: #A3B2C6;
  --line: #22405F; --chip: #1B3655; --alarm-bg: #3A1A22; --alarm-text: #FF8A8D; --signal-hover: #5287FF; --link: #7FA6FF;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; }
strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-s); }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

/* Кнопки: везде pill, карточки 16px, поля 10px */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--signal); color: #fff; }
.btn--primary:hover { background: var(--signal-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--wide { width: 100%; }

/* Шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: block; flex: none; }
.logo img { height: 32px; width: auto; }
.logo--dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light { display: none !important; }
  :root:not([data-theme="light"]) .logo--dark { display: block !important; }
}
:root[data-theme="dark"] .logo--light { display: none !important; }
:root[data-theme="dark"] .logo--dark { display: block !important; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--text); }
@media (max-width: 860px) { .nav { display: none; } .top .btn { margin-left: auto; } }

/* Первый экран */
.hero { padding: 64px 0 72px; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--link); margin-bottom: 16px; }
.hero h1 { font-size: clamp(34px, 3.9vw, 50px); line-height: 1.08; }
.lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__shot { position: relative; margin: 0; padding-bottom: 40px; }
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
.shot--desk { width: 100%; }
.shot--phone {
  position: absolute; right: -8px; bottom: 0; width: 27%;
  border-radius: 22px; border: 6px solid var(--night);
}
.hero__shot figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }

@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero__in { grid-template-columns: 1fr; gap: 40px; }
  .lead { max-width: 46ch; }
}
@media (max-width: 640px) {
  .shot--phone { width: 34%; right: 0; border-width: 4px; border-radius: 16px; }
  .hero__shot { padding-bottom: 28px; }
}

/* Тезис */
.thesis { background: var(--night); color: #E8EEF6; padding: 72px 0; }
.thesis__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.thesis__q { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.thesis__body p { color: #B9C6D8; font-size: 18px; }
.thesis__ex { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); }
.thesis__ex dt { font-size: 14px; color: #B9C6D8; }
.thesis__ex dd { margin: 4px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.thesis__ex .num { font-size: 48px; font-weight: 600; line-height: 1.1; color: #fff; }
.thesis__sub { font-size: 15px; color: #8FB0FF; }
.thesis__ex .thesis__alarm { color: #FF7A7E; }
.thesis__q { color: #fff; }
@media (max-width: 860px) { .thesis { padding: 56px 0; } .thesis__in { grid-template-columns: 1fr; gap: 24px; } }

/* Как работает */
.how { padding: 88px 0; }
.how h2, .features h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.sec-lead { margin-top: 12px; color: var(--muted); max-width: 60ch; font-size: 18px; }
.flow { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.flow::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 7px; height: 2px;
  background: linear-gradient(90deg, var(--line), var(--signal));
}
.flow__item { position: relative; padding: 32px 20px 0 0; }
.flow__item::before {
  content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--signal);
}
.flow__item--end::before { background: var(--signal); }
.flow__k { display: block; font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.flow__item p { color: var(--muted); font-size: 15.5px; }
.flow__item strong { color: var(--text); }
@media (max-width: 960px) {
  .how { padding: 64px 0; }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; background: linear-gradient(180deg, var(--line), var(--signal)); }
  .flow__item { padding: 0 0 26px 40px; }
  .flow__item:last-child { padding-bottom: 0; }
}

/* Возможности */
.features { padding: 0 0 96px; }
.bento { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tile { border-radius: var(--radius); overflow: hidden; display: grid; border: 1px solid var(--line); }
.tile__text { padding: 32px 32px 0; }
.tile h3 { font-size: 23px; line-height: 1.2; }
.tile p { margin-top: 10px; color: var(--muted); max-width: 52ch; }

.tile--plan { grid-column: 1 / -1; background: var(--surface); grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: end; }
.tile--plan .tile__text { padding: 40px 0 40px 40px; align-self: center; }
.tile__img--desk { padding: 32px 0 0 32px; }
.tile__img--desk img { border-radius: 12px 0 0 0; border: 1px solid var(--line); border-right: 0; border-bottom: 0; }

.tile--strength { background: var(--night); border-color: var(--night); }
.tile--strength h3 { color: #fff; }
.tile--strength p { color: #B9C6D8; }
.tile--alarm { background: var(--surface-2); }
.tile--strength, .tile--alarm { grid-template-rows: auto 1fr; }
.tile__img--phone { display: flex; justify-content: center; align-items: flex-end; padding: 28px 32px 0; overflow: hidden; max-height: 420px; }
.tile__img--phone img { width: min(300px, 82%); border-radius: 20px 20px 0 0; border: 5px solid var(--night); border-bottom: 0; }
.tile--strength .tile__img--phone img { border-color: #24405F; }

.tile--journal { grid-column: 1 / -1; background: var(--surface); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.tile--journal .tile__img--phone { align-self: end; padding: 32px 32px 0; max-height: 400px; }
.tile--journal .tile__text { padding: 40px 48px 40px 8px; }
.tile--journal .tile__text p + p { margin-top: 12px; }

.chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--chip); color: var(--text); }
.chip--red { background: var(--alarm-bg); color: var(--alarm-text); }

@media (max-width: 860px) {
  .features { padding-bottom: 72px; }
  .bento { grid-template-columns: 1fr; }
  .tile--plan { grid-template-columns: 1fr; }
  .tile--journal { grid-template-columns: 1fr; }
  .tile--journal .tile__text { order: -1; padding: 28px 24px 0; }
  .tile--journal .tile__img--phone { padding: 24px 24px 0; max-height: 380px; }
  .tile--plan .tile__text { padding: 28px 24px 0; }
  .tile__text { padding: 28px 24px 0; }
  .tile__img--desk { padding: 24px 0 0 24px; }
  .tile__img--phone { padding: 24px 24px 0; max-height: 380px; }
}

/* Тестирование и контакты */
.test { padding: 88px 0; background: var(--surface); border-top: 1px solid var(--line); }
.test__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.test h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.test__text > p { margin-top: 16px; color: var(--muted); font-size: 18px; max-width: 52ch; }
.contact { display: grid; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact__name { font-weight: 600; font-size: 20px; }
.contact__role { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.contact__link { font-size: 20px; font-weight: 600; color: var(--link); text-decoration: none; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact__link:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .test { padding: 64px 0; }
  .test__in { grid-template-columns: 1fr; gap: 32px; }
  .contact { padding: 20px; }
}

/* Подвал */
.foot { background: var(--night); color: #B9C6D8; padding: 32px 0; font-size: 15px; }
.foot__in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot__in img { height: 28px; width: auto; }
.foot__in p { flex: 1 1 260px; }
.foot a { color: #fff; }

/* Появление при прокрутке: только если пользователь не просил меньше движения */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .hero__text > * { animation: rise .7s cubic-bezier(.16, 1, .3, 1) both; }
  .js .hero__text > :nth-child(2) { animation-delay: .06s; }
  .js .hero__text > :nth-child(3) { animation-delay: .12s; }
  .js .hero__text > :nth-child(4) { animation-delay: .18s; }
  .js .hero__shot { animation: rise .9s .1s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
