/* PR1ME — главная: выбор направления. Стиль «светящийся портал», как /cpa (токены и шапка — оттуда же) */
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --c-bg: #04060a;
  --c-text: #f4f7fb;
  --c-text-2: #c3ccd8;
  --c-text-3: #8c97a6;
  --c-glow: #cfe4ff;
  --c-line: rgba(220, 232, 255, .14);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));

  --f: 'Montserrat', system-ui, sans-serif;

  /* Сетка и логотип — как на /cpm (docs/DESIGN_SYSTEM.md §1.1) */
  --pad: 60px;
  --logo-w: 153px;
  --header-line: 48.92px;
  --header-pad: 12px;
  --max: 1440px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}
@media (max-width: 1500px) { :root { --pad: 45px; --logo-w: 114.8px; --header-line: 36.7px; } }
@media (max-width: 860px)  { :root { --pad: 24px; --logo-w: 120px; } }
@media (max-width: 860px)  { :root { --header-line: 38.37px; } }
@media (min-width: 1501px) { :root { --max: 1920px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--c-bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--f); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--c-glow); outline-offset: 4px; border-radius: 10px; }

/* ---------- Шапка: тонкая, по высоте логотипа; при прокрутке — неоморфная полоса с бегущим светом (владелец, 2026-10-15) ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 20; padding-block: var(--header-pad); transition: padding .4s var(--ease); }
.header::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s var(--ease);
  background: linear-gradient(180deg, rgba(13, 18, 26, .92), rgba(6, 9, 14, .94));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
}
/* нижняя кромка — тонкая световая линия с бегущим бликом */
.header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0; transition: opacity .4s var(--ease);
  background:
    linear-gradient(90deg, transparent 0%, rgba(207, 228, 255, .9) 50%, transparent 100%) no-repeat 0 0 / 28% 100%,
    linear-gradient(90deg, transparent, rgba(207, 228, 255, .22) 20%, rgba(207, 228, 255, .22) 80%, transparent);
  animation: header-glint 6s ease-in-out infinite;
}
.header.is-scrolled::before, .header.is-scrolled::after { opacity: 1; }
@keyframes header-glint { 0% { background-position: -30% 0, 0 0; } 60%, 100% { background-position: 130% 0, 0 0; } }
.header__inner { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); height: var(--header-line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo { flex: none; width: var(--logo-w); filter: drop-shadow(0 0 0 rgba(207, 228, 255, 0)); transition: filter .4s var(--ease); }
.header__logo:hover { filter: drop-shadow(0 0 10px rgba(207, 228, 255, .55)); }
.header__logo img { width: 100%; height: auto; }

/* ---------- Главная ---------- */
.home { position: relative; height: max(100svh, 620px); overflow: hidden; isolation: isolate; --h: max(100svh, 620px); }
/* картинка и карточки — одна геометрия: 3:2 «cover», по центру экрана */
.stage, .dirs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100vw, calc(var(--h) * 1.5)); aspect-ratio: 3 / 2;
}
.stage { z-index: -1; }
.stage__img { width: 100%; height: 100%; object-fit: cover; animation: zoom 30s ease-in-out infinite alternate; }
.stage__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 6, 10, .7) 0%, rgba(4, 6, 10, 0) 24%), linear-gradient(0deg, rgba(4, 6, 10, .85) 0%, rgba(4, 6, 10, 0) 42%); }
.stage { transition: translate 1.2s var(--ease); }

.home__title {
  /* на одной линии с логотипом — не задевает порталы ни на каком размере */
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); width: max-content; top: var(--header-pad); height: var(--header-line); display: flex; align-items: center; margin: 0; pointer-events: none;
  font-size: clamp(12px, .9vw, 15px); font-weight: 600; letter-spacing: .38em; text-transform: uppercase; color: #eef3f8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .8);
  animation: rise 1s var(--ease) both;
}

