:root {
  --bg: #ffffff;
  --soft: #f5fbff;
  --soft-blue: #eef7ff;
  --text: #0c2342;
  --muted: #516782;
  --muted-2: #7b8ca2;
  --line: #dce8f3;
  --line-2: #cbdceb;
  --teal: #10b7aa;
  --teal-dark: #079e94;
  --blue: #2f7edb;
  --blue-dark: #0d4e99;
  --orange: #ff9f43;
  --shadow: 0 18px 48px rgba(26, 66, 112, 0.09);
  --radius: 8px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(220, 232, 243, 0.85);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-link {
  flex: 0 0 auto;
}

.brand-link img {
  width: 185px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex: 1;
  color: #29415f;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--teal-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.phone {
  display: grid;
  gap: 1px;
  text-align: right;
}

.phone strong {
  font-size: 15px;
  line-height: 1.1;
}

.phone span {
  color: var(--muted);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #11aa9f);
  box-shadow: 0 12px 24px rgba(16, 183, 170, 0.22);
}

.button-blue {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, #3386df, #246fca);
  box-shadow: 0 12px 24px rgba(47, 126, 219, 0.18);
}

.button-ghost,
.button-outline {
  color: var(--teal-dark);
  background: #fff;
  border-color: var(--teal);
}

.button-light {
  width: 100%;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.button-small {
  min-height: 42px;
  padding-inline: 21px;
  font-size: 13px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  padding: 28px 0 24px;
  background:
    radial-gradient(circle at 78% 22%, rgba(232, 246, 255, 0.9), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, #fff 84%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 28px;
}

.hero-copy {
  padding-top: 6px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 16px;
  padding: 0 16px;
  color: #2d7ccc;
  background: #dff0ff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 735px;
  margin-bottom: 18px;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
}

.hero-copy p {
  max-width: 560px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 19px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
}

.hero-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 630px;
}

.hero-benefits div {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  color: #405a77;
  font-size: 14px;
  font-weight: 700;
}

.hero-benefits img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hero-visual {
  position: relative;
  min-height: 420px;
}

.hero-blob {
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: min(530px, 96%);
  height: 342px;
  border-radius: 42% 58% 34% 66% / 42% 42% 58% 58%;
  background: #e8f5ff;
}

.hero-student {
  position: absolute;
  right: 68px;
  top: 0;
  bottom: auto;
  z-index: 2;
  width: min(410px, 76%);
  max-height: 500px;
  object-fit: contain;
  object-position: center top;
}

.decor {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.decor-bulb {
  top: 38px;
  left: 70px;
  width: 76px;
}

.decor-star {
  left: 0;
  bottom: 124px;
  width: 66px;
}

.decor-plane {
  right: 0;
  top: 80px;
  width: 92px;
}

.decor-dash {
  right: 16px;
  top: 168px;
  width: 210px;
  opacity: 0.72;
}

.section {
  padding: 26px 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 36px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid transparent;
}

.section-copy > p,
.trial-copy > p,
.cabinet-copy > p {
  max-width: 520px;
  margin-bottom: 18px;
  color: var(--muted);
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-card,
.subject-card,
.teacher-card,
.review-card,
.price-card,
.test-card,
.lead-form,
.dashboard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(26, 66, 112, 0.04);
}

.mini-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 16px;
  padding: 15px;
}

.mini-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.mini-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.test-card {
  padding: 24px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  box-shadow: var(--shadow);
}

.test-card h3 {
  margin-bottom: 6px;
  font-size: 24px;
}

.test-card p {
  margin-bottom: 18px;
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

select,
input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(16, 183, 170, 0.13);
}

.test-card small,
.lead-form small {
  display: block;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.subject-card {
  min-height: 70px;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.subject-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 183, 170, 0.45);
  box-shadow: 0 16px 34px rgba(26, 66, 112, 0.08);
}

.subject-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 5px;
  background: radial-gradient(circle at center, #eff9ff 0 64%, rgba(239, 249, 255, 0) 65%);
  border-radius: 0;
  mix-blend-mode: multiply;
}

.subject-card strong,
.teacher-card strong,
.review-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  line-height: 1.2;
}

.subject-card span,
.teacher-card span,
.review-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.section-link.inline {
  margin-top: 0;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.teacher-card {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 13px;
  padding: 10px;
  overflow: hidden;
}

.teacher-card img {
  width: 104px;
  height: 92px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 6px;
}

.teacher-card p {
  margin: 7px 0 0;
  color: #516782;
  font-size: 12px;
  font-weight: 650;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.review-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 58px 1fr 64px;
  gap: 11px;
  padding: 14px;
}

.review-card > img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 6px;
}

.review-main p {
  margin: 12px 0 0;
  color: #516782;
  font-size: 12px;
  line-height: 1.45;
}

.score {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--teal-dark);
  background: #dff7f4;
  border-radius: 8px;
}

.score b {
  font-size: 27px;
  line-height: 1;
}

.score span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.price-card {
  position: relative;
  min-height: 272px;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 20px;
}

.price-card.featured {
  border-color: var(--teal);
  box-shadow: 0 18px 44px rgba(16, 183, 170, 0.13);
}

.popular {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  color: #8b4a06;
  background: #ffd395;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.price-card h3 {
  margin-bottom: 4px;
}

.price-card > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.price {
  margin: 18px 0 16px;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.price small {
  font-size: 14px;
}

.price-card ul {
  min-height: 104px;
  margin: 0 0 16px;
  padding-left: 18px;
  color: #304964;
  font-size: 14px;
  line-height: 1.75;
}

.price-card li::marker {
  color: var(--blue);
}

.price-card .button {
  margin-top: auto;
  min-height: 42px;
  font-size: 13px;
}

.price-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 18px 40px rgba(47, 126, 219, 0.12);
}

