/* Meowsicat Academy: ворота → коридор факультетов → кампус. Переменные: --gp (проход в ворота 0…1), --hp (коридор 0…1) */

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

/* ---------- Ворота ---------- */
.gate { position: relative; height: 220vh; --gp: 0; }
@media (max-width: 760px) { .gate { height: 150vh; } }
.gate__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.gate__bg { position: absolute; inset: 0; transform: scale(calc(1.04 + var(--gp) * .55)); transform-origin: 50% 46%; will-change: transform; }
.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(90deg, rgba(6, 8, 15, .88) 0%, rgba(6, 8, 15, .55) 34%, transparent 62%),
    linear-gradient(to top, rgba(12, 16, 34, 1) 0%, transparent 30%),
    rgba(12, 16, 34, calc(var(--gp) * var(--gp) * 1.1));
}
.gate__char { position: absolute; bottom: 0; height: min(78vh, 760px); width: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .55)); will-change: transform; }
.gate__char--meowsic { right: 24%; transform: translate3d(calc(var(--gp) * -30vw), calc(var(--gp) * 30vh), 0) scale(calc(1 + var(--gp) * .6)); transform-origin: 50% 100%; }
.gate__char--fresh { right: 3%; height: min(60vh, 600px); transform: translate3d(calc(var(--gp) * 40vw), calc(var(--gp) * 30vh), 0) scale(calc(1 + var(--gp) * .8)); transform-origin: 50% 100%; }

