/* ====== ЭТАП 0: Глобальные стили и палитра ====== */
:root{
  --bg: #f6f7ff;           /* молочный лавандовый */
  --surface: #ffffff;
  --text: #161821;
  --muted: #62677f;
  --stroke: #e6e8f2;
  --accent: #6a5bff;       /* электрик-фиолетовый */
  --accent-2: #00b894;     /* мятный */
  --warning: #ffb020;

  --radius: 14px;
  --radius-lg: 22px;

  --container: 1160px;

  --shadow-1: 0 8px 24px rgba(17, 18, 26, 0.06);
  --shadow-2: 0 16px 40px rgba(17, 18, 26, 0.08);
}

*{box-sizing:border-box}
html,body{height:100%}
html:focus-within{scroll-behavior:smooth}
body{
  margin:0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, #eef0ff, transparent 60%), var(--bg);
  line-height:1.6;
  text-rendering: optimizeLegibility;
}

h1,h2,h3{
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 12px;
}
h1{font-size:clamp(28px, 5vw, 44px); letter-spacing: -0.02em;}
h2{font-size:clamp(22px, 3.2vw, 32px);}
h3{font-size:clamp(18px, 2.4vw, 22px); text-transform: none;}

p{margin:0 0 12px; color: var(--muted)}
a{color:inherit; text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%; display:block}

.container{
  width:min(100% - 32px, var(--container));
  margin-inline:auto;
}

.btn{
  display:inline-block;
  border:1px solid transparent;
  padding:12px 18px;
  border-radius: calc(var(--radius) + 4px);
  font-weight:700;
  text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  box-shadow: var(--shadow-1);
  cursor:pointer;
}
.btn:focus-visible{outline:3px solid #b9b2ff; outline-offset:2px}
.btn--primary{
  background: linear-gradient(135deg, var(--accent), #8b7bff);
  color:#fff;
}
.btn--primary:hover{transform: translateY(-1px); box-shadow: var(--shadow-2);}

/* Скрытый текст для скринридеров */
.sr-only{
  position:absolute!important; height:1px;width:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;padding:0;margin:-1px
}

/* Skip link */
.skip-link{
  position: absolute;
  top: -40px; left: 12px;
  background: var(--accent);
  color:#fff;
  padding:10px 14px;
  border-radius: 10px;
  transition: top .2s ease;
  z-index: 1000;
}
.skip-link:focus{top:12px}

/* ====== ЭТАП 1: Header ====== */
.header{
  position: sticky; top:0; z-index: 900;
  background: rgba(255,255,255,.75);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--stroke);
}
.header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:12px 0;
}
.logo{display:inline-flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px}
.logo__mark{
  display:inline-grid; place-items:center;
  width:28px; height:28px; border-radius:10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#fff; font-size:14px; box-shadow: var(--shadow-1);
}
.logo__text{white-space:nowrap}

