:root {
  --bg: #06080f;
  --bg-2: #0b1120;
  --panel: #0e1524;
  --line: rgba(255,255,255,0.09);
  --line-2: rgba(255,255,255,0.18);
  --text: #eaf0fb;
  --muted: #a3adbf;
  --dim: #6b7489;
  --accent: #22d3ee;
  --accent-2: #34d399;
  --red: #ff3b3b;
  --red-soft: #ff5b5b;
  --blue: #4aa7ff;
  --radius: 2px;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(34,211,238,0.07), transparent 60%),
    radial-gradient(700px 400px at 0% 20%, rgba(255,59,59,0.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(6,8,15,0.82);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid rgba(34,211,238,0.4);
  padding: 4px 8px;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__line {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__sub {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav__links {
  display: none;
  gap: 28px;
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.nav__links a { transition: color .15s; padding: 6px 0; }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
  user-select: none;
  min-height: 44px;
  white-space: nowrap;
}
.btn--sm { padding: 9px 14px; font-size: 12.5px; min-height: 36px; }
.btn--lg { padding: 16px 28px; font-size: 15px; min-height: 52px; width: 100%; }
.btn--primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--red-soft);
  border-color: var(--red-soft);
}
.btn--primary:disabled {
  background: #4a2226;
  border-color: #4a2226;
  cursor: not-allowed;
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* badges / dots / tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(52,211,153,0.38);
  background: rgba(52,211,153,0.08);
  color: #b2f2d1;
  font-size: 11.5px;
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent-2); flex-shrink: 0; }

.tag { font-weight: 600; }
.tag--red { color: #ff9b9b; }
.tag--blue { color: #8ecaff; }
.accent { color: var(--accent); }
.accent--red { color: var(--red-soft); }

/* hero */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 75%);
  pointer-events: none;
}
.hero__glow { display: none; }

.hero__inner { position: relative; }

.hero__title { margin: 16px 0 0; }
.hero__kicker {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.hero__headline {
  display: block;
  margin-top: 14px;
  font-weight: 800;
  font-size: clamp(40px, 11vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.hero__headline .accent { color: var(--accent); font-weight: 300; }

.hero__lead {
  max-width: 620px;
  margin-top: 24px;
  color: #cfd6e4;
  font-size: 16px;
  line-height: 1.65;
}

.hero__cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__cta .btn { flex: 1 1 auto; min-width: 160px; }

.hero__meta {
  margin: 40px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.hero__meta dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--dim);
  text-transform: uppercase;
  margin: 0;
}
.hero__meta dd { margin: 4px 0 0; font-size: 15px; color: var(--text); }

/* teams */
.teams {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}
.team {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}
.team__bg {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  height: 160px;
  opacity: 0.07;
  pointer-events: none;
}
.team--red { border-left: 3px solid var(--red); }
.team--blue { border-left: 3px solid var(--blue); }
.team__body { position: relative; max-width: 420px; }
.team__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  margin: 0 0 10px;
}
.team--red .team__label { color: #ff9b9b; }
.team--blue .team__label { color: #8ecaff; }
.team__title { margin: 0 0 10px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.team__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* sections */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section__head { max-width: 780px; margin: 0 0 36px; }
.section__kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 14px;
}
.section__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 6vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section__lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 620px;
}

/* cards grid */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--line-2); }
.card--dashed { border-style: dashed; background: transparent; }
.card__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.card__text { margin: 0; font-size: 15.5px; color: var(--text); line-height: 1.6; }
.card__sub { margin: 12px 0 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* tracks / program */
.tracks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.track {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}
.track--red { border-top: 2px solid var(--red); }
.track--blue { border-top: 2px solid var(--blue); }
.track__head { margin-bottom: 20px; }
.track__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin: 0 0 10px;
}
.track__title { margin: 0 0 8px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.track__meta { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--dim); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.timeline__time {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.timeline b { display: block; font-size: 15px; font-weight: 600; }
.timeline p { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

/* stages */
.stages { list-style: none; margin: 0; padding: 0; }
.stages li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.stages li:last-child { border-bottom: 1px solid var(--line); }
.stages__num {
  font-family: var(--mono);
  font-size: 32px;
  color: var(--accent);
  line-height: 1;
  font-weight: 300;
}
.stages__date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 6px;
  letter-spacing: 0.05em;
}
.stages b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.stages p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* experts */
.experts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.expert {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 20px;
  transition: border-color .15s;
}
.expert__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 0 14px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.expert:hover { border-color: var(--line-2); }
.expert h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.expert__role { margin: 0; font-size: 14px; color: var(--muted); }
.expert__org {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* form */
.form {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
  width: 100%;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}
.field input {
  padding: 14px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  font-family: var(--sans);
  transition: border-color .15s, background-color .15s;
  border-radius: var(--radius);
  min-width: 0;
  width: 100%;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #0a1424;
}
.field input[aria-invalid="true"] { border-color: var(--red); }
.field__error {
  min-height: 16px;
  font-size: 12px;
  color: var(--red-soft);
  font-family: var(--mono);
}
.form__hint {
  margin: 16px 0 20px;
  color: var(--dim);
  font-size: 12.5px;
  font-family: var(--mono);
  line-height: 1.6;
}

/* согласие: галочка рядом с текстом, оформлено панелью (раскладка классом — CSP режет inline) */
.field--consent {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 22px 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.field--consent .consent__text {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
}
/* чекбокс согласия — не растягивается как текстовое поле */
.field--consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.part__title { margin-top: 18px; }

/* приём заявок закрыт */
.reg-closed {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 32px 24px;
  text-align: center;
}
.reg-closed__title { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.reg-closed__text { margin: 0; color: var(--muted); font-size: 14px; }
.reg-deadline {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 13px;
}

/* скрытый file input — выбор по кнопке */
.hidden-file-input { display: none; }
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.file-chip {
  font-size: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
  word-break: break-all;
}

/* блок скачивания отборочных заданий */
.tasks-dl {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 20px;
}
.tasks-dl:empty { display: none; }
.tasks-dl__label { color: var(--muted); font-size: 14px; }

/* подчёркнутая ссылка на текст согласия */
.consent-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.consent-link:hover { color: var(--text); }

/* модалка с текстом согласия */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(2px);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 24px 24px 20px;
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--text); }
.modal__title {
  margin: 0 0 12px;
  padding-right: 28px;
  font-size: 16px;
  color: var(--text);
}
.modal__body {
  overflow-y: auto;
  padding-right: 6px;
}
.modal__body p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.btn--primary.is-loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}
.btn--primary.is-loading::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* partners */
.partners {
  padding: 56px var(--pad);
  margin-top: 32px;
  border-top: 1px solid var(--line);
}
.partners__title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin: 0 0 24px;
}
.partners__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.partner {
  height: 90px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
}
.partner img { max-height: 50px; max-width: 85%; object-fit: contain; opacity: .85; }
.partner--light { background: #e6e7ec; }
.partner--light img { opacity: 1; }

/* гранты / при поддержке — полоса вверху страницы */
.grants {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.grants__title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 16px;
  text-align: center;
}
.grants__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 44px;
  align-items: center;
  justify-content: center;
}
.grant { display: flex; align-items: center; gap: 20px; max-width: 100%; }
.grant__logo {
  max-height: 88px;
  max-width: 440px;
  width: auto;
  object-fit: contain;
}
/* светлая подложка — для тёмных логотипов; без неё фон прозрачный (для светлых лого) */
.grant--light .grant__logo {
  background: #fff;
  border-radius: 8px;
  padding: 18px 24px;
}
.grant__text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 380px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; background: var(--bg-2); }
.footer__inner { display: flex; flex-direction: column; gap: 8px; color: var(--dim); font-size: 13px; line-height: 1.6; }
.footer p { margin: 0; }

/* toast */
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  padding: 14px 16px;
  background: #0a1f15;
  border: 1px solid var(--accent-2);
  color: #c7f5de;
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.is-error { background: #1f0a0d; border-color: var(--red); color: #ffcccc; }
.toast__title { font-weight: 600; margin-bottom: 4px; }
.toast__body { color: #9bb3a7; font-size: 13px; line-height: 1.5; }
.toast.is-error .toast__body { color: #d7a3a3; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ≥ 560px */
@media (min-width: 560px) {
  :root { --pad: 28px; }
  .hero__meta { grid-template-columns: repeat(3, 1fr); }
  .partners__grid { grid-template-columns: repeat(3, 1fr); }
  .btn--lg { width: auto; }
  .form__row { grid-template-columns: repeat(2, 1fr); }
  .form__row .field:nth-child(3) { grid-column: 1 / -1; }
  .timeline li { grid-template-columns: 110px 1fr; gap: 14px; }
  .stages li { grid-template-columns: 80px 1fr; gap: 20px; padding: 28px 0; }
  .stages__num { font-size: 44px; }
  .experts { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .teams { grid-template-columns: repeat(2, 1fr); }
  .toast { left: auto; right: 24px; bottom: 24px; min-width: 280px; max-width: 360px; }
}

/* ≥ 860px */
@media (min-width: 860px) {
  body { font-size: 17px; }
  .hero { padding: 96px 0 72px; }
  .section { padding: 96px 0; }
  .nav__links { display: flex; }
  .tracks { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .experts { grid-template-columns: repeat(3, 1fr); }
  .partners__grid { grid-template-columns: repeat(5, 1fr); }
  .form { padding: 32px; }
  .form__row { grid-template-columns: repeat(2, 1fr); }
  .team__bg { height: 200px; opacity: 0.1; right: -40px; }
}
