/* —— Hero —— */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  min-height: 0;
}
.hero-visual {
  position: relative;
  overflow: hidden;
  background: #d9b07a;
  min-height: 480px;
  max-height: 560px;
}
.hero-visual img.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.hero-visual .overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(251, 247, 239, 0.55) 0%, rgba(251, 247, 239, 0.12) 28%, transparent 48%),
    linear-gradient(90deg, rgba(59, 44, 32, 0.08), transparent 45%);
  pointer-events: none;
}
.hero-visual .top-copy {
  position: absolute;
  top: 1.25rem;
  left: 1.15rem;
  right: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  z-index: 2;
}
.slogan {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  font-weight: 600;
  color: #2f1d10;
  max-width: min(15ch, 100%);
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 253, 248, 0.55);
}
.hero-logo-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem 0.35rem 0.3rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.65);
  flex: 0 0 auto;
  backdrop-filter: blur(6px);
}
.hero-logo-pill img { width: 34px; height: 34px; object-fit: contain; }
.hero-logo-pill strong {
  font-family: var(--serif);
  font-size: 0.84rem;
  line-height: 1.15;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 1.35rem 1.5rem 1.4rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(232, 184, 74, 0.16), transparent 34%),
    linear-gradient(180deg, #fff8ed, #f5e8d4);
  border-left: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-panel .leaf {
  position: absolute;
  width: min(28%, 150px);
  right: -2%;
  top: 16%;
  opacity: 0.16;
  transform: rotate(16deg);
  pointer-events: none;
}
.panel-kicker {
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brown);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem;
}
.panel-kicker::before, .panel-kicker::after {
  content: "";
  height: 1px;
  background: rgba(122, 90, 61, 0.22);
}
.panel-title { text-align: center; position: relative; z-index: 1; }
.panel-title .prep {
  display: block;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brown);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}
.panel-title h1 {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
}
.panel-title h1 span { color: var(--orange); }

.hero-lead {
  margin: 0 auto;
  max-width: 34ch;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.trust-line {
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brown);
  position: relative;
  z-index: 1;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
  position: relative;
  z-index: 1;
}
.hero-cta .btn {
  min-width: min(100%, 260px);
  padding: 0.78rem 1.15rem;
  font-size: 0.95rem;
}
.text-link {
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(122, 90, 61, 0.28);
  padding-bottom: 1px;
}
.text-link:hover { color: var(--orange-deep); border-color: var(--orange); }
.hero-phone {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  z-index: 1;
}
.hero-phone:hover { color: var(--orange-deep); }

/* —— Reveal motion —— */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: revealUp .55s ease forwards;
}
.reveal.delay-1 { animation-delay: .08s; }
.reveal.delay-2 { animation-delay: .16s; }
.reveal.delay-3 { animation-delay: .24s; }
@keyframes revealUp {
  to { opacity: 1; transform: none; }
}

/* —— Sections —— */
.section { padding: 1.35rem 0; }
.section-head { margin-bottom: 0.75rem; max-width: 680px; }
.section-head h2 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.section-head p { font-size: 0.95rem; }
.about-story {
  max-width: 760px;
  margin: 0 0 1.35rem;
  display: grid;
  gap: 0.85rem;
}
.about-story p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}
.about-story .about-thanks {
  color: var(--ink);
  font-weight: 500;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(122, 90, 61, 0.16);
}
.section-subjects {
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.55), transparent 40%),
    var(--cream);
}

