/* NCRDO landing. Mobile-first, system fonts, no external dependencies. */

:root {
  --ink: #000a3e;
  --ink-soft: #4b5170;
  --bg: #f1f6f9;
  --card: #ffffff;
  --accent: #d4ff16;
  --accent-hover: #c0e61a;
  --violet: #6c3cf0;
  --blue: #2f5bff;
  --line: #dbe3ec;
  --danger: #c62828;
  --radius: 10px;
  --radius-lg: 20px;
  --shadow: 0 6px 24px rgba(0, 10, 62, 0.08);
  --gradient: linear-gradient(120deg, #4b2bd6 0%, #6c3cf0 45%, #2f5bff 100%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.2; }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: var(--radius); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: var(--radius);
  font-weight: 700; font-size: 16px; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:disabled { opacity: .7; cursor: progress; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn--big { min-height: 56px; padding: 16px 32px; font-size: 18px; }
.btn--wide { width: 100%; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo img { width: 48px; height: auto; }
.site-nav { display: none; }
.site-header__phone { margin-left: auto; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 14px; }
.site-header__inner > .btn:only-of-type { margin-left: auto; }

/* ---------- hero ---------- */

.hero {
  background: #ece8fb url("/assets/img/hero-bg.webp") center / cover no-repeat;
  color: var(--ink);
  padding: 32px 0 0;
  overflow: hidden;
}
.hero__inner { display: grid; gap: 16px; }
.hero h1 { font-size: 30px; font-weight: 800; }
.hero__lead { font-size: 17px; color: var(--ink-soft); }
.hero__price { font-size: 17px; }
.hero__price strong { color: var(--violet); }
.hero__img { justify-self: center; width: 100%; max-width: 380px; }

.timer { margin: 16px 0 20px; }
.timer__label { font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; }
.timer__digits { display: flex; align-items: flex-start; gap: 6px; }
.timer__digits span { display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: 8px 6px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.timer__digits b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.timer__digits small { font-size: 11px; color: var(--ink-soft); }
.timer__digits i { font-style: normal; font-weight: 700; font-size: 24px; padding-top: 8px; }

/* ---------- benefits ---------- */

.benefits { padding: 24px 0; }
.benefits__list { list-style: none; display: grid; gap: 12px; }
.benefit { background: var(--card); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.benefit img { width: 40px; height: 40px; margin-bottom: 12px; }
.benefit h3 { font-size: 18px; margin-bottom: 6px; }
.benefit p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- sections ---------- */

section { padding: 40px 0; }
.section-title { font-size: 26px; font-weight: 800; }
.section-lead { color: var(--ink-soft); margin-bottom: 20px; }
.note { font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

/* ---------- program cards ---------- */

.programs__grid { display: grid; gap: 16px; }
.program {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow);
}
.program__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
/* Rows must align: tags wrap on narrow cards (head reserves two lines in the 2-column range), one line from 960px. */
.program__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.program__tags li { font-size: 11px; padding: 4px 7px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.program__badge { margin: 0; flex: none; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent); }
.program__img { width: 96px; height: 96px; margin-bottom: 12px; }
.program__title { font-size: 20px; }
.program__desc { font-size: 14px; color: var(--ink-soft); flex: 1; }
.program__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.program__actions .btn { padding-left: 8px; padding-right: 8px; }

.price { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--bg); }
.price__col { display: flex; flex-direction: column; }
.price__label { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.price__new { font-size: 18px; font-weight: 800; margin: 0; }
.price__usd { font-size: 14px; font-weight: 600; color: var(--violet); margin: 0 0 2px; }
.price__old { font-size: 13px; color: var(--ink-soft); }

/* ---------- lead forms ---------- */

.form-banner { padding: 40px 0; }
.form-banner .lead-form {
  color: #fff; padding: 28px 20px; border-radius: var(--radius-lg);
  background: var(--gradient);
}
/* Narrow screens: plain gradient, the decorative photo would sit under the white consent text.
   From 960px the art is pinned to the bottom and the text keeps clear of it. */
@media (min-width: 960px) {
  .form-banner--cards .lead-form,
  .form-banner--questions .lead-form {
    background-size: cover; background-position: 15% bottom, center;
    background-repeat: no-repeat;
  }
  .form-banner--cards .lead-form { background-image: url("/assets/img/form-bg-1.webp"), var(--gradient); }
  .form-banner--questions .lead-form { background-image: url("/assets/img/form-bg-2.webp"), var(--gradient); }
}
.lead-form__title { font-size: 24px; font-weight: 800; }
.lead-form__subtitle { opacity: .95; }
.lead-form__program { font-weight: 700; padding: 8px 12px; border-radius: var(--radius); background: var(--bg); }
.lead-form__fields { display: grid; gap: 10px; margin-top: 16px; }
.field input {
  width: 100%; height: 55px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); font: inherit; font-size: 16px;
}
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(198, 40, 40, .25); }
.lead-form__fields .btn { height: 55px; }
.lead-form__consents { display: grid; gap: 8px; margin-top: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.form-banner .check a { color: inherit; }
.lead-form__error {
  margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius);
  background: #fff1f1; color: var(--danger); font-weight: 600; font-size: 14px;
}
.lead-form__success { padding: 16px 0 4px; }
.lead-form__success-title { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.form-banner .lead-form__success-title { color: var(--accent); }

/* ---------- diploma ---------- */

.diploma__inner { display: grid; gap: 24px; align-items: center; }
.diploma__text p { color: var(--ink-soft); }
.diploma__img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- sliders ---------- */

.slider-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.slider-nav { display: none; gap: 8px; flex: none; }
.slider-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; }
.slider-btn:hover { background: var(--ink); color: #fff; }
.slider {
  list-style: none; display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin;
}
.slider > li { scroll-snap-align: start; flex: 0 0 85%; }

.review { background: var(--card); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.review__author { font-weight: 800; margin-bottom: 4px; }
.review__program { font-size: 14px; color: var(--violet); font-weight: 600; margin-bottom: 4px; }
.review__date { font-size: 13px; color: var(--ink-soft); }
.review__text { font-size: 15px; margin: 0; }

.slider--teachers > li { flex-basis: 70%; }
.teacher img { border-radius: var(--radius-lg); background: #fff; }

/* ---------- video reviews ---------- */

.video-reviews__grid { display: grid; gap: 24px; align-items: start; }
.video { margin: 0; }
.video__frame { position: relative; width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: #000; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--wide .video__frame { aspect-ratio: 16 / 9; }
.video--vertical .video__frame { aspect-ratio: 9 / 16; max-width: 360px; }
.video figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }

/* ---------- graduates ---------- */

.graduates__list { list-style: none; display: grid; gap: 12px; }
.graduates__list img { width: 100%; border-radius: var(--radius-lg); }

/* ---------- numbers ---------- */

.numbers .section-title span { color: var(--violet); }
.ratings { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.rating { background: var(--card); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.rating img { height: 24px; width: auto; margin-bottom: 8px; }
.rating p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.rating strong { font-size: 24px; color: var(--ink); margin-right: 4px; }
.figures { list-style: none; display: grid; gap: 12px; }
.figure { background: var(--card); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.figure strong { display: block; font-size: 36px; font-weight: 800; color: var(--violet); line-height: 1.1; margin-bottom: 6px; }
.figure p { margin: 0; color: var(--ink-soft); }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: #c9cde0; padding: 32px 0; font-size: 14px; }
.site-footer a { color: #fff; }
.site-footer__requisites { color: #fff; }

/* ---------- cookie banner ---------- */

.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30;
  max-width: 560px; margin: 0 auto; padding: 16px;
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0, 10, 62, .25);
  font-size: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- modals ---------- */

.modal {
  width: min(720px, calc(100% - 16px)); max-height: calc(100% - 16px);
  padding: 0; border: 0; border-radius: var(--radius-lg);
  color: var(--ink); background: #fff;
}
.modal::backdrop { background: rgba(0, 10, 62, .6); }
.modal--small, .modal--form { width: min(520px, calc(100% - 16px)); }
.modal__box { position: relative; padding: 28px 20px 24px; }
.modal__close {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--bg); color: var(--ink);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.modal h2 { font-size: 22px; padding-right: 40px; }
.modal h3 { font-size: 18px; margin-top: 20px; }
.modal__kicker { font-size: 13px; color: var(--violet); font-weight: 700; }
.modal__lead { color: var(--ink-soft); font-size: 15px; }
.modal__features { font-size: 15px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.facts div { background: var(--bg); border-radius: var(--radius); padding: 10px 12px; }
.facts dt { font-size: 12px; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; }
.modal__sections { padding-left: 20px; display: grid; gap: 10px; }
.modal__sections h4 { font-size: 15px; margin-bottom: 2px; }
.modal__sections p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.modal .price { margin-top: 8px; }
.modal .btn--wide { margin-top: 16px; }
.modal--form .lead-form { padding: 0; }
.modal--form .lead-form__fields { margin-top: 8px; }
.modal .check { margin-bottom: 8px; }

/* ---------- legal pages ---------- */

/* 404 page: footer pinned to the bottom on short pages */
.not-found-page { min-height: 100vh; display: flex; flex-direction: column; }
.not-found-page .not-found { flex: 1 0 auto; width: 100%; }
.not-found { padding-top: 64px; padding-bottom: 80px; max-width: 640px; text-align: center; }
.not-found__code { font-size: 72px; font-weight: 800; line-height: 1; color: var(--violet); margin-bottom: 8px; }
.not-found h1 { font-size: 28px; }
.not-found p { margin-bottom: 24px; }
.legal { padding-top: 32px; padding-bottom: 48px; max-width: 860px; }
.legal h1 { font-size: 28px; }
.legal__requisites { padding: 12px 16px; border-radius: var(--radius); background: #fff; border: 1px dashed var(--violet); font-weight: 600; }
.legal p, .legal li { font-size: 15px; }
.legal ul, .legal ol { padding-left: 22px; margin-bottom: 12px; }
.legal table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; margin-bottom: 12px; }
.legal td, .legal th { border: 1px solid var(--line); padding: 6px 8px; font-size: 14px; vertical-align: top; }

/* ---------- tablet and up ---------- */

@media (min-width: 640px) {
  .benefits__list { grid-template-columns: 1fr 1fr; }
  .programs__grid { grid-template-columns: 1fr 1fr; }
  .program__head { min-height: 56px; }
  .slider > li { flex-basis: calc(50% - 8px); }
  .slider--teachers > li { flex-basis: calc(33.333% - 11px); }
  .graduates__list { grid-template-columns: repeat(3, 1fr); }
  .ratings { grid-template-columns: repeat(4, 1fr); }
  .figures { grid-template-columns: 1fr 1fr; }
  .lead-form__fields { grid-template-columns: 1fr 1fr; }
  .video-reviews__grid { grid-template-columns: 360px 1fr; }
  .modal__box { padding: 32px; }
  .site-header__phone { font-size: 16px; }
}

@media (min-width: 960px) {
  section { padding: 64px 0; }
  .site-nav { display: flex; gap: 24px; margin-left: 32px; }
  .site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
  .site-nav a:hover { color: var(--violet); }
  .slider-nav { display: flex; }
  .hero { padding-top: 56px; }
  .hero__inner { grid-template-columns: 1.2fr 1fr; align-items: end; }
  .hero__text { padding-bottom: 56px; }
  .hero h1 { font-size: 46px; }
  .hero__lead, .hero__price { font-size: 20px; }
  .timer__digits span { min-width: 72px; }
  .timer__digits b { font-size: 34px; }
  .benefits { margin-top: -8px; }
  .benefits__list { grid-template-columns: repeat(4, 1fr); }
  .programs__grid { grid-template-columns: repeat(3, 1fr); }
  .program__head { min-height: 0; }
  .program__tags { flex-wrap: nowrap; }
  .section-title { font-size: 36px; }
  .slider > li { flex-basis: calc(33.333% - 11px); }
  .slider--teachers > li { flex-basis: calc(25% - 12px); }
  .form-banner .lead-form { padding: 40px 40px calc(40px + 12%); }
  .lead-form__title { font-size: 32px; }
  .form-banner .lead-form__fields { grid-template-columns: repeat(3, 1fr) auto; }
  .diploma__inner { grid-template-columns: 1fr 1.1fr; }
  .figures { grid-template-columns: repeat(4, 1fr); }
  .video-reviews__grid { grid-template-columns: 360px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
