/* ==========================================================================
   Алина Куракина — лендинг
   Вёрстка по макету «Air trainer landing page» (AerialLanding v2).
   Порядок: токены → база → шапка и hero → секции → адаптив.
   ========================================================================== */

:root {
  --ink:        #17151A;   /* основной тёмный */
  --paper:      #F3EEE8;   /* фон страницы */
  --pink:       #F3AFC9;   /* акцент */
  --pink-deep:  #B83A72;   /* акцент в тексте */
  --muted:      #6B6570;   /* второстепенный текст */
  --muted-soft: #4A4550;
  --muted-dark: #BDB6B0;   /* второстепенный текст на тёмном */
  --panel:      #EAE2DA;   /* подложка под фото */
  --card:       #FBF8F4;   /* карточка фотоальбома */
  --hairline:   rgba(23, 21, 26, .15);

  --gutter: clamp(16px, 4vw, 56px);

  /* Шкала рукописного шрифта. Он тонкий и монолинейный: на мелких кеглях
     превращается в росчерк, поэтому ступени заметно крупнее обычных.
     Цифры в нём вдвое мельче букв при том же кегле («01» на 34px даёт 16px
     очка против 34px у слова), поэтому для цифр — отдельные ступени. */
  --script-lg:   clamp(34px, 3.4vw, 44px);   /* «ярлыки» секций */
  --script-num:  clamp(40px, 3.8vw, 56px);   /* номера направлений */
  --script-year: clamp(28px, 2.4vw, 34px);   /* годы в списке достижений */
  --display: 'Oswald', 'Arial Narrow', Helvetica, Arial, sans-serif;
  --body:    'Open Sans', Helvetica, Arial, sans-serif;
  --script:  'MADE TheArtist Script', 'Marck Script', cursive;

  --photo-filter: grayscale(1);
}

/* ─── База ───────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }   /* иначе display:flex перебивает атрибут */
img { display: block; max-width: 100%; }
button { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0;
}
h2 { font-size: clamp(36px, 4.5vw, 64px); }
h1 em, h2 em, h3 em { font-style: normal; font-weight: 400; color: var(--pink-deep); }

.script { font-family: var(--script); line-height: 1.1; }

:focus-visible { outline: 2px solid var(--pink-deep); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 20px; font-size: 14px;
}
.skip-link:focus { left: 0; }

/* Появление секции при прокрутке; там, где scroll-timeline не поддержан,
   анимация отыгрывает мгновенно и элемент просто виден. */
.reveal {
  animation: reveal 1ms linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}
@keyframes reveal { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Плашка с именем и контактами ───────────────────────────────────────── */

.topbar {
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  padding: 12px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
}
.topbar__links { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted-dark); }
.topbar__links a:hover { color: var(--pink); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  background: #555;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero__blur {
  position: absolute; inset: -40px;
  width: calc(100% + 80px); height: calc(100% + 80px);
  object-fit: cover; object-position: center 30%;
  filter: var(--photo-filter) brightness(.75) blur(40px);
  transform: scaleX(2.4); transform-origin: left center;
}
.hero__photo {
  position: absolute; top: 0; bottom: 0; right: 0; left: 42%;
  width: 58%; height: 100%;
  object-fit: cover; object-position: center 30%;
  filter: var(--photo-filter) brightness(.85);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(40, 40, 42, .55) 0%, rgba(40, 40, 42, .4) 38%, rgba(40, 40, 42, .1) 55%, rgba(40, 40, 42, 0) 70%);
}

