/*
 * Unified public experience v7.
 * Главная собрана как одна продуктовая история: единые окна, карточки,
 * типографика, радиусы и плотность интерфейса на каждом этапе страницы.
 */

:root {
  --public-frame-radius: 28px;
  --public-card-radius: 22px;
  --public-shadow: 0 32px 90px rgba(17, 22, 47, .11);
  --public-section-x: clamp(24px, 6vw, 100px);
  --public-section-y: clamp(76px, 6vw, 96px);
}

.public-page { color: var(--brand-night); }
.public-page main { overflow: clip; }

/* Общая редакционная сетка секций. */
.product-proof,
.public-section {
  padding: var(--public-section-y) var(--public-section-x);
}

.product-proof > header,
.public-section-head {
  align-items: end;
  display: grid;
  gap: clamp(28px, 5vw, 76px);
  grid-template-columns: minmax(180px, .34fr) minmax(0, 1fr);
  margin: 0 0 clamp(42px, 5vw, 68px);
}

.public-section-head > div { grid-column: 1 / -1; }
.public-section-head > a {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(17, 22, 47, .1);
  border-radius: 999px;
  color: var(--brand-night);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  grid-column: 2;
  justify-self: end;
  margin-top: -102px;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.public-section-head > a:hover {
  background: var(--brand-night);
  color: #fff;
  transform: translateY(-2px);
}

.product-proof > header > span,
.public-eyebrow {
  align-items: center;
  color: var(--brand-electric);
  display: flex;
  font-size: 9px;
  font-weight: 850;
  gap: 9px;
  letter-spacing: .12em;
  line-height: 1.4;
  margin: 0;
  text-transform: uppercase;
}

.product-proof > header > span::before,
.public-section-head .public-eyebrow::before {
  background: var(--brand-coral);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 95, 122, .09);
  content: "";
  flex: 0 0 7px;
  height: 7px;
}

.product-proof h2,
.public-section-head h2 {
  color: var(--brand-night);
  font: 760 clamp(46px, 5.25vw, 80px)/.98 Manrope, sans-serif;
  letter-spacing: -.07em;
  margin: 0;
  max-width: 1120px;
}

.interface-window {
  border-color: rgba(17, 22, 47, .1);
  border-radius: var(--public-frame-radius);
  box-shadow: var(--public-shadow);
}

.interface-chrome {
  background: #20284f;
  height: 48px;
}

.interface-chrome--light {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(17, 22, 47, .08);
}

/* Бенто преимуществ поддерживает тот же ритм, что и продуктовые экраны. */
.product-proof {
  background:
    radial-gradient(circle at 91% 12%, rgba(255, 95, 122, .07), transparent 24%),
    radial-gradient(circle at 8% 90%, rgba(120, 231, 255, .1), transparent 25%),
    var(--brand-cloud);
}

.product-bento { gap: 14px; }
.product-bento > article {
  border: 1px solid rgba(17, 22, 47, .08);
  border-radius: var(--public-card-radius);
  box-shadow: 0 16px 46px rgba(17, 22, 47, .05);
}

.bento-library {
  background:
    radial-gradient(circle at 95% 5%, rgba(120, 231, 255, .11), transparent 28%),
    var(--brand-night);
}

.bento-visibility {
  background:
    radial-gradient(circle at 86% 83%, rgba(255, 255, 255, .44), transparent 24%),
    var(--brand-ice);
}

.bento-progress { background: linear-gradient(145deg, #e9e8ff, #f2efff); }
.bento-rhythm { background: rgba(255, 255, 255, .9); }

/* Навигатор предметов превращён в полноценный продуктовый браузер. */
.public-subjects {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 248, 253, .96));
}