.header__toggle{
  appearance:none; border:1px solid var(--stroke);
  background: var(--surface); border-radius:12px;
  width:46px; height:42px; display:grid; place-items:center;
  box-shadow: var(--shadow-1);
}
.header__toggle:focus-visible{outline:3px solid #b9b2ff; outline-offset:2px}
.burger{
  width:22px; height:2px; background:var(--text); border-radius:2px; position:relative;
}
.burger::before, .burger::after{
  content:""; position:absolute; left:0; width:22px; height:2px; background:var(--text); border-radius:2px;
}
.burger::before{ top:-7px }
.burger::after{ top:7px }

.header__nav{position: fixed; inset: 64px 12px auto 12px; background: var(--surface); border:1px solid var(--stroke); border-radius: var(--radius-lg); padding:12px; box-shadow: var(--shadow-2); transform: scale(.98); opacity:0; pointer-events:none; transition: opacity .15s ease, transform .15s ease;}
.header__nav.is-open{opacity:1; pointer-events:auto; transform: scale(1)}
.header__list{list-style:none; margin:0; padding:0; display:grid; gap:2px}
.header__link{
  display:block; padding:12px 14px; border-radius:12px; text-decoration:none;
}
.header__link:hover{background:#f2f3ff}
.header__link--cta{
  background: linear-gradient(135deg, var(--accent), #8b7bff);
  color:#fff; text-align:center; border:1px solid transparent;
}
.header__link--cta:hover{filter: saturate(110%);}

/* ≥ 880px — десктоп меню */
@media (min-width:880px){
  .header__toggle{display:none}
  .header__nav{position: static; background: transparent; border:0; box-shadow:none; transform:none; opacity:1; pointer-events:auto; padding:0}
  .header__list{display:flex; gap:8px}
  .header__link{padding:10px 12px}
}

/* ====== ЭТАП 0: Заглушка главной (заменим на Hero позже) ====== */
.stub{padding:72px 0 88px}
.stub__title{margin-bottom:8px}
.stub__lead{font-size:1.05rem; max-width:60ch}
.stub .btn{margin-top:16px}

/* ====== ЭТАП 2: Footer ====== */
.footer{margin-top:48px; border-top:1px solid var(--stroke); background: linear-gradient(180deg, rgba(106,91,255,.05), transparent 40%), var(--surface);}
.footer__grid{
  display:grid; gap:24px; padding:24px 0;
  grid-template-columns: 1fr;
}
.footer__logo{margin-bottom:8px}
.footer__tagline{max-width:44ch}
.footer__title{margin:6px 0 10px}
.footer__links{list-style:none; margin:0; padding:0; display:grid; gap:8px}
.footer__links a{color:var(--text)}
.footer__links a:hover{text-decoration:underline}
.contact{list-style:none; margin:0; padding:0; display:grid; gap:10px}
.contact__item{display:flex; align-items:center; gap:10px}
.contact__item i{width:18px;height:18px;color:var(--accent)}

.footer__bottom{border-top:1px dashed var(--stroke); margin-top:8px}
.footer__bottom-inner{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:14px 0}

@media (min-width:780px){
  .footer__grid{grid-template-columns: 1.2fr .8fr .8fr 1fr}
}

/* Фокус-стили и доступность */
:focus-visible{outline:3px solid #b9b2ff; outline-offset:2px}
a, button{touch-action:manipulation}


/* ====== ЭТАП 3: Hero ====== */
.hero{
  position: relative;
  min-height: clamp(68vh, 88vh, 92vh);
  display:grid; align-items:center;
  isolation:isolate; overflow:hidden;
  background:
    radial-gradient(900px 420px at 110% 10%, rgba(0,184,148,.12), transparent 60%),
    radial-gradient(700px 380px at -10% 80%, rgba(106,91,255,.18), transparent 60%),
    var(--bg);
  border-bottom:1px solid var(--stroke);
}
.hero__canvas{
  position:absolute; inset:0; width:100%; height:100%;
  z-index:-1; filter: blur(22px) saturate(120%);
  opacity:.9;
}
.hero__inner{padding: clamp(36px, 5vw, 64px) 0;}
.hero__intro{max-width: 720px}
.hero__title{
  font-size: clamp(28px, 6vw, 52px);
  letter-spacing:-0.02em;
  background: linear-gradient(135deg, var(--text), #3f3a97);
  -webkit-background-clip: text; background-clip:text; color: transparent;
  margin-bottom: 10px;
}
.hero__lead{
  font-size: clamp(16px, 2.6vw, 18px);
  color: var(--muted); max-width: 62ch;
  margin-bottom: 18px;
}
.hero__cta{display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 14px;}
.hero__badges{display:flex; gap:12px; flex-wrap:wrap; padding:0; margin:8px 0 0; list-style:none}
.hero__badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border:1px solid var(--stroke); border-radius: 999px;
  background: rgba(255,255,255,.75); backdrop-filter: blur(8px);
  font-size: 14px; color:#2c2f3a;
}
.hero__badge i{width:16px; height:16px; color: var(--accent)}

/* Когда предпочтительно минимизировать анимации */
@media (prefers-reduced-motion: reduce){
  .hero__canvas{display:none}
}

/* ====== СЕКЦИЯ: Форматы ====== */
.section-head{margin-bottom:18px; max-width:72ch}
.section-head__title{margin-bottom:6px}
.section-head__lead{color:var(--muted)}

.formats{padding:36px 0 12px; border-bottom:1px solid var(--stroke)}
.formats__grid{
  list-style:none; margin:18px 0 0; padding:0;
  display:grid; gap:12px;
  grid-template-columns: 1fr;
}
.formats__card{
  background: linear-gradient(180deg, rgba(255,255,255,.85), #fff);
  border:1px solid var(--stroke); border-radius: var(--radius-lg);
  padding:16px; box-shadow: var(--shadow-1);
  display:grid; align-content:start; gap:8px; min-height: 100%;
}
.formats__icon{
  width:42px; height:42px; border-radius: 12px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#fff; box-shadow: var(--shadow-1);
}
.formats__icon i{width:20px; height:20px; color:#fff}
.formats__title{margin:4px 0 2px}
.formats__text{color:var(--muted)}
.formats__cta{
  margin-top:4px; justify-self:start;
  border:1px solid var(--stroke);
  padding:8px 12px; border-radius: 12px;
  text-decoration:none; font-weight:700; background:#fff;
  transition: transform .15s ease, box-shadow .15s ease, border .15s ease;
}
.formats__cta:hover{transform: translateY(-1px); box-shadow: var(--shadow-2); border-color:#d9dbeb}

@media (min-width:720px){
  .formats__grid{grid-template-columns: repeat(2, 1fr)}
}
@media (min-width:1024px){
  .formats__grid{grid-template-columns: repeat(4, 1fr)}
}

/* ====== СЕКЦИЯ: Модули ====== */
.modules{padding:36px 0; border-bottom:1px solid var(--stroke)}

.tabs__list{
  display:flex; gap:8px; flex-wrap:wrap;
  background: linear-gradient(180deg, rgba(255,255,255,.85), #fff);
  border:1px solid var(--stroke); border-radius: var(--radius-lg);
  padding:8px; box-shadow: var(--shadow-1);
}
.tabs__tab{
  appearance:none; border:1px solid var(--stroke);
  background:#fff; border-radius:12px; padding:10px 12px;
  font-weight:700; cursor:pointer;
}
.tabs__tab[aria-selected="true"], .tabs__tab.is-active{
  background: linear-gradient(135deg, var(--accent), #8b7bff);
  color:#fff; border-color: transparent;
}
.tabs__panel{margin-top:14px}
.tabs__panel[hidden]{display:none}
.tabs__panel.is-active{display:block}

.modules__grid{
  list-style:none; margin:0; padding:0;
  display:grid; gap:12px; grid-template-columns: 1fr;
}
.modules__card{
  background: #fff; border:1px solid var(--stroke);
  border-radius: var(--radius-lg); padding:16px; box-shadow: var(--shadow-1);
  display:grid; gap:8px;
}
.modules__title{margin:0}
.modules__desc{color:var(--muted)}
.modules__meta{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  display:inline-block; padding:6px 10px; border:1px solid var(--stroke);
  border-radius:999px; font-size:13px; background:#fff;
}
.chip--mint{background: linear-gradient(135deg, rgba(0,184,148,.12), transparent); border-color:#d6efe9}
.chip--gold{background: linear-gradient(135deg, rgba(255,176,32,.12), transparent); border-color:#fde6bf}
.modules__cta{
  justify-self:start; border:1px solid var(--stroke); padding:8px 12px;
  border-radius:12px; background:#fff; font-weight:700; text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, border .15s ease;
}
.modules__cta:hover{transform: translateY(-1px); box-shadow: var(--shadow-2); border-color:#d9dbeb}

@media (min-width:780px){
  .modules__grid{grid-template-columns: repeat(3, 1fr)}
}

/* ====== СЕКЦИЯ: Практикум ====== */
.lab{padding:36px 0; border-bottom:1px solid var(--stroke)}
.lab__steps{
  counter-reset: step;
  list-style:none; margin: 8px 0 18px; padding:0;
  display:grid; gap:10px;
}
.lab__step{
  display:grid; grid-template-columns: 44px 1fr; gap:10px;
  background:#fff; border:1px solid var(--stroke); border-radius: var(--radius-lg);
  padding:12px; box-shadow: var(--shadow-1); position:relative;
}
.lab__step::after{
  content:""; position:absolute; left:22px; top:52px; bottom:-18px; width:2px;
  background: linear-gradient(180deg, #e8eaf7, transparent);
}
.lab__step:last-child::after{display:none}
.lab__icon{
  width:44px; height:44px; border-radius:12px; display:grid; place-items:center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color:#fff;
  box-shadow: var(--shadow-1);
}
.lab__icon i{width:20px; height:20px; color:#fff}
.lab__title{margin:0 0 4px}
.lab__text{color:var(--muted); margin:0}

.lab__results{
  display:grid; gap:12px; grid-template-columns: 1fr;
}
.lab__card{
  background: linear-gradient(180deg, rgba(255,255,255,.85), #fff);
  border:1px solid var(--stroke); border-radius: var(--radius-lg);
  padding:16px; box-shadow: var(--shadow-1);
}
.lab__card-title{margin:0 0 8px}
.lab__list{list-style:none; margin:0 0 12px; padding:0; display:grid; gap:8px}
.lab__list i{width:18px; height:18px; color: var(--accent); margin-right:6px; vertical-align:-3px}
.lab__list li{color: var(--text)}

@media (min-width:860px){
  .lab__steps{grid-template-columns: 1fr 1fr}
  .lab__results{grid-template-columns: 1fr 1fr}
}

/* ====== СЕКЦИЯ: Наставники ====== */
.mentors{padding:36px 0; border-bottom:1px solid var(--stroke)}
.mentors__grid{
  list-style:none; margin:18px 0 0; padding:0;
  display:grid; gap:12px; grid-template-columns: 1fr;
}
.mentors__card{
  display:grid; grid-template-columns: 96px 1fr; gap:12px;
  background:#fff; border:1px solid var(--stroke); border-radius: var(--radius-lg);
  padding:12px; box-shadow: var(--shadow-1); align-items:start;
}
.mentors__photo{
  width:96px; height:96px; object-fit:cover; border-radius: 18px;
  background:#f1f2fb; border:1px solid #e8eaf7;
}
.mentors__name{margin:0}
.mentors__role{margin:2px 0 6px; color:var(--muted)}
.mentors__bio{margin:0 0 8px; color: var(--muted)}
.mentors__tags{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px}
.tag{
  display:inline-block; padding:6px 10px; border:1px solid var(--stroke);
  border-radius:999px; background:#fff; font-size:12.5px; font-weight:700;
}
.mentors__links{display:flex; gap:8px}
.mentors__cta{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--stroke); border-radius:12px; padding:8px 12px; background:#fff;
  text-decoration:none; font-weight:700;
  transition: transform .15s ease, box-shadow .15s ease, border .15s ease;
}
.mentors__cta i{width:18px; height:18px; color: var(--accent)}
.mentors__cta:hover{transform: translateY(-1px); box-shadow: var(--shadow-2); border-color:#d9dbeb}

@media (min-width:780px){
  .mentors__grid{grid-template-columns: repeat(3, 1fr)}
  .mentors__card{grid-template-columns: 120px 1fr}
  .mentors__photo{width:120px; height:120px}
}

/* ====== СЕКЦИЯ: Контакты ====== */
.contact-section{padding:36px 0}
.form{background:#fff; border:1px solid var(--stroke); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding:16px}
.form__grid{display:grid; gap:12px; grid-template-columns: 1fr}
.form__field{display:grid; gap:6px}
.form__field--wide{grid-column: 1 / -1}
.form__label{font-weight:700}
.form__input, .form__textarea{
  width:100%; border:1px solid var(--stroke); border-radius:12px; padding:11px 12px; background:#fff;
}
.form__textarea{resize:vertical}
.form__input:focus-visible, .form__textarea:focus-visible{outline:3px solid #b9b2ff; outline-offset:2px}
.form__error{min-height:16px; color:#b00020; font-size:13px; margin:0}
.form__actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:6px}
.form__note{margin-top:10px; font-weight:700}
.checkbox{display:flex; align-items:flex-start; gap:10px}
.checkbox input{margin-top:3px}

.hp{position:absolute !important; left:-9999px !important; width:1px; height:1px; opacity:0}

.form__captcha{margin-top:6px}
.captcha__row{display:flex; gap:8px; align-items:center}
.captcha__task{
  display:inline-grid; place-items:center; min-width:88px; padding:8px 10px;
  border:1px dashed var(--stroke); border-radius:12px; background:linear-gradient(180deg, rgba(255,255,255,.85), #fff);
  font-weight:700;
}
.captcha__input{flex:1}

@media (min-width:780px){
  .form__grid{grid-template-columns: 1fr 1fr}
  .form__field--wide{grid-column: span 2}
}

/* ====== ЭТАП 5: Cookie Pop-up ====== */
.cookie{
  position: fixed; left:0; right:0; bottom:0; z-index: 1000;
  transform: translateY(110%); opacity:0; transition: transform .25s ease, opacity .2s ease;
  background: radial-gradient(600px 220px at 90% 0%, rgba(106,91,255,.08), transparent 60%), #fff;
  border-top: 1px solid var(--stroke); box-shadow: 0 -12px 24px rgba(17,18,26,.06);
}
.cookie.is-visible{ transform: translateY(0); opacity:1 }
.cookie__inner{ display:flex; gap:14px; align-items:flex-start; padding:14px 0; }
.cookie__text{ display:grid; gap:6px; }
.cookie__text p{ margin:0; color:var(--muted) }
.cookie__text a{ color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.cookie__actions{ margin-left:auto; display:flex; gap:8px; flex-wrap:wrap }
@media (max-width:720px){
  .cookie__inner{ flex-direction:column; }
  .cookie__actions{ margin-left:0 }
}

/* ====== ЭТАП 5: Стили для текстовых страниц (privacy.html и др.) ====== */
/* Ожидаемая структура:
<main>
  <section class="pages">
    <div class="container">
      <h1>...</h1>
      <p>...</p>
      <h2>...</h2>
      <p>...</p>
      <ul> <li><strong>...</strong></li> <li>... <a href="#">...</a></li> </ul>
    </div>
  </section>
</main>
*/
.pages{ padding: 32px 0 48px; }
.pages .container{ max-width: 860px; }
.pages h1{
  font-family: "Spectral", Georgia, serif; margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.02em;
}
.pages h2{
  font-family: "Spectral", Georgia, serif; margin: 22px 0 8px;
  font-size: clamp(20px, 3.2vw, 28px);
}
.pages p{ margin: 0 0 12px; color: var(--text); }
.pages ul, .pages ol{
  margin: 10px 0 12px 20px; color: var(--text);
}
.pages li{ margin: 6px 0; }
.pages strong{ font-weight: 700; }
.pages a{
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
}
.pages .note{
  padding: 10px 12px; border:1px dashed var(--stroke); border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.85), #fff);
  color: var(--muted);
}
.pages code, .pages pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background:#f6f7ff; border:1px solid var(--stroke); border-radius:10px;
}
.pages code{ padding:2px 6px }
.pages pre{ padding:12px; overflow:auto }
.pages table{
  width:100%; border-collapse: collapse; margin: 12px 0;
  background:#fff; border:1px solid var(--stroke); border-radius:12px; overflow:hidden; display:block;
}
.pages th, .pages td{ padding:10px 12px; border-bottom:1px solid var(--stroke); }
.pages tr:last-child td{ border-bottom:0 }
.pages blockquote{
  margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--accent);
  background: #fff; border:1px solid var(--stroke); border-left-color: var(--accent);
  border-radius: 12px;
}

/* Уточнение читаемости на больших экранах */
@media (min-width:1100px){
  .pages .container{ max-width: 920px; }
}