.header {
  position: relative; z-index: 2;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  color: var(--paper);
}
.logo {
  font-family: var(--display);
  font-size: 22px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.logo em { font-style: normal; font-weight: 400; color: var(--pink); }

.header .nav { margin-right: auto; }
.nav { display: flex; gap: 28px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.nav a { border-bottom: 1px solid transparent; padding-bottom: 2px; }
.nav a:hover, .nav a:focus-visible { border-color: var(--pink); color: var(--pink); }

.btn-cta {
  background: var(--pink); color: var(--ink);
  padding: 10px 26px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transition: background .2s;
}
.btn-cta:hover { background: var(--paper); color: var(--ink); }

.burger {
  display: none;
  background: none; border: 1px solid var(--paper); color: var(--paper);
  padding: 0 16px; height: 44px;
  align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.burger__lines { display: flex; flex-direction: column; gap: 4px; }
.burger__lines span { width: 18px; height: 1px; background: var(--paper); transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__lines span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.menu {
  position: absolute; top: 72px; left: 0; right: 0; z-index: 3;
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column;
  padding: 8px var(--gutter) 20px;
  font-family: var(--display); font-size: 24px; text-transform: uppercase;
}
.menu[hidden] { display: none; }
.menu a { padding: 12px 0; border-bottom: 1px solid rgba(243, 238, 232, .15); }
.menu a:last-child { border-bottom: 0; }
.menu__cta {
  background: var(--pink); color: var(--ink);
  padding: 14px 22px; margin-top: 12px;
  font-family: var(--body); font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-align: center;
}

.hero__body {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 18px;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(64px, 10vw, 120px);
  width: 42%;
  color: var(--paper);
}
.hero__hello { font-size: clamp(40px, 4.6vw, 64px); color: var(--pink); white-space: nowrap; }
.hero__title {
  max-width: 1000px;
  font-size: clamp(34px, 4.2vw, 68px);
  letter-spacing: 0;
  color: var(--pink);
  text-wrap: balance;
}
.btn-hero {
  margin-top: 12px;
  background: var(--pink); color: var(--ink);
  padding: 16px 36px; min-height: 52px;
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s;
}
.btn-hero:hover { background: var(--paper); }

/* ─── Бегущая строка ─────────────────────────────────────────────────────── */

.marquee {
  background: var(--pink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding: 12px 0;
}
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 20px; padding-right: 20px;
  font-family: var(--display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .06em; font-size: 16px; color: var(--ink); white-space: nowrap;
}
.marquee__item i { width: 6px; height: 6px; border-radius: 999px; background: var(--ink); display: inline-block; }

/* ─── Для кого ───────────────────────────────────────────────────────────── */

.intro { padding: clamp(56px, 8vw, 112px) var(--gutter); border-bottom: 1px solid var(--ink); }
.intro__inner {
  margin: 0 auto; max-width: 900px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.intro p {
  margin: 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 3.4vw, 44px); line-height: 1.2; letter-spacing: -.01em;
  text-wrap: balance;
}
.intro__rule { width: 40px; height: 1px; background: var(--ink); }

/* ─── Обо мне ────────────────────────────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  border-bottom: 1px solid var(--ink);
}
.about__media { border-right: 1px solid var(--ink); background: var(--panel); min-height: 420px; overflow: hidden; }
.about__media picture, .about__media img { width: 100%; height: 100%; }
.about__media img { object-fit: cover; object-position: center top; filter: var(--photo-filter); }
.about__text {
  padding: clamp(40px, 6vw, 88px) var(--gutter);
  display: flex; flex-direction: column; gap: 24px;
}
.about__text p { margin: 0; font-size: 16px; line-height: 1.6; max-width: 520px; text-wrap: pretty; }
/* Абзацы читаются как один текст, поэтому между ними шаг меньше,
   чем колоночный gap между блоками секции. */
.about__body { display: flex; flex-direction: column; gap: 14px; }

.pill {
  align-self: flex-start;
  border: 1px solid var(--ink); border-radius: 999px;
  font-size: var(--script-lg);
  /* Отступы в em — пилюля растёт вместе с кеглем. Сверху сильно больше:
     у шрифта нижний просвет на треть глубже верхнего, из-за чего строка
     визуально прилипает к верхнему краю. Снизу оставляем место выносным
     («р» в «Направления»), иначе хвост обрезается рамкой. */
  padding: .46em .66em .16em;
  line-height: 1.25;
}
.pill--pink { background: var(--pink); color: var(--ink); border-color: var(--pink); transform: rotate(-3deg); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tab {
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 10px 18px; min-height: 44px;
  font-size: 13px; font-weight: 500; letter-spacing: .04em; cursor: pointer;
  transition: background .2s, color .2s;
}
.tab:hover { background: rgba(23, 21, 26, .08); }
.tab.is-active { background: var(--ink); color: var(--paper); }

.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.facts li {
  display: grid; grid-template-columns: 76px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--hairline); align-items: baseline;
}
/* Список без годов: колонка под год не нужна, иначе единственный блок
   с текстом попадает именно в неё и сжимается до ширины колонки. */
.facts--plain li { grid-template-columns: 1fr; }
.facts__year { font-size: var(--script-year); color: var(--pink-deep); }
.facts__name { font-size: 16px; font-weight: 500; }

/* Медаль рядом с названием соревнования. Цвет задаётся классом и наследуется
   внутрь значка через currentColor. */
.medal {
  width: 1.05em; height: 1.05em;
  margin-left: .4em;
  vertical-align: -.16em;
}
.medal--gold   { color: #C9A227; }
.medal--bronze { color: #A9714B; }
.facts__note { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ─── Фотоальбом ─────────────────────────────────────────────────────────── */

.album { padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--ink); overflow: hidden; }
.album__head { padding: 0 var(--gutter); margin-bottom: 32px; }
.album__track {
  display: flex; width: max-content;
  padding: 16px 0 20px;
  animation: marquee 40s linear infinite;
}
.album__track:hover { animation-play-state: paused; }

/* На сенсорных экранах (и там, где анимации отключены системно) автопрокрутка
   бесполезна: пальцем её не сдвинуть, а часть фотографий остаётся за краем.
   Заменяем её обычной лентой с прокруткой и прилипанием карточек. */
@media (max-width: 899px), (hover: none) and (pointer: coarse), (prefers-reduced-motion: reduce) {
  .album__track {
    animation: none;
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  /* Дубль ленты нужен только для бесшовной анимации — здесь он лишний. */
  .album__group[aria-hidden="true"] { display: none; }
  /* Поля задаём содержимому, а не контейнеру: иначе браузер съедает
     правое поле в конце прокрутки. */
  .album__group { padding-inline: var(--gutter); }
  .card { scroll-snap-align: center; }
}
.album__group { display: flex; gap: 16px; padding-right: 16px; }
.card {
  margin: 0; flex: none;
  width: clamp(220px, 28vw, 320px);
  border: 1px solid var(--ink); background: var(--card);
  padding: 8px;   /* подписей под фото нет — рамка равномерная */
  transform: rotate(var(--rot, 0deg));
}
.card__frame {
  aspect-ratio: 3 / 4; overflow: hidden;
  background: repeating-linear-gradient(135deg, #E6DED6 0 8px, #EDE6DF 8px 16px);
}
.card__frame img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); }


/* ─── Направления ────────────────────────────────────────────────────────── */

.directions { border-bottom: 1px solid var(--ink); }
/* В шапке секции остался только ярлык, поэтому отступ снизу задаём ей самой. */
.directions__head { padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(28px, 4vw, 40px); display: flex; }

.direction {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  border-top: 1px solid var(--ink);
}
.direction__media {
  order: 1;
  border-right: 1px solid var(--ink);
  background: var(--panel);
  min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.direction__media picture { display: contents; }
.direction__media img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; filter: var(--photo-filter); }
.direction__text {
  order: 2;
  padding: clamp(32px, 5vw, 72px) var(--gutter);
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.direction--reverse .direction__media { order: 2; border-right: 0; border-left: 1px solid var(--ink); }
.direction--reverse .direction__text { order: 1; }

/* Направление без фотографии: полоса остаётся во всю ширину, но текст
   не растягивается на неё целиком — иначе строки становятся нечитаемо
   длинными, а блок выглядит так, будто картинка не загрузилась. */
.direction--plain { grid-template-columns: 1fr; }
.direction--plain .direction__text { max-width: 900px; margin: 0 auto; width: 100%; }
.direction--plain .direction__text p { max-width: 700px; }

.direction__num { font-size: var(--script-num); color: var(--pink-deep); line-height: 1; }
.direction h3 { font-size: clamp(32px, 3.6vw, 52px); }
.direction p { margin: 0; font-size: 16px; line-height: 1.6; max-width: 520px; text-wrap: pretty; }
.direction__who { font-size: 15px; line-height: 1.5; color: var(--muted); }
.direction__who span { color: var(--ink); font-weight: 500; }

/* Розовая плашка между воздушными направлениями и остальными. */
.note {
  border-top: 1px solid var(--ink);
  background: var(--pink);
  padding: clamp(36px, 5vw, 64px) var(--gutter);
}
.note p {
  margin: 0 auto; max-width: 900px; text-align: center;
  font-size: clamp(18px, 1.9vw, 24px); line-height: 1.45;
  color: var(--ink); text-wrap: pretty;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid rgba(23, 21, 26, .3); border-radius: 999px; padding: 6px 12px; font-size: 12px; letter-spacing: .04em; }

.btn-pill {
  align-self: flex-start; margin-top: 8px;
  background: var(--pink); border: 1px solid var(--ink); border-radius: 999px;
  padding: 12px 24px; min-height: 48px;
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  transition: background .2s, color .2s;
}
.btn-pill:hover { background: var(--ink); color: var(--paper); }

/* ─── Расписание ─────────────────────────────────────────────────────────── */

.schedule { padding: clamp(48px, 7vw, 96px) var(--gutter); border-bottom: 1px solid var(--ink); }
.schedule__inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px); }

/* Детские и взрослые группы переключаются вкладками; в панели — площадка
   и таблица занятий. */
.schedule__group { display: flex; flex-direction: column; gap: 10px; }
.schedule__place { margin: 0 0 4px; font-size: 15px; line-height: 1.5; color: var(--muted); }

.schedule__scroll { overflow-x: auto; }
.schedule table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; }
/* Во взрослой таблице три колонки — ей широкий минимум ни к чему,
   иначе на телефоне она зря уезжает в горизонтальную прокрутку. */
.schedule .table--compact { min-width: 340px; }
.schedule th {
  padding: 10px 16px; font-size: 12px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); text-align: left;
  border-bottom: 1px solid var(--ink);
}
.schedule td { padding: 16px; border-bottom: 1px solid var(--hairline); }
.schedule th:first-child, .schedule td:first-child { padding-left: 0; }
.schedule th:last-child, .schedule td:last-child { padding-right: 0; }
.schedule .day { font-family: var(--display); font-size: 20px; font-weight: 500; text-transform: uppercase; vertical-align: top; }
.schedule .dir { font-weight: 500; }
.schedule .muted { color: var(--muted); }
.schedule__note { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted-soft); }
.schedule__note a { border-bottom: 1px solid rgba(23, 21, 26, .3); }
.schedule__note a:hover { color: var(--pink-deep); border-color: var(--pink-deep); }

/* ─── Контакты ───────────────────────────────────────────────────────────── */

.contacts { background: var(--ink); color: var(--paper); padding: clamp(64px, 9vw, 128px) var(--gutter); }
.contacts__inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: end;
}
.contacts__lead { display: flex; flex-direction: column; gap: 24px; }
.contacts h2 { font-size: clamp(44px, 6vw, 88px); line-height: .95; }
.contacts h2 em { color: var(--pink); }
.contacts__lead p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted-dark); max-width: 460px; }
.contacts__links { display: flex; flex-direction: column; gap: 12px; }

