/* Nucleolenz page — services-style slides.
   Mirrors services-index.css; re-namespaced .ip-* -> .nz-*.
   Reuses the site-wide --ip-* token layer from shell.css. Bump ?v=N on every change. */

.nz-services {
  --nz-accent: var(--ip-accent, #FF5A1F);
  --nz-ink: #14171C;
  --nz-ghost: rgba(20, 23, 28, 0.16);
  background: #FFFFFF;
}

:root { --ip-header-h: 72px; }

/* ---- Fold (one screen) ---- */
.nz-fold {
  min-height: calc(100svh - var(--ip-header-h, 72px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Match the services-index fold rhythm: hero row carries the outer padding so the
   panel can span the same 1440px-capped, centered width as the services hero. */
.nz-hero {
  flex: 1;
  min-height: 220px;
  display: flex;
  padding: 28px 40px 0;
}
.nz-hero__panel {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1440px;   /* same card width as the services-index hero */
  margin: 0 auto;
  border-radius: 40px;
  /* Dark fallback so any panel area the zoomed-out photo doesn't reach reads as scrim, not white. */
  background-color: #0c0f13;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .30)), url('../img/nucleolenz_hero.png');
  /* Gradient scrim stays cover; the photo is zoomed out (contain-ish) so more of the wall shows. */
  background-size: cover, 105%;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 40px;
}
.nz-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.nz-hero__eyebrow {
  font-family: var(--ip-font-mono, "IBM Plex Mono", monospace);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  color: rgba(255, 255, 255, .82);
}
.nz-hero__title {
  font-family: var(--ip-font-display, "Bricolage Grotesque", sans-serif);
  font-size: clamp(48px, 8vw, 80px);
  line-height: 1;
  margin: 14px 0 12px;
  color: rgba(255, 255, 255, .82);
  display: flex;
  justify-content: center;
}
/* Hero wordmark replaces the "Nucleolenz" text heading. White logo PNG
   (nucleolenzlogo_white.png) for legibility on the dark scrim; transparent
   background. Sized small for breathing room — bump the clamp if it needs to grow. */
.nz-hero__logo {
  display: block;
  width: clamp(220px, 34vw, 440px);
  height: auto;
}
.nz-hero__crumb {
  font-family: var(--ip-font-body, "Inter", sans-serif);
  font-size: .9rem;
  color: rgba(255, 255, 255, .78);
}
.nz-hero__crumb a { color: rgba(255, 255, 255, .92); text-decoration: none; }
.nz-hero__sep { margin: 0 8px; opacity: .7; }
.nz-hero__current { color: #FFFFFF; font-weight: 600; }
.nz-intro {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px 24px;
}
.nz-intro__heading {
  font-family: var(--ip-font-display, "Bricolage Grotesque", sans-serif);
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.08;
  text-align: center;
  max-width: 980px;
  color: var(--nz-ink);
}
.nz-intro__hl {
  background: var(--nz-accent);
  color: #fff;
  padding: 0 .18em;
  border-radius: 8px;
}

/* ===== Category slides — faithful copy of the services-index featured slide,
   re-namespaced .ip-* -> .nz-*. The ghost is a DIRECT child of .nz-slide (sibling
   of __inner), absolutely positioned + vertically centered behind a free-floating
   render; a single accent "Explore" link with an animated arrow. ===== */
.nz-slide {
  display: flex;
  align-items: center;
  /* Zero the shell's global section{padding:80px 0} so the slide is exactly its
     min-height (the visible region) and the centered content sits mid-screen. */
  padding: 0;
  /* Fit the VISIBLE region exactly (dvh minus the sticky header) = one screen. */
  min-height: calc(100dvh - var(--ip-header-h));
  scroll-margin-top: var(--ip-header-h);
  background: var(--ip-paper);
}
.nz-slide__inner {
  display: flex;
  align-items: center;
  gap: 72px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 56px;
}
.nz-slide--mirror .nz-slide__inner { flex-direction: row-reverse; }

/* Media half */
.nz-slide__media {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nz-slide__render {
  width: 100%;
  max-height: 72svh;
  object-fit: contain;
  border-radius: var(--ip-r-hero);
  display: block;
}
.nz-slide__render.is-placeholder {
  width: 100%;
  height: auto;
  border: 1px solid var(--ip-line);
}

/* Text half */
.nz-slide__text {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.nz-slide__index {
  font-family: var(--ip-font-mono);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--ip-accent-2);
}
.nz-slide__title {
  font-family: var(--ip-font-display);
  font-size: 52px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--ip-ink);
  margin: 0;
}
.nz-slide__desc {
  font-family: var(--ip-font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ip-muted);
  margin: 0;
  max-width: 46ch;
}
/* Two pill BUTTONS: Explore = filled signal-orange, RFQ = light orange-tint. */
.nz-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.nz-slide__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ip-font-card);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--ip-r-pill, 999px);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.nz-slide__btn:active { transform: scale(0.97); }
.nz-slide__btn--primary {
  background: var(--ip-accent);
  color: #fff;
}
.nz-slide__btn--primary:hover { background: var(--ip-accent-2); }
.nz-slide__btn--soft {
  background: rgba(255, 90, 31, 0.10);   /* soft --ip-accent tint */
  color: var(--ip-accent-2);
}
.nz-slide__btn--soft:hover { background: rgba(255, 90, 31, 0.18); }
.nz-slide__arrow { transition: transform 0.22s ease; }
.nz-slide__btn--primary:hover .nz-slide__arrow { transform: translateX(5px); }

/* ===== Featured slide — floating render + oversized ghost title (FUTURESKYLINES) ===== */
.nz-slide--featured { position: relative; overflow: hidden; display: block; }
.nz-slide--featured .nz-slide__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: calc(100dvh - var(--ip-header-h));
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  gap: 0;
  padding: 48px 56px;
}
.nz-slide--featured .nz-slide__ghost {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 0;
  margin: 0;
  max-width: 78%;
  text-align: right;
  font-family: var(--ip-font-display);
  font-weight: 700;
  font-size: clamp(56px, 11.5vw, 176px);
  line-height: 0.94;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: rgba(20, 23, 28, 0.16);
  pointer-events: none;
  white-space: normal;
  overflow-wrap: break-word;
}
.nz-slide--featured .nz-slide__media {
  grid-column: 2;
  align-self: center;
  justify-self: center;
}
.nz-slide--featured .nz-slide__render {
  width: 100%;
  max-width: 620px;
  max-height: calc(100dvh - var(--ip-header-h) - 150px);
  border-radius: 0;
  filter: drop-shadow(0 40px 60px rgba(20, 23, 28, 0.28));
}
.nz-slide--featured .nz-slide__text {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: 460px;
}
.nz-slide--featured .nz-slide__title { font-size: 40px; }

/* Alternation: mirrored featured slides — ghost+render to the LEFT, text to the RIGHT */
.nz-slide--featured.nz-slide--mirror .nz-slide__ghost {
  right: auto;
  left: 24px;
  text-align: left;
}
.nz-slide--featured.nz-slide--mirror .nz-slide__media { grid-column: 1; }
.nz-slide--featured.nz-slide--mirror .nz-slide__text {
  grid-column: 2;
  justify-self: end;
  text-align: right;
  align-items: flex-end;
}
/* The fixed Tidio chat widget sits bottom-right; on mirrored slides the right-aligned
   link can fall under it. Pull the block in + center it so the link clears the corner. */
.nz-slide--featured.nz-slide--mirror .nz-slide__text {
  padding-right: 88px;
  align-self: center;
}
@media (max-height: 760px) {
  .nz-slide--featured.nz-slide--mirror .nz-slide__text {
    align-self: start;
    margin-top: 8%;
  }
}
@media (max-width: 1024px) {
  .nz-slide--featured .nz-slide__inner { padding: 88px 32px 56px; }
  .nz-slide--featured .nz-slide__render { max-width: 480px; }
}

/* ---- CTA band ---- */
.nz-cta {
  padding: 0;
  scroll-margin-top: var(--ip-header-h, 72px);
  min-height: calc(100dvh - var(--ip-header-h, 72px));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ip-card, #FFFFFF);
}
.nz-cta__inner { max-width: 760px; padding: 0 32px; text-align: center; }
.nz-cta__eyebrow {
  font-family: var(--ip-font-mono, "IBM Plex Mono", monospace);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .76rem;
  color: var(--nz-accent);
}
.nz-cta__heading {
  font-family: var(--ip-font-card, "Space Grotesk", sans-serif);
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.08;
  margin: 14px 0 16px;
  color: var(--nz-ink);
}
.nz-cta__sub {
  font-family: var(--ip-font-body, "Inter", sans-serif);
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--ip-muted, #6B7280);
  margin: 0 auto 30px;
  max-width: 600px;
}
.nz-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.nz-cta__btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--ip-font-body, "Inter", sans-serif);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--ip-r-pill, 999px);
  padding: 14px 26px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.nz-cta__btn:active { transform: scale(0.97); }
