/* ИТ-компетенции — федеральный проект по обучению школьников ИИ
   Макет: Figma «ИТ-компетенции», десктоп 1200, контент 932 */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: #000;
  background: #e4f7fe;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
p, h1, h2, h3, ul { margin: 0; }

/* висячие слова: заголовки выравниваем, абзацам не даём оставить одно слово */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* обрезка по капительной высоте, как в Figma (text-box-trim) */
.trim { text-box: trim-both cap alphabetic; }

.container {
  position: relative;
  width: 100%;
  max-width: 972px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { position: relative; }

/* ---------- общие элементы ---------- */

.sec-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin: 0 auto;
}

.sec-head__icon { width: 120px; height: 90px; object-fit: cover; }

.sec-head__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.lead {
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #1e1e1e;
}

.red { color: #f8151d; }

.bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullets li {
  position: relative;
  padding-left: 15.6px;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-box: trim-both cap alphabetic;
}

/* светящаяся точка: svg 16.6 со свечением, сама точка 8.6 */
.bullets li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: .36em; /* центр первой строки, а не всего пункта */
  width: 16.64px;
  height: 16.64px;
  margin-top: -8.32px;
  background: url(img/bullet.svg) no-repeat center / contain;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 324px;
  max-width: 100%;
  height: 60px;
  padding: 10px 20px;
  border: 1px solid #fff;
  border-radius: 60px;
  background: linear-gradient(169.69deg, #fa2b3b 15.18%, #ad040b 84.12%);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(214, 4, 5, .55);
  filter: brightness(1.06);
}

.btn-cta:active { transform: translateY(0); }

.btn-cta__arrow {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

/* стрелка в макете отражена по горизонтали */
.btn-cta__arrow img { width: 15px; height: 14px; transform: scaleX(-1); }

/* ---------- 01 hero ---------- */

.hero {
  min-height: 696px;
  background: #e8e5de;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__bg img {
  position: absolute;
  left: 0;
  top: -9.5%;
  width: 112.32%;
  height: 109.5%;
  object-fit: cover;
  object-position: left bottom;
  max-width: none;
}

.hero .container { padding-top: 30px; padding-bottom: 96px; }

.hero__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 60px;
  width: 651px;
  max-width: 100%;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 361px;
  max-width: 100%;
  padding: 6px 60px 6px 20px;
  background: rgba(155, 159, 206, .2);
  border: 1px solid #9a46fa;
  border-radius: 20px;
}

.badge__icon { width: 55px; height: 56px; padding: 4px; flex-shrink: 0; }
.badge__icon img { width: 47px; height: 47px; }

.badge__text { font-size: 14px; line-height: 1.2; }
.badge__text b { display: block; font-size: 18px; font-weight: 700; color: #f8151d; }

.hero__main { display: flex; flex-direction: column; gap: 60px; }

.hero__decree { display: flex; align-items: center; gap: 14px; }

.flag {
  width: 40px;
  height: 30px;
  border-radius: 2px;
  flex-shrink: 0;
  background: linear-gradient(#fff 0 33.33%, #0952ca 33.33% 66.66%, #f8151d 66.66%);
}

.hero__decree p {
  width: 323px;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero__offer { display: flex; flex-direction: column; gap: 30px; }

.hero__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: wrap;
}

.grad {
  background: linear-gradient(90deg, #9a46fa, #09c4de);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__gets {
  width: 360px;
  max-width: 100%;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #f8151d;
}

.hero .bullets { margin-top: -20px; } /* между подзаголовком и списком 10px, а не 30 */

.hero__kids {
  position: absolute;
  right: 20px;
  top: 206px;
  width: 303px;
  height: 303px;
}

/* ---------- 02 регистрация ---------- */

.reg { padding: 40px 0; overflow: hidden; }

.reg .sec-head { max-width: 528px; }

.form-register {
  width: 485px;
  max-width: 100%;
  min-height: 223px;
  margin: 20px auto 0;
  background: #fff;
  border: 1px solid #59cef8;
  border-radius: 20px;
}

.sphere { position: absolute; pointer-events: none; }
.sphere--r { right: -87px; top: 287px; width: 174px; height: 170px; }
.sphere--l { left: -51px; top: 116px; width: 101px; height: 99px; }

/* ---------- 03 организатор ---------- */

.about { padding: 40px 0; background: #eaf7fd; overflow: hidden; }

.about__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transform: scaleX(-1);
}

.about__bg img {
  position: absolute;
  left: -11.06%;
  top: -71.85%;
  width: 254.42%;
  height: 181.22%;
  object-fit: cover;
  max-width: none;
}

.about .sec-head { max-width: 484px; }
.about .lead { padding-bottom: 18px; } /* в макете после подзаголовка пустая строка */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 10px;
  margin-top: 20px;
}

.card-rating {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 245px;
  padding: 16px 16px 0;
  background: #fff;
  border-radius: 12.7px;
}

.card-rating h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #131313;
}

.card-rating__img {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 6.4px 6.4px 0 0;
}

.card-rating__img img {
  position: absolute;
  left: -3.83%;
  top: -2.99%;
  width: 107.66%;
  height: 114.09%;
  max-width: none;
}

.facts { display: flex; flex-direction: column; gap: 9px; }

.fact {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
}

.fact__icon {
  position: relative;
  width: 63.4px;
  height: 63.4px;
  flex-shrink: 0;
}

.fact__star { position: absolute; inset: 4.49% 6.34%; width: auto; height: auto; }

.fact__pic { position: absolute; object-fit: cover; }
.fact__pic--grad { left: 10.95px; top: 17.25px; width: 41px; height: 28px; }
.fact__pic--money { left: 15px; top: 16.25px; width: 34px; height: 29px; }

.fact p {
  flex: 1;
  font-size: 17.66px;
  font-weight: 700;
  line-height: 1.1;
  color: #262626;
}

.fact p b { font-weight: 700; color: #683adb; }

.card-dark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-height: 391px;
  padding: 16px;
  background: #2f308f;
  border-radius: 16px;
}

.card-dark h3 {
  width: 244px;
  font-size: 17.66px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.card-dark__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-dark__head img { width: 74px; height: 53px; object-fit: contain; border-radius: 8px; }

.unis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  flex: 1;
}

.uni {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  background: #fff;
  border: .8px solid #ececec;
  border-radius: 8px;
}

.uni img { position: absolute; max-width: none; }
.uni--innopolis img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.uni--ranepa img { left: 5.75%; top: 29.09%; width: 88.5%; height: 41.82%; }
.uni--mfti img { left: 8.5%; top: 33.51%; width: 83.01%; height: 32.99%; }
.uni--hse img { left: 24.31%; top: 15.97%; width: 51.37%; height: 68.05%; object-fit: contain; }

.licenses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.licenses img {
  width: 100%;
  aspect-ratio: 1190 / 1686;
  object-fit: cover;
  border: .8px solid #ececec;
  border-radius: 8px;
}

/* ---------- 04 рейтинг регионов ---------- */

.rang { padding: 40px 0; }

.rang .sec-head,
.news .sec-head { max-width: 682px; }

.rang__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding: 22px 20px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
}

.rang__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: 10px;
  background: #e5f1fd;
}

