.np-hero-showcase {
  --mouse-x: 50%;
  --mouse-y: 40%;
  position: relative;
  overflow: hidden;
  /* Capped at a full HD screen (1080px) so tall and 4K screens do not get a
     screen of empty black. */
  min-height: min(100svh, 67.5rem);
  background: var(--np-color-bg);
  border-bottom: 1px solid var(--np-color-border);
  text-align: center;
}

.np-hero-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mouse-x) var(--mouse-y), rgba(185, 224, 121, 0.13), transparent 70%);
}

:root[data-theme='light'] .np-hero-showcase::before {
  background: radial-gradient(520px circle at var(--mouse-x) var(--mouse-y), rgba(110, 160, 30, 0.14), transparent 70%);
}

.np-hero-showcase__grain {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image: radial-gradient(var(--np-color-border) 0.65px, transparent 0.65px);
  background-size: 23px 23px;
  mask-image: linear-gradient(to bottom, transparent 9%, #000 35%, #000 80%, transparent);
}

.np-hero-showcase__orbit {
  position: absolute;
  border: 1px solid rgba(154, 196, 77, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.np-hero-showcase__orbit--one { width: 70vw; height: 70vw; top: -44vw; right: -12vw; }
.np-hero-showcase__orbit--two { width: 55vw; height: 55vw; bottom: -43vw; left: -18vw; }

.np-hero-showcase__inner {
  position: relative;
  z-index: 2;
  width: min(82rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(9.5rem, 18vh, 13.75rem) 0 0;
}

.np-hero-showcase__kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
  font-family: var(--np-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--np-color-ink-soft);
}
.np-hero-showcase__kicker span {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--np-color-accent);
  box-shadow: 0 0 14px rgba(185, 224, 121, 0.8);
}

.np-hero-showcase__title {
  max-width: 68rem;
  margin: 1.9rem auto 0;
  font-size: clamp(2.6rem, 5.6vw, 5.25rem);
  text-wrap: balance;
  letter-spacing: -0.055em;
  line-height: 1;
}
.np-hero-showcase__title em {
  font-style: normal;
  color: var(--np-color-accent-text);
}

.np-hero-showcase__lede {
  max-width: 40rem;
  margin: 1.75rem auto 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: var(--np-color-ink-soft);
}

.np-hero-showcase__actions {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem 1.75rem;
}

.np-hero-showcase__proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2.1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--np-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--np-color-ink-faint);
}
.np-hero-showcase__proof li {
  padding: 0 1.05rem;
  border-right: 1px solid var(--np-color-border);
}
.np-hero-showcase__proof li:last-child { border: 0; }

