/* ============================================================
   Рядом — онлайн-школа для собак и людей
   Палитра: крем #FAF5EC, тёмно-зелёный #1C332C, терракота #E0623A,
   светло-зелёный #DCE9C6, персиковый #F8DDBE, голубой #CFE0E2
   ============================================================ */

:root {
  --cream: #FAF5EC;
  --green-dark: #1C332C;
  --green-deep: #1E352E;
  --orange: #E0623A;
  --orange-soft: #E08A6E;
  --lime: #DCE9C6;
  --lime-card: #CDDFAE;
  --peach: #F8DDBE;
  --blue: #CFE0E2;
  --text-muted: #5C6B62;
  --text-on-dark: #B9C7BE;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', Arial, sans-serif;
  --radius-lg: 28px;
  --shadow-card: 0 24px 60px rgba(28, 51, 44, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--green-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Общие элементы ---------- */

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow-orange { color: var(--orange); }

.eyebrow-line {
  display: inline-block;
  width: 34px;
  height: 2px;
  background: var(--orange);
  flex: none;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: 0.5px;
}

.title-cream { color: #F3EEDF; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  padding: 18px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn svg { width: 20px; height: 20px; }

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 14px 30px rgba(224, 98, 58, 0.32);
}

.btn-primary:hover { background: #d4562e; }

.btn-dark {
  background: var(--green-dark);
  color: #fff;
}

.btn-outline-dark {
  background: transparent;
  color: var(--green-dark);
  border: 1.5px solid rgba(28, 51, 44, 0.45);
  padding: 14px 28px;
}

.btn-outline-dark:hover { border-color: var(--green-dark); }

.link-underline {
  color: var(--green-dark);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid rgba(224, 98, 58, 0.55);
  padding-bottom: 4px;
  transition: border-color 0.2s ease;
}

.link-underline:hover { border-color: var(--orange); }

.link-dark { color: var(--green-dark); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 236, 0.92);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 92px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green-dark);
}

.logo-paw { width: 34px; height: 34px; }

.logo-text {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
}

.main-nav {
  display: flex;
  gap: 44px;
}

.main-nav a {
  color: var(--green-dark);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-nav a:hover { color: var(--orange); }

.burger { display: none; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding: 24px 40px 32px;
  background: var(--cream);
  border-bottom: 1px solid rgba(28, 51, 44, 0.1);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  color: var(--green-dark);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 60px 0 110px;
}

/* Низкие экраны (небольшой ноутбук, zoom, крупный системный шрифт):
   сжимаем вертикальные отступы hero, чтобы CTA-кнопка оставалась
   на первом экране */
@media (max-height: 820px) {
  .hero { padding: 24px 0 48px; }
  /* Заголовок масштабируется по высоте окна: 4 строки serif-текста —
     главный «пожиратель» первого экрана на низких экранах */
  .hero-title {
    font-size: min(72px, clamp(2.2rem, 5.6vw, 9.5svh));
    margin-bottom: clamp(14px, 2svh, 24px);
  }
  .hero-sub { font-size: 16px; margin-bottom: clamp(16px, 2.5svh, 28px); }
  .hero-actions { margin-bottom: clamp(20px, 3svh, 32px); }
}

/* Ещё жёстче для совсем коротких окон */
@media (max-height: 680px) {
  .hero { padding: 16px 0 32px; }
  .hero-proof { display: none; }
  .hero-eyebrow { margin-bottom: 12px; }
}

/* Fluid-высоты: hero и его визуал подстраиваются под низкие экраны
   и под увеличение системного шрифта / масштаба браузера (svh и vh
   пересчитываются при zoom, px — нет) */
.hero-media {
  width: 100%;
  max-width: min(470px, 26vw);
  height: clamp(320px, 46svh, 640px);
  border-radius: 240px 240px 24px 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #7FA6C4 0%, #B9CFDD 42%, #8E9A7B 68%, #5C6650 100%);
  box-shadow: var(--shadow-card);
}

.hero::before {
  content: '';
  position: absolute;
  left: -260px;
  top: 120px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 1.5px solid rgba(224, 98, 58, 0.35);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: 0.5px;
  margin-bottom: clamp(20px, 3svh, 32px);
}

.hero-title em {
  color: var(--orange);
  font-style: italic;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: clamp(24px, 4svh, 40px);
}

/* <br> только на широких экранах: при zoom/увеличенном шрифте
   принудительный перенос растягивает блок в высоту */
@media (max-width: 1280px) {
  .hero-sub br { display: none; }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  margin-bottom: clamp(32px, 5svh, 56px);
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-stack { display: flex; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark);
  border: 2.5px solid var(--cream);
  margin-right: -12px;
}

.avatar-green { background: #B9CFA8; }
.avatar-lime { background: #CDDFAE; }
.avatar-blue { background: #AECBD1; }

.proof-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-left: 8px;
}

.proof-text strong {
  color: var(--green-dark);
  font-size: 16px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-circle-decor {
  position: absolute;
  right: -40px;
  top: -50px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: var(--lime);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img.img-missing { display: none; }

.hero-card {
  position: absolute;
  left: -8%;
  bottom: 40px;
  width: 250px;
  background: #fff;
  border-radius: 22px;
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}

.hero-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.card-paw { width: 22px; height: 22px; }

.hero-card-text {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.28;
}

/* ---------- Courses ---------- */

.courses {
  background: var(--green-deep);
  padding: 110px 0 120px;
}

.courses-head {
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 72px;
}

.courses-head .eyebrow { color: var(--orange-soft); }

.courses-head-text {
  color: var(--text-on-dark);
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: 8px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.course-card {
  border-radius: var(--radius-lg);
  padding: 36px 38px 42px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  color: var(--green-dark);
  transition: transform 0.25s ease;
}

.course-card:hover { transform: translateY(-8px); }

.course-green { background: var(--lime-card); }
.course-peach { background: var(--peach); }
.course-blue { background: var(--blue); }

.course-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.course-num {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.course-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(250, 245, 236, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
  flex: none;
}

.course-arrow svg { width: 20px; height: 20px; }

.course-arrow-dark {
  background: var(--green-dark);
  color: #F3EEDF;
}

.course-card-body {
  margin-top: auto;
}

.course-tag {
  font-size: 15px;
  color: rgba(28, 51, 44, 0.68);
  margin-bottom: 12px;
}

.course-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  margin-bottom: 18px;
}

.course-desc {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(28, 51, 44, 0.78);
  margin-bottom: 28px;
}

.course-card .link-underline {
  font-size: 15px;
  border-bottom-color: rgba(28, 51, 44, 0.5);
}

/* ---------- How it works ---------- */

.how { padding: 120px 0; }

.how-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: start;
}

.how-text {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 28px;
  max-width: 400px;
}

.how-steps {
  list-style: none;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 64px 260px 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 34px 0;
  border-top: 1px solid rgba(28, 51, 44, 0.18);
}

.step:last-child { border-bottom: 1px solid rgba(28, 51, 44, 0.18); }

.step-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--orange);
}

.step-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 34px;
}

.step-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- Quote ---------- */

.quote { padding: 20px 0 120px; }

.quote-box {
  position: relative;
  background: var(--orange);
  border-radius: 36px;
  padding: 84px 90px;
  overflow: hidden;
  color: #fff;
}

.quote-decor {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.quote-decor-1 {
  width: 460px;
  height: 460px;
  right: 120px;
  top: -260px;
}

.quote-decor-2 {
  width: 420px;
  height: 420px;
  right: -60px;
  bottom: -240px;
  border-color: rgba(255, 255, 255, 0.2);
}

.quote-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 70px;
  align-items: center;
}

.quote-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 26px;
}

.quote-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.22;
}

.quote-author {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
}

.quote-role {
  font-size: 16px;
  opacity: 0.88;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 28px;
}

.quote-stats {
  display: flex;
  gap: 70px;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.1;
}

.stat-label {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}

/* ---------- Contact ---------- */

.contact {
  background: #D9E7C9;
  padding: 130px 0;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-text {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 28px;
  max-width: 430px;
}

.contact-form {
  background: #FDFBF6;
  border-radius: 32px;
  padding: 52px 50px 40px;
  box-shadow: var(--shadow-card);
}

.field {
  display: block;
  margin-bottom: 30px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.field input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid rgba(28, 51, 44, 0.25);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--green-dark);
  padding: 8px 0 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.field input::placeholder { color: #9AA8A0; }

.field input:focus { border-bottom-color: var(--orange); }

.field input.input-error { border-bottom-color: #C0392B; }

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.form-note {
  text-align: center;
  font-size: 13px;
  color: #8B988F;
  margin-top: 20px;
}

.form-success {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--green-dark);
  margin-top: 20px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--green-deep);
  padding: 44px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo-light { color: #F3EEDF; }

.footer-copy {
  color: var(--text-on-dark);
  font-size: 15px;
}

.footer-mail {
  color: #F3EEDF;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-mail:hover { color: var(--orange-soft); }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .hero { padding: 24px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  /* Контент идёт первым: кнопка не должна уезжать за картинку */
  .hero-media { max-width: min(420px, 90vw); }
  .hero-card { left: 50%; transform: translateX(-90%); }
  .hero-proof { margin-bottom: 8px; }
  .courses-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}

@media (max-width: 1100px) {
  .courses-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .course-card { min-height: auto; }
  .how-inner { grid-template-columns: 1fr; gap: 48px; }
  .quote-inner { grid-template-columns: 1fr; gap: 48px; }
  .quote-box { padding: 60px 48px; }
  .contact-inner { grid-template-columns: 1fr; gap: 56px; }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .main-nav { display: none; }
  /* CTA шапки остаётся видимой: на средних экранах (в т.ч. при zoom)
     это второй способ попасть к курсам; прячем её только вместе с
     переходом на бургер-меню */
  .header-cta { padding: 10px 18px; font-size: 14px; }
  .burger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .burger span {
    width: 26px;
    height: 2.5px;
    background: var(--green-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .burger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
  .header-inner { height: 76px; }
  .hero { padding: 24px 0 60px; }
  .hero-title { font-size: clamp(2.4rem, 13vw, 52px); }
  .hero-card { position: static; transform: none; width: 100%; max-width: 320px; margin: -40px auto 0; }
  .hero-visual { flex-direction: column; align-items: center; gap: 0; }
  .step { grid-template-columns: 48px 1fr; gap: 16px; }
  .step-title { grid-column: 2; }
  .step-text { grid-column: 2; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .contact-form { padding: 36px 26px 28px; }
}
