/* ==========================================================================
   Сказки кота — Дом-музей Бабы Яги
   Static landing. Layout is proportional to the 1440px Figma frame.
   ========================================================================== */

@font-face {
  font-family: "Balkara";
  src: url("assets/fonts/balkara.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NT Somic";
  src: url("assets/fonts/nt-somic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #083325;
  --green-2: #0d3428;
  --glow: #0f3124;
  --parchment: #f3f1e8;
  --gold: #d3be68;
  --red: #881d00;
  --ink: #000;

  --font-display: "Balkara", Georgia, "Times New Roman", serif;
  --font-body: "NT Somic", Arial, "Helvetica Neue", sans-serif;

  /* 1px of the 1440 frame */
  --u: calc(100vw / 1440);

  --pad: clamp(20px, 6.875vw, 99px);
  --header-h: 0px;

  --fs-body: clamp(17px, 1.736vw, 25px);
  --fs-h2: clamp(32px, 5vw, 72px);
  --fs-cap-l: clamp(34px, 4.17vw, 60px);
  --fs-cap-m: clamp(28px, 3.47vw, 50px);
  --fs-plank-w: clamp(250px, 29.5vw, 425px);
}

@media (max-width: 1099px) {
  :root { --header-h: 64px; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.2;
  overflow-x: hidden;
}

img { max-width: 100%; }

figure { margin: 0; }

h1, h2, h3, p, ul { margin: 0; }

ul { padding: 0; list-style: none; }

a { color: inherit; }

button { font: inherit; color: inherit; }

[id] { scroll-margin-top: var(--header-h); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(8, 51, 37, 0.85);
}

section[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--parchment);
  color: var(--green);
  border-radius: 5px;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1;
  overflow-wrap: break-word;
}

/* ---------- Backgrounds ---------- */

.bg-parchment {
  position: relative;
  background: var(--parchment) url("assets/figma/4fd03.webp") center top / cover repeat-y;
}

.bg-forest {
  position: relative;
  isolation: isolate;
  background: var(--green) url("assets/figma/12363.webp") 30% 0 / cover no-repeat;
}

.bg-forest::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(1, 4, 3, 0.35);
}

/* Ornamental band — the lower strip of 8422d.webp, as placed in the Figma frame */
.border-strip {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1440 / 66;
  background: url("assets/figma/8422d.webp") center bottom / 100% auto no-repeat;
}

/* ---------- Section headings ---------- */

.section-title {
  color: var(--red);
  font-size: var(--fs-h2);
  text-align: center;
}

.section-title--light { color: var(--parchment); }

.section-title--left { text-align: left; }

.ornate-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 40px);
  padding-inline: var(--pad);
}

.ornate-heading .section-title { max-width: 1028px; }

.branch {
  flex: none;
  width: clamp(46px, 8.26vw, 119px);
  height: auto;
  pointer-events: none;
}

.branch--left { transform: rotate(31.41deg); }

.branch--right { transform: scaleX(-1) rotate(31.41deg); }

@media (max-width: 519px) {
  .ornate-heading .branch { display: none; }
}

.caps-title {
  color: var(--red);
  font-size: var(--fs-cap-m);
}

.cap-l { font-size: var(--fs-cap-l); }

/* ---------- Plank button (1ac5d.webp) ---------- */

.plank-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--fs-plank-w);
  aspect-ratio: 429 / 106;
  padding: 0 14%;
  border: 0;
  background: none;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  container-type: inline-size;
  isolation: isolate;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.plank-btn::before {
  content: "";
  position: absolute;
  inset: -6.55% -3.36% -4.87% -6.76%;
  z-index: -1;
  background: url("assets/figma/1ac5d.webp") center / 100% 100% no-repeat;
}

.plank-btn__text {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: max(14px, 5.18cqw);
  line-height: 1;
  white-space: nowrap;
}

.plank-btn--price .plank-btn__text { font-size: 9.18cqw; }

.plank-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.plank-btn:active { transform: translateY(0); }

/* ---------- Shape button (hero ticket SVGs) ---------- */

