@import url("fonts.css");

/* ==========================================================================
   Лестница - лендинг школы-парка.

   Правила системы, которые нельзя нарушать при доработках:
   * Один акцент действия - синий (--blue). Все кнопки, ссылки и фокус синие.
     Оранжевый и оливковый - только «цвет формата»: маркируют раздел или
     карточку, но никогда не становятся кнопкой.
   * Радиусы: кнопки и пилюли - полный круг, карточки 24px, медиа 20px,
     поля ввода 14px. Другие значения не вводить.
   * Тема одна на всю страницу. По умолчанию светлая; тёмная включается
     только кнопкой в шапке и запоминается в браузере. Секции не инвертируются.
   ========================================================================== */

/* --- 1. Токены ----------------------------------------------------------- */

:root {
  color-scheme: light;

  --paper: #FBFAF6;
  --surface: #FFFFFF;
  --surface-2: #F2F0E9;
  --surface-3: #E8E5DB;

  --ink: #23231F;
  --ink-2: #5B5B53;
  --ink-3: #8A8A80;

  --line: rgba(35, 35, 31, 0.10);
  --line-strong: rgba(35, 35, 31, 0.20);

  --blue: #0089CE;
  --blue-deep: #0071AB;
  --blue-text: #00669B;
  --blue-wash: #E4F2FA;

  --orange: #F98700;
  --orange-text: #A85C00;
  --orange-wash: #FDEEDC;

  --olive: #879122;
  --olive-text: #5E6716;
  --olive-wash: #EDEFDC;

  --on-accent: #FFFFFF;

  --shadow-1: 0 1px 2px rgba(35, 35, 31, 0.05), 0 8px 24px -12px rgba(35, 35, 31, 0.18);
  --shadow-2: 0 2px 4px rgba(35, 35, 31, 0.05), 0 22px 48px -20px rgba(35, 35, 31, 0.28);

  --r-card: 24px;
  --r-media: 20px;
  --r-field: 14px;
  --r-pill: 999px;

  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 11vw, 136px);
  --shell: 1220px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --paper: #16171A;
  --surface: #1D1F23;
  --surface-2: #24262B;
  --surface-3: #2E3137;

  --ink: #F2F1ED;
  --ink-2: #ADAEA6;
  --ink-3: #83847C;

  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);

  --blue: #2BA5E4;
  --blue-deep: #55B9EC;
  --blue-text: #7CCBF1;
  --blue-wash: rgba(43, 165, 228, 0.14);

  --orange: #FF9C2E;
  --orange-text: #FFB667;
  --orange-wash: rgba(255, 156, 46, 0.14);

  --olive: #AAB53C;
  --olive-text: #C6D067;
  --olive-wash: rgba(170, 181, 60, 0.14);

  --on-accent: #0D1114;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.4), 0 22px 48px -20px rgba(0, 0, 0, 0.7);
}

/* --- 2. База ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Golos Text", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Onest", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-weight: 600;
}

p { margin: 0; }
img { max-width: 100%; display: block; }
/* Базовое display:block у img перебивает UA-правило для [hidden], возвращаем его. */
[hidden] { display: none !important; }
a { color: var(--blue-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.section-head p {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 1.06rem;
  max-width: 60ch;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* --- 3. Логотип и знак --------------------------------------------------- */
/* Настоящий файл public/assets/logo.png (без перерисовки): кольца и слово
   «лестница» баке одной картинкой. Слово впечатано в изображение тёмным
   цветом на прозрачном фоне, поэтому в тёмной теме под ним нужна светлая
   подложка - иначе слово растворится в тёмном фоне страницы. */

.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }

.brand__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
}
:root[data-theme="dark"] .brand__badge {
  background: #FBFAF6;
  padding: 5px 10px;
}
.brand__badge--square {
  border-radius: 20px;
}
:root[data-theme="dark"] .brand__badge--square { padding: 14px 18px; }

.brand__logo { height: 52px; width: auto; display: block; }
.brand__logo--square { height: 116px; }

/* --- 4. Кнопки ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  font-family: "Onest", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:active { transform: translateY(1px) scale(0.985); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--blue); color: var(--on-accent); }
.btn--primary:hover { background: var(--blue-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink-3); background: var(--surface-2); }

.btn--sm { padding: 11px 20px; font-size: 0.94rem; }

/* --- 5. Шапка ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.topbar[data-stuck="true"] { border-bottom-color: var(--line); }

@supports not (backdrop-filter: blur(4px)) {
  .topbar { background: var(--paper); }
}

.topbar__inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar__nav a {
  font-size: 0.96rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: var(--r-pill);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.topbar__nav a:hover { color: var(--ink); background: var(--surface-2); }

.topbar__side { display: flex; align-items: center; gap: 10px; }

/* Кнопка внутри меню нужна только на мобильном: на десктопе она в шапке. */
.nav-cta { display: none; }

.icon-btn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }
/* В светлой теме показываем солнце, в тёмной луну. */
.icon-btn .icon-moon { display: none; }
:root[data-theme="dark"] .icon-btn .icon-sun { display: none; }
:root[data-theme="dark"] .icon-btn .icon-moon { display: block; }

