/* ==========================================================================
   Art Life — стили сайта
   Цвета и шрифт взяты из официального брендбука студии (ArtLife Guide 02.pdf)
   ========================================================================== */


/* --- 1. ПЕРЕМЕННЫЕ ------------------------------------------------------
   Здесь мы один раз даём имена фирменным цветам, а дальше по всему файлу
   пишем var(--orange) вместо того, чтобы помнить код #FF6D00.
   Захочешь поменять оттенок — правишь одну строчку здесь. */

:root {
  --orange:    #FF6D00;   /* Pumpkin — основной фирменный */
  --sandy:     #FFA766;   /* Sandy — светлый оранжевый */
  --black:     #262626;   /* Eerie Black — текст */
  --seashell:  #FFF2ED;   /* Seashell — тёплый светлый фон */
  --platinum:  #D2D6D9;   /* Platinum — рамки и разделители */
  --white:     #FFFFFF;

  --radius:      22px;    /* скругление углов — логотип круглый, и блоки тоже */
  --radius-big:  36px;
  --container:  1180px;   /* максимальная ширина содержимого */
}


/* --- 2. СБРОС -----------------------------------------------------------
   У браузера есть свои умолчания (отступы у заголовков и т.д.).
   Обнуляем их, чтобы всё считать самим. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;   /* ширина элемента считается вместе с рамкой и padding */
}

img {
  display: block;
  max-width: 100%;          /* картинка никогда не вылезет за свой блок */
  height: auto;
}

a { text-decoration: none; color: inherit; }


/* --- 3. БАЗОВАЯ ТИПОГРАФИКА -------------------------------------------- */

body {
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

p + p { margin-top: 14px; }   /* отступ появляется только между соседними абзацами */


/* --- 4. КОНТЕЙНЕР -------------------------------------------------------
   Невидимая «рамка» по центру страницы. Без неё на широком мониторе
   текст растянулся бы на всю ширину и его стало бы неудобно читать. */

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


/* --- 5. КНОПКИ ---------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  padding: 14px 28px;
  border: 2px solid var(--orange);
  border-radius: 100px;         /* 100px = кнопка-таблетка */
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  transition: 0.2s;             /* плавность при наведении */
}

.btn:hover {
  background: #e85f00;
  border-color: #e85f00;
  transform: translateY(-2px);  /* кнопка чуть приподнимается */
}

.btn--big   { padding: 18px 40px; font-size: 18px; }
.btn--small { padding: 10px 22px; font-size: 15px; }

.btn--ghost {                    /* «призрачная» кнопка: без заливки */
  background: transparent;
  color: var(--orange);
}
.btn--ghost:hover { background: var(--orange); color: var(--white); }


/* --- 6. ШАПКА ----------------------------------------------------------- */

.header {
  position: sticky;              /* шапка прилипает к верху при прокрутке */
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);   /* лёгкое размытие того, что проезжает под ней */
  border-bottom: 1px solid var(--platinum);
}

.header__inner {
  display: flex;                 /* элементы встают в строку */
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.header__menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav { display: flex; gap: 24px; }

/* Кнопка-бургер. На широком экране она спрятана,
   показывается только в медиазапросе для телефонов (раздел 17) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--black);
  border-radius: 3px;
  transition: 0.25s;
}

/* Когда меню открыто — три полоски превращаются в крестик */
.header.is-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav a {
  font-weight: 600;
  font-size: 16px;
  position: relative;
  padding-bottom: 3px;
}

.nav a::after {                  /* оранжевая полоска, растущая при наведении */
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.25s;
}
.nav a:hover::after { width: 100%; }


/* --- 7. ПЕРВЫЙ ЭКРАН ---------------------------------------------------- */

.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(255,167,102,0.55) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(255,109,0,0.35) 0%, transparent 50%),
    var(--seashell);
  padding: 110px 0 120px;
  text-align: center;
}

.hero__kicker {
  display: inline-block;
  background: var(--white);
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 26px;
}