.shape-btn {
  position: relative;
  flex: none;
  width: clamp(96px, 12.36vw, 178px);
  aspect-ratio: 178 / 73.2;
  padding: 0;
  border: 0;
  background: none;
  color: var(--parchment);
  cursor: pointer;
  container-type: inline-size;
  transition: transform 0.25s ease;
}

.shape-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.shape-btn__text {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-body);
  font-size: 11.24cqw;
  line-height: 1.15;
  text-align: center;
}

.shape-btn--filled { color: var(--green-2); }

.shape-btn:hover { transform: translateY(-2px); }

/* ---------- Leaf list ---------- */

.leaf-list li {
  position: relative;
  padding-left: 1.6em;
  line-height: 1.17;
}

.leaf-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.25em;
  height: 1.25em;
  background: url("assets/figma/36abc.webp") center / contain no-repeat;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  max-width: 1440px;
  margin-inline: auto;
}

.site-header__logo {
  position: absolute;
  left: 6.94%;
  top: calc(46 * var(--u));
  display: block;
  width: clamp(120px, 12.36vw, 178px);
}

.site-header__logo img { display: block; width: 100%; height: auto; }

.site-nav {
  position: absolute;
  top: calc(18 * var(--u));
  right: 4.72%;
  width: min(815px, 56.6vw);
  aspect-ratio: 815 / 96;
  background: url("assets/figma/3a615.svg") center / 100% 100% no-repeat;
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.74vw, 25px);
  height: 100%;
  padding: 0 14%;
}

.site-nav__list a {
  display: block;
  padding: 6px 2px;
  color: var(--parchment);
  font-size: clamp(16px, 1.67vw, 24px);
  line-height: 1.11;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s ease, color 0.3s ease;
}

.site-nav__list a:hover { color: var(--gold); background-size: 100% 1px; }

.menu-toggle { display: none; }

@media (max-width: 1099px) {
  .site-header {
    position: fixed;
    height: var(--header-h);
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--pad);
    background: rgba(8, 51, 37, 0.94);
    border-bottom: 1px solid rgba(211, 190, 104, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .site-header__logo { position: static; width: 132px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--gold);
    border-radius: 5px;
    background: transparent;
    color: var(--parchment);
    font-size: 16px;
    cursor: pointer;
  }

  .menu-toggle__bars,
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gold);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .menu-toggle__bars { position: relative; }

  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-toggle__bars::before { top: -6px; }
  .menu-toggle__bars::after { top: 6px; }

  .site-header.is-open .menu-toggle__bars { background: transparent; }
  .site-header.is-open .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .site-header.is-open .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    aspect-ratio: auto;
    background: var(--green);
    border-bottom: 1px solid var(--gold);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  }

  .site-header.is-open .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 18px;
  }

  .site-nav__list a {
    padding: 14px 0;
    font-size: 20px;
    border-bottom: 1px solid rgba(211, 190, 104, 0.25);
    background: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--green);
  min-height: calc(967 * var(--u));
}

.hero__art {
  position: absolute;
  top: calc(124 * var(--u));
  left: 0;
  width: 110.42%;
  aspect-ratio: 1590 / 895;
}

.hero__frame {
  position: absolute;
  inset: 0;
}

.hero__photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Theatre ticket placed into Baba Yaga's hand (ebab3.webp, crop as in Figma) */
.hero__ticket {
  position: absolute;
  left: 52.69%;
  top: 44.05%;
  width: 6.894%;
  aspect-ratio: 109.6 / 42.9;
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(-17.33deg);
  pointer-events: none;
}

.hero__ticket img {
  position: absolute;
  left: -47.06%;
  top: -136.66%;
  width: 196.11%;
  height: 291.29%;
  max-width: none;
}

.hero__trees {
  position: absolute;
  left: 0;
  top: calc(-10 * var(--u));
  width: 28.4%;
  aspect-ratio: 409 / 986;
  overflow: hidden;
  pointer-events: none;
}

.hero__trees img {
  position: absolute;
  left: -63.39%;
  top: -13.39%;
  width: 456.86%;
  height: 233.97%;
  max-width: none;
}

