/* ============================================================
   Нейро искусство
   ============================================================ */

.nr-page {
  background: #0B0D11;
  color: rgba(255, 255, 255, .78);
  overflow: hidden;
}

/* ---------- hero ---------- */
.nr-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding: 96px 24px 56px;
  isolation: isolate;
}

.nr-aurora { position: absolute; inset: -20% -10%; z-index: -1; filter: blur(60px); opacity: .85; }

.nr-blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: nr-drift 18s ease-in-out infinite alternate;
}

.nr-blob.b1 { width: 46vw; height: 46vw; left: -6vw; top: -8vw; background: radial-gradient(circle at 30% 30%, rgba(var(--gold-rgb), .55), transparent 62%); }
.nr-blob.b2 { width: 40vw; height: 40vw; right: -4vw; top: 6vw; background: radial-gradient(circle at 60% 40%, rgba(120, 78, 170, .45), transparent 64%); animation-delay: -6s; }
.nr-blob.b3 { width: 34vw; height: 34vw; left: 30vw; bottom: -14vw; background: radial-gradient(circle at 50% 50%, rgba(74, 140, 160, .34), transparent 66%); animation-delay: -12s; }

@keyframes nr-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3vw, -2vw, 0) scale(1.08); }
  100% { transform: translate3d(-2vw, 3vw, 0) scale(.96); }
}

.nr-hero-inner { max-width: 1280px; margin: 0 auto; width: 100%; }

.nr-eyebrow {
  margin: 0 0 18px;
  font: 600 11.5px/1 Montserrat, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-2, var(--gold-2));
}

.nr-hero h1 {
  margin: 0 0 24px;
  font: 800 clamp(46px, 9vw, 112px)/0.92 Montserrat, sans-serif;
  letter-spacing: -.03em;
  color: #fff;
}

.nr-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--gold-2) 10%, var(--gold) 45%, #8E6BC0 75%, #4A8CA0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nr-lead {
  margin: 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .66);
}

.nr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }

.nr-chips span {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font: 600 11.5px/1 Montserrat, sans-serif;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .03);
}

/* ---------- история ---------- */
.nr-story {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 70px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: start;
}

.nr-quote {
  padding: 30px 32px;
  border-left: 2px solid var(--gold, var(--gold));
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .08), transparent);
  border-radius: 0 18px 18px 0;
  font: 500 20px/1.5 Montserrat, sans-serif;
  color: #fff;
}

.nr-story-text p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .6);
}

.nr-story-text p:last-child { margin-bottom: 0; }
.nr-story-text b { color: #fff; font-weight: 600; }

/* ---------- видео ---------- */
.nr-section { max-width: 1280px; margin: 0 auto; padding: 0 24px 70px; }

.nr-section h2 {
  margin: 0 0 8px;
  font: 700 clamp(28px, 4vw, 40px)/1.15 Montserrat, sans-serif;
  color: #fff;
  letter-spacing: -.01em;
}

.nr-section-sub {
  margin: 0 0 30px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, .45);
}

.nr-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.nr-video { display: block; text-align: left; border: 0; padding: 0; background: none; cursor: pointer; }

.nr-poster {
  position: relative;
  display: block;
  background-size: cover;
  background-position: center 35%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.nr-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .10), transparent 55%),
    linear-gradient(180deg, rgba(11, 13, 17, .25) 0%, transparent 35%, rgba(0, 0, 0, .55) 100%);
}