/* Browser mockup */
.np-hero-showcase__stage {
  position: relative;
  width: min(57.5rem, 94%);
  height: clamp(15.5rem, 36vw, 24.4rem);
  margin: 4.25rem auto -3.9rem;
  perspective: 1000px;
}
.np-hero-showcase__window {
  position: absolute;
  inset: 0 3rem;
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  background: #f0eee7;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: rotateX(2deg);
  transform-origin: bottom;
  text-align: left;
}
.np-hero-showcase__bar {
  height: 34px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e2e0da;
  color: #5f5f5a;
  font-family: var(--np-font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.np-hero-showcase__dots { display: flex; gap: 5px; }
.np-hero-showcase__dots i { width: 6px; height: 6px; border-radius: 50%; background: #b9b7b0; }
.np-hero-showcase__body {
  position: relative;
  height: calc(100% - 34px);
  overflow: hidden;
  color: #151714;
}
@media (max-width: 40rem) {
  .np-hero-showcase { min-height: 0; padding-bottom: 4.5rem; }
  .np-hero-showcase__window { inset-inline: -2.5rem; }
  .np-hero-showcase__stage { margin-bottom: -2rem; }
  .np-hero-showcase__proof { gap: 0.4rem; }
  .np-hero-showcase__proof li { border: 0; padding: 0 0.5rem; }
}

/* ------------------------------------------------------------------ */
/* Bigger image on large screens: less empty black under the hero.    */
/* Image height follows the screen: title, CTAs and the whole image fit in one
   screen (full HD browser window ~ 950px), never cropped. */
.np-hero-showcase { --np-hero-media-h: 40rem; }
@media (min-width: 64rem) {
  .np-hero-showcase { --np-hero-media-h: clamp(15rem, calc(100svh - 33rem), 40rem); }
  .np-hero-showcase__inner { padding-top: clamp(5.5rem, 10vh, 13.75rem); }
  .np-hero-showcase__title { margin-top: 1.4rem; font-size: clamp(2.4rem, 4.3vw, 4rem); }
  .np-hero-showcase__lede { margin-top: 1.25rem; font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.55; }
  .np-hero-showcase__actions { margin-top: 1.6rem; }
  .np-hero-showcase__proof { margin-top: 1.5rem; }
  .np-hero-showcase__stage { width: min(76rem, 94%); height: var(--np-hero-media-h); margin: 2.75rem auto 3.5rem; }
  .np-hero-single, .np-hero-compare { height: auto; margin-bottom: 3.5rem; }
}

/* ------------------------------------------------------------------ */
/* Single image (visual = image) */
/* The frame follows the image proportions, so the whole image is visible. */
.np-hero-single { height: auto; margin-bottom: 3.5rem; }
.np-hero-single .np-hero-showcase__window {
  position: relative;
  inset: auto;
  border-radius: 13px;
  transform: none;
}
.np-hero-single .np-hero-showcase__body { height: auto; background: var(--np-color-surface, #f0eee7); }
.np-hero-single .np-hero-showcase__window { width: fit-content; max-width: 100%; margin-inline: auto; }
.np-hero-showcase__shot { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(var(--np-hero-media-h) - var(--np-bar-h, 2.25rem)); margin-inline: auto; object-fit: contain; }

/* Before / after slider (visual = compare)                           */
.np-hero-compare { height: auto; margin-bottom: 3.5rem; }
.np-hero-compare .np-hero-showcase__window { position: relative; inset: auto; border-radius: 13px; transform: none; }
.np-hero-compare .np-hero-showcase__window { width: min(100%, calc((var(--np-hero-media-h) - var(--np-bar-h, 2.25rem)) * 16 / 9)); margin-inline: auto; }
.np-hero-compare .np-hero-showcase__body { --pos: 50%; height: auto; aspect-ratio: 16 / 9; }
.np-hero-compare__before,
.np-hero-compare__after { position: absolute; inset: 0; }
.np-hero-compare__after {
  background: #f0eee7;
  clip-path: inset(0 0 0 var(--pos));
}
/* Before/after screenshots: fill the layer, anchored top left. */
.np-hero-compare__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }

.np-hero-compare__tag {
  position: absolute;
  z-index: 3;
  top: 58px;
  padding: 4px 8px;
  border-radius: var(--np-radius-pill);
  font-family: var(--np-font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.np-hero-compare__tag--before { left: 12px; background: #222; color: #f5f5f2; }
.np-hero-compare__tag--after { right: 12px; background: var(--np-color-accent); color: var(--np-color-on-accent); }

.np-hero-compare__line {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--np-color-accent);
  pointer-events: none;
}
.np-hero-compare__line i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: var(--np-color-accent);
  color: var(--np-color-on-accent);
  font-style: normal;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
/* The native range does the dragging and the keyboard: invisible, on top. */
.np-hero-compare__range {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.np-hero-compare__range::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 100vh; }
.np-hero-compare__range::-moz-range-thumb { width: 2px; height: 100vh; border: 0; }
.np-hero-compare__range:focus-visible ~ .np-hero-compare__line i { outline: 3px solid #fff; outline-offset: 2px; }
.np-hero-compare__range:focus-visible { opacity: 0; }

/* ------------------------------------------------------------------ */
/* Design + code split (visual = split)                               */
.np-hero-split__grid {
  position: absolute;
  inset: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.np-hero-split__panel {
  position: relative;
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  text-align: left;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.np-hero-split__panel--design { background: #ecebe6; color: #151714; }
.np-hero-split__panel--code { background: #0f110f; color: #c9ccc4; }
.np-hero-split__tag {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: var(--np-radius-pill);
  font-family: var(--np-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.np-hero-split__panel--design .np-hero-split__tag { background: #151714; color: #f5f5f2; }
.np-hero-split__panel--code .np-hero-split__tag { background: var(--np-color-accent); color: var(--np-color-on-accent); }

.np-hero-split__canvas { position: absolute; inset: 0; padding: 62px 12% 0; }
.np-hero-split__canvas small { display: block; margin-bottom: 6px; font-family: var(--np-font-mono); font-size: 9px; color: #6b6c66; }
.np-hero-split__frame {
  position: relative;
  height: 100%;
  padding: 18px;
  border-radius: 6px 6px 0 0;
  background: #fff;
  outline: 1.5px solid #3b82f6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.np-hero-split__frame::before,
.np-hero-split__frame::after {
  content: '';
  position: absolute;
  top: -4px;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1.5px solid #3b82f6;
}
.np-hero-split__frame::before { left: -4px; }
.np-hero-split__frame::after { right: -4px; }
.np-hero-split__frame b { display: block; width: 55%; height: 16px; margin-bottom: 12px; border-radius: 3px; background: #151714; }
.np-hero-split__frame i { display: block; height: 6px; margin-bottom: 7px; border-radius: 3px; background: #d6d5cf; }
.np-hero-split__frame i:nth-of-type(2) { width: 88%; }
.np-hero-split__frame i:nth-of-type(3) { width: 64%; }
.np-hero-split__frame em {
  display: inline-block;
  margin: 10px 0 14px;
  padding: 7px 13px;
  border-radius: var(--np-radius-pill);
  background: var(--np-color-accent);
  color: var(--np-color-on-accent);
  font: 600 10px var(--np-font-body);
}
.np-hero-split__frame s { display: inline-block; width: 22%; height: 46px; margin-right: 3%; border-radius: 4px; background: #e6e5df; }

.np-hero-split__panel pre {
  margin: 0;
  padding: 62px 18px 0;
  font-family: var(--np-font-mono);
  font-size: clamp(10px, 1.05vw, 13px);
  line-height: 1.65;
  white-space: pre;
  overflow: hidden;
}
.np-hero-split__panel pre .d { color: #7d8077; }
.np-hero-split__panel pre .g { color: var(--np-color-accent); }

.np-hero-split__result {
  position: absolute;
  z-index: 3;
  left: 50%;
  /* The stage is cut at the bottom by the hero (negative margin): stay above. */
  bottom: calc(3.9rem + 14px);
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: var(--np-radius-pill);
  background: var(--np-color-accent);
  color: var(--np-color-on-accent);
  font-family: var(--np-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* The halves slide in and join when the slide comes into view (the script
   sets data-play); without JS or with reduced motion they are already joined. */
@media (prefers-reduced-motion: no-preference) {
  .np-hero-split[data-play] .np-hero-split__grid { animation: np-split-gap 1.1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .np-hero-split[data-play] .np-hero-split__panel--design { animation: np-split-left 1.1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .np-hero-split[data-play] .np-hero-split__panel--code { animation: np-split-right 1.1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .np-hero-split[data-play] .np-hero-split__result { animation: np-split-pop 0.6s 1.2s both; }
}
@keyframes np-split-gap { from { gap: 3.5rem; } to { gap: 0.75rem; } }
@keyframes np-split-left { from { opacity: 0.4; transform: translateX(-2rem); } to { opacity: 1; transform: none; } }
@keyframes np-split-right { from { opacity: 0.4; transform: translateX(2rem); } to { opacity: 1; transform: none; } }
@keyframes np-split-pop { from { opacity: 0; transform: translate(-50%, 10px) scale(0.9); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 40rem) {
  .np-hero-split__grid { inset-inline: 0; }
  .np-hero-split__panel pre { font-size: 8px; padding: 52px 10px 0; }
  .np-hero-split__result { bottom: calc(2rem + 12px); }
  .np-hero-compare__tag { font-size: 8px; }
}

/* ------------------------------------------------------------------ */
/* Side layout (layout = image_right | image_left): text on one side,  */
/* image on the other, so the image can be much bigger. Desktop only.  */
@media (min-width: 64rem) {
  .np-hero-showcase--side { --np-hero-media-h: clamp(18rem, calc(100svh - 16rem), 44rem); text-align: left; }
  .np-hero-showcase--side { display: flex; align-items: center; }
  .np-hero-showcase--side .np-hero-showcase__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
    column-gap: 3rem;
    width: min(96rem, calc(100% - 6rem));
    align-content: center;
    align-items: center;
    padding: 6.5rem 0 5rem;
  }
  .np-hero-showcase--side .np-hero-showcase__inner > * { grid-column: 1; }
  .np-hero-showcase--side .np-hero-showcase__kicker,
  .np-hero-showcase--side .np-hero-showcase__actions,
  .np-hero-showcase--side .np-hero-showcase__proof { justify-content: flex-start; }
  .np-hero-showcase--side .np-hero-showcase__title,
  .np-hero-showcase--side .np-hero-showcase__lede { margin-left: 0; margin-right: 0; }
  .np-hero-showcase--side .np-hero-showcase__title { font-size: clamp(2.4rem, 3.9vw, 3.75rem); }
  .np-hero-showcase--side .np-hero-showcase__proof li:first-child { padding-left: 0; }
  .np-hero-showcase--side .np-hero-showcase__stage {
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: center;
    width: 100%;
    margin: 0;
  }
  .np-hero-showcase--left .np-hero-showcase__inner { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr); }
  .np-hero-showcase--left .np-hero-showcase__inner > * { grid-column: 2; }
  .np-hero-showcase--left .np-hero-showcase__stage { grid-column: 1; }
  .np-hero-showcase--side .np-hero-single, .np-hero-showcase--side .np-hero-compare { margin-bottom: 0; }
  .np-hero-showcase--side .np-hero-compare .np-hero-showcase__window { margin-inline: 0; }
  .np-hero-showcase--side .np-hero-single .np-hero-showcase__window { margin-inline: 0; }
}

/* Mobile: text only. The image is too small to read on a phone, so it is not shown. */
@media (max-width: 40rem) {
  .np-hero-showcase__stage { display: none; }
}

/* No address bar text: no grey browser bar either, just the image. */
.np-hero-showcase__window--bare { --np-bar-h: 0rem; }