.hero__glow {
  position: absolute;
  left: 3.75%;
  top: calc(141 * var(--u));
  width: 48.4%;
  height: calc(624 * var(--u));
  background: var(--glow);
  filter: blur(calc(150 * var(--u)));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  width: calc(709 * var(--u) + var(--pad));
  max-width: calc(709px + 99px);
  padding: calc(173 * var(--u)) 0 calc(150 * var(--u)) var(--pad);
}

.hero__title {
  display: flex;
  flex-direction: column;
  color: var(--gold);
  line-height: 1.085;
}

.hero__title-line { display: block; white-space: nowrap; }

.hero__title .cap-xl { font-size: clamp(52px, 9.86vw, 142px); }

.hero__title .cap-md { font-size: clamp(36px, 6.39vw, 92px); }

.hero__title-line--big { font-size: clamp(50px, 9.79vw, 141px); }

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(10px, 1.32vw, 19px);
  margin-top: clamp(14px, 1.53vw, 22px);
  color: var(--parchment);
  font-size: clamp(18px, 2.43vw, 35px);
}

.hero__tags img { width: 7px; height: 7px; }

.hero__lead {
  margin-top: clamp(14px, 1.53vw, 22px);
  color: var(--parchment);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(12px, 2.43vw, 35px);
  margin-top: clamp(24px, 4.3vw, 62px);
}

@media (max-width: 899px) {
  .hero {
    min-height: 0;
    padding-top: var(--header-h);
  }

  .hero__art {
    position: relative;
    top: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .hero__art::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 28%;
    background: linear-gradient(rgba(8, 51, 37, 0), var(--green));
  }

  .hero__frame {
    inset: 0 auto auto -72%;
    width: 178%;
    aspect-ratio: 1590 / 895;
  }

  .hero__trees,
  .hero__glow { display: none; }

  .hero__content {
    width: 100%;
    max-width: none;
    margin-top: -14vw;
    padding: 0 var(--pad) 48px;
  }

  .hero__title { line-height: 1.02; }

  .hero__actions { gap: 12px; }

  .hero__actions .shape-btn { width: calc((100% - 24px) / 3); max-width: 178px; }
}

@media (min-width: 600px) and (max-width: 899px) {
  .hero__art { aspect-ratio: 100 / 73; }
  .hero__frame { left: -30%; width: 130%; }
  .hero__content { margin-top: -8vw; }
}

@media (min-width: 900px) and (max-width: 1099px) {
  .hero__content { padding-top: calc(var(--header-h) + 6vw); }
}

@media (max-width: 359px) {
  .hero__title .cap-xl { font-size: 46px; }
  .hero__title .cap-md { font-size: 32px; }
  .hero__title-line--big { font-size: 44px; }
}

/* ==========================================================================
   Program selector
   ========================================================================== */

.programs {
  padding-block: clamp(56px, 8vw, 116px);
}

.programs__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px clamp(12px, 2.43vw, 35px);
  margin-top: clamp(28px, 3.5vw, 50px);
}

.shape-tab img { transition: opacity 0.3s ease; }

.shape-tab .shape-tab__on { opacity: 0; }

.shape-tab[aria-selected="true"] { color: var(--green-2); }

.shape-tab[aria-selected="true"] .shape-tab__on { opacity: 1; }

.shape-tab[aria-selected="true"] .shape-tab__off { opacity: 0; }

.programs__panel {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1080px;
  margin: clamp(32px, 4vw, 56px) auto 0;
}

.programs__panel[hidden] { display: none; }

.programs__media {
  border: 2px solid var(--gold);
  aspect-ratio: 939 / 780;
  overflow: hidden;
  background: var(--parchment);
}

.programs__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 3%;
}

.programs__body { color: var(--parchment); }

.programs__name {
  color: var(--gold);
  font-size: var(--fs-cap-m);
}

.programs__lead { margin-top: 18px; }

.programs__body .leaf-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.programs__price {
  margin-top: 22px;
  color: var(--gold);
  font-size: clamp(30px, 2.7vw, 39px);
}