.hero__title {
  font-size: 68px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero__title span { color: var(--orange); }

.hero__text {
  font-size: 20px;
  max-width: 620px;
  margin: 0 auto 38px;
  color: #4a4a4a;
}


/* --- 8. ПОЛОСА С ЦИФРАМИ ------------------------------------------------ */

.stats { background: var(--black); padding: 46px 0; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* четыре равные колонки */
  gap: 24px;
  text-align: center;
}

.stat { display: flex; flex-direction: column; }

.stat__num {
  font-size: 42px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}

.stat__label { color: var(--platinum); font-size: 15px; margin-top: 6px; }


/* --- 9. СЕКЦИИ И ЗАГОЛОВКИ --------------------------------------------- */

.section { padding: 96px 0; }

.section--soft   { background: var(--seashell); }
.section--accent { background: var(--orange); color: var(--white); }

.section__kicker {
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section--accent .section__kicker { color: var(--seashell); }

.section__title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 34px;
}


/* --- 10. О СТУДИИ ------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about__text .section__title { margin-bottom: 20px; }

.about__media img {
  border-radius: var(--radius-big);
  box-shadow: 0 24px 60px rgba(38, 38, 38, 0.16);
}


/* --- 11. КАРТОЧКИ КУРСОВ И ОТЗЫВОВ -------------------------------------
   auto-fit + minmax = «клади столько карточек в ряд, сколько влезет,
   но не уже 280px». Сетка сама перестроится на узком экране. */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

.card {
  background: var(--white);
  border: 1px solid var(--platinum);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(255, 109, 0, 0.18);
  border-color: var(--sandy);
}

.card__title { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.card__text  { color: #5a5a5a; flex-grow: 1; }   /* растягивается, чтобы цены выровнялись */

.card__price {
  font-size: 26px;
  font-weight: 800;
  color: var(--orange);
  margin: 22px 0 20px;
}
.card__price span { font-size: 15px; font-weight: 600; color: #8a8a8a; }

.card .btn { align-self: flex-start; }


/* --- 12. ГАЛЕРЕЯ -------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.gallery img {
  width: 100%;
  height: 320px;
  object-fit: cover;        /* картинка заполняет плитку без искажений */
  border-radius: var(--radius);
  cursor: pointer;
  transition: 0.3s;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 18px 44px rgba(38, 38, 38, 0.22);
}


/* --- 12б. ПРЕПОДАВАТЕЛИ ------------------------------------------------- */

.teachers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 32px;
}

.teacher {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;                  /* обрезает углы у картинки по радиусу блока */
  text-align: center;
  padding-bottom: 26px;
  transition: 0.25s;
}

.teacher:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(255, 109, 0, 0.18);
}

.teacher img {
  width: 100%;
  height: 340px;
  object-fit: cover;                 /* фото заполняет рамку без искажения пропорций */
  object-position: center 25%;       /* сдвигаем кадр вверх — к лицу */
  margin-bottom: 20px;
}

.teacher__name { font-size: 20px; font-weight: 800; }
.teacher__role { font-size: 15px; color: #7a7a7a; margin-top: 4px; }


/* --- 12в. НАГРАДЫ ------------------------------------------------------- */

.awards__lead { max-width: 640px; color: #5a5a5a; margin-bottom: 30px; }

.awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.awards img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius);
  border: 4px solid var(--seashell);
}


/* --- 13. ОТЗЫВЫ --------------------------------------------------------- */

.review {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  border-left: 5px solid var(--orange);
}

.review blockquote { font-size: 17px; font-style: italic; color: #4a4a4a; }
.review__author { margin-top: 18px; font-weight: 700; font-size: 15px; }


/* --- 14. КОНТАКТЫ ------------------------------------------------------- */

.contacts {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}

.contacts__info p { margin-bottom: 22px; }
.contacts__info strong { color: var(--orange); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.contacts__info a:hover { color: var(--orange); }

.contacts__map {
  background: var(--seashell);
  border-radius: var(--radius);
  min-height: 340px;
  overflow: hidden;          /* обрезает углы карты по радиусу блока */
}

.contacts__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}


/* --- 15. ФОРМА ЗАПИСИ --------------------------------------------------- */

.form-block { max-width: 620px; text-align: center; }
.form-block__lead { font-size: 18px; margin-bottom: 34px; opacity: 0.95; }

.form {
  background: var(--white);
  border-radius: var(--radius-big);
  padding: 38px 34px;
  text-align: left;
  color: var(--black);
}

.form__row { margin-bottom: 20px; }

.form label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.form input,
.form select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 18px;
  border: 2px solid var(--platinum);
  border-radius: 14px;
  background: var(--white);
  transition: 0.2s;
}

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--orange);   /* активное поле подсвечивается фирменным цветом */
}