.gate__copy {
  position: absolute; left: clamp(16px, 6vw, 110px); top: 50%; width: min(620px, calc(100vw - 32px));
  transform: translateY(calc(-50% - var(--gp) * 160px)); opacity: calc(1 - var(--gp) * 2.4);
}
.gate__title { margin: 0 0 16px; font: 900 clamp(44px, 6.4vw, 104px)/1 var(--font-head); }
.gate__title .neon--pink { color: #ffd0f4; text-shadow: 0 0 2px #fff, 0 0 16px rgba(255, 79, 216, .7), 0 0 40px rgba(255, 79, 216, .4); }
.gate__title .neon--cyan { color: #c9f8ff; text-shadow: 0 0 2px #fff, 0 0 16px rgba(62, 232, 255, .7), 0 0 40px rgba(62, 232, 255, .4); }
.gate__lead { margin: 0 0 26px; font-size: clamp(17px, 1.45vw, 20px); text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 20px; border-radius: 14px;
  background: rgba(6, 8, 15, .78); border: 1px solid rgba(255, 255, 255, .18); color: var(--text); text-decoration: none;
  font: 700 16px var(--font-head); backdrop-filter: blur(6px);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.store svg { width: 22px; height: 22px; fill: currentColor; }
.store small { display: block; font: 600 11px 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, .35); }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"]:hover { transform: none; border-color: rgba(255, 255, 255, .3); box-shadow: none; }

@media (min-width: 761px) and (max-width: 1150px) {
  .gate__char--meowsic { right: 17%; height: min(64vh, 640px); }
  .gate__char--fresh { right: -3%; height: min(50vh, 500px); }
}
@media (max-width: 760px) {
  .gate__shade { background: linear-gradient(to bottom, rgba(6, 8, 15, .9) 0%, rgba(6, 8, 15, .5) 55%, transparent 75%), linear-gradient(to top, rgba(12, 16, 34, 1) 0%, transparent 25%), rgba(12, 16, 34, calc(var(--gp) * var(--gp) * 1.1)); }
  .gate__copy { top: 84px; transform: translateY(calc(var(--gp) * -160px)); }
  .gate__char--meowsic { right: 34%; height: 46vh; }
  .gate__char--fresh { right: -4%; height: 38vh; }
  .store { flex: 1 1 140px; justify-content: center; }
}

/* ---------- Коридор факультетов ---------- */
.halls { position: relative; --hp: 0; }                       /* высоту задаёт academy.js по ширине дорожки */
.halls__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 70px 0 34px; }
.halls__head { padding: 0 clamp(16px, 6vw, 110px); }
.halls__head .section-lead { margin: 0; }
.halls__track { display: flex; gap: clamp(18px, 3vw, 40px); padding: 0 clamp(16px, 6vw, 110px); will-change: transform; }
.halls__bar { margin: 0 clamp(16px, 6vw, 110px); height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.halls__bar span { display: block; height: 100%; width: calc(var(--hp) * 100%); background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 10px var(--pink); }

.hall {
  --shift: 0; position: relative; flex: 0 0 min(84vw, 1040px); height: min(64vh, 600px); border-radius: 22px; overflow: hidden;
  background: #0b0e1e; box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.hall__bg { position: absolute; inset: 0 -12%; transform: translateX(calc(var(--shift) * 8%)); will-change: transform; }
.hall__bg img { width: 100%; height: 100%; object-fit: cover; }
.hall::after { /* затемнение под текст */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 8, 15, .92) 0%, rgba(6, 8, 15, .7) 38%, rgba(6, 8, 15, .05) 70%);
}
.hall__prof {
  position: absolute; z-index: 2; right: 4%; bottom: -2%; height: 98%; width: auto;
  transform: translateX(calc(var(--shift) * -14%)); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6));
  will-change: transform;
}
.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; }
.hall__num { font: 900 14px var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-shadow: 0 0 12px var(--accent); }
.hall h4 { margin: 6px 0 2px; font: 900 clamp(26px, 3vw, 42px)/1.05 var(--font-head); }
.hall__head { margin: 0 0 14px; font-weight: 800; color: var(--accent); }
.hall__about { margin: 0 0 18px; font-size: clamp(15px, 1.25vw, 18px); }
.hall__staff { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hall__staff li { font: 600 13px var(--font-body); color: var(--text); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

@media (max-width: 760px) {
  .halls__sticky { padding: 64px 0 20px; gap: 14px; }
  .halls__head .section-lead { display: none; }
  .hall { flex-basis: 86vw; height: min(74vh, 640px); }
  .hall::after { background: linear-gradient(to top, rgba(6, 8, 15, .97) 0%, rgba(6, 8, 15, .9) 48%, rgba(6, 8, 15, .15) 68%); }
  .hall__body { top: auto; width: 100%; padding: 18px; }
  .hall__prof { right: 50%; transform: translateX(calc(50% + var(--shift) * -14%)); height: 46%; top: 3%; bottom: auto; }
  .hall__about { font-size: 15px; margin-bottom: 12px; }
}

/* без анимаций — обычная горизонтальная прокрутка */
.halls.is-static .halls__sticky { position: static; height: auto; padding: 70px 0 40px; }
.halls.is-static .hall { --shift: 0 !important; }
.halls.is-static .halls__track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.halls.is-static .hall { scroll-snap-align: center; }
.halls.is-static .halls__bar { display: none; }

/* ---------- Кампус ---------- */
.campus { position: relative; overflow: hidden; padding: 120px 0 80px; }
.campus__map { position: absolute; inset: -20% 0; opacity: .32; 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(12, 16, 34, .55) 25%, rgba(12, 16, 34, .55) 70%, var(--bg-2));
}
.campus__inner { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 6vw, 110px); }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
@media (max-width: 1100px) { .perks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .perks { grid-template-columns: 1fr; } }
.perk {
  padding: 26px; border-radius: 18px; background: rgba(10, 13, 29, .78); backdrop-filter: blur(8px);
  border: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.perk:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 20px 40px rgba(0, 0, 0, .35), 0 0 24px rgba(255, 79, 216, .25); }
.perk__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 14px; background: rgba(255, 79, 216, .12); border: 1px solid rgba(255, 79, 216, .45); }
.perk__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--pink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--pink)); }
.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); filter: drop-shadow(0 0 4px var(--cyan)); }
.perk h4 { margin: 0 0 6px; font: 900 20px var(--font-head); }
.perk p { margin: 0; color: var(--muted); font-size: 16px; }

/* лента педагогов — бесконечная, на наведении останавливается */
.teachers { position: relative; z-index: 2; margin-top: 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: 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: 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: 180px; margin: 8px auto 0; font: 700 13px var(--font-head); color: var(--muted); }