.programs__body .plank-btn { margin-top: 26px; }

@media (prefers-reduced-motion: no-preference) {
  .js .programs__panel:not([hidden]) { animation: panel-in 0.5s ease both; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
  .programs__panel { grid-template-columns: 1fr; }
  .programs__tabs .shape-btn { width: calc((100% - 24px) / 3); max-width: 178px; }
}

/* ==========================================================================
   Куда ведут сказки
   ========================================================================== */

.directions {
  padding-block: clamp(56px, 9.17vw, 132px) clamp(40px, 6vw, 90px);
  overflow: hidden;
}

.direction {
  display: grid;
  grid-template-columns:
    minmax(0, 99fr) minmax(0, 602fr) minmax(0, 36fr) minmax(0, 602fr) minmax(0, 101fr);
  align-items: center;
}

.direction__text > * + * { margin-top: clamp(16px, 2.36vw, 34px); }

.direction__text p { color: var(--ink); }

.direction__media img { display: block; width: 100%; height: auto; }

.direction--museum { margin-top: clamp(40px, 7.6vw, 110px); }

.direction--museum .direction__text { grid-column: 4; }

.direction--show { margin-top: clamp(32px, 2.8vw, 40px); }

.direction--show .direction__text { grid-column: 2; grid-row: 1; }

.direction--show .direction__media {
  grid-column: 3 / 6;
  grid-row: 1;
  margin-left: calc(-42 * var(--u));
}

.direction--quest { margin-top: calc(-73 * var(--u)); }

.direction--quest .direction__media {
  grid-column: 1 / 4;
  grid-row: 1;
  margin-left: calc(-2 * var(--u));
}

.direction--quest .direction__text { grid-column: 4; grid-row: 1; }

@media (max-width: 767px) {
  .direction {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-inline: var(--pad);
  }

  .direction .direction__text,
  .direction .direction__media {
    grid-column: 1;
    grid-row: auto;
    margin-left: 0;
  }

  .direction .direction__media { order: -1; }

  .direction--show,
  .direction--quest { margin-top: 56px; }
}

/* ==========================================================================
   Билеты
   ========================================================================== */

.tickets {
  padding-block: clamp(56px, 9.17vw, 132px) clamp(56px, 9.5vw, 137px);
}

.tickets__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1.32vw, 19px);
  margin-top: clamp(28px, 3.5vw, 50px);
  padding-inline: var(--pad);
}

.ticket-card {
  position: relative;
  width: clamp(270px, 27.85vw, 401px);
  container-type: inline-size;
  color: var(--ink);
  text-align: center;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
}

.ticket-card--main { width: clamp(270px, 28.82vw, 415px); }

.ticket-card__bg { display: block; width: 100%; height: auto; }

.ticket-card > :not(.ticket-card__bg) { position: absolute; }

.ticket-card__title,
.ticket-card__price {
  left: 0;
  right: 0;
  color: var(--red);
  font-size: 7.98cqw;
  line-height: 1.2;
}

.ticket-card__title { top: 47.6%; }

.ticket-card__desc {
  top: 53.8%;
  left: 6%;
  right: 6%;
  font-size: 4.49cqw;
  line-height: 1.17;
}

.ticket-card__price { top: 66.1%; }

.ticket-card__list {
  top: 74%;
  left: 50%;
  width: max-content;
  max-width: 76%;
  transform: translateX(-50%);
  font-size: 4.49cqw;
  text-align: left;
}

.ticket-card__btn {
  top: 85.2%;
  left: 50%;
  width: 71.6%;
  transform: translateX(-50%);
}

.ticket-card__btn .plank-btn__text { font-size: 6.97cqw; }

.ticket-card__btn:hover { transform: translateX(-50%) translateY(-2px); }

.ticket-card__btn:active { transform: translateX(-50%); }

/* ==========================================================================
   Секреты
   ========================================================================== */

.secrets {
  padding-block: clamp(56px, 8.9vw, 128px) clamp(40px, 5vw, 72px);
}

