/* «Ленточка» — editorial. Единственный акцент — бирюза с афиши: CTA и лента. */

:root {
  --bg: #FFFFFF;
  --surface: #F7F7F7;
  --ink: #141414;
  --body: #333333;
  --line: rgba(0, 0, 0, 0.14);
  --accent: #1D5E68;
  --sheen: #5FB4BE;
  --dark: #111111;
  --font-display: 'Jost', 'Futura PT', Futura, 'Century Gothic', sans-serif;
  --font-slab: 'Bitter', 'Roboto Slab', Georgia, serif;
  --font-ui: 'Onest', 'Proxima Nova', Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-slab);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  overflow: clip;
}

.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
}

h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h2 {
  font-family: var(--font-slab);
  font-weight: 300;
  font-size: clamp(1.65rem, 3vw, 2.125rem);
  line-height: 1.25;
}

p { margin: 0; }
p + p { margin-top: 0.9em; }

figure { margin: 0; }

img { display: block; max-width: 100%; }

/* picture-обёртки в фигурах не создают своего бокса — img тянется как раньше */
figure > picture { display: contents; }

/* текст только для поисковиков и скринридеров */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; }

::selection { background: var(--ink); color: #fff; }

/* ---------- типографские мелочи ---------- */

.kicker {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--body);
}

.kicker--light { color: rgba(255, 255, 255, 0.72); }

.index {
  display: inline-block;
  margin-right: 1.4em;
  color: rgba(0, 0, 0, 0.38);
}

.kicker--light .index { color: rgba(255, 255, 255, 0.38); }

.text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s ease;
}

.text-link:hover { text-decoration-color: currentColor; }

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

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  padding: 16px 30px;
  border-radius: 3px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover { background: #174E57; }
.btn--primary:active { background: #123F46; }

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

.trial :focus-visible,
.hero :focus-visible,
.site-head :focus-visible {
  outline-color: #fff;
}

/* ---------- лента ---------- */

.ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#ribbon-path {
  transition: stroke-dashoffset 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

/* ---------- шапка ---------- */

.site-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding-top: 28px;
}

.site-head__row {
  display: flex;
  align-items: baseline;
  gap: clamp(24px, 4vw, 56px);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 2.5vw, 32px);
  margin-left: auto;
}

.site-nav a,
.site-head__phone {
  font-family: var(--font-ui);
  font-size: 13.5px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-head__phone:hover { color: #fff; }

.site-head__phone { letter-spacing: 0.04em; }

/* ---------- герой ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--dark);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero__slide.is-active { opacity: 1; }

.hero__slide img {
  display: block;
  width: 100%;
  height: 112%;
  object-fit: cover;
}

.hero__slide--stage img { object-position: 60% 30%; }
.hero__slide--balloons img { object-position: 50% 22%; }

.hero__dots {
  position: absolute;
  right: var(--pad);
  bottom: clamp(60px, 11vh, 114px);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero__dot {
  width: 30px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.hero__dot::after {
  content: '';
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.45);
  transition: background-color 0.3s ease;
}

.hero__dot:hover::after { background: rgba(255, 255, 255, 0.75); }
.hero__dot.is-active::after { background: #fff; }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.48) 0%, rgba(17, 17, 17, 0) 18%),
    linear-gradient(75deg, rgba(17, 17, 17, 0.62) 0%, rgba(17, 17, 17, 0.18) 55%, rgba(17, 17, 17, 0) 100%),
    linear-gradient(0deg, rgba(17, 17, 17, 0.55) 0%, rgba(17, 17, 17, 0) 40%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(56px, 11vh, 110px);
}

.hero__content h1 {
  color: #fff;
  max-width: 11em;
  margin-top: 18px;
}

.hero__sub {
  font-family: var(--font-slab);
  font-weight: 300;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 26em;
  margin-top: 20px;
}

.hero__content .btn { margin-top: 36px; }

/* ---------- манифест ---------- */

.manifesto {
  padding-block: clamp(90px, 14vh, 170px);
}

.manifesto__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px var(--pad);
}

.manifesto__tag {
  grid-column: 2 / 6;
  font-family: var(--font-slab);
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  color: var(--body);
}

.manifesto__quote {
  grid-column: 2 / 11;
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.35;
  color: var(--ink);
}

.manifesto__about {
  grid-column: 2 / 10;
  font-size: 16.5px;
  max-width: 46em;
}

/* ---------- секции ---------- */

/* текст всегда над лентой; фото остаются под ней */
.section-head,
.manifesto__grid,
.schedule__grid,
.teacher__text {
  position: relative;
  z-index: 2;
}

.section-head { margin-bottom: clamp(48px, 7vh, 80px); }

.section-head h2 { margin-top: 14px; }

.groups { padding-block: clamp(40px, 6vh, 70px) clamp(90px, 13vh, 160px); }

.groups__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--pad);
}