/* —— Steps (how it works) —— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.step {
  padding: 1.05rem 1.1rem 1.15rem;
  border-top: 2px solid rgba(216, 137, 58, 0.55);
  background: transparent;
}
.step-num {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 0.35rem;
  line-height: 1;
}
.step h3 {
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
}
.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* —— Subject cards —— */
.subject-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.subject-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #fffdf8;
  border: 1px solid rgba(122, 90, 61, 0.12);
  border-radius: 999px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  min-height: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.subject-card:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 137, 58, 0.5);
  background: #fff8ee;
}
.subject-contact-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0.35rem 0 0.85rem;
}
.subject-contact-channels .link-pill {
  width: 100%;
  justify-content: flex-start;
}
.subject-contact-note {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.subject-card .icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #8a4e24;
  background: #fff8ee;
  border: 1px solid rgba(216, 137, 58, 0.2);
}
.subject-card .icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
.subject-card .icon-russian { color: #b23b3b; background: #fff1f0; border-color: rgba(178, 59, 59, 0.18); }
.subject-card .icon-math { color: #2f6fed; background: #eef4ff; border-color: rgba(47, 111, 237, 0.18); }
.subject-card .icon-history { color: #8a6a2f; background: #fff7e8; border-color: rgba(138, 106, 47, 0.18); }
.subject-card .icon-social { color: #3d6ea8; background: #eff5ff; border-color: rgba(61, 110, 168, 0.18); }
.subject-card .icon-physics { color: #6b4ad1; background: #f3efff; border-color: rgba(107, 74, 209, 0.18); }
.subject-card .icon-lit { color: #9a4d1c; background: #fff3e9; border-color: rgba(154, 77, 28, 0.18); }
.subject-card .icon-chem { color: #1f8a6a; background: #eafaf4; border-color: rgba(31, 138, 106, 0.18); }
.subject-card .icon-bio { color: #2f7a44; background: #eef8f0; border-color: rgba(47, 122, 68, 0.18); }

.subject-card-body {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  min-width: 0;
  flex: 1;
}
.subject-card .subject-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.15;
  white-space: nowrap;
}
.exam-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  min-width: 0;
}
.exam-tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brown);
  background: rgba(216, 137, 58, 0.12);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
}
.subject-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--orange);
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(40, 28, 18, 0.08);
  transition: background 0.15s ease, transform 0.15s ease;
}
.subject-cta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
  flex: 0 0 auto;
}
.subject-card:hover .subject-cta {
  background: var(--orange-deep);
  transform: translateX(1px);
}

/* —— Contact panel —— */
.contact-panel {
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 18px;
  background: #3b2c20;
  color: #fbf7ef;
}
.contact-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 253, 248, 0.12);
}
.contact-panel-head h2 {
  font-size: 1.2rem;
  margin: 0 0 0.15rem;
}
.contact-panel-head p {
  margin: 0;
  color: rgba(251, 247, 239, 0.72);
  font-size: 0.88rem;
}
.contact-panel-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.1rem 1.5rem;
  align-items: start;
}
.contact-col h3 {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, 0.55);
}
.contact-col-note {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: rgba(251, 247, 239, 0.72);
}
.contact-subhead {
  margin-top: 0.85rem !important;
}
.contact-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-stack .link-pill {
  width: 100%;
  justify-content: flex-start;
}
.contact-stack--messengers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.contact-stack--messengers .link-pill {
  width: 100%;
  min-width: 0;
}

.map-btns {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.map-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf8;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.map-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(41, 178, 74, 0.55);
}
.map-btn-logo {
  width: 72px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  background: #fff;
}
.map-btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 auto;
}
.map-btn-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fffdf8;
}
.map-btn-text span {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 253, 248, 0.72);
  line-height: 1.3;
}
.map-btn-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #29b24a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.map-btn:hover .map-btn-cta { background: #219640; }
.wa-legal {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(251, 247, 239, 0.55);
  max-width: 42ch;
}

.footer-map-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.25rem 0 0.55rem;
}
.footer-map-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.footer-map-row a img {
  width: 40px;
  height: 14px;
  object-fit: contain;
  flex: 0 0 auto;
}
.footer-map-row a:hover { color: var(--orange-deep); }

/* —— Footer —— */
.site-footer { padding: 1.15rem 0 1.35rem; }
.footer-grid {
  align-items: center;
  gap: 0.85rem 1.25rem;
}
.footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  align-items: center;
}
.footer-links h4 { width: 100%; margin-bottom: 0; }
.footer-links a { font-weight: 600; }
.footer-contacts .link-row { margin-top: 0.3rem; }

@media (max-width: 980px) {
  .hero-split { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { min-height: 240px; max-height: 280px; }
  .hero-visual img.hero-photo {
    object-fit: contain;
    object-position: center center;
  }
  .slogan {
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    background: rgba(255, 253, 248, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.65);
    text-shadow: none;
  }
  .hero-panel { padding: 1.1rem 1rem 1.2rem; gap: 0.5rem; }
  .steps { grid-template-columns: 1fr; gap: 0.35rem; }
  .step {
    border-top: none;
    border-left: 2px solid rgba(216, 137, 58, 0.55);
    padding: 0.7rem 0 0.7rem 0.9rem;
  }
  .subject-cards { grid-template-columns: 1fr; }
  .subject-cta {
    min-height: 30px;
    padding: 0.28rem 0.75rem;
    font-size: 0.74rem;
  }
  .exam-tags { display: none; }
  .contact-panel-grid { grid-template-columns: 1fr; }
  .contact-stack--messengers { grid-template-columns: 1fr 1fr; }
  .map-btn { flex-wrap: wrap; }
  .map-btn-cta { margin-left: auto; }
  .map-btn-logo { width: 64px; height: 22px; }
}