.nz-cta__btn--primary { background: #C2502A; color: #fff; }
.nz-cta__btn--primary:hover { background: #A8431F; }
.nz-cta__btn--ghost { background: transparent; color: var(--nz-ink); border-color: #D6CFC1; }
.nz-cta__btn--ghost:hover { border-color: var(--nz-ink); }

/* ---- Mobile (≤768px): stack render-top / text-below, left-aligned ----
   Faithful copy of the services-index mobile slide rules. The single-column
   selectors intentionally also match .nz-slide--mirror so the desktop mirror
   placement (grid-column:2, justify-self:end, text-align:right, padding-right:88px)
   is fully RESET — otherwise mirrored even slides keep their desktop column and the
   media cell collapses to 0 width (the documented services mobile bug). */
@media (max-width: 768px) {
  .nz-slide--featured .nz-slide__inner,
  .nz-slide--featured.nz-slide--mirror .nz-slide__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: calc(100svh - var(--ip-header-h));
    align-content: center;
    gap: 24px;
    padding: 40px 20px;
  }
  .nz-slide--featured .nz-slide__media,
  .nz-slide--featured.nz-slide--mirror .nz-slide__media {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }
  .nz-slide--featured .nz-slide__text,
  .nz-slide--featured.nz-slide--mirror .nz-slide__text {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: stretch;
    align-items: flex-start;
    text-align: left;
    padding-right: 0;
    padding-bottom: 0;
    max-width: 100%;
  }
  .nz-slide--featured .nz-slide__render { max-width: 340px; max-height: 42svh; }
  /* Ghost is oversized decorative type that overlaps content on narrow screens — hide it. */
  .nz-slide--featured .nz-slide__ghost,
  .nz-slide--featured.nz-slide--mirror .nz-slide__ghost { display: none; }
  .nz-slide--featured .nz-slide__title { font-size: 32px; }
  .nz-fold { min-height: auto; }
  /* Tighten the hero gutters + radius on phones (mirrors services-index mobile). */
  .nz-hero { padding: 16px 16px 0; }
  .nz-hero__panel { min-height: 180px; border-radius: 24px; }
  .nz-cta { min-height: auto; padding: 64px 0; }
}
