/* MindUp School — public website */
:root {
  --paper: #f7f6f0;
  --white: #fff;
  --ink: #21183e;
  --text: #3e3651;
  --muted: #635c73;
  --dark: #211731;
  --violet: #422a73;
  --lavender: #eee9fb;
  --lavender-2: #ded4f7;
  --lime: #d7fa73;
  --lime-hover: #c3ed54;
  --line: #bcb6c8;
  --field-line: #8b819c;
  --on-dark: #e4ddef;
  --danger: #a32441;
  --focus: #6243a2;
  --radius: 3px;
  --max-content: 1320px;
  --gutter: clamp(20px, 4.2vw, 76px);
  --header-h: 72px;
  --section-space: clamp(62px, 7.1vw, 112px);
  --grid-space: clamp(18px, 3vw, 48px);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .68, .22, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--paper); color: var(--text); font: 500 16px/1.6 var(--font); }
:where(main, header, footer) { overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 800; line-height: 1.08; }
p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: calc(var(--max-content) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.h1 { font-size: clamp(37px, 5.35vw, 84px); letter-spacing: -.052em; }
.h2 { font-size: clamp(34px, 4.25vw, 67px); letter-spacing: -.049em; }
.h3 { font-size: clamp(24px, 2.1vw, 36px); letter-spacing: -.042em; }
.h4 { font-size: clamp(20px, 1.65vw, 26px); letter-spacing: -.035em; }
.lead { max-width: 57ch; font-size: clamp(16px, 1.35vw, 20px); }
.icon { flex: none; vertical-align: middle; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .8em; min-height: 48px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink); font-weight: 800; text-align: center; text-decoration: none; line-height: 1.25; transition: background-color .2s, color .2s, border-color .2s; }
.btn--lime { background: var(--lime); }
.btn--lime:hover { background: var(--lime-hover); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--violet); }
.btn--outline { border-color: var(--field-line); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--lg { min-height: 56px; padding-inline: 22px; }
.btn--block { width: 100%; }
.btn:active { translate: 0 1px; }
.btn:disabled { opacity: .7; cursor: progress; }
.link-underline, .more { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; color: var(--ink); font-weight: 800; text-decoration-thickness: 1px; }
.more svg, .more span[aria-hidden] { transition: transform .2s var(--ease); }
.more:hover svg, .more:hover span[aria-hidden] { transform: translateX(4px); }

.skip-link { position: fixed; z-index: 100; top: 12px; left: var(--gutter); clip-path: inset(50%); background: var(--lime); color: var(--ink); padding: 10px 16px; }
.skip-link:focus { clip-path: none; }
.header { position: sticky; z-index: 10; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; min-height: var(--header-h); gap: clamp(14px, 2vw, 28px); }
.header--localized .header__inner { justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 1.12; font-size: 23px; font-weight: 800; letter-spacing: -.052em; }
.logo__mark { width: 39px; height: 39px; flex: none; object-fit: contain; }
.logo__text { overflow-wrap: normal; }
.logo__stack { display: grid; gap: 3px; }
.logo__tagline { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .015em; }
.logo__accent { color: var(--violet); }
.nav { display: flex; align-items: center; gap: clamp(12px, 1.55vw, 25px); margin-left: auto; }
.nav__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; text-decoration: none; }
.nav__link:hover { text-decoration: underline; }
.header__cta { min-height: 44px; background: var(--ink); color: var(--white); font-size: 13px; flex: none; }
.header__cta:hover { background: var(--violet); }
.nav__cta-mobile, .burger { display: none; }

.section { padding-block: var(--section-space); }
.section--lavender { background: var(--lavender); }
.section--dark { background: var(--dark); color: var(--on-dark); --focus: var(--lime); }
.section--dark :is(.h1, .h2, .progress__label) { color: var(--white); }
.section--dark .form-card { --focus: #6243a2; }
.section--dark .form-card .h2 { color: var(--ink); }
.section__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--grid-space); align-items: end; margin-bottom: clamp(26px, 4.4vw, 64px); }
.section__head .lead { max-width: 45ch; }
.section__head--light .h2 { color: var(--white); }

.bar { display: block; height: 9px; border: 1px solid currentColor; }
.bar__fill { display: block; width: var(--p, 0%); height: 100%; background: var(--lime); }