.pricing-note {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.trial {
  background: linear-gradient(180deg, #f2f9ff 0%, #fff 100%);
}

.trial-grid {
  display: grid;
  grid-template-columns: 0.9fr 0.8fr 1fr;
  gap: 42px;
  align-items: center;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #39536f;
  font-weight: 700;
}

.check-list li {
  position: relative;
  padding-left: 31px;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2f8f5;
  border: 1px solid rgba(16, 183, 170, 0.5);
}

.check-list li::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 6px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--teal-dark);
  border-bottom: 2px solid var(--teal-dark);
  transform: rotate(-45deg);
}

.trial-photo {
  width: 300px;
  height: 220px;
  justify-self: center;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.trial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.lead-form {
  padding: 24px;
}

.lead-form .button {
  width: 100%;
}

.cabinet {
  padding-top: 36px;
  padding-bottom: 44px;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.72fr;
  gap: 36px;
  align-items: start;
}

.dashboard {
  display: grid;
  grid-template-columns: 160px 1fr;
  overflow: hidden;
  background: linear-gradient(135deg, #f7fbff, #ffffff 62%);
}

.dashboard-side {
  padding: 18px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.dashboard-side img {
  width: 36px;
  margin-bottom: 16px;
}

.dashboard-side nav {
  display: grid;
  gap: 8px;
}

.dashboard-side span {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #5f738d;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
}

.dashboard-side span.active {
  color: var(--blue);
  background: #eaf4ff;
}

.dashboard-main {
  padding: 26px;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dashboard-top strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
}

.dashboard-top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.dashboard-top img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1.12fr;
  gap: 18px;
}

.dashboard-cards article {
  min-height: 158px;
  padding: 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(26, 66, 112, 0.05);
}

.dashboard-cards h3 {
  margin-bottom: 20px;
  font-size: 14px;
}

.progress-line {
  height: 10px;
  overflow: hidden;
  background: #e7edf3;
  border-radius: 999px;
}

.progress-line span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.dashboard-cards p {
  margin: 14px 0 4px;
  text-align: right;
  color: var(--text);
  font-weight: 850;
}

.dashboard-cards small {
  color: var(--muted);
  font-size: 12px;
}

.lesson-row,
.result-row {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid #edf3f8;
  font-size: 12px;
}

.lesson-row span,
.result-row span {
  color: var(--muted);
}

.lesson-row b,
.result-row b {
  color: #29415f;
}

.dashboard a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.site-footer {
  padding: 38px 0 32px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.55fr repeat(4, 1fr);
  gap: 40px;
}

.footer-brand img {
  width: 178px;
  height: auto;
  margin-bottom: 28px;
}

.footer-grid h3 {
  margin-bottom: 14px;
  font-size: 14px;
}

.footer-grid a,
.footer-grid span,
.footer-brand p {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.socials a,
.socials img {
  width: 42px;
  height: 42px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 48px));
  padding: 15px 18px;
  color: #fff;
  background: #0c2342;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-weight: 750;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .header-inner {
    gap: 18px;
  }

  .main-nav {
    gap: 16px;
    font-size: 13px;
  }

  .phone {
    display: none;
  }

  h1 {
    font-size: 44px;
  }

  .subject-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .teacher-grid,
  .review-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trial-grid {
    grid-template-columns: 1fr 0.9fr;
  }

  .trial-photo {
    order: 3;
    grid-column: 1 / -1;
  }

  .cabinet-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-link img {
    width: 156px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    grid-template-columns: 1fr;
    justify-content: start;
    gap: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    padding: 12px;
    border-radius: 6px;
  }

  .main-nav a:hover {
    background: var(--soft-blue);
  }

  .header-actions {
    display: none;
  }

  .hero {
    padding-top: 30px;
  }

  .hero-grid,
  .split,
  .trial-grid,
  .cabinet-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-benefits {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-visual {
    min-height: 360px;
  }

  .hero-blob {
    right: 5%;
    width: 90%;
    height: 310px;
  }

  .hero-student {
    right: 12%;
    width: 68%;
  }

  .decor-bulb {
    left: 10px;
  }

  .decor-star {
    bottom: 96px;
  }

  .decor-plane {
    right: 4px;
  }

  .diagnostic-grid,
  .subject-grid,
  .teacher-grid,
  .review-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-link {
    justify-content: flex-start;
  }

  .teacher-card,
  .review-card {
    max-width: 100%;
  }

  .trial-photo {
    order: initial;
    width: min(300px, 100%);
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-side nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .hero {
    min-height: 0;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 27px;
  }

  .hero-buttons {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 315px;
  }

  .hero-student {
    right: 8%;
    width: 78%;
    max-height: 340px;
  }

  .hero-blob {
    height: 270px;
  }

  .decor-dash {
    width: 170px;
  }

  .mini-card,
  .subject-card {
    grid-template-columns: 48px 1fr;
  }

  .teacher-card {
    grid-template-columns: 94px 1fr;
  }

  .teacher-card img {
    width: 94px;
    height: 96px;
  }

  .review-card {
    grid-template-columns: 52px 1fr;
  }

  .review-card > img {
    width: 52px;
    height: 52px;
  }

  .score {
    grid-column: 1 / -1;
    width: 100%;
    height: 48px;
    grid-auto-flow: column;
    justify-content: center;
    gap: 8px;
  }

  .lead-form,
  .test-card,
  .dashboard-main {
    padding: 20px;
  }

  .dashboard-side nav {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