.burger { display: none; }

@media (max-width: 1023px) {
  .topbar__nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 22px;
    box-shadow: var(--shadow-2);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .topbar__nav[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .topbar__nav a { padding: 13px 14px; font-size: 1.05rem; }
  .topbar__nav .nav-cta {
    display: inline-flex;
    margin-top: 10px;
    color: var(--on-accent);
    font-size: 1rem;
  }
  .topbar__nav .nav-cta:hover { background: var(--blue-deep); color: var(--on-accent); }
  .burger { display: inline-flex; }
  .topbar__side .btn { display: none; }
}

/* --- 6. Первый экран ----------------------------------------------------- */

.hero {
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: var(--section-y);
  display: grid;
  align-items: center;
  min-height: min(780px, calc(100dvh - 72px));
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.15rem, 3.6vw, 3.25rem);
  max-width: 22ch;
}

.hero__lede {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  max-width: 46ch;
}

.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media {
  position: relative;
  border-radius: var(--r-media);
  overflow: hidden;
  aspect-ratio: 4 / 4.2;
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
}
.hero__media > img { width: 100%; height: 100%; object-fit: cover; }

/* Слайдер первого экрана. Кадры лежат в photos/, порядок по имени файла.
   Смена каждые 3 секунды: она показывает пространство с разных сторон,
   а не крутится ради движения. */
.slides { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.slide[data-active="true"] { opacity: 1; }

.slides::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  background: linear-gradient(to top, rgba(12, 14, 16, 0.42), transparent);
  pointer-events: none;
}

.slides__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 7px;
  justify-content: center;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.35s var(--ease), background-color 0.35s var(--ease);
}
.dot:hover { background: rgba(255, 255, 255, 0.8); }
.dot[aria-selected="true"] { width: 24px; background: #FFFFFF; }
.dot:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
}

/* Запасной вариант, пока в public/img/ нет реальной фотографии школы. */
.media-fallback {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  padding: 24px 20px 18px;
  background:
    radial-gradient(120% 100% at 78% 12%, var(--blue-wash), transparent 62%),
    radial-gradient(110% 100% at 18% 88%, var(--orange-wash), transparent 60%),
    var(--surface-2);
}
.media-fallback img { width: min(52%, 190px); height: auto; opacity: 0.92; }
.media-fallback figcaption {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-3);
  text-align: center;
  max-width: 30ch;
}

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 4 / 3; order: -1; }
  .hero h1 { max-width: 100%; }
}

/* --- 7. Форматы (бенто) --------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(26px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }

.tile--wide { grid-column: span 7; }
.tile--narrow { grid-column: span 5; }

.tile__age {
  font-family: "Onest", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--tone-text, var(--ink-2));
  background: var(--tone-wash, var(--surface-2));
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--r-pill);
}
.tile h3 { font-size: clamp(1.45rem, 2.3vw, 1.95rem); }
.tile p { color: var(--ink-2); font-size: 1rem; max-width: 46ch; }

.tile--tone-blue { --tone: var(--blue); --tone-text: var(--blue-text); --tone-wash: var(--blue-wash); }
.tile--tone-orange { --tone: var(--orange); --tone-text: var(--orange-text); --tone-wash: var(--orange-wash); }
.tile--tone-olive { --tone: var(--olive); --tone-text: var(--olive-text); --tone-wash: var(--olive-wash); }

/* Фоновая подложка из фирменных дуг: даёт плиткам визуальное различие,
   вместо шести одинаковых белых карточек. */