.tags { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.tags li { color: var(--violet); font-size: 12px; font-weight: 800; padding: 2px 0; }
.tags li + li::before { content: '·'; display: inline-block; padding-right: 10px; }
.dots, .list-check { display: grid; gap: 8px; }
.dots li { display: list-item; list-style: square outside; margin-inline-start: 1.12em; }
.dots li::marker { color: var(--violet); }
.list-check li { display: flex; align-items: start; gap: 8px; }
.list-check svg { margin-top: 3px; color: var(--violet); }

#how, .localized-plan { background: var(--lavender); }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.step { display: grid; align-content: start; grid-template-columns: 1fr auto; gap: 12px 5px; padding: 20px clamp(11px, 1.55vw, 25px) 8px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step__num { grid-row: 1; align-self: center; color: var(--violet); font-size: clamp(27px, 3vw, 42px); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.step :is(.h4, p) { grid-column: 1 / -1; }
.step p, .feature p { font-size: 15px; }
.icon-box { display: inline-grid; place-items: center; width: 42px; height: 42px; background: var(--lime); color: var(--ink); flex: none; }
.localized-plan .dots { margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 20px; }
.localized-plan .dots li { border-top: 1px solid var(--line); padding-top: 10px; }

.features { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--grid-space); }
.feature { display: flex; align-items: start; gap: 17px; padding-block: 23px; border-top: 1px solid var(--line); }
.feature p { margin-top: 8px; }
.banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px var(--grid-space); margin-top: 24px; background: var(--ink); padding: clamp(20px, 3vw, 44px); color: var(--on-dark); }
.banner p { max-width: 60ch; }
.banner b { color: var(--white); }

#teachers { background: var(--lavender-2); }
.teachers, .formats, .reviews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 30px); }
.teacher { display: flex; flex-direction: column; min-width: 0; }
.teacher__photo { position: relative; overflow: hidden; aspect-ratio: 1.04; background: var(--lavender); color: var(--violet); }
.teacher__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.teacher__ph { display: grid; place-items: center; height: 100%; font-size: 46px; font-weight: 800; }
.teacher__illustration { position: absolute; bottom: 7px; left: 7px; padding: 2px 5px; background: var(--paper); color: var(--ink); font-size: 11px; }
.teacher__body { display: flex; flex-direction: column; align-items: start; gap: 8px; flex: 1; padding-block: 15px; font-size: 14px; border-bottom: 1px solid var(--line); }
.teacher__role, .teacher__exp, .format__meta { color: var(--violet); font-size: 13px; font-weight: 800; }
.teacher .more, .format .btn { margin-top: auto; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }

.progress, .lead-grid, .faq { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: clamp(34px, 6vw, 96px); }
.progress__text { display: grid; gap: 18px; }
.progress__label { font-size: 13px; font-weight: 700; }
.progress__label span { color: var(--lime); margin-right: 6px; }
.bars { display: grid; gap: 18px; padding-inline-start: var(--grid-space); border-left: 1px solid #756488; align-self: center; }
.bars__row { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; font-size: 15px; }
.bars__row b { flex: none; color: var(--white); }

.formats { gap: 0; border: 1px solid var(--line); }
.format { display: flex; flex-direction: column; align-items: start; gap: 11px; padding: clamp(16px, 2vw, 30px); border-right: 1px solid var(--line); font-size: 15px; }
.format:last-child { border-right: 0; }
.format .btn { width: 100%; }
.format .list-check { padding-bottom: 12px; font-size: 14px; }
.format--featured { background: var(--lavender-2); }
.reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.review { display: flex; flex-direction: column; gap: 15px; padding-block: 20px 6px; border-top: 1px solid var(--line); }
.stars { display: flex; gap: 4px; color: var(--violet); }
.review blockquote { margin: 0; font-size: clamp(17px, 1.4vw, 21px); font-weight: 700; line-height: 1.5; }
.review__author { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.review__author small { display: block; color: var(--muted); }
.avatar { width: 43px; height: 43px; flex: none; border-radius: 50%; object-fit: cover; }
.avatar--ph { display: grid; place-items: center; background: var(--lavender-2); color: var(--ink); font-weight: 800; }

.faq .section__head { display: block; margin: 0; }
.faq .lead { margin-top: 13px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__item summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--ink); padding-block: 14px; cursor: pointer; list-style: none; font-size: clamp(16px, 1.35vw, 20px); font-weight: 800; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { display: grid; place-items: center; width: 34px; height: 34px; background: var(--lavender-2); flex: none; transition: rotate .25s, background-color .25s; }
.faq__item[open] .faq__icon { rotate: 45deg; background: var(--lime); }
.faq__item[open] > .faq__wrap { animation: show-answer .18s ease-out; }
.faq__wrap > p { padding-bottom: 18px; }
@keyframes show-answer { from { opacity: 0; } to { opacity: 1; } }

#lead { border-top: 7px solid var(--lime); }
.lead-grid :is(.h1, .h2) { margin-bottom: 16px; }
.lead-grid__contacts { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 24px; }
.lead-grid__contacts a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); }
.form-card { padding: clamp(16px, 3vw, 40px); background: var(--paper); color: var(--text); }
.form { display: grid; gap: 14px; }
.form__head p { font-size: 14px; margin-top: 5px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; min-width: 0; gap: 5px; font-size: 14px; color: var(--ink); font-weight: 700; }
.field :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 49px; padding: 9px 11px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--white); color: var(--ink); font-size: 16px; font-weight: 500; }
.field textarea { resize: vertical; min-height: 85px; }
.field ::placeholder { color: var(--muted); opacity: 1; }
.field.has-error :is(input, select) { border-color: var(--danger); }
.field__error, .form__error, [data-localized-error] { font-size: 13px; color: var(--danger); font-style: normal; }
:is(.field__error, .form__error, [data-localized-error]):empty { display: none; }
.checkbox { position: relative; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.checkbox input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.checkbox__box { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border: 1px solid var(--field-line); border-radius: var(--radius); color: transparent; margin-top: 1px; }
.checkbox input:checked + .checkbox__box { background: var(--violet); border-color: var(--violet); color: var(--white); }
.checkbox input:focus-visible + .checkbox__box { outline: 3px solid var(--focus); outline-offset: 3px; }
[for], .form label { cursor: pointer; }
.form input[type="checkbox"] { accent-color: var(--violet); }
.hp { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.form-success { display: grid; justify-items: start; gap: 12px; padding-block: 26px; }
.form-success__icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--lime); color: var(--ink); }

