/* Meowsicat Academy: ворота → факультеты → кампус.
   По умолчанию (телефон, планшет, низкий экран) — обычная страница: картинка, текст, факультеты листаются пальцем вбок.
   На большом экране (класс .is-cine ставит academy.js) — сцены от прокрутки: камера проходит в ворота, коридор едет вбок.
   Переменные: --gp (проход в ворота 0…1), --hp (коридор 0…1). */

.academy { position: relative; background: var(--bg-2); }

/* ---------- Ворота ---------- */
.gate { position: relative; --gp: 0; }
.gate__sticky { position: relative; overflow: hidden; }
.gate__art { position: relative; height: clamp(250px, 46svh, 560px); overflow: hidden; }
.gate__bg { position: absolute; inset: 0; }
.gate__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.gate__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(11, 15, 34, .25) 0, transparent 30%, transparent 55%, var(--bg-2) 100%); }
.gate__char { position: absolute; bottom: 0; width: auto; max-width: none; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .55)); }
.gate__char--meowsic { left: 8%; height: 84%; }
.gate__char--fresh { right: 6%; height: 66%; }

.gate__art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; pointer-events: none; background: linear-gradient(to top, var(--bg-2), transparent); }
.gate__copy { position: relative; z-index: 2; max-width: 680px; margin: 10px auto 0; padding: 0 var(--gr) 40px var(--gl); }
.gate__title { margin: 0 0 12px; font: 900 clamp(38px, 11vw, 96px)/1 var(--font-head); letter-spacing: -.01em; }
.gate__title span { display: inline-block; }
.gate__lead { margin: 0 0 22px; font-size: clamp(16px, 1.45vw, 20px); }

.stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }   /* магазинов 4 (App Store с 25.11.2026): 2×2, на широком — в ряд */
@media (min-width: 560px) { #stores { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.store {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: 14px; min-width: 0;
  background: rgba(13, 17, 36, .82); border: 1px solid var(--line-2); color: var(--text); text-decoration: none;
  font: 700 14px/1.2 var(--font-head); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.store svg { flex: 0 0 auto; width: 22px; height: 22px; fill: currentColor; }
.store small { display: block; font: 700 10.5px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.store:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 0 18px rgba(62, 232, 255, .3); }
.store[aria-disabled="true"] { cursor: default; opacity: .8; }
.store[aria-disabled="true"]:hover { transform: none; border-color: var(--line-2); box-shadow: none; }
.stores > .store[aria-disabled="true"] svg { display: none; }
/* скачивание с сайта (до 25.11.2026 — открытый бета-тест): кнопки над магазинами */
.beta { margin-bottom: 12px; padding: 14px; border-radius: var(--r); background: rgba(18, 23, 47, .9); border: 1px solid var(--line-2); }
.beta__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 12px; font: 600 14px var(--font-body); color: var(--muted); }
.beta__tag { padding: 4px 10px; border-radius: 999px; background: var(--pink); color: #06080f; font: 800 11.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.beta__help { margin-left: auto; white-space: nowrap; font: 700 14px var(--font-body); color: var(--cyan); text-decoration: none; }
.beta__help:hover { text-decoration: underline; }
.beta .stores { grid-template-columns: 1fr; }
.store--dl { justify-content: flex-start; min-height: 56px; padding: 6px 16px; font-size: 16px; background: rgba(255, 255, 255, .05); }
.store--dl.is-mine { color: #1a0c06; background: linear-gradient(100deg, #ff9a68, #ff7a8f); border-color: transparent; box-shadow: 0 8px 26px rgba(255, 122, 110, .32); }
.store--dl.is-mine small { color: rgba(26, 12, 6, .75); }
@media (min-width: 560px) {
  .beta .stores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store--dl { padding: 6px 12px; font-size: 14.5px; }
  .stores > .store[aria-disabled="true"] svg { display: block; }
}

/* альбом: ворота во весь блок, текст слева, герои справа */
@media (orientation: landscape) {
  .gate__sticky { display: flex; align-items: center; min-height: calc(100vh - var(--top-h)); min-height: calc(100svh - var(--top-h)); }
  .gate__art { position: absolute; inset: 0; height: auto; }
  .gate__shade { background:
    linear-gradient(90deg, rgba(7, 9, 19, .9) 0, rgba(7, 9, 19, .62) 38%, transparent 66%),
    linear-gradient(to top, var(--bg-2) 0, transparent 26%); }
  .gate__char--meowsic { left: auto; right: 21%; height: min(80%, 44vw, 760px); }
  .gate__char--fresh { right: 2%; height: min(62%, 34vw, 600px); }
  .gate__copy { width: min(620px, 50%); max-width: none; margin: 0; padding: 28px 0 36px var(--gl); }
  .gate__title { font-size: clamp(34px, 6.2vw, 100px); }
  .gate__lead { text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .gate__sticky { min-height: 0; }
  .gate__copy { padding-top: 18px; padding-bottom: 24px; }
  .gate__lead { margin-bottom: 14px; font-size: 15px; }
  .beta { padding: 10px; }
  .beta .stores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store, .store--dl { min-height: 46px; padding: 4px 8px; font-size: 13px; gap: 6px; }
  .store svg { width: 18px; height: 18px; }
}

/* ---------- Факультеты: карточки, листаются вбок ---------- */
.halls { position: relative; --hp: 0; padding: clamp(36px, 6vw, 64px) 0 12px; }
.halls__head { padding: 0 var(--gr) 0 var(--gl); }
.halls__head .section-lead { margin-bottom: 16px; }
.halls__track {
  display: flex; gap: 14px; padding: 6px var(--gr) 18px var(--gl);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gr) 0 var(--gl); overscroll-behavior-x: contain; scrollbar-width: none;
}
.halls__track::-webkit-scrollbar { display: none; }
.halls__bar { display: none; }
.hall {
  --shift: 0; position: relative; flex: 0 0 min(86%, 430px); scroll-snap-align: start; display: flex; flex-direction: column;
  border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.hall__art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0e1e; }
.hall__art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, var(--panel) 0, transparent 34%); }
.hall__bg { position: absolute; inset: 0; }
.hall__bg img { width: 100%; height: 100%; object-fit: cover; }
.hall__prof { position: absolute; right: 6%; bottom: 0; height: 94%; width: auto; max-width: none; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .6)); }
.hall__body { position: relative; padding: 4px 18px 20px; }
.hall__num { font: 900 12px var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hall h4 { margin: 6px 0 2px; font: 900 clamp(22px, 3vw, 40px)/1.08 var(--font-head); }
.hall__head { margin: 0 0 10px; font-weight: 800; color: var(--accent); }
.hall__about { margin: 0 0 14px; font-size: clamp(15px, 1.25vw, 18px); color: var(--muted); }
.hall__staff { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hall__staff li { font: 700 12.5px var(--font-body); color: var(--text); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
/* шире: текст слева, картинка справа */
@media (min-width: 640px) {
  .hall { flex-basis: min(88%, 780px); flex-direction: row-reverse; }
  .hall__art { flex: 0 0 44%; aspect-ratio: auto; min-height: 250px; }
  .hall__art::after { background: linear-gradient(to right, var(--panel) 0, transparent 40%); }
  .hall__body { flex: 1 1 0; min-width: 0; align-self: center; padding: 20px 8px 22px 24px; }
}

/* ---------- Большой экран: сцены от прокрутки ---------- */
.is-cine .gate { height: 200vh; }
.is-cine .gate__sticky { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); min-height: 0; }
.is-cine .gate__bg { transform: scale(calc(1.04 + var(--gp) * .55)); transform-origin: 50% 46%; will-change: transform; }
.is-cine .gate__shade { background:
  linear-gradient(90deg, rgba(7, 9, 19, .9) 0, rgba(7, 9, 19, .6) 36%, transparent 64%),
  linear-gradient(to top, var(--bg-2) 0, transparent 30%),
  rgba(11, 15, 34, calc(var(--gp) * var(--gp) * 1.1)); }
.is-cine .gate__char { will-change: transform; transform-origin: 50% 100%; }
.is-cine .gate__char--meowsic { transform: translate3d(calc(var(--gp) * -30vw), calc(var(--gp) * 30vh), 0) scale(calc(1 + var(--gp) * .6)); }
.is-cine .gate__char--fresh { transform: translate3d(calc(var(--gp) * 40vw), calc(var(--gp) * 30vh), 0) scale(calc(1 + var(--gp) * .8)); }
.is-cine .gate__copy { transform: translateY(calc(var(--gp) * -160px)); opacity: calc(1 - var(--gp) * 2.4); }

.is-cine .halls { padding: 0; }                      /* высоту задаёт academy.js по ширине дорожки */
.is-cine .halls__sticky { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 20px 0; }
.is-cine .halls__head .section-lead { margin: 0; }
.is-cine .halls__track { gap: clamp(18px, 3vw, 40px); padding-top: 0; padding-bottom: 0; overflow: visible; scroll-snap-type: none; will-change: transform; }
.is-cine .halls__bar { display: block; margin: 0 var(--gr) 0 var(--gl); height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.is-cine .halls__bar span { display: block; height: 100%; width: calc(var(--hp) * 100%); background: linear-gradient(90deg, var(--cyan), var(--pink)); }
.is-cine .hall { flex: 0 0 min(84vw, 1040px); height: min(62vh, 600px); display: block; background: #0b0e1e; border-color: rgba(255, 255, 255, .08); box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.is-cine .hall__art { position: absolute; inset: 0; min-height: 0; }
.is-cine .hall__art::after { background: linear-gradient(90deg, rgba(6, 8, 15, .92) 0, rgba(6, 8, 15, .7) 38%, rgba(6, 8, 15, .05) 70%); }
.is-cine .hall__bg { inset: 0 -12%; transform: translateX(calc(var(--shift) * 8%)); will-change: transform; }
.is-cine .hall__prof { right: 4%; bottom: -2%; height: 98%; transform: translateX(calc(var(--shift) * -14%)); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); will-change: transform; }
.is-cine .hall__body { position: absolute; z-index: 3; left: 0; top: 0; bottom: 0; width: min(54%, 520px); padding: clamp(22px, 3.4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.is-cine .hall__about { color: var(--text); }

/* ---------- Кампус ---------- */
.campus { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 6vw, 80px); }
.campus__map { position: absolute; inset: -20% 0; opacity: .3; transform: translate3d(0, var(--sy, 0px), 0); }
.campus__map img { width: 100%; height: 100%; object-fit: cover; }
.campus::before { /* карта уходит в тёмный фон сверху и снизу */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(var(--bg-2), rgba(11, 15, 34, .55) 25%, rgba(11, 15, 34, .55) 70%, var(--bg-2));
}
.campus__inner { position: relative; z-index: 2; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gr) 0 var(--gl); }
.perks { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
/* телефон: значок слева, текст справа */
.perk {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-items: start;
  padding: 16px; border-radius: var(--r); background: rgba(18, 23, 47, .88); border: 1px solid var(--line);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.perk__icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 79, 216, .12); border: 1px solid rgba(255, 79, 216, .45); }
.perk__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--pink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.perk:nth-child(even) .perk__icon { background: rgba(62, 232, 255, .1); border-color: rgba(62, 232, 255, .45); }
.perk:nth-child(even) .perk__icon svg { stroke: var(--cyan); }
.perk h4 { margin: 0 0 4px; font: 900 18px/1.2 var(--font-head); }
.perk p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
@media (min-width: 640px) { .perks { grid-template-columns: 1fr 1fr; gap: 14px; } }
@media (min-width: 1100px) {
  .perks { grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
  .perk { display: block; padding: 24px; }
  .perk__icon { margin-bottom: 14px; }
  .perk p { font-size: 16px; }
}
@media (hover: hover) { .perk:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 0 24px rgba(255, 79, 216, .22); } }

/* лента педагогов — бесконечная, на наведении останавливается */
.teachers { position: relative; z-index: 2; margin-top: clamp(32px, 6vw, 70px); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.teachers__track { display: flex; gap: clamp(14px, 2vw, 26px); width: max-content; animation: teachers 90s linear infinite; }
.teachers:hover .teachers__track { animation-play-state: paused; }
@keyframes teachers { to { transform: translateX(-50%); } }
.teacher { flex: 0 0 auto; margin: 0; text-align: center; }
.teacher img { height: clamp(130px, 24vw, 220px); width: auto; max-width: none; margin: 0 auto; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55)); transition: transform .3s; }
.teacher:hover img { transform: translateY(-8px) scale(1.05); }
.teacher span { display: block; max-width: 160px; margin: 8px auto 0; font: 700 12.5px var(--font-head); color: var(--muted); }
