/* Новогодняя афиша barvikhagroup.ru — подача как у афиши на barvikha-krylatskoe.ru: выезжает снизу, страница затемнена,
   карточка ~560×600 без рамки со скруглением 10px, крестик в углу экрана, надзаголовок вразрядку, крупный заголовок,
   светлые кнопки и тихое «Не сейчас». Внутри — наша тематика: бокалы → золотое дерево с шарами и подарками (видео).
   Всё в пространстве имён .nyp, шрифты свои — со стилями сайта не пересекается. */

@font-face { font-family: "NYP Alumni"; src: url(fonts/AlumniSans.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "NYP Montserrat"; src: url(fonts/Montserrat.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

.nyp { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --gold: #E4C374; --gold-hi: #F0D894; --gold-lo: #D2AE5E; --cream: #F4ECDC;
  position: fixed; inset: 0; z-index: 99980; display: grid; place-items: center; padding: 20px;
  visibility: hidden; pointer-events: none; }
.nyp.is-open { visibility: visible; pointer-events: auto; }
/* фон — не чёрный квадрат, а размытая страница, как в системных окнах Apple */
.nyp__backdrop { position: absolute; inset: 0; background: rgba(12, 10, 8, .38); backdrop-filter: blur(22px) saturate(1.4) brightness(.8); -webkit-backdrop-filter: blur(22px) saturate(1.4) brightness(.8);
  opacity: 0; transition: opacity .6s ease; }
.nyp.is-open .nyp__backdrop { opacity: 1; }

/* крестик — в углу экрана, тонкий, как у Крылатского */
.nyp__x { position: absolute; top: 18px; right: 18px; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; color: #fff;
  opacity: 0; transition: opacity .4s ease .2s; }
.nyp.is-open .nyp__x { opacity: .9; }
.nyp__x svg { width: 30px; height: 30px; }
@media (hover: hover) and (pointer: fine) { .nyp__x:hover { opacity: 1; } }

/* карточка: выезжает снизу */
.nyp__card { position: relative; width: min(560px, 100%, calc((100dvh - 40px) * 1120 / 1200)); aspect-ratio: 1120 / 1200; overflow: hidden;
  border-radius: 10px; background: #000; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); container-type: inline-size;
  opacity: 0; transform: translateY(60px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.nyp.is-open .nyp__card { opacity: 1; transform: none; }
.nyp.is-closing .nyp__card { opacity: 0; transform: translateY(30px) scale(.98); transition-duration: var(--close, .3s); }
.nyp.is-closing .nyp__backdrop, .nyp.is-closing .nyp__x { opacity: 0; transition-duration: var(--close, .3s); transition-delay: 0s; }

.nyp__poster, .nyp__v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nyp__poster { opacity: 0; transition: opacity .5s ease; }
.nyp.is-still .nyp__poster { opacity: 1; }
.nyp__v { opacity: 0; }
.nyp__v.is-on { opacity: 1; }
.nyp__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, .55) 100%); }

/* текст — нижняя часть карточки, под деревом */
.nyp__content { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 8.5cqw 6.5cqw; text-align: center; }
.nyp__eyebrow { margin: 0 0 3cqw; font: 500 clamp(10px, 2.3cqw, 13px)/1 "NYP Montserrat", system-ui, sans-serif; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.nyp__title { margin: 0; font: 600 clamp(30px, 10.5cqw, 60px)/.95 "NYP Alumni", "Arial Narrow", sans-serif; letter-spacing: .04em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .7)); }
.nyp__title > span { display: block; }
.nyp__venues { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; margin: 5.5cqw 0 0; padding: 0; }
.nyp__venue { display: flex; align-items: center; justify-content: center; height: clamp(44px, 10.5cqw, 58px); padding: 0 6px; border-radius: 8px;
  font: 600 clamp(10px, 2.35cqw, 13px)/1.1 "NYP Montserrat", system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; text-align: center; text-decoration: none;
  color: #17120A; background: var(--cream); transition: background-color .2s ease, color .2s ease; }
@media (hover: hover) and (pointer: fine) { .nyp__venue:hover { background: var(--gold); color: #17120A; } }
.nyp__venue:active { transform: scale(.98); }
.nyp__later { display: inline-block; margin-top: 3.4cqw; padding: 6px 10px; border: 0; background: none; cursor: pointer;
  font: 400 clamp(11px, 2.3cqw, 13px)/1 "NYP Montserrat", system-ui, sans-serif; color: rgba(244, 236, 220, .55); transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) { .nyp__later:hover { color: var(--cream); } }
.nyp__venue:focus-visible, .nyp__btn:focus-visible, .nyp__x:focus-visible, .nyp__later:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* проявление по времени видео: надзаголовок и заголовок, потом площадки по одной, потом «Не сейчас» */
.nyp__eyebrow, .nyp__title, .nyp__venues li, .nyp__later { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.nyp.is-1 .nyp__eyebrow, .nyp.is-1 .nyp__title, .nyp.is-2 .nyp__venues li:nth-child(1), .nyp.is-3 .nyp__venues li:nth-child(2),
.nyp.is-4 .nyp__venues li:nth-child(3), .nyp.is-4 .nyp__later { opacity: 1; transform: none; }
.nyp.is-1 .nyp__title { transition-delay: .08s; }
.nyp.is-4 .nyp__later { transition-delay: .3s; }

/* звук — маленькая кнопка в углу карточки */
.nyp__btn { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 100px; cursor: pointer;
  color: var(--gold); background: rgba(10, 8, 4, .45); border: 1px solid rgba(228, 195, 116, .3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 600 10px/1 "NYP Montserrat", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; transition: background-color .2s ease; }
@media (hover: hover) and (pointer: fine) { .nyp__btn:hover { background: rgba(228, 195, 116, .16); } }
.nyp__btn svg { width: 16px; height: 16px; flex: none; }
.nyp__btn [data-on] { display: none; }
.nyp.is-sound .nyp__btn [data-on] { display: block; }
.nyp.is-sound .nyp__btn [data-off] { display: none; }
.nyp__sound-label { display: none; }
.nyp.is-muted-hint .nyp__sound-label { display: inline; }

/* узкий экран: кнопки площадок столбиком */
@media (max-width: 480px) {
  .nyp { padding: 14px; }
  .nyp__card { width: min(100%, calc((100dvh - 28px) * 9 / 16)); aspect-ratio: 9 / 16; }
  .nyp__x { top: 8px; right: 8px; }
  .nyp__venues { grid-template-columns: 1fr; gap: 8px; margin-top: 4.5cqw; }
  .nyp__venue { height: 44px; font-size: 12px; }
  .nyp__content { padding-bottom: 4cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .nyp__card, .nyp.is-closing .nyp__card { transform: none; transition: opacity .3s ease; }
  .nyp__eyebrow, .nyp__title, .nyp__venues li, .nyp__later { transform: none; transition: opacity .4s ease; }
}