.form .btn { width: 100%; margin-top: 8px; }

.form__note {
  font-size: 13px;
  color: #8a8a8a;
  text-align: center;
  margin-top: 14px;
  line-height: 1.45;
}


/* --- 16. ПОДВАЛ --------------------------------------------------------- */

.footer { background: var(--black); color: var(--platinum); padding: 54px 0; }

.footer__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: center;
}

.footer a:hover { color: var(--orange); }


/* ==========================================================================
   17. АДАПТИВ — как сайт ведёт себя на узких экранах

   @media (max-width: 900px) читается так: «всё, что ниже, применяй только
   если ширина экрана 900 пикселей или меньше». Обычные правила выше
   работают всегда, эти — включаются дополнительно и переопределяют их.
   ========================================================================== */


/* --- ПЛАНШЕТЫ И УЗКИЕ НОУТБУКИ (до 900px) ------------------------------ */

@media (max-width: 900px) {

  .section { padding: 68px 0; }

  .hero { padding: 80px 0 90px; }
  .hero__title { font-size: 46px; }
  .hero__text  { font-size: 18px; }

  .section__title { font-size: 32px; }

  /* Два блока рядом больше не помещаются — ставим их друг под друга */
  .about,
  .contacts {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  /* Четыре цифры в ряд слишком мелкие — делаем 2 на 2 */
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }

  .footer__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 20px; }
}


/* --- ТЕЛЕФОНЫ (до 760px) ------------------------------------------------ */

@media (max-width: 760px) {

  body { font-size: 16px; }

  /* Показываем бургер и прячем меню в выпадающую панель */
  .nav-toggle { display: flex; }

  .header__menu {
    position: absolute;          /* панель «висит» под шапкой */
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--platinum);
    padding: 12px 24px 24px;
    box-shadow: 0 20px 40px rgba(38, 38, 38, 0.12);

    display: none;               /* по умолчанию меню скрыто */
  }

  /* Класс is-open добавляет и убирает JavaScript при клике на бургер */
  .header.is-open .header__menu { display: flex; }

  .nav { flex-direction: column; gap: 0; }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--seashell);
    font-size: 17px;
  }
  .nav a::after { display: none; }   /* подчёркивание при наведении тут ни к чему */

  .header__menu .btn { margin-top: 18px; text-align: center; }

  /* Первый экран */
  .hero { padding: 56px 0 64px; }
  .hero__title { font-size: 34px; }
  .hero__text  { font-size: 17px; margin-bottom: 28px; }
  .hero__kicker { font-size: 12px; padding: 7px 16px; }

  .btn--big { padding: 16px 26px; font-size: 16px; width: 100%; }

  .section { padding: 52px 0; }
  .section__title { font-size: 27px; margin-bottom: 26px; }

  /* Карточки, плитки и фото — в одну колонку */
  .cards,
  .teachers,
  .awards { grid-template-columns: 1fr; }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery img { height: 170px; }

  .teacher img { height: 380px; }
  .awards img  { height: 420px; }

  .card { padding: 26px 22px; }
  .card .btn { align-self: stretch; text-align: center; }

  .stat__num { font-size: 34px; }

  .form { padding: 26px 20px; border-radius: 26px; }
  .form-block__lead { font-size: 16px; margin-bottom: 26px; }

  .contacts__map { min-height: 260px; }
}


/* --- УЗКИЕ ТЕЛЕФОНЫ (до 400px) ------------------------------------------ */

@media (max-width: 400px) {

  .container { padding: 0 16px; }

  .hero__title { font-size: 29px; }
  .section__title { font-size: 24px; }

  .stats__grid { grid-template-columns: 1fr; gap: 24px; }

  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 240px; }
}
