/* Nunito Sans (SIL Open Font License), вариативный 400–900, лежит у нас, без Google Fonts */
@font-face {
  font-family: "Nunito Sans"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/nunito-sans-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito Sans"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/nunito-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #eaf2fd;
  --card: #fff;
  --text: #172033;
  --muted: #525c70;
  --blue: #1668e3;
  --blue-dark: #0f55c0;
  --field: #f1f6fd;
  --field-border: #d4e1f2;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
.wrap { max-width: 1288px; margin: 0 auto; padding: 0 24px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 800; font-size: 17px;
  padding: 15px 30px; border: 0; border-radius: 999px;
  background: var(--blue); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--sm { padding: 10px 20px; font-size: 15px; }
.btn--ghost { background: #e8eef7; color: var(--text); }
.btn--ghost:hover { background: #dbe4f1; }

/* Шапка */
.header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; }
.logo { font-weight: 900; font-size: 22px; color: var(--blue); text-decoration: none; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 4px; background: #fff; padding: 6px; border-radius: 999px; }
.nav > a:not(.btn) { padding: 10px 18px; font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 999px; }
.nav > a:not(.btn):hover { background: var(--bg); }

/* Первый экран */
.hero { display: grid; grid-template-columns: 1fr 400px; gap: 20px; }
.hero__main {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: var(--radius);
  min-height: 560px; padding: 56px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
}
.hero__blob { position: absolute; top: -70px; right: 40px; width: 300px; height: 280px; background: #cfe2ff; border-radius: 48% 52% 50% 50% / 50% 46% 54% 50%; }
.hero__sun { position: absolute; top: 120px; right: 230px; width: 96px; height: 96px; background: #ffd43b; border-radius: 50%; }
.hero__cube { position: absolute; top: 40px; right: 330px; width: 56px; height: 56px; background: #9fe6b8; border-radius: 14px; transform: rotate(-14deg); }
.chip { position: relative; display: inline-block; background: #e8eef7; font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { position: relative; font-size: 84px; line-height: 1; font-weight: 900; letter-spacing: -.02em; margin-bottom: 24px; }
.hero h1 span { color: var(--blue); }
.hero__main > p { position: relative; font-size: 20px; color: var(--muted); max-width: 620px; margin-bottom: 32px; }
.hero__actions { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }

.hero__dates { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.date { border-radius: var(--radius); padding: 28px 32px; display: flex; flex-direction: column; justify-content: space-between; }
.date__label { font-weight: 800; font-size: 15px; }
.date__value { font-weight: 900; font-size: 52px; line-height: 1.02; }
.date__note { font-size: 15px; }
.date--blue { background: var(--blue); color: #fff; }
.date--blue .date__note { color: #dbe8ff; }
.date--green { background: #a8ecc0; color: #0f4d2a; }

/* Секции */
.section { margin-top: 72px; }
.section h2, .apply h2 { font-size: 40px; font-weight: 900; letter-spacing: -.01em; margin-bottom: 20px; }
.lead { color: var(--muted); font-size: 17px; margin: -8px 0 20px; }
.grid { display: grid; gap: 16px; }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.dir { border-radius: 22px; padding: 24px; min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.dir__num { font-weight: 900; font-size: 15px; }
.dir h3 { font-size: 20px; font-weight: 900; line-height: 1.2; margin-bottom: 8px; }
.dir p { font-size: 15px; color: #3d4659; }
.dir--1 { background: #cde1ff; } .dir--1 .dir__num { color: #1668e3; }
.dir--2 { background: #ffd4bb; } .dir--2 .dir__num { color: #d0420a; }
.dir--3 { background: #ffec99; } .dir--3 .dir__num { color: #9a6700; }
.dir--4 { background: #b4efc8; } .dir--4 .dir__num { color: #13803e; }
.dir--5 { background: #dfd4ff; } .dir--5 .dir__num { color: #6a3fe0; }

.prize { background: var(--card); border-radius: 22px; padding: 28px; min-height: 230px; }
.prize svg { width: 30px; height: 30px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.prize h3 { font-size: 22px; font-weight: 900; line-height: 1.2; margin-bottom: 10px; }
.prize p { font-size: 15px; color: var(--muted); }
.prize--dark { background: #1b2234; color: #fff; }
.prize--dark svg { stroke: #ffd43b; }
.prize--dark p { color: #c9d0de; }

.rule { background: var(--card); border-radius: 22px; padding: 26px; min-height: 170px; }
.rule strong { display: block; font-size: 34px; font-weight: 900; color: var(--blue); line-height: 1.1; margin-bottom: 14px; }
.rule p { font-size: 15px; color: var(--muted); }

.warn {
  margin-top: 20px; background: #ffe680; border-radius: 18px; padding: 20px 26px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 16px;
}
.warn a { font-weight: 800; white-space: nowrap; }

/* Форма */
.apply { margin-top: 56px; background: var(--card); border-radius: 30px; padding: 56px; }
.apply--page { margin-top: 24px; }
.apply h2 { margin-bottom: 12px; }
.apply .lead { margin: 0 0 32px; }
.form__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-weight: 800; font-size: 14px; }
.field input:not([type=checkbox]), .field select {
  font: inherit; font-size: 16px; width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--field-border); border-radius: 12px; background: var(--field); color: var(--text);
}
.field select { font-weight: 700; }
.field textarea {
  font: inherit; font-size: 16px; width: 100%; padding: 12px 16px; resize: vertical; min-height: 110px;
  border: 1px solid var(--field-border); border-radius: 12px; background: var(--field); color: var(--text);
}
.field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; background: #fff; }
.field.is-invalid textarea { border-color: #e5484d; background: #fff5f5; }
.field small, .form__legend small { font-weight: 600; color: var(--muted); font-size: 13px; }
.field--wide { grid-column: span 2; }
.form__legend { font-weight: 900; font-size: 19px; margin: 28px 0 14px; }
.form__legend:first-child { margin-top: 0; }
.checks { margin: 24px 0; display: grid; gap: 12px; }
.checks .consent { margin: 0; }
.js-coauthor-only.is-hidden { display: none; }
.consent-text { margin: -4px 0 0 30px; font-size: 14px; color: var(--muted); }
.consent-text summary { cursor: pointer; font-weight: 700; color: var(--blue); width: fit-content; }
.consent-text p { margin-top: 8px; max-width: 760px; }
.consent-text a { color: var(--blue); }.rule__link { display: inline-block; margin-top: 12px; font-weight: 800; font-size: 15px; color: var(--blue); }
.dir h3 a { color: inherit; }
.field input:focus, .field select:focus { outline: 2px solid var(--blue); outline-offset: 1px; background: #fff; }
.field em { font-style: normal; font-size: 13px; color: #c2261b; min-height: 0; }
.field.is-invalid input, .field.is-invalid select { border-color: #e5484d; background: #fff5f5; }
.consent { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 20px 0 24px; font-size: 15px; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.consent > span { flex: 1; min-width: 0; font-weight: 400; font-size: 15px; }
.consent em { flex-basis: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__error { color: #c2261b; font-weight: 700; margin-bottom: 12px; }
.form__error:empty { display: none; }
.done h3 { font-size: 26px; font-weight: 900; margin-bottom: 8px; }
.done p { color: var(--muted); }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 40px 0 48px; font-size: 15px; color: var(--muted); }
.footer a { color: var(--blue); font-weight: 800; }

/* Адаптив */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero__dates { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .date { min-height: 200px; }
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .form__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header { padding: 16px 0; }
  .logo { font-size: 18px; }
  .nav { padding: 4px; }
  .nav > a:not(.btn) { display: none; }
  .hero__main { min-height: 0; padding: 150px 24px 28px; }
  .hero__blob { width: 200px; height: 190px; top: -60px; right: -20px; }
  .hero__sun { width: 64px; height: 64px; top: 70px; right: 150px; }
  .hero__cube { width: 40px; height: 40px; top: 30px; right: 220px; }
  /* ширина слова «НейроНаука» ≈ 6,2 × кегль; доступно 100vw − 80px (поля страницы и карточки) */
  .hero h1 { font-size: min(52px, calc((100vw - 80px) / 6.4)); }
  .hero__main > p { font-size: 17px; }
  .hero__dates { gap: 12px; }
  .date { padding: 20px; min-height: 170px; }
  .date__value { font-size: 36px; }
  .section { margin-top: 48px; }
  .section h2, .apply h2 { font-size: 30px; }
  .grid--5, .grid--4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dir { min-height: 200px; padding: 18px; }
  .dir h3 { font-size: 17px; }
  .dir p, .prize p, .rule p { font-size: 14px; }
  .prize { min-height: 0; padding: 22px; }
  .prize--dark { grid-column: 1 / -1; }
  .rule { min-height: 0; padding: 20px; }
  .rule strong { font-size: 26px; }
  .warn { flex-direction: column; align-items: flex-start; padding: 18px 20px; font-size: 15px; }
  .apply { padding: 28px 20px; border-radius: 24px; margin-top: 40px; }
  .form__grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .btn { width: 100%; }
  .nav .btn, .hero__actions .btn { width: auto; }
}
