/* ==========================================================================
   English Дети — единая дизайн-система (сайт, портал, CRM)
   Стиль: «стикеры» — толстая обводка, смещённая тень, яркие плашки.
   ========================================================================== */

/* Шрифты лежат на нашем сервере (assets/fonts), а не в Google Fonts: IP-адреса посетителей
   и детей не уходят за рубеж (ч. 5 ст. 18 152-ФЗ). Лицензия SIL OFL 1.1 — assets/fonts/OFL-*.txt.
   Файлы вариативные: один файл на набор символов покрывает все начертания из диапазона.
   Браузер скачивает только те наборы, символы которых есть на странице (unicode-range). */
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('../fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext нужен ради знака рубля ₽ (U+20BD) в ценах */
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Unbounded'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url('../fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url('../fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ₽ в крупных ценах (заголовочный шрифт); грузится, только если знак есть в тексте Unbounded */
@font-face {
  font-family: 'Unbounded'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url('../fonts/unbounded-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Основа */
  --cream: #FFF8EC;
  --cream-2: #FFF1DA;
  --paper: #FFFFFF;
  --ink: #1E1B3A;
  --ink-2: #4A4668;
  --ink-3: #8C88A8;
  --line: #1E1B3A;
  --hair: #EDE4D3;

  /* Акценты */
  --orange: #FF7A30;
  --orange-2: #E8601A;
  --orange-soft: #FFE3D1;
  --yellow: #FFC93C;
  --yellow-soft: #FFF1C2;
  --blue: #4D8DFF;
  --blue-soft: #DCE8FF;
  --mint: #22B894;
  --mint-soft: #D3F5EC;
  --pink: #FF6FA8;
  --pink-soft: #FFE0EE;
  --purple: #8A6CFF;
  --purple-soft: #E9E3FF;
  --red: #E5484D;
  --red-soft: #FFE1E1;

  /* Форма */
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 32px;
  --bw: 2.5px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --shadow-soft: 0 10px 30px rgba(30, 27, 58, .10);

  --f-head: 'Unbounded', 'Nunito', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::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(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 6vw, 68px); font-weight: 800; }
h2 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; }
h3 { font-size: clamp(19px, 2vw, 23px); font-weight: 700; }
h4 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.tiny { font-size: 13px; }
.small { font-size: 15px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hl { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 90%, transparent 90%); padding: 0 .08em; }
.hl-o { color: var(--orange); }
.hl-b { color: var(--blue); }
.hl-m { color: var(--mint); }
.hl-p { color: var(--pink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 14px; border-radius: 999px; background: var(--paper);
  border: var(--bw) solid var(--line); box-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 18px;
}

/* ---------- Кнопки ---------- */
.btn {
  --bg: var(--paper); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; min-height: 50px;
  background: var(--bg); color: var(--fg);
  border: var(--bw) solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 800; font-size: 16px; text-decoration: none; line-height: 1.1;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { --bg: var(--orange); --fg: #fff; }
.btn-yellow { --bg: var(--yellow); }
.btn-blue { --bg: var(--blue); --fg: #fff; }
.btn-mint { --bg: var(--mint); --fg: #fff; }
.btn-pink { --bg: var(--pink); --fg: #fff; }
.btn-dark { --bg: var(--ink); --fg: #fff; }
.btn-lg { padding: 18px 30px; min-height: 60px; font-size: 18px; }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.btn-sm:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: rgba(30,27,58,.06); box-shadow: none; transform: none; }
.btn-icon { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 12px; }

/* ---------- Карточки ---------- */
.card {
  background: var(--paper);
  border: var(--bw) solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-flat { box-shadow: none; }
.card-soft { border: 1.5px solid var(--hair); box-shadow: var(--shadow-soft); }
.bg-orange { background: var(--orange-soft); }
.bg-yellow { background: var(--yellow-soft); }
.bg-blue { background: var(--blue-soft); }
.bg-mint { background: var(--mint-soft); }
.bg-pink { background: var(--pink-soft); }
.bg-purple { background: var(--purple-soft); }
.bg-ink { background: var(--ink); color: #fff; }

/* ---------- Чипы и бейджи ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--paper);
  font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap;
}
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-weight: 800; font-size: 12px; line-height: 1.3;
  background: var(--hair); color: var(--ink); white-space: nowrap;
}
.badge.orange { background: var(--orange-soft); color: #A8430C; }
.badge.yellow { background: var(--yellow-soft); color: #7A5A00; }
.badge.blue { background: var(--blue-soft); color: #1D4FB8; }
.badge.mint { background: var(--mint-soft); color: #0E7258; }
.badge.pink { background: var(--pink-soft); color: #B0265E; }
.badge.purple { background: var(--purple-soft); color: #5236C9; }
.badge.red { background: var(--red-soft); color: #B42318; }
.badge.gray { background: #EEEAF4; color: var(--ink-2); }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-weight: 800; font-size: 14px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--line); border-radius: 14px;
  outline: none; transition: box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 4px rgba(77,141,255,.3); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%231E1B3A' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; margin-top: 1px; }

/* ---------- Табы-пилюли ---------- */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--paper); font-weight: 800; font-size: 15px;
  transition: background .15s, transform .15s;
}
.pill:hover { transform: translateY(-1px); }
.pill.is-active { background: var(--ink); color: #fff; }

/* ---------- Модалка и тосты ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30, 27, 58, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .15s ease;
}
.modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--paper); border: var(--bw) solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 28px;
  animation: popIn .2s cubic-bezier(.2,1.4,.4,1);
}
.toast-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px;
  font-weight: 700; box-shadow: var(--shadow-soft); animation: popIn .2s ease;
  max-width: calc(100vw - 32px);
}

/* ---------- Логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-head); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo img, .logo svg { width: 44px; height: 44px; }
.logo b { color: var(--orange); font-weight: 800; }

/* ---------- Анимации ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounceIn { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.floaty { animation: floaty 5s ease-in-out infinite; }
.wiggle { animation: wiggle 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Утилиты ---------- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
