/*
 * Открытый урок «Хеллоуин с привидением Бу» (/halloween/), Незабудка.
 * Основа — lampa-open/style.css. Мобильная вёрстка по умолчанию, десктоп — от 900px.
 */

:root {
  --orange: #FFAB38;
  --orange-hover: #F59A1C;
  --green: #5AA052;
  --green-hover: #4E9047;
  --blue: #0C89DA;
  --coral: #FF5457;
  --navy: #264D9E;
  --cream: #F8F4EC;
  --cream-2: #FFFCF3;
  --paper: #F9F8F6;
  --paper-2: #EFE8DA;
  --line: #E6E0D3;
  --ink: #122A33;
  --muted: #3D5058;
  --white: #FFFFFF;
  --black: #000000;

  --font-display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --container: 1200px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
p, figure, dl, dd { margin: 0; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  border: 0; border-radius: var(--radius);
  font: 700 17px/1.2 var(--font-body); color: var(--ink);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s, transform .1s;
}
.btn--primary { background: var(--orange); }
.btn--primary:hover { background: var(--orange-hover); }
.btn--whatsapp { background: var(--green); }
.btn--whatsapp:hover { background: var(--green-hover); }
.btn:active { transform: scale(.98); }
.btn--block { display: flex; width: 100%; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--cream); border-bottom: 1px solid var(--ink);
}
.site-header__inner { min-height: 64px; display: flex; align-items: center; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { width: auto; height: 30px; }

/* ---------- Первый экран ---------- */

.hero { padding: 28px 0 44px; }
.hero__grid { display: grid; gap: 18px; }
.hero__text { display: flex; flex-direction: column; gap: 18px; }
.hero__title { font-size: 30px; line-height: 1.18; }
.hero__lead { font-size: 17px; line-height: 1.55; color: var(--muted); }
.hero__cta { display: flex; flex-direction: column; gap: 18px; }
.hero__cta .btn { width: 100%; }

.date-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--white);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-weight: 700; font-size: 17px;
}
.date-chip svg { flex: 0 0 24px; color: var(--navy); }

.boo-frame {
  position: relative; aspect-ratio: 800 / 766; overflow: hidden;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 16px;
}
.boo-frame img { width: 100%; height: 100%; object-fit: cover; }
.boo-frame__plaque {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--orange); color: var(--ink);
  font-family: var(--font-display); font-size: 21px; line-height: 1.15; text-align: center;
}

/* ---------- История Бу ---------- */

.story { position: relative; background: var(--navy); color: var(--cream-2); padding-bottom: 52px; }
.story__wave { display: block; width: 100%; height: 28px; background: var(--cream); fill: var(--navy); }
.story__sparkle { position: absolute; right: 40px; top: 74px; fill: var(--orange); }
.story__inner { padding-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.story__head { display: flex; flex-direction: column; gap: 20px; }
.story__title-row { display: flex; align-items: flex-end; gap: 12px; }
.story__title { flex: 1 1 auto; font-size: 26px; line-height: 1.2; }
.story__title span { color: var(--orange); }
.story__ghost { flex: 0 0 72px; width: 72px; height: 86px; transform: rotate(8deg); }

.bubble {
  background: var(--cream-2); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 22px; padding: 16px 18px;
  box-shadow: 5px 5px 0 var(--ink);
}
.bubble p { font-size: 16px; line-height: 1.55; font-weight: 500; }

.story__sub { margin-top: 6px; font-family: var(--font-display); font-size: 20px; line-height: 1.25; }

.tasks { display: grid; gap: 18px; padding-right: 6px; }
.task {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink); border: 3px solid var(--ink); border-radius: 22px;
  padding: 14px 16px; box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.2deg);
}
.task:nth-child(even) { transform: rotate(1deg); }
.task--cream { background: var(--cream-2); }
.task--orange { background: var(--orange); }
.task p { font-size: 16px; line-height: 1.45; font-weight: 600; }
.task__icon {
  flex: 0 0 56px; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--ink); border-radius: 50%;
}
.task--cream .task__icon { background: var(--orange); }
.task--orange .task__icon { background: var(--cream-2); }
.task__icon svg {
  width: 30px; height: 30px;
  fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Логопедическая работа ---------- */

.section { padding: 44px 0; }
.section--speech { padding-bottom: 0; }

.speech {
  background: var(--white); border: 1px solid #D9D2C3; border-radius: 16px;
  padding: 24px 20px; display: flex; flex-direction: column; gap: 16px;
}
.speech__title { font-size: 24px; line-height: 1.22; }
.speech__list { margin: 0; padding: 0; list-style: none; }
.speech__list li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.speech__list li:last-child { border-bottom: 0; }
.speech__list img { flex: 0 0 24px; width: 24px; height: 24px; object-fit: contain; }

/* ---------- Педагог и формат ---------- */

.section--teacher { padding-bottom: 48px; }
.teacher { display: flex; flex-direction: column; gap: 20px; }
.teacher__person { display: flex; align-items: center; gap: 16px; }
.teacher__photo {
  flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover;
  border-radius: 50%; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--orange);
}
.teacher__name { display: flex; flex-direction: column; gap: 2px; }
.teacher__name span:first-child { font-size: 14px; font-weight: 600; color: var(--muted); }
.teacher__name strong { font-size: 18px; }
.teacher__name span:last-child { font-size: 15px; color: var(--muted); }