.secrets__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: calc(35 * var(--u));
  row-gap: clamp(28px, 4vw, 58px);
  max-width: 1440px;
  margin: clamp(32px, 4.4vw, 64px) auto 0;
  padding-inline: var(--pad);
}

.secrets__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.secrets__img--a {
  grid-column: 2;
  grid-row: 1;
  width: 103.6%;
  justify-self: end;
  aspect-ratio: 404 / 442;
}

.secrets__img--b {
  grid-column: 3;
  grid-row: 1;
  width: 106.2%;
  justify-self: start;
  aspect-ratio: 414 / 454;
}

.secret { grid-row: 2; }

.secret__title {
  color: var(--red);
  font-size: clamp(22px, 2.22vw, 32px);
  text-align: center;
}

.secret p { margin-top: clamp(16px, 2.36vw, 34px); }

@media (max-width: 767px) {
  .secrets__grid { grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .secrets__img--a { grid-column: 1; width: 100%; }
  .secrets__img--b { grid-column: 2; width: 100%; }
  .secret { grid-column: 1 / -1; grid-row: auto; }
}

/* ==========================================================================
   Праздники
   ========================================================================== */

.holidays {
  padding-block: clamp(40px, 6vw, 88px) clamp(40px, 6vw, 88px);
  overflow: hidden;
}

.holiday {
  display: grid;
  align-items: center;
}

.holiday__media img { display: block; width: 100%; height: auto; }

.holiday__text { position: relative; z-index: 1; }

.holiday__text > * + * { margin-top: clamp(16px, 2.36vw, 34px); }

.holiday__text .plank-btn { margin-top: clamp(24px, 3.05vw, 44px); }

.holiday--birthday {
  grid-template-columns: minmax(0, 8fr) minmax(0, 797fr) minmax(0, 38fr) minmax(0, 494fr) minmax(0, 103fr);
  margin-top: clamp(28px, 3.1vw, 44px);
}

.holiday--birthday .holiday__media { grid-column: 2; grid-row: 1; }

.holiday--birthday .holiday__text { grid-column: 4; grid-row: 1; }

.holiday--graduation {
  grid-template-columns: minmax(0, 99fr) minmax(0, 393fr) minmax(0, 103fr) minmax(0, 845fr);
  margin-top: calc(-73 * var(--u));
}

.holiday--graduation .holiday__text { grid-column: 2 / 4; grid-row: 1; }

.holiday--graduation .holiday__media {
  grid-column: 3 / 5;
  grid-row: 1;
  width: calc(100% + 25 * var(--u));
}

@media (max-width: 767px) {
  .holiday--birthday,
  .holiday--graduation {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
    padding-inline: var(--pad);
  }

  .holiday .holiday__media,
  .holiday .holiday__text { grid-column: 1; grid-row: auto; width: 100%; }

  .holiday .holiday__media { order: -1; }

  .holiday--graduation { margin-top: 56px; }
}

/* ==========================================================================
   Кафе
   ========================================================================== */

.cafe {
  padding-top: clamp(40px, 5vw, 72px);
  overflow: hidden;
}

.cafe__text {
  max-width: calc(602px + 2 * var(--pad));
  margin: clamp(24px, 3vw, 40px) auto 0;
  padding-inline: var(--pad);
  text-align: center;
}

.cafe__text p + p { margin-top: 10px; }

.cafe__text .plank-btn { margin-top: clamp(24px, 3vw, 44px); }

.cafe__media {
  width: calc(100% + 14 * var(--u));
  margin-left: calc(-9 * var(--u));
  margin-top: calc(-4 * var(--u));
  aspect-ratio: 1454 / 569;
  overflow: hidden;
}

.cafe__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

@media (max-width: 767px) {
  .cafe__media { width: 100%; margin-left: 0; margin-top: 24px; aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   Галерея
   ========================================================================== */

.gallery {
  padding-block: clamp(56px, 9.17vw, 132px) clamp(48px, 7.9vw, 114px);
  overflow: hidden;
}

.gallery__stage {
  --slide-w: 56.32%;
  --side-w: 39.7%;
  --left-x: -20.56%;
  --center-x: 21.8%;
  --right-x: 80.7%;
  position: relative;
  aspect-ratio: 1440 / 477;
  margin-top: clamp(28px, 4.3vw, 62px);
  touch-action: pan-y;
}

.gallery__stage:focus-visible { outline-offset: -3px; box-shadow: none; }

.gallery__slide {
  position: absolute;
  top: 0;
  height: 100%;
  left: var(--center-x);
  width: var(--slide-w);
  border: 2px solid var(--gold);
  overflow: hidden;
  background: var(--green-2);
  cursor: pointer;
}

.gallery__slide[data-pos="center"] { z-index: 2; cursor: default; }

.gallery__slide[data-pos="left"] { left: var(--left-x); width: var(--side-w); }

.gallery__slide[data-pos="right"] { left: var(--right-x); width: var(--side-w); }

.gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .js .gallery__slide { transition: left 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.5vw, 50px);
  margin-top: clamp(28px, 4.4vw, 64px);
}

.gallery__arrow {
  display: inline-flex;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.gallery__arrow img { display: block; width: 50px; height: 50px; }

.gallery__arrow:hover { transform: scale(1.06); }

.gallery__dots { display: flex; gap: 0; }

.gallery__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.gallery__dot::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.gallery__dot[aria-current="true"]::before { background: var(--gold); }

@media (max-width: 767px) {
  .gallery__stage {
    --slide-w: 84%;
    --side-w: 84%;
    --left-x: -78%;
    --center-x: 8%;
    --right-x: 94%;
    aspect-ratio: 100 / 49.4;
  }
}

/* ==========================================================================
   Школьные группы
   ========================================================================== */

.school {
  overflow: hidden;
}

.branch--school {
  position: absolute;
  left: calc(26 * var(--u));
  top: calc(20 * var(--u));
  transform: rotate(29.47deg);
  z-index: 1;
}

.school__inner {
  display: grid;
  grid-template-columns: minmax(0, 99fr) minmax(0, 485fr) minmax(0, 117fr) minmax(0, 739fr);
  align-items: center;
}

.school__text {
  position: relative;
  z-index: 1;
  grid-column: 2 / 4;
  grid-row: 1;
  padding-block: clamp(40px, 5vw, 72px);
}

.school__text .section-title { margin-bottom: clamp(20px, 3.05vw, 44px); }

.school__text .plank-btn { margin-top: clamp(24px, 3.05vw, 44px); }

.school__media {
  grid-column: 3 / 5;
  grid-row: 1;
  width: calc(100% + 85 * var(--u));
  aspect-ratio: 941 / 831;
  overflow: hidden;
}

.school__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 50%;
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  .branch--school { display: none; }
  .school__inner { grid-template-columns: 1fr; padding-inline: var(--pad); }
  .school__text,
  .school__media { grid-column: 1; grid-row: auto; width: 100%; }
  .school__media { aspect-ratio: 1 / 1; }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
  min-height: calc(760 * var(--u));
  overflow: hidden;
}

.faq__decor { position: absolute; height: auto; pointer-events: none; }

.faq__decor--left { left: calc(-18 * var(--u)); top: 0; width: calc(546 * var(--u)); }

.faq__decor--right { right: 0; bottom: 0; width: calc(421 * var(--u)); }

.faq__inner {
  position: relative;
  z-index: 1;
  max-width: calc(815px + 2 * var(--pad));
  margin-left: calc(524 * var(--u));
  margin-right: auto;
  padding: calc(96 * var(--u)) var(--pad) calc(250 * var(--u)) 0;
}

.faq__title {
  color: var(--red);
  font-size: clamp(30px, 4.3vw, 62px);
  margin-left: 3px;
}

.faq__list { margin-top: clamp(24px, 4vw, 60px); }

.faq__line { display: block; width: 100%; height: 1px; }

.faq__q button {
  position: relative;
  display: block;
  width: 100%;
  padding: clamp(16px, 1.8vw, 26px) 48px clamp(16px, 1.8vw, 26px) 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.faq__q button::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s ease;
}

.faq__q button[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }

.faq__q button:hover { color: var(--red); }

.faq__a { padding: 0 48px clamp(16px, 1.8vw, 26px) 0; }

.faq__a p { font-size: clamp(16px, 1.39vw, 20px); line-height: 1.35; }

@media (prefers-reduced-motion: no-preference) {
  .js .faq__a:not([hidden]) { animation: panel-in 0.35s ease both; }
}

@media (max-width: 767px) {
  .faq { min-height: 0; }
  .faq__decor--left { width: 46vw; left: -10vw; opacity: 0.5; }
  .faq__decor--right { width: 48vw; }
  .faq__inner { margin-left: 0; padding: 48px var(--pad) 36vw; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--green);
  color: var(--parchment);
  padding-block: clamp(36px, 4vw, 56px);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}

.site-footer__logo { display: block; width: 178px; }

.site-footer__logo img { display: block; width: 100%; height: auto; }

.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }

.site-footer__nav a {
  display: inline-block;
  padding: 6px 0;
  font-size: 18px;
  text-decoration: none;
}

.site-footer__nav a:hover { color: var(--gold); }

.site-footer__copy { font-size: 16px; color: rgba(243, 241, 232, 0.8); }

/* ==========================================================================
   Program dialog
   ========================================================================== */

.program-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: var(--parchment) url("assets/figma/4fd03.webp") center / cover;
  color: var(--ink);
  overflow: auto;
}