.tile--art { background: linear-gradient(158deg, var(--tone-wash), var(--surface) 68%); }
.tile--art::after {
  content: "";
  position: absolute;
  right: -84px;
  bottom: -112px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 30px solid var(--tone);
  opacity: 0.16;
  pointer-events: none;
}
.tile--art2::after { right: -120px; bottom: -140px; width: 340px; height: 340px; border-width: 38px; }

.tile__photo {
  margin: -4px -4px 0;
  border-radius: var(--r-media);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  position: relative;
}
.tile__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
  .tile--wide, .tile--narrow { grid-column: span 12; }
  .tile { min-height: 0; }
}

/* --- 8. Наставники (сетка, перетекает по рядам) --------------------------- */
/* Карточек может быть сколько угодно: лишние не прячутся за скролл, а уходят
   на следующий ряд, страница просто становится длиннее. */

.people__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.people__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.person:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

.person__photo {
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }

.person__initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Onest", sans-serif;
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--tone-text, var(--ink-3));
  background: linear-gradient(160deg, var(--tone-wash, var(--surface-2)), var(--surface-2));
}

.person__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.person__name { font-family: "Onest", sans-serif; font-weight: 600; font-size: 1.15rem; }
.person__role { color: var(--tone-text, var(--ink-2)); font-size: 0.92rem; }
.person__bio { color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; }

.person--tone-blue { --tone-text: var(--blue-text); --tone-wash: var(--blue-wash); }
.person--tone-orange { --tone-text: var(--orange-text); --tone-wash: var(--orange-wash); }
.person--tone-olive { --tone-text: var(--olive-text); --tone-wash: var(--olive-wash); }

/* Скелет загрузки повторяет форму карточки, а не крутится спиннером. */
.person--skeleton { pointer-events: none; }
.person--skeleton .person__photo,
.skeleton-line { background: var(--surface-2); position: relative; overflow: hidden; }
.skeleton-line { height: 12px; border-radius: var(--r-pill); }
.skeleton-line--short { width: 55%; }
.person--skeleton .person__photo::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-3), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.notice {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-card);
  padding: 34px;
  color: var(--ink-2);
  max-width: 52ch;
}
.notice strong { color: var(--ink); font-family: "Onest", sans-serif; font-weight: 600; display: block; margin-bottom: 6px; }

/* --- 9. Стоимость -------------------------------------------------------- */

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.plan {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(28px, 3.2vw, 40px);
}
.plan--lead {
  background: linear-gradient(168deg, var(--blue-wash), var(--surface) 60%);
  border-color: color-mix(in srgb, var(--blue) 26%, transparent);
}
.plan__title { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.plan__price {
  font-family: "Onest", sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  margin-top: 12px;
  color: var(--blue-text);
}
.plan--lead .plan__price { font-size: 1.7rem; }
.plan__note { margin-top: 8px; color: var(--ink-2); font-size: 0.97rem; }

/* Что входит: три смысловых блока вместо десяти строк с линейками. */
.includes { margin-top: 30px; display: grid; gap: 22px; }
.includes__group { display: grid; gap: 8px; }
.includes__label {
  font-family: "Onest", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}
.includes__group p { color: var(--ink-2); font-size: 0.98rem; }

.plan-stack { display: grid; gap: 16px; }

.badge-discount {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--olive-wash);
  color: var(--olive-text);
  font-family: "Onest", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
}

.pricing__footnote {
  margin-top: 24px;
  color: var(--ink-3);
  font-size: 0.92rem;
  max-width: 70ch;
}