.facts { border-top: 1px solid var(--ink); }
.facts > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--ink); font-size: 15px;
}
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; text-align: right; }
.facts dd b { font-weight: 700; }

.teacher__cta .btn { width: 100%; }

/* ---------- Подвал ---------- */

.site-footer { background: var(--black); color: var(--cream); padding: 40px 0 32px; }
.site-footer a { color: var(--cream); }
.site-footer__top { display: flex; flex-direction: column; gap: 22px; }
.site-footer__logo { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }
.site-footer__logo img { width: auto; height: 36px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 15px; }
.footer-nav a { padding: 10px 0; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.social { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.social__links { display: flex; flex-wrap: wrap; gap: 8px; }
.social__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--cream); border-radius: 12px;
  font-weight: 600; text-decoration: none;
}
.social__links a:hover { background: rgba(248, 244, 236, .12); }
.site-footer__bottom {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--cream); font-size: 13px;
}
.site-footer__bottom a { padding: 6px 0; }

/* ---------- Форма заявки (диалог) ---------- */

.lead-dialog {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%;
  max-height: 100dvh; background: transparent; color: var(--ink);
}
.lead-dialog::backdrop { background: rgba(18, 42, 51, .55); }
.lead-dialog[open] { animation: sheet-in .25s ease-out; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.lead {
  position: relative; background: var(--cream);
  border-radius: 20px 20px 0 0; overflow: hidden auto; max-height: 100dvh;
}
.lead__close {
  position: absolute; top: 10px; right: 8px; z-index: 1;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--cream); cursor: pointer;
}

.lead__group {
  background: var(--navy); color: var(--cream-2);
  padding: 14px 16px 22px; display: flex; flex-direction: column; gap: 14px;
}
.lead__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--cream); opacity: .5; margin: 0 auto; }
.lead__eyebrow {
  padding-right: 44px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--orange);
}
.lead__title { font-size: 26px; line-height: 1.15; }
.lead__info {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 14px; background: rgba(255, 252, 243, .12); font-size: 15px;
}
.lead__info > div { display: flex; align-items: flex-start; gap: 10px; }
.lead__info svg { flex: 0 0 20px; margin-top: 1px; color: var(--orange); }

.lead__body { padding: 22px 16px 28px; }

.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-form__row { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1.5px solid var(--ink); border-radius: 12px; background: var(--white);
  font: 500 16px var(--font-body); color: var(--ink);
}
.field input::placeholder { color: #6B7C84; }
.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input[aria-invalid="true"] { border-color: var(--coral); border-width: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--navy); }

.lead-form__error {
  font-size: 13px; line-height: 1.4; color: var(--ink);
  background: #FFE3E3; border: 1.5px solid var(--coral); border-radius: 10px; padding: 10px 12px;
}
.lead-form .btn { min-height: 54px; margin-top: 4px; }

.lead-done { display: flex; flex-direction: column; gap: 12px; }
.lead-done__badge {
  align-self: flex-start; background: var(--paper-2);
  border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700;
}
.lead-done strong { font-size: 18px; line-height: 1.3; }
.lead-done p { font-size: 15px; color: var(--muted); }
.lead-done__back {
  align-self: center; min-height: 44px; padding: 0 8px; display: flex; align-items: center;
  font: 600 14px var(--font-body); color: var(--muted); background: none; border: 0; text-decoration: underline; cursor: pointer;
}

/* ---------- Согласие на cookie ---------- */