.contact {
  border: 1px solid rgba(243, 238, 232, .4); border-radius: 999px;
  padding: 18px 28px; min-height: 56px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 15px;
  transition: border-color .2s, color .2s, background .2s;
}
.contact:hover { border-color: var(--pink); color: var(--pink); }
.contact--primary { background: var(--pink); border-color: var(--pink); color: var(--ink); font-weight: 600; }
.contact--primary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.contacts__bottom {
  max-width: 1100px; margin: clamp(48px, 7vw, 96px) auto 0;
  padding-top: 24px; border-top: 1px solid rgba(243, 238, 232, .15);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--muted-dark);
}

/* ─── Адаптив ────────────────────────────────────────────────────────────── */

@media (max-width: 899px) {
  .nav, .header__cta { display: none; }
  .burger { display: flex; }
  .header { justify-content: flex-end; }   /* остался один бургер */
  .topbar { font-size: 12px; }
  .topbar .logo { font-size: 20px; }

  .hero { min-height: min(94vh, 760px); }
  .hero__photo { left: 0; width: 100%; -webkit-mask-image: none; mask-image: none; }
  .hero__scrim {
    background: linear-gradient(180deg, rgba(23, 21, 26, .45) 0%, rgba(23, 21, 26, .55) 45%, rgba(23, 21, 26, .8) 100%);
  }
  .hero__body { width: 100%; }
  .hero__hello { white-space: normal; }

  /* В одну колонку фото всегда идёт первым — независимо от чётности блока. */
  .direction__media, .direction--reverse .direction__media { order: 0; border-right: 0; border-left: 0; }
  .direction__text, .direction--reverse .direction__text { order: 1; }
  .about__media { border-right: 0; }
}

@media (max-width: 560px) {
  .card { width: min(74vw, 260px); }
  .facts:not(.facts--plain) li { grid-template-columns: 64px 1fr; gap: 12px; }
  .contact { padding: 16px 22px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .album__track { animation: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}