.rang__row:nth-child(even) { background: #ebe5fd; }

.rang__region { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }

.rang__pos {
  min-width: 19px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #9a46fa;
}

.rang__name,
.rang__count {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.rang__count { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.rang__count span { font-weight: 400; color: #9c9c9c; }

/* поочерёдное появление строк: включается только при работающем JS */
.js-anim .rang__row {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1);
}

.js-anim .rang__row.is-in { opacity: 1; transform: none; }

/* ---------- 05 новости ---------- */

.news { padding: 40px 0; }

.news__card {
  margin-top: 20px;
  padding: 22px 12px 22px 20px; /* справа поуже: в макете строки занимают 900 из 932 */
  background: #fff;
  border-radius: 20px;
}

.news__list {
  padding-left: 24px;
  color: #9a46fa;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.news__list a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .2s ease;
}

.news__list a:hover { color: #6a16c9; }

/* ---------- 06 CTA ---------- */

.cta { padding: 60px 0; }

.cta__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 90px;
  padding: 30px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #59cef8;
  border-radius: 20px;
}

.cta__bg {
  position: absolute;
  left: -15px;
  top: -105px;
  width: 960px;
  height: 539px;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.cta__laptop {
  position: absolute;
  left: 471px;
  top: 29px;
  width: 413px;
  height: 275px;
  object-fit: cover;
}

.cta__text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 399px;
  max-width: 100%;
}

.cta .bullets li { font-weight: 500; }
.cta .btn-cta { position: relative; }

/* ================= адаптив ================= */

@media (max-width: 1000px) {
  .hero__kids { width: 250px; height: 250px; top: 240px; }
  .hero__left { width: calc(100% - 270px); }
  .hero__title { font-size: 30px; }
  .hero__title br { display: none; }

  .cta__bg { width: 100%; height: 100%; left: 0; top: 0; }
  .cta__laptop { left: auto; right: 10px; top: 50%; transform: translateY(-50%); width: 46%; height: auto; }
}

@media (max-width: 860px) {
  .h2 { font-size: 30px; }

  /* hero в одну колонку: фото ребят между оффером и кнопкой */
  .hero { min-height: 0; }
  .hero .container { padding-bottom: 48px; }
  .hero__left { width: 100%; gap: 36px; }
  .hero__main { gap: 36px; }
  .hero__kids {
    position: static;
    order: 3;
    width: 260px;
    height: 260px;
    margin: -8px auto -8px;
  }
  .hero__left .btn-cta { order: 4; }
  .hero__bg img { width: 100%; height: 100%; top: 0; }

  .about__grid { grid-template-columns: 1fr; }
  .card-rating { height: auto; }
  .card-rating__img { flex: none; aspect-ratio: 429 / 198; }
  .fact { min-height: 117px; }
  .card-dark { min-height: 0; }
  .uni { min-height: 0; aspect-ratio: 206 / 154; }

  .cta__card { gap: 24px; padding: 24px; }
  .cta__laptop {
    position: relative;
    order: 2;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 413px;
    height: auto;
    align-self: center;
  }
  .cta .btn-cta { order: 3; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .h2, .hero__title { font-size: 25px; }
  .sec-head__icon { width: 96px; height: 72px; }

  .badge { width: 100%; padding-right: 20px; }
  .hero__decree p { width: auto; }
  .hero__kids { width: 220px; height: 220px; }
  .btn-cta { width: 100%; }

  .sphere--r { width: 110px; height: 107px; right: -60px; top: auto; bottom: 20px; }
  .sphere--l { width: 70px; height: 69px; left: -38px; top: 40px; }

  .fact { padding: 14px; gap: 12px; }
  .fact p { font-size: 16px; }
  .card-dark h3 { width: auto; font-size: 16px; }
  .unis, .licenses { gap: 10px; }

  .rang__list { padding: 12px 10px; gap: 6px; }
  .rang__row { padding: 14px 12px; gap: 10px; }
  .rang__pos { font-size: 17px; min-width: 16px; }
  .rang__region { gap: 8px; }
  .rang__name, .rang__count { font-size: 14px; }
  .rang__count { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  .rang__count span { font-size: 13px; }

  .news__card { padding: 18px 16px; }
  .news__list { padding-left: 20px; font-size: 15px; line-height: 1.5; }
  .news__list li + li { margin-top: 8px; }

  .cta { padding: 40px 0; }
  .cta__card { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .rang__row { opacity: 1; transform: none; transition: none; }
}

.nw { white-space: nowrap; }

/* ---------- подвал: пакет zerocoder-footer (как на vibe-lab), только логотип и юр. информация ---------- */

.footer {
  background: #121212;
  color: rgba(255, 255, 255, .7);
  padding: 64px 0;
  font-size: 15px;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.footer__logo { display: inline-flex; align-items: center; text-decoration: none; }
.footer__logo img { height: 36px; width: auto; max-width: 220px; }

.footer__col h4 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .45);
}

.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

.footer__col a {
  color: #fff;
  text-decoration: none;
  transition: color .2s cubic-bezier(.22, 1, .36, 1);
}

.footer__col a:hover { color: #c9a4ff; } /* наш фиолетовый #9a46fa, осветлённый под тёмный фон */

@media (max-width: 639px) {
  .footer { padding: 48px 0; }
  .footer__top { flex-direction: column; gap: 32px; }
}

/* ---------- закреплённая кнопка внизу экрана, только мобилка (как на vibe-lab) ---------- */

.mcta { display: none; }

@media (max-width: 639px) {
  .mcta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(89, 206, 248, .45);
  }

  /* кнопка на экране всегда, на всех блоках */
  .mcta .btn-cta { width: 100%; max-width: none; }

  /* место под кнопку — внутри тёмного подвала, иначе под ним вылезет светлая полоса */
  .footer { padding-bottom: calc(48px + 80px + env(safe-area-inset-bottom)); }
}

/* ---------- R3 (25.09) ---------- */

/* иконка «Новости»: кадрирование как в макете (1:169) — картинка вписана по высоте, по бокам срез 3.4%, а не cover */
.sec-head__icon--news { position: relative; overflow: hidden; }

.sec-head__icon--news img {
  position: absolute;
  left: -3.4%;
  top: -3.77%;
  width: 103.46%;
  height: 91.96%;
  max-width: none;
}

/* мобилка: у «Организатора» без картинки-фона, только заливка, как у остальных экранов кроме hero */
@media (max-width: 639px) {
  .about { background: #e4f7fe; }
  .about__bg { display: none; }
}

/* мигающие голубые точки в списках hero и CTA, поочерёдно */
@keyframes bullet-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .2; transform: scale(.6); }
}

.hero .bullets li::before,
.cta .bullets li::before { animation: bullet-blink 1.6s ease-in-out infinite; }

.hero .bullets li:nth-child(2)::before,
.cta .bullets li:nth-child(2)::before { animation-delay: .35s; }

.hero .bullets li:nth-child(3)::before { animation-delay: .7s; }

@media (prefers-reduced-motion: reduce) {
  .hero .bullets li::before,
  .cta .bullets li::before { animation: none; }
}

/* ---------- R4 (25.09) ---------- */

/* десктоп: первый экран во всю высоту окна, чтобы регистрация не выглядывала снизу.
   --z — масштаб страницы из скрипта в <head>: под zoom высота окна в CSS-пикселях равна 100svh / z */
@media (min-width: 861px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: max(696px, calc(100svh / var(--z, 1)));
  }

  .hero .container { padding-top: 40px; padding-bottom: 40px; }
}