.group { grid-column: span 4; }

.group--shift1 { margin-top: 88px; }
.group--shift2 { margin-top: 176px; }

.group__photo {
  overflow: hidden;
  background: var(--surface);
}

.group__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.group:hover .group__photo img { transform: scale(1.025); }

.group__photo--tall { aspect-ratio: 3 / 4; }
.group__photo--wide { aspect-ratio: 4 / 3; }

.group__age {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1;
  color: var(--ink);
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.group__name {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  margin-top: 8px;
}

.group__desc {
  font-size: 15.5px;
  margin-top: 10px;
  max-width: 30em;
}

.group__meta {
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--body);
  margin-top: 10px;
}

.group .text-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 14.5px;
  margin-top: 16px;
}

/* ---------- расписание ---------- */

.schedule { padding-block: 0 clamp(90px, 13vh, 160px); }

.schedule__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--pad);
  align-items: start;
}

.schedule__table-wrap {
  grid-column: 1 / 9;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 15px;
}

th {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--body);
  text-align: left;
  padding: 0 20px 14px 0;
  border-bottom: 1px solid var(--ink);
}

td {
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}

td:first-child { font-weight: 500; }

.schedule__note {
  grid-column: 10 / 13;
  border-left: 1px solid var(--line);
  padding-left: clamp(20px, 2.5vw, 36px);
  font-size: 15.5px;
}

.schedule__note p + p { margin-top: 1.2em; }

/* ---------- фотополоса ---------- */

.strip {
  height: min(62vh, 560px);
  overflow: hidden;
  background: var(--surface);
}

.strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- педагог ---------- */

.teacher {
  display: grid;
  grid-template-columns: minmax(0, 54%) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 100px);
  align-items: center;
  padding-block: clamp(90px, 13vh, 160px) 0;
}

.teacher__photo {
  height: min(86vh, 760px);
  overflow: hidden;
  background: var(--surface);
}

.teacher__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.teacher__text {
  max-width: 420px;
  padding-right: var(--pad);
}

.teacher__text h2 { margin-top: 14px; }

.teacher__role {
  font-family: var(--font-ui);
  font-size: 14.5px;
  letter-spacing: 0.06em;
  color: var(--body);
  margin-top: 8px;
}

.teacher__text p.reveal { margin-top: 1.2em; }
.teacher__text .teacher__role { margin-top: 8px; }

/* ---------- пробное ---------- */

.trial {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.82);
  margin-top: clamp(90px, 13vh, 160px);
  padding-block: clamp(90px, 12vh, 150px);
  position: relative;
  z-index: 2;
}

.trial h2 { color: #fff; margin-top: 14px; }

.trial__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--pad);
  row-gap: 56px;
}

.trial__text { grid-column: 1 / 6; }

.trial__text p:last-child {
  margin-top: 1.2em;
  max-width: 24em;
}

.trial__form { grid-column: 7 / 13; }