.nr-poster.p1 { background: conic-gradient(from 210deg at 60% 40%, #2a1d3c, #6b4a2a, #1b2b33, #2a1d3c); }
.nr-poster.p2 { background: conic-gradient(from 30deg at 40% 60%, #3a1f22, #6b4a2a, #241a2f, #3a1f22); }
.nr-poster.p3 { background: conic-gradient(from 120deg at 50% 50%, #1b2b33, #3a2c1a, #2a1d3c, #1b2b33); }

.nr-video:hover .nr-poster {
  transform: translateY(-4px);
  border-color: rgba(var(--gold-rgb), .55);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9);
}

.nr-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .5);
  backdrop-filter: blur(6px);
  transition: background .2s ease, transform .2s ease;
}

.nr-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

.nr-video:hover .nr-play { background: rgba(var(--gold-rgb), .9); transform: scale(1.06); }

.nr-video-tag {
  position: absolute;
  z-index: 2;
  left: 18px;
  top: 16px;
  font: 600 10.5px/1 Montserrat, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}

.nr-video h3 {
  margin: 16px 0 6px;
  font: 600 17px/1.35 Montserrat, sans-serif;
  color: #fff;
}

.nr-video p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

/* ---------- работа ---------- */
.nr-art {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 44px;
  align-items: center;
  padding: 70px 24px;
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.nr-art-figure {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(var(--gold-rgb), .18), rgba(11, 13, 17, .9));
  border: 1px solid rgba(255, 255, 255, .1);
}

.nr-art-figure img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}

.nr-art-figure:hover img { transform: scale(1.04) rotate(.6deg); }

.nr-art-text h2 {
  margin: 0 0 14px;
  font: 700 clamp(26px, 3.6vw, 38px)/1.15 Montserrat, sans-serif;
  color: #fff;
}

.nr-art-text p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .6);
}

.nr-art-text .nr-tagline {
  font: 600 12px/1 Montserrat, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-2, var(--gold-2));
}

/* ---------- промпты ---------- */
.nr-prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.nr-prompt {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .025);
}

.nr-prompt code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font: 400 13px/1.65 ui-monospace, "SF Mono", Menlo, monospace;
  color: rgba(255, 255, 255, .78);
  word-break: break-word;
}

.nr-prompt span {
  display: block;
  margin-bottom: 10px;
  font: 600 10.5px/1 Montserrat, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
}

.nr-copy {
  margin-top: 14px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  font: 600 11.5px/1 Montserrat, sans-serif;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.nr-copy:hover, .nr-copy.is-done {
  border-color: rgba(var(--gold-rgb), .7);
  color: #17130A;
  background: var(--gold-2, var(--gold-2));
}

/* ---------- CTA ---------- */
.nr-cta {
  max-width: 1280px;
  margin: 0 auto 70px;
  padding: 40px 36px;
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(var(--gold-rgb), .16), rgba(120, 78, 170, .16));
  border: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.nr-cta h2 { margin: 0 0 8px; font: 700 24px/1.25 Montserrat, sans-serif; color: #fff; }
.nr-cta p { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .6); }

.nr-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  color: #17130A;
  font: 700 14px/1 Montserrat, sans-serif;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 18px 34px -20px rgba(var(--gold-rgb), .9);
}

.nr-cta a:hover { transform: translateY(-2px); }

/* ---------- модалка видео ---------- */
.nr-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 8, .88);
  backdrop-filter: blur(6px);
}

.nr-modal[hidden] { display: none; }

.nr-modal video {
  width: min(1100px, 100%);
  max-height: 82vh;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 40px 90px -40px #000;
}

.nr-modal-close {
  position: absolute;
  right: 22px;
  top: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- появление ---------- */
.nr-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.nr-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .nr-blob { animation: none; }
  .nr-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .nr-story { grid-template-columns: 1fr; gap: 24px; }
  .nr-videos { grid-template-columns: 1fr; }
  .nr-art { grid-template-columns: 1fr; gap: 28px; }
  .nr-prompts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nr-hero { min-height: auto; padding: 56px 16px 48px; }
  .nr-section, .nr-art { padding: 0 16px 46px; }
  .nr-art { padding-top: 46px; }
  .nr-prompts { grid-template-columns: 1fr; }
  .nr-cta { margin: 0 16px 46px; padding: 26px 22px; }
  .nr-quote { padding: 22px 20px; font-size: 17px; }
}


/* ---------- публичная галерея ---------- */
.nr-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.nr-gallery-item {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  background: #111;
  cursor: zoom-in;
}

.nr-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1), opacity .3s ease;
}

.nr-gallery-item:hover img { transform: scale(1.05); opacity: .85; }

.nr-gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}

.nr-gallery-item:hover figcaption,
.nr-gallery-item:focus figcaption { opacity: 1; transform: none; }

.nr-gallery-item b {
  display: block;
  font: 600 13.5px/1.3 Montserrat, sans-serif;
  color: #fff;
}

.nr-gallery-item span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
}