.footer { padding: clamp(36px, 5vw, 80px) 0 26px; background: #171023; color: var(--on-dark); font-size: 15px; --focus: var(--lime); }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--grid-space); }
.footer__about { margin-top: 12px; max-width: 36ch; }
.footer__nav, .footer__contacts { display: grid; align-content: start; justify-items: start; gap: 10px; }
.footer a:not(.logo) { text-decoration: none; }
.footer a:not(.logo):hover { text-decoration: underline; }
.logo--light { color: var(--white); }
.logo--light .logo__accent { color: var(--lime); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 13px; margin-top: 26px; padding-top: 18px; border-top: 1px solid #5e526b; font-size: 14px; }
.footer__bottom:first-child { margin-top: 0; }

.page { padding-block: clamp(34px, 5.4vw, 80px) var(--section-space); min-height: 60vh; }
.page__inner, .prose { display: grid; gap: 20px; justify-items: start; }
.prose { max-width: 74ch; }
.prose h2 { font-size: 25px; margin-top: 12px; }
.prose .dots { gap: 15px; }
/* Preserve dialog hooks for pages using the original public interactions. */
.dialog { border: 1px solid var(--line); padding: 0; width: min(600px, calc(100% - 32px)); background: var(--paper); }
.dialog::backdrop { background: #171023a8; }
.dialog__box { position: relative; display: grid; gap: 16px; padding: 28px; }
.dialog__close { justify-self: end; }

@media (prefers-reduced-motion: no-preference) {
  .js :where(.dir-card, .step, .feature, .teacher, .format, .review).is-visible { animation: settle .4s var(--ease) both; }
  @keyframes settle { from { translate: 0 5px; } to { translate: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .bar__fill { transform: none; }
}

@media (max-width: 1060px) {
  .header__inner { justify-content: space-between; flex-wrap: wrap; }
  .nav { width: 100%; margin: 0; flex-wrap: wrap; }
  .header__cta { display: none; }
  .js .nav { position: absolute; inset: 100% 0 auto; display: none; width: auto; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 22px; }
  .js .nav.is-open { display: grid; gap: 0; }
  .nav__link { border-bottom: 1px solid var(--line); padding-block: 8px; font-size: 16px; }
  .nav__cta-mobile { display: inline-flex; justify-self: start; margin-top: 14px; }
  .js .burger { display: grid; gap: 4px; place-content: center; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); }
  .burger span { width: 18px; height: 2px; background: var(--ink); transition: transform .18s, opacity .18s; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 820px) {
  .progress, .lead-grid, .faq { grid-template-columns: minmax(0, 1fr); }
  .section__head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step:nth-child(3) { border-right: 0; }
  .step:nth-child(n+4) { border-top: 1px solid var(--line); }
  .teachers, .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .format:nth-child(2) { border-right: 0; }
  .format:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bars { padding-inline-start: 0; border-left: 0; }
}
@media (max-width: 530px) {
  :root { --gutter: 17px; --header-h: 60px; }
  body { font-size: 15px; }
  .logo { font-size: 21px; }
  .logo__mark { width: 35px; height: 35px; }
  .hero { padding-top: 18px; }
  .features, .reviews, .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px 12px; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); }
  .step:nth-child(n+4) { border-top: 0; }
  .step__top { display: none; }
  .step :is(.h4, p) { grid-column: 2; }
  .step .h4 { grid-row: 1; align-self: center; }
  .teacher__photo { aspect-ratio: .92; }
  .teacher__body { font-size: 13px; }
  .teacher .h4 { font-size: 19px; }
  .formats { grid-template-columns: minmax(0, 1fr); }
  .format, .format:nth-child(2) { border-right: 0; }
  .format + .format { border-top: 1px solid var(--line); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
}