@media (max-width: 880px) { .pricing { grid-template-columns: 1fr; } }

/* --- 10. Вопросы --------------------------------------------------------- */

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 900px; }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 56px 26px 0;
  position: relative;
  font-family: "Onest", sans-serif;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.35;
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue-text); }

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  background: currentColor;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.faq summary::before { width: 16px; height: 2px; margin-top: -1px; }
.faq summary::after { width: 2px; height: 16px; margin-top: -8px; right: 13px; }
.faq details[open] summary::after { transform: rotate(90deg); opacity: 0; }

.faq__answer { padding: 0 0 30px; color: var(--ink-2); max-width: 68ch; }
.faq__answer p + p { margin-top: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq__answer { animation: faq-open 0.32s var(--ease); }
  @keyframes faq-open {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
  }
}

/* --- 11. Анкета ---------------------------------------------------------- */

.apply {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.apply__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.apply__aside h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.apply__aside p { margin-top: 18px; color: var(--ink-2); max-width: 40ch; }

.contact-list { margin-top: 30px; display: grid; gap: 16px; }
.contact-list div { display: grid; gap: 3px; }
.contact-list dt { font-size: 0.85rem; color: var(--ink-3); }
.contact-list dd { margin: 0; font-family: "Onest", sans-serif; font-weight: 500; font-size: 1.02rem; }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(26px, 3.2vw, 40px);
  display: grid;
  gap: 20px;
}

.field { display: grid; gap: 8px; }
.field > label {
  font-family: "Onest", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
.field__hint { font-size: 0.85rem; color: var(--ink-2); }

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-field);
  padding: 14px 16px;
  width: 100%;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field textarea { min-height: 118px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }

.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 24%, transparent);
}

.field[data-invalid="true"] input:not([type="radio"]):not([type="checkbox"]),
.field[data-invalid="true"] select {
  border-color: #C22B1F;
}
:root[data-theme="dark"] .field[data-invalid="true"] input,
:root[data-theme="dark"] .field[data-invalid="true"] select { border-color: #FF7A6E; }

.field__error { font-size: 0.87rem; color: #A61E14; min-height: 0; }
:root[data-theme="dark"] .field__error { color: #FF9C92; }
.field:not([data-invalid="true"]) .field__error { display: none; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form__consent { font-size: 0.85rem; color: var(--ink-2); max-width: 34ch; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { font-size: 0.95rem; }
.form__status[data-kind="error"] { color: #A61E14; }
:root[data-theme="dark"] .form__status[data-kind="error"] { color: #FF9C92; }

.form-done {
  display: grid;
  gap: 12px;
  place-items: start;
  padding: clamp(30px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
  border-radius: var(--r-card);
}
.form-done h3 { font-size: 1.5rem; }
.form-done p { color: var(--ink-2); max-width: 44ch; }

.btn[data-busy="true"] { opacity: 0.72; pointer-events: none; }

@media (max-width: 900px) { .apply__grid { grid-template-columns: 1fr; } }

/* --- 12. Подвал ---------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 72px) 40px;
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer__about { max-width: 34ch; color: var(--ink-2); font-size: 0.96rem; margin-top: 16px; }
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h4 { font-size: 0.85rem; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.footer__col a, .footer__col span { color: var(--ink-2); text-decoration: none; font-size: 0.98rem; }
.footer__col a:hover { color: var(--blue-text); }

/* Кнопки-иконки сервисов: значки настоящие (Simple Icons), поэтому цвет
   держат свой брендовый, а не общий акцент сайта - как логотип, это тоже
   знак, который должен узнаваться. */
.contact-buttons { display: flex; gap: 10px; margin: 2px 0 4px; }
.contact-btn:hover { border-color: var(--line-strong); }
.contact-btn svg { width: 20px; height: 20px; }
.footer__legal {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

/* --- 13. Появление при скролле ------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); }
  .reveal[data-shown="true"] {
    opacity: 1;
    transform: none;
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .hero__enter {
    opacity: 0;
    animation: hero-in 0.8s var(--ease) forwards;
    animation-delay: var(--reveal-delay, 0ms);
  }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