#nr-lightbox img {
  max-width: min(1100px, 100%);
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: 0 40px 90px -40px #000;
}

@media (max-width: 640px) {
  .nr-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}


/* подвал вплотную к тёмной странице — без белой полосы */
.nr-page ~ .site-footer,
.nr-page + .site-footer { margin-top: 0; }

/* ---------- компактный герой: страница начинается с галереи ---------- */
.nr-hero { min-height: auto; padding: 56px 24px 18px; }
.nr-hero h1 { margin-bottom: 0; }
.nr-section { padding-top: 20px; }
.nr-section h2 { margin-top: 0; }
@media (max-width: 991px) {
  .nr-hero { padding: 40px 16px 12px; }
}

/* воздух между заголовком страницы и галереей */
.nr-section { padding-top: 40px; }
.nr-section h2 { margin: 0 0 8px; }


/* ---------- галерея: листалка ---------- */
.nr-gal-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.nr-gal-nav { display: flex; gap: 8px; flex: 0 0 auto; }

.nr-gal-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--gold-rgb, 200, 162, 74), .45);
  background: rgba(255, 255, 255, .04);
  color: #E8CB84;
  font: 400 26px/1 Montserrat, sans-serif;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease, transform .18s ease;
}

.nr-gal-btn:hover:not(:disabled) {
  background: rgba(var(--gold-rgb, 200, 162, 74), .14);
  border-color: rgba(var(--gold-rgb, 200, 162, 74), .9);
  transform: translateY(-1px);
}

.nr-gal-btn:disabled { opacity: .28; cursor: default; }
.nr-gal-btn:focus-visible { outline: 2px solid #E8CB84; outline-offset: 2px; }

.nr-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nr-gallery::-webkit-scrollbar { display: none; }

.nr-gallery-item {
  flex: 0 0 clamp(190px, 23vw, 268px);
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  .nr-gal-top { align-items: center; }
  .nr-gal-btn { width: 40px; height: 40px; font-size: 22px; }
  .nr-gallery-item { flex: 0 0 74vw; }
}

/* мобильные стрелки — отдельной строкой, чтобы не обрезались */
@media (max-width: 700px) {
  .nr-gal-top { flex-wrap: wrap; align-items: flex-start; }
  .nr-gal-nav { width: 100%; justify-content: flex-end; margin-top: 4px; }
}

.nr-gal-btn.is-off { opacity: .45; }
.nr-gal-btn.is-off:hover { transform: none; background: rgba(255, 255, 255, .04); }

/* стрелки поверх ленты — видны на любом экране */
.nr-gal-wrap { position: relative; }
.nr-gal-btn {
  position: absolute !important;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  background: rgba(14, 15, 14, .82) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9);
}
.nr-gal-btn.prev { left: 6px; }
.nr-gal-btn.next { right: 6px; }
.nr-gal-btn.is-off { opacity: 0; pointer-events: none; }
.nr-gal-nav { display: none !important; }

/* ---------- плотная плитка: много работ на экран, листание вниз ---------- */
#nr-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 6px;
  overflow: visible;
  max-height: none;
  scroll-snap-type: none;
}

.nr-gal-wrap { overflow: visible; }
.nr-gal-btn { display: none !important; }

#nr-gallery-grid .nr-gallery-item {
  border-radius: 10px;
  border-color: rgba(255, 255, 255, .07);
}

#nr-gallery-grid .nr-gallery-item img {
  aspect-ratio: 1;
  transition: transform .35s cubic-bezier(.2, .7, .3, 1), opacity .25s ease;
}

#nr-gallery-grid .nr-gallery-item:hover img { transform: scale(1.06); opacity: .92; }

#nr-gallery-grid .nr-gallery-item figcaption { padding: 16px 8px 7px; }
#nr-gallery-grid .nr-gallery-item b { font-size: 10.5px; }
#nr-gallery-grid .nr-gallery-item span { display: none; }

@media (max-width: 1000px) {
  #nr-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 5px; }
}

@media (max-width: 640px) {
  #nr-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 4px; }
  #nr-gallery-grid .nr-gallery-item { border-radius: 8px; }
}

/* счётчик работ в подзаголовке */
.nr-gal-count { color: #E8CB84; font-weight: 700; }
