/* NEUROLLAMAS — Character Sheet homepage promo */

.nl-cs-promo-root {
  --nl-cs-green: #00ff9d;
  --nl-cs-violet: #7f5cff;
  --nl-cs-ink: #ffffff;
  --nl-cs-muted: rgba(244, 247, 245, 0.68);
  --nl-cs-panel: rgba(8, 10, 12, 0.92);
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.nl-cs-promo-root.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nl-cs-promo-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(127, 92, 255, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at 70% 75%, rgba(0, 255, 157, 0.12) 0%, transparent 55%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.nl-cs-promo-dialog {
  position: relative;
  width: min(920px, calc(100vw - 2rem));
  max-height: min(92vh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 22px;
  background: var(--nl-cs-panel);
  border: 1px solid rgba(0, 255, 157, 0.28);
  box-shadow:
    0 0 0 1px rgba(127, 92, 255, 0.18),
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(0, 255, 157, 0.12);
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  -webkit-overflow-scrolling: touch;
}

.nl-cs-promo-root.is-open .nl-cs-promo-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.nl-cs-promo-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(176, 38, 255, 0.7), rgba(0, 255, 157, 0.55) 55%, rgba(127, 92, 255, 0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.nl-cs-promo-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nl-cs-promo-close:hover {
  color: #fff;
  border-color: rgba(176, 38, 255, 0.55);
  background: rgba(176, 38, 255, 0.16);
}

.nl-cs-promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  min-height: 0;
}

.nl-cs-promo-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: stretch;
  align-content: start;
  padding: 1.15rem 1rem 1.15rem 1.15rem;
  min-width: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(127, 92, 255, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(12, 14, 18, 0.2), rgba(0, 0, 0, 0.35));
}

.nl-cs-promo-visual figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0c0e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
  min-width: 0;
  min-height: 0;
  max-height: min(42vh, 360px);
  animation: none;
}

.nl-cs-promo-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.55s ease;
}

.nl-cs-promo-visual figure:hover img {
  transform: scale(1.04);
}

.nl-cs-promo-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.75rem 2.75rem 1.6rem 1.5rem;
  min-width: 0;
  overflow: visible;
  text-align: start;
}

html[dir="rtl"] .nl-cs-promo-copy {
  padding: 1.75rem 1.5rem 1.6rem 2.75rem;
}

html[dir="rtl"] .nl-cs-promo-close {
  right: auto;
  left: 0.75rem;
}

.nl-cs-promo-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nl-cs-green);
  text-shadow: 0 0 14px rgba(0, 255, 157, 0.35);
}

.nl-cs-promo-brand img {
  width: 34px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.45));
}

.nl-cs-promo-brand i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nl-cs-violet);
  box-shadow: 0 0 10px var(--nl-cs-violet);
  animation: nlCsPulse 1.8s ease-in-out infinite;
}

.nl-cs-promo-copy h2 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.nl-cs-promo-copy h2 em {
  font-style: normal;
  color: #ffffff;
}

.nl-cs-promo-copy p {
  margin: 0;
  max-width: none;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--nl-cs-muted);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.nl-cs-promo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.35rem;
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  color: #ffffff !important;
  background: linear-gradient(135deg, #ff5cff 0%, #e14bff 28%, #d24bff 52%, #b026ff 78%, #7f5cff 100%);
  box-shadow:
    0 0 22px rgba(255, 92, 255, 0.95),
    0 0 48px rgba(210, 75, 255, 0.75),
    0 0 80px rgba(176, 38, 255, 0.45),
    0 10px 28px rgba(176, 38, 255, 0.45);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.nl-cs-promo-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.1) saturate(1.15);
  box-shadow:
    0 0 30px rgba(255, 92, 255, 1),
    0 0 64px rgba(210, 75, 255, 0.85),
    0 0 96px rgba(176, 38, 255, 0.55),
    0 14px 34px rgba(176, 38, 255, 0.55);
  color: #ffffff !important;
}

.nl-cs-promo-micro {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(244, 247, 245, 0.48);
}

@keyframes nlCsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

