/* ==========================================================================
   «Золотая ночь 2027» — изолированный блок.
   Все стили вложены в .ny27 и не влияют на основной сайт.
   Стили для html / body намеренно отсутствуют.
   ========================================================================== */

.ny27 {
  /* Палитра и параметры блока */
  --ny27-bg:        #090604;
  --ny27-gold:      #efc163;
  --ny27-gold-lt:   #f9e29a;
  --ny27-gold-dk:   #c8912f;
  --ny27-text:      #ffffff;
  --ny27-ink:       #2a1b06;
  --ny27-max:       1200px;
  --ny27-gap:       clamp(16px, 3vw, 32px);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  padding: clamp(28px, 6vw, 80px) clamp(16px, 4vw, 48px) clamp(40px, 8vw, 110px);
  background-color: var(--ny27-bg);
  color: var(--ny27-text);
  font-family: "Montserrat", "Golos Text", "PT Sans", -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

/* Локальный сброс — только внутри блока */
.ny27 *,
.ny27 *::before,
.ny27 *::after { box-sizing: border-box; }

.ny27 h1,
.ny27 h2,
.ny27 p,
.ny27 figure { margin: 0; }

.ny27 img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

.ny27 a { text-decoration: none; }

/* --------------------------- Фон: боке ----------------------------------- */

.ny27::before,
.ny27::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("images/bg-bokeh.jpg");
  background-repeat: no-repeat;
  background-size: cover;
}

.ny27::before {
  top: 0;
  height: min(70%, 1100px);
  background-position: center top;
  opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.ny27::after {
  bottom: 0;
  height: min(72%, 1500px);
  background-position: center center;
  opacity: .55;
  transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}

/* ------------------------------ Шапка ------------------------------------ */

.ny27__hero {
  max-width: var(--ny27-max);
  margin: 0 auto;
}

.ny27__title {
  margin-bottom: clamp(-14px, -1vw, 0px);
  font-size: clamp(30px, 7.2vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ny27-gold);
  background-image: linear-gradient(180deg, #fdefc0 0%, #efc163 45%, #c8912f 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ny27__year {
  width: clamp(220px, 46vw, 620px);
  margin: clamp(4px, 1vw, 12px) auto 0;
}

/* ------------------------------ Текст ------------------------------------ */

.ny27__intro {
  max-width: 980px;
  margin: clamp(20px, 4vw, 48px) auto 0;
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.6;
}

.ny27__intro p + p { margin-top: 1.4em; }

/* --------------------------- Кнопки-разделы ------------------------------ */

.ny27__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(26px, 4.5vw, 56px) clamp(14px, 3.4vw, 52px);
  max-width: var(--ny27-max);
  margin: clamp(56px, 9vw, 120px) auto 0;
}

.ny27__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  padding: 18px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f5cd76 0%, #efc163 55%, #e0ae4b 100%);
  color: var(--ny27-ink);
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .01em;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Блёстки за кнопкой */
.ny27__card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: auto;
  height: 205%;
  min-width: 104%;
  aspect-ratio: 7 / 6;
  transform: translate(-50%, -50%);
  background: url("images/glitter-circle.png") center / contain no-repeat;
  opacity: .7;
  pointer-events: none;
}

.ny27__card:hover,
.ny27__card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(239, 193, 99, .28);
}

.ny27__card-text b {
  display: inline-block;
  margin-top: 2px;
  font-weight: 700;
}

/* ----------------------- Бронирование и подарок -------------------------- */

.ny27__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 44px);
  max-width: var(--ny27-max);
  margin: clamp(40px, 8vw, 110px) auto 0;
}

.ny27__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px clamp(24px, 3vw, 42px);
  border-radius: 14px;
  background: linear-gradient(180deg, #f5cd76 0%, #efc163 55%, #e0ae4b 100%);
  color: var(--ny27-ink);
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: transform .25s ease, box-shadow .25s ease;
}

.ny27__btn:hover,
.ny27__btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(239, 193, 99, .35);
}

.ny27__gift {
  width: clamp(130px, 20vw, 260px);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .55));
}

.ny27__gift-text {
  font-size: clamp(22px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ny27-gold);
  background-image: linear-gradient(180deg, #fdefc0 0%, #efc163 50%, #d5a13c 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----------------------------- Галерея ----------------------------------- */

.ny27__gallery-section {
  max-width: var(--ny27-max);
  margin: clamp(48px, 9vw, 130px) auto 0;
}

.ny27__subtitle {
  margin-bottom: clamp(20px, 4vw, 48px);
  font-size: clamp(20px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--ny27-gold);
  background-image: linear-gradient(180deg, #fdefc0 0%, #efc163 50%, #d5a13c 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ny27__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ny27-gap);
}

.ny27__photo {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(239, 193, 99, .35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  background: rgba(0, 0, 0, .3);
}

.ny27__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .45s ease;
}

.ny27__photo:hover img { transform: scale(1.06); }

/* ============================ Адаптивность =============================== */

@media (max-width: 1024px) {
  .ny27__cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 680px;
    row-gap: clamp(64px, 11vw, 96px);
  }
  .ny27__card  { font-size: 14px; }
  .ny27__intro { font-size: 16px; }
}

@media (max-width: 860px) {
  .ny27__gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ny27 { padding-left: 16px; padding-right: 16px; }

  .ny27__cards { gap: 60px 14px; }
  .ny27__card  { min-height: 96px; font-size: 12.5px; border-radius: 14px; }
  .ny27__card::before { height: 190%; }

  .ny27__cta { gap: 18px; }
  .ny27__btn { width: 100%; max-width: 320px; order: 3; }
  .ny27__gift { order: 1; width: 150px; }
  .ny27__gift-text { order: 2; }

  .ny27__gallery { grid-template-columns: 1fr; gap: 16px; }
  .ny27__photo img { aspect-ratio: 3 / 2; }
}

@media (max-width: 380px) {
  .ny27__cards { grid-template-columns: 1fr; }
}

/* Уважение к пользовательским настройкам анимации */
@media (prefers-reduced-motion: reduce) {
  .ny27 * { transition: none !important; }
}