/* Карточки — четыре колонки в нижней части экрана (четвёртая — каталог каналов, 2026-10-26) */
.dirs { z-index: 1; margin: 0; padding: 0; list-style: none; pointer-events: none; }
/* ряд по центру: ширина карточки — не больше 21% картинки и не шире, чем помещается в экран с отступами по краям */
.dir {
  --gap: clamp(14px, 1.4vw, 28px); --w: min(21%, calc((100vw - 2 * var(--pad) - 3 * var(--gap)) / 4));
  position: absolute; top: 67%; width: var(--w); left: calc(50% + (var(--i) - 2) * (var(--w) + var(--gap)) + var(--gap) / 2);
  animation: rise 1.1s var(--ease) var(--d) both;
}
.dir--cpm { --i: 0; --d: .1s; } .dir--cpa { --i: 1; --d: .2s; } .dir--telegram { --i: 2; --d: .3s; } .dir--channels { --i: 3; --d: .4s; }
.dir__card {
  pointer-events: auto; display: block; padding: clamp(18px, 1.5vw, 28px) clamp(18px, 1.6vw, 30px); border-radius: 20px; text-align: center;
  background: linear-gradient(180deg, rgba(18, 24, 34, .72), rgba(6, 9, 14, .78));
  border: 1px solid var(--c-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 24px 50px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .45s var(--ease), border-color .45s, box-shadow .45s;
}
a.dir__card:hover { transform: translateY(-4px); border-color: rgba(220, 232, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 30px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(160, 200, 255, .18); }
a.dir__card:active { transform: translateY(-1px) scale(.99); transition-duration: .1s; }
.dir__thumb { display: none; }
.dir__body { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dir__name { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(24px, 2.2vw, 40px); font-weight: 600; letter-spacing: -.02em; color: #fff; }
.dir__arrow { width: .6em; height: .6em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform .45s var(--ease), opacity .45s; }
a.dir__card:hover .dir__arrow { transform: translateX(5px); opacity: 1; }
.dir__text { font-size: clamp(13px, .95vw, 16px); line-height: 1.5; color: var(--c-text-2); min-height: 4.5em; /* место под три строки у всех — четыре карточки одной высоты */ }
.dir__stat { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--c-line); align-self: stretch; font-size: clamp(12px, .85vw, 14px); color: var(--c-text-3); }
.dir__stat b { margin-right: .3em; font-size: 1.35em; font-weight: 600; color: #fff; }
.dir__stat--soon { line-height: calc(1.35em + 3px); }
.dir__soon {
  padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(220, 232, 255, .45); background: rgba(255, 255, 255, .06);
  font-size: clamp(11px, .7vw, 12px); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #eef3f8;
}
.is-soon .dir__name { color: var(--c-text-2); }

/* ---------- Вертикальные и почти квадратные экраны: три карточки столбиком, у каждой — своя картинка ---------- */
@media (max-aspect-ratio: 5/4) {
  .home { height: auto; min-height: 100svh; display: flex; flex-direction: column; padding: calc(var(--header-pad) + var(--header-line) + 22px) var(--pad) 28px; }
  /* фон — на весь первый экран, карточки — стекло поверх */
  .stage { position: absolute; inset: 0; left: 0; top: 0; transform: none; width: 100%; height: 100%; aspect-ratio: auto; }
  .stage__img { object-position: 50% 30%; }
  .stage__shade { background: linear-gradient(180deg, rgba(4, 6, 10, .55) 0%, rgba(4, 6, 10, .25) 30%, rgba(4, 6, 10, .55) 70%, var(--c-bg) 100%); }
  .dir__card { background: linear-gradient(180deg, rgba(14, 20, 30, .55), rgba(6, 9, 14, .7)); border-color: rgba(220, 232, 255, .2); }
  .home__title { position: static; transform: none; width: auto; height: auto; display: block; text-align: center; margin: 0 0 18px; }
  .dirs { position: static; transform: none; width: 100%; max-width: 620px; aspect-ratio: auto; margin: auto; display: flex; flex-direction: column; gap: 12px; pointer-events: auto; }
  .dir { position: static; width: auto; }
  .dir__card { display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden; text-align: left; border-radius: 22px; }
  /* у каждой карточки — та же картинка, что у направления ниже на странице */
  .dir__thumb {
    display: block; flex: none; width: min(30%, 150px); /* высота — по тексту карточки: четыре карточки помещаются в первый экран телефона */
    background: var(--thumb) 50% 40% / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent);
  }
  .dir--cpm { --thumb: url('/home/img/way-cpm.webp'); } .dir--cpa { --thumb: url('/home/img/way-cpa.webp'); } .dir--telegram { --thumb: url('/home/img/way-telegram.webp'); }
  /* у каталога своей картинки нет — холодное свечение и линия графика роста */
  .dir--channels .dir__thumb {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 146'%3E%3Cpath d='M14 104 L38 90 L58 96 L80 64 L104 44' fill='none' stroke='%23cfe4ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='104' cy='44' r='5' fill='%23cfe4ff'/%3E%3C/svg%3E") 50% 50% / 70% no-repeat,
      radial-gradient(circle at 60% 45%, rgba(170, 210, 255, .35), rgba(170, 210, 255, 0) 65%), linear-gradient(160deg, #0d1522, #05080d);
  }
  .dir__body { align-items: flex-start; justify-content: center; padding: 16px 18px 16px 6px; }
  .dir__name { font-size: clamp(24px, 7vw, 34px); flex-wrap: wrap; gap: 6px 10px; }
  .dir__text { font-size: 14px; min-height: 0; }
  .dir__stat { margin-top: 2px; padding-top: 8px; }
  .is-soon .dir__thumb { filter: brightness(.7); }
}
/* узкие телефоны: картинка уже, текст плотнее — четыре карточки в первом экране (360×740) */
@media (max-aspect-ratio: 5/4) and (max-width: 480px) {
  .dir__thumb { width: 84px; }
  .dir__body { gap: 4px; padding: 12px 14px 12px 4px; }
  .dir__name { font-size: 24px; }
  .dir__text { font-size: 13px; line-height: 1.4; }
  .dir__stat { font-size: 12px; padding-top: 6px; }
}

/* ---------- Блоки ниже первого экрана ---------- */
html { scroll-behavior: smooth; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.eyebrow { margin: 0 0 16px; font-size: clamp(11px, .8vw, 14px); font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--c-text-2); }
.section-title, .way__title, .cta__title {
  margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.08;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, #b9c4d2 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title { font-size: clamp(30px, 3.6vw, 60px); max-width: 16em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: clamp(52px, 6.4vh, 62px); padding: 0 clamp(24px, 2vw, 34px); border-radius: 999px;
  font-size: clamp(15px, 1.05vw, 17px); font-weight: 600; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, border-color .3s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn--primary { background: linear-gradient(180deg, #ffffff, #dfe7f2); color: #070b12; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6) inset, 0 10px 30px rgba(140, 180, 255, .18); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff inset, 0 14px 36px rgba(140, 180, 255, .35), 0 0 40px rgba(180, 210, 255, .25); }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost {
  border: 1.5px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .12); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 30px rgba(0, 0, 0, .45);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: #fff; background: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 36px rgba(0, 0, 0, .5), 0 0 30px rgba(180, 210, 255, .25); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .1s; }


.about { padding: clamp(80px, 12vh, 150px) 0 clamp(60px, 9vh, 110px); text-align: center; }
.about .section-title { margin-inline: auto; }
.about__lead { margin: 20px auto 0; max-width: 46ch; font-size: clamp(15px, 1.15vw, 19px); line-height: 1.55; color: var(--c-text-2); }
.stats { margin: clamp(44px, 7vh, 80px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.stat { padding: clamp(28px, 4.5vh, 48px) 12px; }
.stat + .stat { border-left: 1px solid var(--c-line); }
.stat__value { font-size: clamp(32px, 3.4vw, 60px); line-height: 1; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; background: linear-gradient(180deg, #fff 30%, #b9c4d2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__value small { margin-right: .2em; font-size: .42em; font-weight: 500; letter-spacing: 0; }
.stat__label { margin: 12px 0 0; font-size: clamp(13px, .95vw, 16px); color: var(--c-text-3); }

.ways { padding-bottom: clamp(60px, 9vh, 110px); }
.ways__list { display: grid; gap: clamp(20px, 3vh, 36px); }
.way {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; overflow: hidden; border-radius: clamp(22px, 2vw, 32px);
  background: linear-gradient(180deg, rgba(18, 24, 34, .7), rgba(6, 9, 14, .8)); border: 1px solid var(--c-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 30px 60px rgba(0, 0, 0, .45);
}
.way--flip .way__media { order: 2; }
/* картинка направления */
.way__media { position: relative; min-height: clamp(280px, 34vw, 480px); }
.way__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.way__media--cpm img, .way__media--telegram img { -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.way__media--cpa img { -webkit-mask-image: linear-gradient(270deg, #000 70%, transparent); mask-image: linear-gradient(270deg, #000 70%, transparent); }
.way__body { padding: clamp(28px, 3.6vw, 64px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.way__title { font-size: clamp(26px, 2.6vw, 44px); }
.way__points { margin: clamp(20px, 3vh, 30px) 0 clamp(26px, 4vh, 40px); padding: 0; list-style: none; display: grid; gap: 12px; }
.way__points li { position: relative; padding-left: 26px; font-size: clamp(14px, 1.05vw, 17px); line-height: 1.5; color: var(--c-text-2); }
.way__points li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: #e6f0ff; box-shadow: 0 0 10px 2px rgba(170, 205, 255, .6); }

.cta { padding-bottom: clamp(70px, 11vh, 130px); }
.cta__box {
  text-align: center; padding: clamp(48px, 8vh, 96px) clamp(22px, 4vw, 64px); border-radius: clamp(22px, 2vw, 32px);
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(4, 6, 10, .55), rgba(4, 6, 10, .9) 75%), url('/home/img/portals.webp') 50% 35% / cover no-repeat;
  border: 1px solid var(--c-line);
}
.cta__title { font-size: clamp(28px, 3.2vw, 54px); }
.cta__text { margin: 18px auto clamp(26px, 4vh, 40px); max-width: 40ch; font-size: clamp(15px, 1.15vw, 19px); line-height: 1.55; color: var(--c-text-2); }

.footer { border-top: 1px solid var(--c-line); }
.footer__inner { padding-block: 36px; display: flex; align-items: center; flex-wrap: wrap; gap: 20px 48px; }
.footer__logo { width: 110px; flex: none; }
.footer__logo img { width: 100%; height: auto; }
.footer__nav { display: flex; gap: 12px 32px; margin-left: auto; flex-wrap: wrap; }
.footer__nav a { font-size: 15px; color: var(--c-text-2); transition: color .3s; }
.footer__nav a:hover { color: #fff; }
.footer__copy { margin: 0; font-size: 14px; color: var(--c-text-3); }

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--c-line); }
  .way { grid-template-columns: 1fr; }
  .way--flip .way__media { order: 0; }
  .way__media { min-height: 0; aspect-ratio: 4 / 3; }
  .way__media--cpm img, .way__media--cpa img, .way__media--telegram img { -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
}
@media (max-width: 700px) {
  .stat__value { font-size: clamp(26px, 8vw, 34px); }
  .btn { width: 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__nav { margin-left: 0; }
}

@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.04); } }
@keyframes rise { from { opacity: 0; translate: 0 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; } }



/* ==========================================================================
   Неоморфизм — основной стиль плашек (владелец, 2026-10-15, выбор «7» из доски ChatGPT):
   плашка выдавлена из фона — мягкая тень снизу-справа и светлая подсветка сверху-слева, без стекла и прозрачности.
   ========================================================================== */
.card, .chip, .cta__box, .brand, .combine__card:not(.combine__card--glow), .qcard:not(.qcard--prime), .mcard, .ctable, .role, .calc, .calc__step, .point, .dir__card, .way {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .045);
  background: linear-gradient(145deg, #0f141c 0%, #0a0e15 55%, #070a10 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    14px 14px 32px rgba(0, 0, 0, .75),
    -10px -10px 26px rgba(74, 96, 130, .17),
    inset 0 1px 0 rgba(255, 255, 255, .055),
    inset 0 -1px 0 rgba(0, 0, 0, .5);
}
.card::before, .card::after, .chip::before, .chip::after, .cta__box::before, .cta__box::after, .brand::before, .brand::after, .combine__card:not(.combine__card--glow)::before, .combine__card:not(.combine__card--glow)::after, .qcard:not(.qcard--prime)::before, .qcard:not(.qcard--prime)::after, .mcard::before, .mcard::after, .ctable::before, .ctable::after, .role::before, .role::after, .calc::before, .calc::after, .calc__step::before, .calc__step::after, .point::before, .point::after, .dir__card::before, .dir__card::after, .way::before, .way::after { content: none; }

.chip { position: absolute; border-radius: 12px; }
.calc__step, .point { border-radius: 12px; }
.card__icon, .role .card__icon { border-radius: 12px;
  background: linear-gradient(145deg, #070a10, #0f141c);
  border: 1px solid rgba(255, 255, 255, .035);
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .65), inset -3px -3px 8px rgba(74, 96, 130, .16);
}
.combine__card--glow, .qcard--prime { border-radius: 16px; }
.step__num { border-radius: 50%; }
.way { overflow: hidden; }

.card:hover, .role:hover, a.dir__card:hover, .brand:hover, .way:hover {
  border-color: rgba(255, 255, 255, .07);
  box-shadow:
    18px 18px 40px rgba(0, 0, 0, .8),
    -12px -12px 30px rgba(74, 96, 130, .22),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 -1px 0 rgba(0, 0, 0, .5),
    0 0 50px rgba(120, 170, 255, .08);
}