@keyframes nlCsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 980px) {
  .nl-cs-promo-grid {
    grid-template-columns: 1fr;
  }

  .nl-cs-promo-visual {
    padding: 1rem 1rem 0.35rem;
  }

  .nl-cs-promo-visual figure {
    max-height: min(34vh, 280px);
  }

  .nl-cs-promo-copy {
    padding: 0.5rem 1.25rem 1.35rem;
  }

  html[dir="rtl"] .nl-cs-promo-copy {
    padding: 0.5rem 1.25rem 1.35rem;
  }

  .nl-cs-promo-cta {
    width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 760px) {
  .nl-cs-promo-grid {
    max-height: none;
  }

  .nl-cs-promo-visual {
    padding: 1rem 1rem 0.25rem;
  }

  .nl-cs-promo-copy {
    padding: 0.35rem 1.15rem 1.25rem;
    text-align: start;
  }

  .nl-cs-promo-copy p {
    max-width: none;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .nl-cs-promo-copy h2 {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
  }

  .nl-cs-promo-visual figure {
    max-height: min(38vh, 320px);
  }
}

html[data-theme="light"] .nl-cs-promo-dialog {
  background: rgba(8, 10, 12, 0.96);
  border-color: rgba(210, 75, 255, 0.35);
}

html[data-theme="light"] .nl-cs-promo-copy h2,
html[data-theme="light"] .nl-cs-promo-copy h2 em {
  color: #ffffff;
}

html[data-theme="light"] .nl-cs-promo-copy p,
html[data-theme="light"] .nl-cs-promo-micro {
  color: rgba(244, 247, 245, 0.68);
}

html[data-theme="light"] .nl-cs-promo-brand {
  color: #00ff9d;
  text-shadow: 0 0 14px rgba(0, 255, 157, 0.35);
}

html[data-theme="light"] .nl-cs-promo-close {
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Studio grid tile (replaces API on socila hero) ── */
.landing-tool-grid a.landing-tool-cs {
  position: relative;
  overflow: visible;
  isolation: isolate;
  color: #f3e8ff !important;
  border: 1px solid rgba(210, 75, 255, 0.65) !important;
  background:
    linear-gradient(145deg, rgba(176, 38, 255, 0.32) 0%, rgba(127, 92, 255, 0.18) 45%, rgba(8, 10, 12, 0.92) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 92, 255, 0.2) inset,
    0 0 22px rgba(176, 38, 255, 0.45),
    0 0 44px rgba(127, 92, 255, 0.25);
  animation: nlCsTilePulse 2.4s ease-in-out infinite;
}

.landing-tool-grid a.landing-tool-cs span.landing-tool-cs-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 8px rgba(255, 92, 255, 0.85));
}

.landing-tool-grid a.landing-tool-cs:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(255, 92, 255, 0.95) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 32px rgba(255, 92, 255, 0.75),
    0 0 64px rgba(176, 38, 255, 0.55),
    0 12px 28px rgba(0, 0, 0, 0.35);
}

.landing-tool-cs-new {
  position: absolute;
  top: -6px;
  right: -4px;
  z-index: 3;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #111;
  background: linear-gradient(135deg, #fde047 0%, #fbbf24 55%, #f59e0b 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 10px rgba(251, 191, 36, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.35);
  animation: nlCsNewPulse 1.6s ease-in-out infinite;
  pointer-events: none;
}

html[dir="rtl"] .landing-tool-cs-new {
  right: auto;
  left: -4px;
}

html[data-theme="light"] .landing-tool-grid a.landing-tool-cs {
  color: #4c1d95 !important;
  background:
    linear-gradient(145deg, rgba(176, 38, 255, 0.22) 0%, rgba(127, 92, 255, 0.12) 50%, rgba(255, 255, 255, 0.96) 100%) !important;
  border-color: rgba(176, 38, 255, 0.45) !important;
}

@keyframes nlCsTilePulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 92, 255, 0.2) inset,
      0 0 18px rgba(176, 38, 255, 0.4),
      0 0 36px rgba(127, 92, 255, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 92, 255, 0.35) inset,
      0 0 28px rgba(255, 92, 255, 0.65),
      0 0 56px rgba(176, 38, 255, 0.4);
  }
}

@keyframes nlCsNewPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.95; }
}