.program-dialog::backdrop { background: rgba(1, 4, 3, 0.72); }

.has-dialog { overflow: hidden; }

.program-dialog__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(20px, 3vw, 40px);
}

.program-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--red);
  border-radius: 50%;
  background: var(--parchment);
  color: var(--red);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.program-dialog__close:hover { background: var(--red); color: var(--parchment); }

.program-dialog__media {
  align-self: start;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: var(--green-2);
}

.program-dialog__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-dialog__media[data-fit="top"] img { object-position: 50% 3%; }
.program-dialog__media[data-fit="bottom"] img { object-position: 50% 100%; }
.program-dialog__media[data-fit="mirror"] img { object-position: 0 50%; transform: scaleX(-1); }
.program-dialog__media[data-fit="contain"] { background: transparent; }
.program-dialog__media[data-fit="contain"] img { object-fit: contain; }

.program-dialog__body { padding-right: 36px; }

.program-dialog__kicker {
  color: var(--red);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.program-dialog__title {
  margin-top: 8px;
  color: var(--red);
  font-size: clamp(30px, 3.5vw, 50px);
}

.program-dialog__text { margin-top: 16px; }

.program-dialog__text p { font-size: clamp(16px, 1.39vw, 20px); line-height: 1.35; }

.program-dialog__text p + p { margin-top: 10px; }

.program-dialog .leaf-list { display: grid; gap: 8px; margin-top: 16px; font-size: clamp(16px, 1.39vw, 20px); }

.program-dialog .leaf-list:empty { display: none; }

.program-dialog__price {
  margin-top: 18px;
  color: var(--red);
  font-size: clamp(28px, 2.7vw, 39px);
}

.program-dialog__price:empty { display: none; }

.program-dialog__note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(136, 29, 0, 0.35);
  font-size: 15px;
  color: #3b3b36;
}

.program-dialog__actions { margin-top: 18px; }

.program-dialog__actions[hidden] { display: none; }

.program-dialog__actions .plank-btn { width: clamp(240px, 24vw, 340px); }

@media (max-width: 767px) {
  .program-dialog__inner { grid-template-columns: 1fr; }
  .program-dialog__media { aspect-ratio: 16 / 10; }
  .program-dialog__body { padding-right: 0; }
}

/* ==========================================================================
   Reveal
   ========================================================================== */

@media (max-width: 599px) {
  .shape-btn { min-height: 48px; }
  .shape-btn > img { height: auto; top: 50%; transform: translateY(-50%); }
  .shape-btn__text { font-size: clamp(12px, 3.5vw, 14px); line-height: 1.15; }
}

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