.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--ink); color: var(--cream);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px;
  font-size: 13px; line-height: 1.4;
}
.cookie p { flex: 1 1 260px; }
.cookie a { color: var(--cream); }
.cookie__actions { display: flex; gap: 8px; }
.cookie__actions button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px;
  font: 700 14px var(--font-body); cursor: pointer;
}
.cookie__accept { background: var(--orange); color: var(--ink); }
.cookie__accept:hover { background: var(--orange-hover); }
.cookie__decline { background: transparent; color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Десктоп
   ========================================================================== */

@media (min-width: 900px) {
  :root { --gutter: 24px; }

  .site-header__inner { min-height: 72px; }
  .logo img { height: 36px; }

  .hero { padding: 64px 0 80px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 48px; align-items: center; }
  .hero__text { gap: 24px; }
  .hero__title { font-size: 56px; line-height: 1.12; }
  .hero__lead { font-size: 19px; max-width: 540px; }
  .hero__cta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
  .hero__cta .btn { width: auto; }
  .date-chip { min-height: 68px; padding: 0 22px; }
  .btn--big { min-height: 68px; padding: 0 52px; font-size: 20px; border-radius: 16px; }
  .boo-frame { border-radius: 20px; }
  .boo-frame__plaque { left: 16px; right: 16px; bottom: 16px; padding: 12px 16px; border-radius: 14px; font-size: 26px; }

  .story { padding-bottom: 80px; }
  .story__wave { height: 40px; }
  .story__sparkle { right: 10%; top: 90px; }
  .story__inner { padding-top: 32px; gap: 28px; }
  .story__head { flex-direction: row; align-items: flex-end; gap: 40px; }
  .story__title-row { flex: 1 1 520px; gap: 16px; }
  .story__title { flex: 0 1 auto; font-size: 38px; }
  .story__ghost { flex-basis: 84px; width: 84px; height: 100px; }
  .bubble { flex: 1 1 420px; padding: 20px 24px; border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); }
  .bubble p { font-size: 18px; }
  .story__sub { margin-top: 12px; font-size: 24px; }
  .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; padding-right: 8px; }
  .task { gap: 18px; padding: 20px 22px; border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); transform: rotate(-1deg); }
  .task:nth-child(2), .task:nth-child(3) { transform: rotate(.8deg); }
  .task:nth-child(4) { transform: rotate(-1deg); }
  .task p { font-size: 18px; }
  .task__icon { flex-basis: 64px; width: 64px; height: 64px; }
  .task__icon svg { width: 34px; height: 34px; }

  .section { padding: 72px 0; }
  .section--speech { padding-bottom: 0; }
  .speech {
    flex-direction: row; align-items: center; gap: 56px;
    padding: 48px; border-radius: 20px;
  }
  .speech__title { flex: 1 1 360px; font-size: 34px; }
  .speech__list { flex: 1 1 420px; }
  .speech__list li { gap: 14px; padding: 13px 0; font-size: 18px; }
  .speech__list img { flex-basis: 26px; width: 26px; height: 26px; }

  .section--teacher { padding-bottom: 88px; }
  .teacher {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 56px; row-gap: 40px; align-items: center;
  }
  .teacher__person { gap: 24px; }
  .teacher__photo { flex-basis: 160px; width: 160px; height: 160px; box-shadow: 6px 6px 0 var(--orange); }
  .teacher__name { gap: 4px; }
  .teacher__name span:first-child { font-size: 16px; }
  .teacher__name strong { font-size: 24px; line-height: 1.25; }
  .teacher__name span:last-child { font-size: 17px; }
  .facts > div { padding: 14px 0; font-size: 17px; gap: 16px; }
  .teacher__cta { grid-column: 1 / -1; display: flex; justify-content: center; }
  .btn--huge { width: 100%; max-width: 520px; min-height: 72px; padding: 0 48px; font-size: 21px; border-radius: 18px; }

  .site-footer { padding: 48px 0 36px; }
  .site-footer__top { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
  .site-footer__logo { align-self: center; }
  .site-footer__logo img { height: 40px; }
  .footer-nav { font-size: 16px; }
  .social { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
  .site-footer__bottom { flex-direction: row; gap: 28px; margin-top: 32px; padding-top: 20px; }

  .lead-dialog { margin: auto; width: calc(100% - 48px); max-width: 820px; }
  .lead-dialog[open] { animation-name: dialog-in; }
  @keyframes dialog-in { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
  .lead {
    display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    border-radius: 20px; max-height: calc(100dvh - 48px);
  }
  .lead__close { top: 8px; color: var(--ink); }
  .lead__close:hover { background: var(--paper-2); }
  .lead__grip { display: none; }
  .lead__group { padding: 36px 32px; }
  .lead__eyebrow { padding-right: 0; }
  .lead__title { font-size: 30px; }
  .lead__body { padding: 40px 32px 32px; }
  .lead-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-done { padding-top: 12px; }
  .lead-done strong { font-size: 20px; }
  .lead-done p { font-size: 16px; }

  .cookie { padding-top: 12px; padding-bottom: 12px; font-size: 14px; }
  .cookie p { flex: 0 1 auto; }
}

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