.field { margin-bottom: 30px; }

.field label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

.field input,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 17px;
  padding: 8px 0 12px;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-bottom-color: #fff;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  cursor: pointer;
}

.field select option { color: var(--ink); background: #fff; }

.trial__form .btn { margin-top: 10px; }

.trial__alt {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 26px;
}

.trial__alt a { color: rgba(255, 255, 255, 0.85); text-underline-offset: 3px; }

/* ---------- частые вопросы ---------- */

.faq { padding-block: clamp(80px, 11vh, 140px) 0; }

.faq__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--pad);
}

.faq__list {
  grid-column: 1 / 9;
  border-top: 1px solid var(--line);
}

.faq__item { border-bottom: 1px solid var(--line); }

.faq__item summary {
  position: relative;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  padding: 20px 40px 20px 0;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--body);
}

.faq__item[open] summary::after { content: '−'; }

.faq__a {
  padding: 0 0 22px;
  max-width: 40em;
}

/* ---------- футер ---------- */

.site-foot {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding-top: clamp(70px, 9vh, 110px);
}

.site-foot__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--pad);
  row-gap: 40px;
  padding-bottom: clamp(56px, 8vh, 90px);
}

.wordmark--foot {
  grid-column: 1 / 4;
  color: var(--ink);
  font-size: 17px;
}

.site-foot__col { font-size: 15.5px; }

.site-foot__col .kicker { margin-bottom: 12px; }

.site-foot__col:nth-of-type(1) { grid-column: 4 / 7; }
.site-foot__col:nth-of-type(2) { grid-column: 7 / 10; }
.site-foot__col:nth-of-type(3) { grid-column: 10 / 13; }

.site-foot__base {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

/* ---------- тост ---------- */

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  padding: 14px 22px;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast--on {
  opacity: 1;
  transform: none;
}

/* ---------- появление на скролле ---------- */

/* скрываем только при работающем JS — без него всё видно сразу.
   Два регистра движения: текст проявляется, фото ещё и приподнимаются. */
.js .reveal {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js figure.reveal,
.js .group.reveal,
.js .trial__form.reveal {
  transform: translateY(16px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- адаптив ---------- */

@media (max-width: 960px) {
  .group { grid-column: span 6; }
  .group--shift1 { margin-top: 64px; }
  .group--shift2 {
    margin-top: 64px;
    grid-column: 4 / 13;
  }

  .schedule__table-wrap { grid-column: 1 / 13; }
  .schedule__note {
    grid-column: 1 / 10;
    border-left: 0;
    padding-left: 0;
    margin-top: 32px;
  }

  .teacher {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .teacher__photo { height: min(70vh, 560px); margin-right: var(--pad); }
  .teacher__text { padding-inline: var(--pad); max-width: 560px; }

  .trial__text { grid-column: 1 / 13; }
  .trial__form { grid-column: 1 / 11; }

  .manifesto__tag { grid-column: 1 / 7; }
  .manifesto__quote { grid-column: 1 / 12; }
  .manifesto__about { grid-column: 1 / 12; }

  .faq__list { grid-column: 1 / 13; }

  .wordmark--foot { grid-column: 1 / 13; }
  .site-foot__col:nth-of-type(1) { grid-column: 1 / 7; }
  .site-foot__col:nth-of-type(2) { grid-column: 7 / 13; }
  .site-foot__col:nth-of-type(3) { grid-column: 1 / 7; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-head__phone { margin-left: auto; }

  .hero__slide--stage img { object-position: 55% 25%; }

  .group,
  .group--shift1,
  .group--shift2 { grid-column: 1 / 13; }
  .group--shift1,
  .group--shift2 { margin-top: 56px; }

  td { white-space: normal; }
}

/* ---------- движение: уважение к reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #ribbon-path { transition: none; }

  .group__photo img { transition: none; }

  .hero__slide { transition: none; }
}
