/* NT Somic — лицензия SIL OFL 1.1 (свободная, см. public/fonts/NT_Somic_LICENSE.txt), self-hosted */
@font-face {
  font-family: 'NT Somic';
  src: url('/fonts/NTSomic-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NT Somic';
  src: url('/fonts/NTSomic-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NT Somic';
  src: url('/fonts/NTSomic-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Палитра — сверено с фреймом Colors в Figma */
  --color-accent-red: #DC5139;
  --color-text-dark: #2F2F2F;
  --color-bg-white: #FFFFFF;
  --color-bg-cream: #FFFBF7;
  --color-deco-pink: #F5CBDE;
  --color-deco-green: #92D48D;
  --color-deco-coral: #FFB09B;
  --color-deco-lavender: #B9AAD9;
  --color-deco-yellow: #F4D469;
  --color-btn-primary: #15B0EF;
  --color-btn-secondary: #DBFBFB;

  /* Типографика — фрейм Fonts в Figma */
  --font-main: 'NT Somic', 'Segoe UI', sans-serif;
  --fs-header-48: 48px;
  --fs-header-42: 42px;
  --fs-header-26: 26px;
  --fs-header-24: 24px;
  --fs-header-20: 20px;
  --fs-text-18: 18px;
  --fs-text-16: 16px;
  --fs-text-14: 14px;

  --radius-card: 30px;
  --radius-card-sm: 20px;
  --container-width: 1280px;
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--fs-text-18);
  color: var(--color-text-dark);
  background: var(--color-bg-cream);
}

h1, h2, h3 { margin: 0 0 16px; font-weight: 700; line-height: 1.15; }
h1 { font-size: var(--fs-header-48); }
h2 { font-size: var(--fs-header-42); }
h3 { font-size: var(--fs-header-24); }
p { line-height: 1.5; margin: 0 0 16px; }
ul { padding-left: 20px; line-height: 1.6; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* Кнопки — pill-форма, TZ_front 8.1 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  border-radius: 999px;
  font-size: var(--fs-text-16);
  font-weight: 400;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--color-btn-primary); color: #fff; }
.btn-primary:hover { background: #0f9bd6; }
.btn-secondary { background: #fff; color: var(--color-text-dark); border: 1px solid var(--color-btn-primary); }
.btn-secondary:hover { background: var(--color-btn-secondary); }
.btn-outline { background: transparent; border: 1px solid var(--color-text-dark); color: var(--color-text-dark); }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* Шапка */
.header-wrap { padding-top: 24px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: var(--radius-card);
  padding: 12px 32px;
  position: relative;
  z-index: 30;
}
.site-header .logo { display: flex; align-items: center; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { text-decoration: none; font-size: var(--fs-text-16); color: var(--color-text-dark); text-transform: uppercase; }
.site-header nav a.active { color: var(--color-accent-red); font-weight: 700; }
.burger { display: none; background: none; border: none; font-size: 26px; cursor: pointer; }

@media (max-width: 900px) {
  .site-header nav {
    display: none; flex-direction: column; gap: 12px;
    position: absolute; top: 76px; left: 0; right: 0;
    background: #fff; padding: 20px; border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .site-header nav.open { display: flex; }
  .burger { display: block; }
}

/* Секции */
.section { padding: 64px 0; position: relative; }
.section-heading { max-width: 700px; }
.section-center { text-align: center; }
.section-center .section-heading { margin: 0 auto 40px; }
.eyebrow { text-transform: uppercase; font-size: var(--fs-text-14); letter-spacing: 0.05em; color: var(--color-text-dark); opacity: 0.7; }

/* Hero */
.hero { text-align: center; padding-top: 40px; }
.hero h1 { max-width: 720px; margin: 12px auto 16px; color: var(--color-accent-red); }
.hero p.lead { max-width: 570px; margin: 0 auto 28px; }
.hero .btn-row { justify-content: center; margin-bottom: 40px; }
.hero-illustration { max-width: 900px; margin: 0 auto; }

/* Карточки-плитки общего назначения */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cards-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards-grid, .cards-grid-2, .cards-grid-4 { grid-template-columns: 1fr; } }

.card {
  border-radius: var(--radius-card);
  padding: 28px;
}
.card h3 { font-size: var(--fs-header-20); margin-bottom: 8px; }
.card p { font-size: var(--fs-text-16); margin-bottom: 0; }

/* radius 20 — принципы работы (About "Почему выбирают", Team "Как мы работаем") по Figma-инспектору */
.card-sm { border-radius: var(--radius-card-sm); padding: 24px; }
.card-sm h3 { font-size: var(--fs-header-20); margin-bottom: 8px; }
.card-sm p { font-size: var(--fs-text-16); margin-bottom: 0; }

/* Белая карточка-пилюля с цветной обводкой (About "Среда") — radius 60, stroke 2px */
.outline-pill {
  background: #fff; border-radius: 60px; border: 2px solid var(--pill-color, var(--color-deco-yellow));
  padding: 16px 28px; text-align: center; font-weight: 700;
}

/* Карточка фото интерьера (About "Среда") — реальное фото с цветным бейджем-подписью поверх */
.interior-photo-card { position: relative; border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 4/3; }
.interior-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.interior-photo-card .tag-badge { position: absolute; left: 12px; bottom: 12px; }

/* Цветная пилюля-бейдж (About "Вы всегда знаете" / "Приходите, чтобы") — radius 60, залита цветом */
.solid-pill {
  background: var(--pill-color, var(--color-deco-yellow)); border-radius: 60px;
  padding: 16px 28px; font-weight: 700;
}

/* Маленький цветной бейдж-подпись внутри карточки (Programs "Результат", Events описание формата, Team роль) — radius 15 */
.tag-badge {
  display: inline-block; background: var(--pill-color, var(--color-deco-yellow)); border-radius: 15px;
  padding: 10px 16px; font-size: var(--fs-text-14); color: var(--color-text-dark);
}

/* Зелёный герой-баннер (About/Team верх страницы) — тот же паттерн, что .big-banner, но без доп. паддинга снизу */
.hero-banner { background: var(--color-deco-green); border-radius: var(--radius-card); padding: 48px; text-align: center; }
.hero-banner .btn-row { justify-content: center; }

/* Возрастные карточки программ (Главная, Programs) */
.age-cards .card:nth-child(5) { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.age-cards .card:nth-child(5) img { width: 200px; flex-shrink: 0; }
@media (max-width: 900px) { .age-cards .card:nth-child(5) { grid-column: span 1; flex-direction: column; } }

/* Доп. занятия карточки с иконкой */
.extra-card { text-align: left; }
.extra-card img { width: 100px; height: 100px; object-fit: contain; margin-bottom: 16px; }

/* Таймлайн "путь развития" */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; margin-top: 40px; }
.timeline::before {
  content: ""; position: absolute; top: 8px; left: 5%; right: 5%; height: 2px;
  background: repeating-linear-gradient(to right, var(--color-deco-yellow) 0 8px, transparent 8px 16px);
}
.timeline-step { position: relative; padding-top: 32px; }
.timeline-step::before {
  content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px;
  border-radius: 50%; background: var(--color-btn-primary);
}
.timeline-step h3 { font-size: var(--fs-header-20); }
.timeline-step p { font-size: var(--fs-text-16); }

/* Большая цветная плашка-секция (праздники на Главной) */
.big-banner {
  border-radius: var(--radius-card);
  padding: 56px;
  padding-bottom: 90px;
  position: relative;
}
.big-banner .section-heading { position: relative; z-index: 2; }
.pill-tags { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.pill-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 10px 18px; font-size: var(--fs-text-14);
}
.pill-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pill-color, var(--color-accent-red)); }
.banner-photo {
  position: absolute; border-radius: 50%; object-fit: cover; border: 6px solid #fff; z-index: 3;
}
.banner-photo-1 { width: 200px; height: 200px; left: 48px; bottom: -40px; }
.banner-photo-2 { width: 170px; height: 170px; right: 64px; top: -30px; }
@media (max-width: 900px) { .banner-photo { display: none; } .big-banner { padding-bottom: 40px; } }

/* Отзывы */
.review-card {
  background: #fff; border: 1px solid var(--color-deco-green); border-radius: var(--radius-card-sm);
  padding: 24px;
}
.stars { color: var(--color-deco-yellow); font-size: 18px; letter-spacing: 2px; margin-bottom: 12px; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.review-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--color-deco-lavender);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex-shrink: 0;
}
.review-meta strong { display: block; }
.review-meta span { font-size: var(--fs-text-14); opacity: 0.7; }

/* Команда — анонс на Главной */
.badge-pill {
  display: inline-block; background: var(--color-deco-yellow); border-radius: 999px;
  padding: 10px 24px; font-weight: 700; font-size: var(--fs-text-16); margin-bottom: 16px;
}
.avatar-strip { display: flex; justify-content: center; margin: 32px 0; flex-wrap: wrap; }
.avatar-strip img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 4px solid var(--color-bg-cream);
  margin-left: -16px;
}
.avatar-strip img:first-child { margin-left: 0; }
@media (max-width: 700px) {
  .avatar-strip img { width: 44px; height: 44px; margin-left: -10px; }
}

/* Финальный CTA (жёлтый блок) */
.final-cta {
  background: var(--color-deco-yellow); border-radius: var(--radius-card);
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px;
  padding: 48px;
}
.final-cta img { border-radius: 24px; object-fit: cover; width: 100%; height: 320px; }
@media (max-width: 900px) { .final-cta { grid-template-columns: 1fr; } .final-cta img { height: 220px; } }

/* Декоративные точки (плейсхолдер вместо ассетов паттерна) */
.deco-dot { position: absolute; border-radius: 50%; z-index: 0; }

/* Команда — страница /team */
.team-director { background: var(--color-bg-white); border: 1px solid var(--color-deco-lavender); }
.team-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .team-grid-3 { grid-template-columns: 1fr; } }
.team-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }

/* Модалки */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(47, 47, 47, 0.6);
  z-index: 100; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-card); padding: 32px; max-width: 480px; width: 90%;
  max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; font-size: var(--fs-text-14); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid #ddd; font-family: inherit; font-size: var(--fs-text-16);
}

/* Футер */
.site-footer { background: var(--color-deco-lavender); padding: 48px 0; margin-top: 64px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-copyright { margin: 0; font-size: var(--fs-text-14); }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { text-decoration: none; font-size: var(--fs-text-16); }
.footer-contacts { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-contacts a { text-decoration: none; }
.footer-social { display: flex; gap: 12px; margin-top: 4px; }
.footer-social img { width: 32px; height: 32px; }

@media (max-width: 700px) {
  .cards-grid, .cards-grid-2, .cards-grid-4, .timeline, .team-grid-3 { grid-template-columns: 1fr !important; }
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  .big-banner, .final-cta { padding: 28px; }
  .footer-inner { flex-direction: column; }
}