.subject-browser { background: #e9edf6; }
.subject-browser-layout {
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 606px;
}

.subject-browser-layout > aside {
  background:
    radial-gradient(circle at 40% 100%, rgba(91, 77, 242, .27), transparent 34%),
    var(--brand-night);
  border-color: rgba(255, 255, 255, .07);
  color: #fff;
  padding: 28px 18px 18px;
}

.subject-browser-layout > aside > small { color: #7781a5; }
.subject-browser-layout > aside > strong { font-size: 28px; }
.subject-browser-layout > aside nav { gap: 5px; margin-top: 27px; }
.subject-browser-layout > aside nav a {
  border: 1px solid transparent;
  border-radius: 12px;
  color: #aab1cb;
  min-height: 44px;
  padding: 10px;
}

.subject-browser-layout > aside nav a:first-child,
.subject-browser-layout > aside nav a:hover {
  background: #20284f;
  border-color: rgba(255, 255, 255, .07);
  color: #fff;
}

.subject-browser-layout > aside nav a span { color: #687293; }
.subject-browser-layout > aside > div {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
}
.subject-browser-layout > aside > div span { background: var(--brand-ice); }

.subject-browser-layout > main {
  background:
    radial-gradient(circle at 10% 0, rgba(120, 231, 255, .12), transparent 28%),
    #eef1f8;
  padding: 18px;
}

.browser-toolbar { margin: 0 4px 14px; min-height: 34px; }
.browser-toolbar > span { font-size: 10px; }
.browser-toolbar > div i { background: #fff; border-color: #d7dceb; }
.browser-toolbar > div i:first-child { background: var(--brand-night); }

.subject-browser .subject-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subject-browser .subject-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(17, 22, 47, .08);
  border-radius: 19px;
  box-shadow: 0 9px 30px rgba(17, 22, 47, .04);
  color: var(--brand-night);
  display: flex;
  flex-direction: column;
  min-height: 508px;
  overflow: hidden;
  padding: 12px;
  text-decoration: none;
}

.subject-browser .subject-card::after { content: none; }
.subject-browser .subject-card:hover {
  border-color: rgba(91, 77, 242, .18);
  box-shadow: 0 24px 55px rgba(17, 22, 47, .12);
  transform: translateY(-5px);
}

.subject-card > header {
  align-items: center;
  display: flex;
  min-height: 29px;
  padding: 0 4px;
}

.subject-card > header span {
  color: #6f7791;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .12em;
}

.subject-card > header i {
  color: #a0a6b8;
  font-size: 7px;
  font-style: normal;
  margin-left: auto;
}

.subject-browser .subject-card > .subject-card-stage {
  align-self: stretch;
  background:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, .86), transparent 28%),
    linear-gradient(145deg, #dcd8ff, #eef0ff);
  border-radius: 15px;
  display: flex;
  flex: 0 0 174px;
  grid-column: auto;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.subject-card-stage::before,
.subject-card-stage::after {
  border: 1px solid rgba(91, 77, 242, .16);
  border-radius: 50%;
  content: "";
  height: 130px;
  position: absolute;
  right: -42px;
  top: -44px;
  width: 130px;
}

.subject-card-stage::after {
  height: 76px;
  left: -26px;
  right: auto;
  top: 112px;
  width: 76px;
}

.subject-card-stage > b {
  align-self: center;
  color: var(--brand-electric);
  font: 800 clamp(50px, 5vw, 78px)/1 Manrope, sans-serif;
  letter-spacing: -.08em;
  position: relative;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
  z-index: 1;
}

.subject-card-stage > span {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(17, 22, 47, .07);
  border-radius: 999px;
  bottom: 12px;
  display: flex;
  font-size: 6px;
  font-weight: 800;
  gap: 6px;
  padding: 7px 9px;
  position: absolute;
  right: 12px;
  text-transform: uppercase;
  z-index: 2;
}

.subject-card-stage > span i {
  background: var(--brand-coral);
  border-radius: 50%;
  height: 5px;
  width: 5px;
}

.subject-card[data-subject-code="MATH"] .subject-card-stage {
  background: radial-gradient(circle at 85% 18%, rgba(255, 95, 122, .25), transparent 28%), linear-gradient(145deg, #fff0f4, #eeeaff);
}
.subject-card[data-subject-code="MATH"] .subject-card-stage > b { color: var(--brand-coral); }
.subject-card[data-subject-code="CODE"] .subject-card-stage {
  background: repeating-linear-gradient(0deg, transparent 0 24px, rgba(120, 231, 255, .06) 25px), var(--brand-night);
}
.subject-card[data-subject-code="CODE"] .subject-card-stage > b { color: var(--brand-ice); }
.subject-card[data-subject-code="CODE"] .subject-card-stage::before,
.subject-card[data-subject-code="CODE"] .subject-card-stage::after { border-color: rgba(120, 231, 255, .16); }

.subject-browser .subject-card > .subject-card-copy {
  align-self: stretch;
  align-content: start;
  display: grid;
  grid-column: auto;
  padding: 22px 6px 8px;
}

.subject-card-copy small {
  color: var(--subject-accent, var(--brand-electric));
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.subject-browser .subject-card h3 {
  color: var(--brand-night);
  font: 760 clamp(25px, 2vw, 33px)/.98 Manrope, sans-serif;
  letter-spacing: -.065em;
  margin: 11px 0 10px;
  text-decoration: none;
}

.subject-card-copy p {
  color: #747b91;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  text-decoration: none;
}

.subject-card > footer {
  align-items: center;
  border-top: 1px solid rgba(17, 22, 47, .09);
  display: flex;
  margin: auto 5px 0;
  min-height: 50px;
}
.subject-card > footer span { font-size: 12px; font-weight: 800; }
.subject-card > footer i {
  align-items: center;
  background: var(--brand-night);
  border-radius: 9px;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-style: normal;
  height: 30px;
  justify-content: center;
  margin-left: auto;
  width: 30px;
}

/* Каталог и урок используют тот же размер рамы и одинаковый chrome. */
.public-programs {
  background:
    radial-gradient(circle at 90% 12%, rgba(91, 77, 242, .09), transparent 25%),
    var(--brand-cloud);
}
.catalog-window { border-radius: var(--public-frame-radius); }

.interface-session {
  border: 1px solid rgba(17, 22, 47, .08);
  border-radius: var(--public-frame-radius);
  box-shadow: var(--public-shadow);
  margin: 16px;
}
.interface-session .method-copy {
  background:
    radial-gradient(circle at 88% 12%, rgba(120, 231, 255, .1), transparent 28%),
    var(--brand-night);
}
.interface-session .method-copy h2 em { color: var(--brand-ice); }

/* Карточка преподавателя и манифест теперь делят одну продуктовую сцену. */
.public-teachers {
  background:
    linear-gradient(180deg, #fff, #f7f9fd);
}

.mentor-console .teacher-showcase {
  background: #e9edf6;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.16fr) minmax(350px, .84fr);
  padding: 12px;
}

.mentor-roster { display: grid; gap: 12px; min-width: 0; }
.mentor-console .public-teacher-card {
  background: var(--brand-paper);
  border: 1px solid rgba(17, 22, 47, .08);
  border-radius: 20px;
  box-shadow: 0 12px 38px rgba(17, 22, 47, .06);
  grid-template-columns: minmax(230px, .82fr) minmax(300px, 1.18fr);
  min-height: 520px;
}

.mentor-console .teacher-portrait { background: #dbe0f1; }
.mentor-console .teacher-portrait::after {
  background: linear-gradient(0deg, rgba(17, 22, 47, .28), transparent 48%);
}
.mentor-console .teacher-portrait i {
  background: var(--brand-ice);
  color: var(--brand-night);
}

.mentor-console .public-teacher-card > div:last-child {
  align-content: center;
  padding: clamp(32px, 4vw, 58px);
}
.mentor-console .public-teacher-card > div:last-child > span {
  color: var(--brand-electric);
  letter-spacing: .1em;
}
.mentor-console .public-teacher-card h3 {
  font: 760 clamp(34px, 3.2vw, 53px)/.98 Manrope, sans-serif;
  letter-spacing: -.07em;
  margin: 13px 0 20px;
}
.mentor-console .public-teacher-card p {
  color: #6f768c;
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
  max-width: 410px;
}
.mentor-console .public-teacher-card > div:last-child > small {
  border-top: 1px solid rgba(17, 22, 47, .09);
  margin-top: 34px;
  padding-top: 18px;
}
.mentor-console .public-teacher-card > div:last-child > small i { background: #36c687; }

.mentor-console .teacher-quote {
  background:
    radial-gradient(circle at 92% 9%, rgba(255, 95, 122, .18), transparent 25%),
    radial-gradient(circle at 5% 100%, rgba(91, 77, 242, .35), transparent 36%),
    var(--brand-night);
  border: 0;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  grid-column: auto;
  min-height: 520px;
  padding: 28px;
}
.mentor-console .teacher-quote header { margin-bottom: 30px; }
.mentor-console .teacher-quote > span {
  color: var(--brand-ice);
  font: 700 70px/1 Georgia, serif;
}
.mentor-console .teacher-quote p {
  font: 690 clamp(30px, 3vw, 48px)/1.04 Manrope, sans-serif;
  letter-spacing: -.055em;
  margin: 18px 0 30px;
  max-width: 560px;
}
.mentor-console .teacher-quote small { margin-top: auto; }

/* Заявка закрывает историю как продолжение интерфейса, а не отдельная форма. */
.interface-onboarding {
  border: 1px solid rgba(17, 22, 47, .08);
  border-radius: var(--public-frame-radius);
  box-shadow: var(--public-shadow);
  margin: 16px;
}

.interface-onboarding .request-copy {
  background:
    radial-gradient(circle at 77% 73%, rgba(120, 231, 255, .85) 0 8%, transparent 8.5%),
    radial-gradient(circle at 86% 61%, rgba(255, 95, 122, .92) 0 5%, transparent 5.5%),
    linear-gradient(145deg, var(--brand-electric), #3e31be 68%, #241d55);
}
.interface-onboarding .request-copy::after { content: none; }
.interface-onboarding .request-copy h2 { line-height: .94; }
.interface-onboarding .request-copy > p { max-width: 560px; }
.interface-onboarding .public-form { background: var(--brand-paper); }
.interface-onboarding .public-field .form-control {
  background: #f4f6fc;
  border-color: #dfe4f1;
  border-radius: 12px;
}
.interface-onboarding .public-field .form-control:focus {
  border-color: var(--brand-electric);
  box-shadow: 0 0 0 4px rgba(91, 77, 242, .1);
}
.interface-onboarding .public-button--lime { background: var(--brand-ice); }

/* Финальный экран повторяет язык тёмных продуктовых панелей. */
.public-footer {
  background:
    radial-gradient(circle at 90% 10%, rgba(91, 77, 242, .24), transparent 27%),
    radial-gradient(circle at 10% 100%, rgba(120, 231, 255, .09), transparent 23%),
    var(--brand-night);
  padding: clamp(68px, 7vw, 110px) var(--public-section-x) 28px;
}

.public-footer-main {
  align-items: end;
  display: grid;
  gap: clamp(28px, 4vw, 66px);
  grid-template-columns: minmax(230px, .48fr) minmax(0, 1fr) auto;
  padding-bottom: clamp(45px, 5vw, 72px);
}

.public-brand--footer {
  align-self: start;
  min-width: 0;
}
.public-brand--footer .public-brand-mark {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .25));
  height: 52px;
  width: 52px;
}
.public-brand--footer .public-brand-type strong { color: #fff; }
.public-brand--footer .public-brand-type b { color: var(--brand-ice); }
.public-brand--footer .public-brand-type em { color: var(--brand-ice); }

.public-footer-statement > span {
  color: var(--brand-ice);
  display: block;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .12em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.public-footer-main .public-footer-statement h2 {
  font: 730 clamp(39px, 4.5vw, 70px)/.98 Manrope, sans-serif;
  letter-spacing: -.065em;
  margin: 0;
  max-width: 900px;
}

.public-footer-main .public-footer-cta {
  align-items: center;
  background: #fff;
  border-radius: 14px;
  color: var(--brand-night);
  display: flex;
  font-size: 9px;
  font-weight: 850;
  gap: 20px;
  min-height: 48px;
  padding: 0 8px 0 16px;
  text-decoration: none;
}
.public-footer-cta b {
  align-items: center;
  background: var(--brand-ice);
  border-radius: 9px;
  color: var(--brand-night);
  display: flex;
  height: 33px;
  justify-content: center;
  width: 33px;
}

.public-footer-grid {
  border-color: rgba(255, 255, 255, .11);
  gap: 32px;
}
.public-footer-grid > div { min-width: 0; }
.public-footer-grid > div > span { color: #727b9b; }
.public-footer-grid a,
.public-footer-grid p { color: #c5cbe0; }
.public-footer-bottom { border-color: rgba(255, 255, 255, .1); color: #737b99; }

@media (max-width: 1180px) {
  .subject-browser-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .subject-browser .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-browser .subject-card:last-child { grid-column: 1 / -1; min-height: 450px; }
  .mentor-console .teacher-showcase { grid-template-columns: 1fr; }
  .mentor-console .teacher-quote { min-height: 440px; }
  .public-footer-main { grid-template-columns: 1fr auto; }
  .public-footer-main .public-brand--footer { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root {
    --public-section-x: clamp(20px, 4vw, 40px);
    --public-section-y: clamp(72px, 8vw, 88px);
  }
  .product-proof > header,
  .public-section-head { grid-template-columns: 1fr; }
  .public-section-head > a { grid-column: 1; margin-top: -10px; justify-self: start; }
  .subject-browser-layout { display: block; min-height: 0; }
  .subject-browser-layout > aside {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    border-right: 0;
    padding: 17px;
  }
  .subject-browser-layout > aside > strong,
  .subject-browser-layout > aside > div { display: none; }
  .subject-browser-layout > aside nav {
    display: flex;
    margin-top: 11px;
    overflow-x: auto;
    padding-bottom: 3px;
  }
  .subject-browser-layout > aside nav a { flex: 0 0 auto; }
  .interface-session { grid-template-columns: 1fr; }
  .public-footer-main { grid-template-columns: 1fr; }
  .public-footer-main .public-brand--footer { grid-column: auto; }
  .public-footer-main .public-footer-cta { justify-self: start; }
}

@media (max-width: 760px) {
  :root {
    --public-frame-radius: 20px;
    --public-card-radius: 18px;
    --public-section-x: 16px;
    --public-section-y: 70px;
  }
  .product-proof h2,
  .public-section-head h2 { font-size: clamp(40px, 12vw, 54px); }
  .product-proof > header,
  .public-section-head { gap: 22px; margin-bottom: 36px; }
  .product-bento { gap: 8px; }
  .product-bento > article { box-shadow: none; }
  .interface-window { box-shadow: 0 20px 55px rgba(17, 22, 47, .09); }
  .interface-chrome { height: 44px; padding-inline: 13px; }
  .interface-chrome > span { font-size: 7px; }

  .subject-browser-layout > main { padding: 8px; }
  .browser-toolbar { margin: 5px 6px 10px; }
  .subject-browser .subject-grid { grid-template-columns: 1fr; }
  .subject-browser .subject-card,
  .subject-browser .subject-card:last-child { grid-column: auto; min-height: 475px; }
  .subject-card-stage { flex-basis: 178px; }
  .subject-browser .subject-card h3 { font-size: 33px; }

  .interface-session,
  .interface-onboarding { margin: 8px; }
  .interface-session { box-shadow: 0 18px 50px rgba(17, 22, 47, .14); }
  .interface-session .method-copy { padding-inline: 22px; }

  .mentor-console .teacher-showcase { gap: 8px; padding: 8px; }
  .mentor-console .public-teacher-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .mentor-console .teacher-portrait { height: 390px; }
  .mentor-console .public-teacher-card > div:last-child { min-height: 330px; padding: 32px 24px; }
  .mentor-console .public-teacher-card h3 { font-size: 40px; }
  .mentor-console .teacher-quote { min-height: 430px; padding: 24px; }
  .mentor-console .teacher-quote p { font-size: clamp(29px, 9vw, 39px); }

  .interface-onboarding .request-copy { min-height: 560px; padding: 56px 22px 80px; }
  .interface-onboarding .request-copy h2 { font-size: clamp(48px, 14vw, 64px); }
  .interface-onboarding .public-form { padding-inline: 20px; }

  .public-footer { padding: 64px 20px 24px; }
  .public-footer-main { gap: 34px; }
  .public-brand--footer .public-brand-mark { height: 46px; width: 46px; }
  .public-footer-main .public-footer-statement h2 { font-size: clamp(38px, 11vw, 52px); }
  .public-footer-grid { grid-template-columns: 1fr 1fr; }
  .public-footer-grid > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  :root { --public-section-x: 12px; }
  .subject-browser .subject-card { padding: 10px; }
  .subject-card-stage { flex-basis: 166px; }
  .mentor-console .teacher-portrait { height: 330px; }
  .mentor-console .public-teacher-card > div:last-child { padding: 28px 20px; }
  .mentor-console .teacher-quote { min-height: 410px; padding: 22px 20px; }
  .interface-onboarding { margin-inline: 4px; }
  .interface-onboarding .request-copy { min-height: 530px; padding-inline: 18px; }
  .public-footer-grid { grid-template-columns: 1fr; }
  .public-footer-grid > div:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .subject-browser .subject-card,
  .public-section-head > a { transition: none; }
}
