/* ============================================================
   Зинаида — лендинг репетитора английского
   Дизайн-вариант «Уютный игривый» (1b). Токены из design_handoff.
   ============================================================ */

:root {
  /* — Цвета — */
  --bg:            #fdf6f0;
  --text:          #4a3f4d;
  --text-2:        #7d7183;
  --muted:         #9a8ea0;

  --terra:         #e08a6e;   /* акцент: CTA, hero */
  --terra-dark:    #c9705a;   /* тень CTA */
  --peach:         #f6c9b6;
  --peach-2:       #f6d3c2;
  --peach-3:       #f2c6b2;

  --yellow:        #ffd9a8;   /* пилюля «Пробный урок» */
  --yellow-sh:     #f0c088;
  --yellow-text:   #8a5a3a;
  --yellow-metric: #e0a860;

  --lav:           #e6ddf3;
  --lav-2:         #ddd2ee;
  --lav-3:         #efeaf7;

  --blue:          #8a9dd0;
  --mint:          #cfe8dc;
  --mint-2:        #dcefe4;
  --mint-3:        #c4e3d1;
  --green:         #7a9d86;

  --results-bg:    #eef3f8;
  --dark:          #5a4a52;   /* кнопка формы */
  --beige:         #b08a5a;   /* надпись «Обо мне» */
  --white:         #ffffff;

  /* — Прочее — */
  --maxw:          1080px;
  --pad-x:         40px;
  --font-head:     'Baloo 2', system-ui, cursive;
  --font-body:     'Nunito', system-ui, sans-serif;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; }

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

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--bg);
  overflow-x: clip;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terra);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 14px 0;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Заглушки изображений ---------- */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph--peach  { background: repeating-linear-gradient(135deg, #f6d3c2, #f6d3c2 12px, #f2c6b2 12px, #f2c6b2 24px); }
.ph--mint   { background: repeating-linear-gradient(135deg, #c4e3d1, #c4e3d1 12px, #b6dcc4 12px, #b6dcc4 24px); }
.ph--lav    { background: repeating-linear-gradient(45deg,  #e6ddf3, #e6ddf3 14px, #ddd2ee 14px, #ddd2ee 28px); }
.ph--yellow { background: repeating-linear-gradient(135deg, #ffd9a8, #ffd9a8 12px, #f6cf98 12px, #f6cf98 24px); }
.ph__tag {
  font: 14px ui-monospace, monospace;
  color: var(--terra-dark);
  background: #fff;
  padding: 7px 15px;
  border-radius: 16px;
}
.ph__tag--sm { font-size: 12px; padding: 4px 10px; border-radius: 12px; }

/* ---------- Общие элементы секций ---------- */
.section-head { text-align: center; margin-bottom: 32px; }
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 38px;
  color: var(--text);
  line-height: 1.08;
}
.section-sub {
  font-size: 17px;
  color: var(--muted);
  margin: 6px 0 0;
}
.eyebrow {
  font-size: 15px;
  font-weight: 700;
  color: var(--beige);
}
.pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 22px;
}
.pill--mint { color: var(--green); background: var(--mint-2); }

.card {
  background: var(--white);
  border-radius: 36px;
  box-shadow: 0 10px 30px -18px rgba(74, 63, 77, .3);
}
.card--sm {
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 8px 24px -14px rgba(74, 63, 77, .35);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .2s var(--ease);
}
.btn--primary {
  background: var(--terra);
  color: #fff;
  padding: 18px 34px;
  border-radius: 30px;
  font-size: 17px;
  box-shadow: 0 5px 0 var(--terra-dark);
}
.btn--primary:hover { background: #d97f62; }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--terra-dark); }

.btn--dark {
  background: var(--dark);
  color: #fff;
  padding: 20px;
  border-radius: 20px;
  font-size: 18px;
  width: 100%;
  box-shadow: 0 4px 0 #443840;
}
.btn--dark:hover { background: #50424a; }
.btn--dark:active { transform: translateY(2px); box-shadow: 0 2px 0 #443840; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  position: relative;
  z-index: 100;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--terra);
}
.brand__badge {
  width: 38px;
  height: 38px;
  border-radius: 13px 13px 13px 5px;
  background: var(--peach);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terra);
  font-size: 19px;
}
.nav__menu {
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}
.nav__menu a { transition: color .18s var(--ease); }
.nav__menu a:not(.nav__cta):hover { color: var(--terra); }
.nav__cta {
  background: var(--yellow);
  color: var(--yellow-text);
  padding: 11px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--yellow-sh);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .2s var(--ease);
}
.nav__cta:hover { background: #ffcf94; }
.nav__cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--yellow-sh); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__burger span {
  height: 2.5px;
  width: 100%;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 40px var(--pad-x) 64px;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}
.blob--lav  { top: -60px; right: -40px; width: 280px; height: 280px; background: var(--lav); }
.blob--mint { bottom: 40px; left: -40px; width: 160px; height: 160px; background: var(--mint); }

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.pill--mint { margin-bottom: 20px; }
.hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.03;
  margin: 0 0 18px;
  color: var(--text);
}
.hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 28px;
  max-width: 420px;
}
.hero__photo .ph--hero,
.hero__photo .hero__img {
  display: block;
  width: 100%;
  height: auto;          /* гасим HTML-атрибут height, иначе он ломает aspect-ratio */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 36px;
  border: 5px solid #fff;
  box-shadow: 0 16px 40px -16px rgba(224, 138, 110, .5);
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 28px var(--pad-x);
  flex-wrap: wrap;
}
.trust__item { text-align: center; }
.trust__num { font-family: var(--font-head); font-size: 40px; line-height: 1; }
.trust__cap { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  margin: 24px var(--pad-x);
  padding: 44px;
}
.about__head {
  display: flex;
  gap: 26px;
  align-items: center;
  margin-bottom: 20px;
}
.about__avatar {
  width: 104px;
  height: 104px;
  border-radius: 30px;
  flex: none;
  object-fit: cover;
}
.about__title {
  font-family: var(--font-head);
  font-size: 38px;
  margin: 4px 0 0;
  color: var(--text);
}
.about__text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 14px;
  max-width: 760px;
}
.about__text:last-child { margin-bottom: 0; }

/* ============================================================
   CERTIFICATES
   ============================================================ */
.certs { padding: 52px var(--pad-x) 20px; }
.certs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cert {
  padding: 18px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cert:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -14px rgba(74, 63, 77, .4);
}
.cert__scan {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  margin-bottom: 14px;
  width: 100%;
  object-fit: contain;      /* документ виден целиком, ничего не срезаем */
  background: #f5efe9;      /* мягкий фон под letterbox */
  padding: 6px;
}
.cert__title { font-weight: 800; font-size: 16px; }
.cert__cap { font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.certs__note { font-size: 14px; color: var(--muted); text-align: center; margin: 20px 0 0; }

/* ============================================================
   METHOD
   ============================================================ */
.method { padding: 52px var(--pad-x); }
.method__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  border-radius: 28px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -18px rgba(74, 63, 77, .3);
}
.feature--peach { background: #fdeede; }
.feature--mint  { background: #e9f3ec; }
.feature--lav   { background: var(--lav-3); }
.feature__icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
.feature__title { font-weight: 800; font-size: 19px; }
.feature__text { font-size: 15px; color: var(--text-2); line-height: 1.6; margin: 4px 0 0; }

/* ============================================================
   RESULTS
   ============================================================ */
.results {
  margin: 12px var(--pad-x) 48px;
  background: var(--results-bg);
  border-radius: 36px;
  padding: 48px 40px;
}
.results .section-title { text-align: center; margin-bottom: 28px; font-size: 36px; }
.results__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.metric {
  background: var(--white);
  border-radius: 24px;
  padding: 26px;
  text-align: center;
}
.metric__num { font-family: var(--font-head); font-size: 42px; line-height: 1; }
.metric__cap { font-size: 15px; color: var(--text-2); margin-top: 6px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.reviews { padding: 12px var(--pad-x) 52px; }
.reviews .section-title { text-align: center; font-size: 36px; }
.reviews__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.review {
  background: var(--white);
  border-radius: 28px;
  padding: 28px;
  margin: 0;
  border: 2px dashed var(--peach-3);
}
.review--peach  { border-color: var(--peach-3); }
.review--mint   { border-color: var(--mint-3); }
.review--lav    { border-color: var(--lav-2); }
.review--yellow { border-color: var(--yellow-sh); }
.review__quote {
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 16px;
  color: var(--text);
}
.review__author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
}
.review__ava { width: 40px; height: 40px; border-radius: 50%; flex: none; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { margin: 0 var(--pad-x) 48px; }
.contact__inner {
  background: linear-gradient(160deg, var(--peach), var(--lav));
  border-radius: 40px;
  padding: 56px 44px;
}
.contact__title {
  font-family: var(--font-head);
  font-size: 42px;
  margin: 0 0 10px;
  text-align: center;
  color: var(--dark);
  line-height: 1.08;
}
.contact__sub {
  font-size: 17px;
  color: #6a5a62;
  text-align: center;
  margin: 0 auto 30px;
  max-width: 520px;
  line-height: 1.55;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 440px;
  margin: 0 auto;
}
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__label {
  font-size: 13px;
  font-weight: 700;
  color: #6a5a62;
  padding-left: 4px;
}
.form__input {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 16px 22px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form__input::placeholder { color: #b7adba; }
.form__input:focus { border-color: var(--terra); box-shadow: 0 0 0 4px rgba(224, 138, 110, .18); }
.form__input.is-invalid { border-color: #d9694f; }
.form__error {
  font-size: 13px;
  color: #b23d28;
  font-weight: 600;
  padding-left: 4px;
  margin: 0;
}
/* honeypot — прячем от людей, оставляем доступным ботам */
.form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Чекбокс согласия на обработку ПДн */
.form__field--consent { gap: 4px; }
.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  padding-left: 2px;
}
.form__check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.form__consent-box {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  background: #fff;
  border: 2px solid #e3d3d9;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
  position: relative;
}
.form__consent-box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .16s var(--ease);
}
.form__check:checked + .form__consent-box {
  background: var(--terra);
  border-color: var(--terra);
}
.form__check:checked + .form__consent-box::after { transform: rotate(45deg) scale(1); }
.form__check:focus-visible + .form__consent-box {
  box-shadow: 0 0 0 4px rgba(224, 138, 110, .22);
}
.form__consent.is-invalid .form__consent-box { border-color: #d9694f; }
.form__consent-text {
  font-size: 15px;
  line-height: 1.5;
  color: #6a5a62;
}
.form__consent-text a { color: var(--terra); text-decoration: underline; font-weight: 700; }

.form .btn--dark { margin-top: 4px; }
.form__status {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  margin: 4px 0 0;
  padding: 12px 16px;
  border-radius: 16px;
}
.form__status.is-success { background: rgba(122, 157, 134, .22); color: #4a6b55; }
.form__status.is-error   { background: rgba(217, 105, 79, .18);  color: #a5432d; }

.contact__or {
  text-align: center;
  font-size: 14px;
  color: #6a5a62;
  margin: 28px 0 16px;
  position: relative;
}
.contact__links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}
.chan {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, .72);
  border-radius: 18px;
  padding: 14px 16px;
  transition: transform .16s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.chan:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 10px 24px -14px rgba(74, 63, 77, .5);
}
.chan__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.chan--tg   .chan__ico { background: #29a9eb; }
.chan--wa   .chan__ico { background: #25d366; }
.chan--mail .chan__ico { background: var(--terra); }
.chan__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chan__txt b { font-size: 15px; color: var(--text); }
.chan__txt small { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 0 var(--pad-x) 40px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.footer__sep { color: #cfc3d0; margin: 0 4px; }
.footer__link { text-decoration: underline; transition: color .18s var(--ease); }
.footer__link:hover { color: var(--terra); }

@media (max-width: 560px) {
  .footer__sep { display: none; }
  .footer__link { display: block; margin-top: 4px; }
}

/* ============================================================
   TO TOP (кнопка «Наверх»)
   ============================================================ */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 18px 10px;
  border: none;
  cursor: pointer;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  /* та же «капелька», что у бейджа лого — один угол острее остальных */
  border-radius: 22px 22px 22px 6px;
  box-shadow: 0 4px 0 #443840, 0 14px 26px -14px rgba(74, 63, 77, .55);
  opacity: 0;
  transform: translateY(14px) scale(.92);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease), background-color .18s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover { background: #50424a; }
.to-top:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #443840, 0 6px 14px -10px rgba(74, 63, 77, .5);
}
.to-top__icon { display: block; }

@media (max-width: 560px) {
  .to-top { right: 16px; bottom: 16px; padding: 10px 14px 9px; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --pad-x: 28px; }

  .nav__burger { display: flex; }
  .nav__menu {
    position: absolute;
    top: 100%;
    right: var(--pad-x);
    left: var(--pad-x);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: #fff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 20px 40px -20px rgba(74, 63, 77, .5);
    transform-origin: top;
    transform: scaleY(.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav__menu a { padding: 12px 14px; border-radius: 14px; }
  .nav__menu a:not(.nav__cta):hover { background: var(--bg); }
  .nav__cta { text-align: center; }
  .nav.is-open .nav__menu { opacity: 1; transform: none; pointer-events: auto; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  /* фото под текстом (по макету): заголовок и кнопка сразу на первом экране */
  .hero__photo { max-width: 360px; margin: 0 auto; }
  .hero__lead { max-width: none; }

  .certs__grid,
  .results__grid { grid-template-columns: repeat(2, 1fr); }
  .method__grid { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; }

  .contact__links { grid-template-columns: 1fr; max-width: 440px; }
}

@media (max-width: 560px) {
  :root { --pad-x: 20px; }

  .hero { padding: 24px var(--pad-x) 40px; }
  .hero__title { font-size: 36px; }
  .section-title { font-size: 28px; }
  .about__title, .contact__title { font-size: 30px; }

  .trust { gap: 32px; }
  .about { padding: 30px 24px; border-radius: 28px; }
  .about__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .certs, .method { padding: 36px var(--pad-x); }
  .certs__grid { grid-template-columns: 1fr; }
  .results__grid { grid-template-columns: 1fr; }
  .results { padding: 36px 24px; }
  .contact__inner { padding: 40px 24px; border-radius: 30px; }

  /* Кнопки на всю ширину, удобные для касания */
  .btn--primary { display: block; width: 100%; min-height: 48px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
