/*
 * Neurallab — Inner Pages Design System ("Architectural Intelligence · Light")
 * Light, approachable B2B language for inner pages (services hub, service pages,
 * workflow framework, orderbrain, contact, blog). White cards with hairline +
 * soft shadow, indigo + warm tertiary accents, near-obsidian ink, serif headlines.
 * Sharp corners (4–8px). Namespace: .nlp-*. Built on the global --nl-* tokens.
 * @package neurallab
 */

/* ───────────────────────────────────────────────
   1) SECTION RHYTHM
   ─────────────────────────────────────────────── */
.nlp-section { padding: clamp(56px, 7vw, 96px) 0; }
.nlp-section--tight { padding: clamp(38px, 5vw, 60px) 0; }
.nlp-section--alt {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(84,87,238,.06), transparent 60%),
    var(--nl-bg-lowest);
}

.nlp-section-head { max-width: 760px; margin: 0 0 clamp(26px, 3.5vw, 44px); }
.nlp-section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.nlp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--nl-accent); font-family: var(--nl-font-sans);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px;
}
.nlp-eyebrow i { width: 15px; height: 15px; }
.nlp-section-head h2 {
  font-family: var(--nl-font-serif); font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.12;
  letter-spacing: -0.02em; margin: 0 0 12px;
}
.nlp-section-head h2 em, .nlp-section-head h2 .accent { font-style: italic; color: var(--nl-accent); }
.nlp-lead { color: var(--nl-text-dim); font-size: clamp(1rem, 1.4vw, 1.14rem); font-weight: 400; line-height: 1.65; margin: 0; }

/* ───────────────────────────────────────────────
   2) HERO (inner pages)
   ─────────────────────────────────────────────── */
.nlp-hero { position: relative; }
.nlp-hero .badge { margin-bottom: 16px; }
.nlp-hero h1 {
  font-family: var(--nl-font-serif); font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.04;
  letter-spacing: -0.03em; margin: 0 0 16px;
}
.nlp-hero h1 em, .nlp-hero h1 .accent { font-style: italic; color: var(--nl-accent); }
.nlp-hero__sub { color: var(--nl-text-soft); font-size: clamp(1.02rem, 1.4vw, 1.22rem); font-weight: 400; line-height: 1.6; max-width: 680px; margin: 0; }
.nlp-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.nlp-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.nlp-hero__visual { display: flex; justify-content: center; }

/* Decorative panel (no fake UI) — soft indigo refraction on light */
.nlp-glasspanel {
  width: 100%; max-width: 460px; aspect-ratio: 4 / 3;
  border-radius: var(--nl-radius-lg);
  background:
    radial-gradient(420px 200px at 30% 10%, rgba(84,87,238,.18), transparent 60%),
    linear-gradient(150deg, rgba(234,122,46,.10), rgba(255,255,255,.6)),
    var(--nl-surface);
  box-shadow: var(--nl-shadow), inset 0 0 0 1px var(--nl-border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.nlp-glasspanel i { width: 84px; height: 84px; color: var(--nl-accent); opacity: .85; }

/* Bespoke SVG hero illustration (self-contained card) */
.nlp-hero-illustration {
  display: block; width: 100%; max-width: 480px; height: auto;
  border-radius: var(--nl-radius-lg);
  box-shadow: var(--nl-shadow);
}

@media (max-width: 860px) {
  .nlp-hero__grid { grid-template-columns: 1fr; text-align: left; }
  .nlp-hero__visual { order: -1; }
  .nlp-glasspanel { max-width: 320px; aspect-ratio: 16 / 10; }
  .nlp-hero-illustration { max-width: 380px; margin-inline: 0; }
}

/* ───────────────────────────────────────────────
   3) CARD GRIDS — white cards, hairline + soft shadow
   ─────────────────────────────────────────────── */
.nlp-grid { display: grid; gap: 18px; }
.nlp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nlp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.nlp-grid--4 { grid-template-columns: repeat(4, 1fr); }

.nlp-card {
  display: flex; flex-direction: column;
  background: var(--nl-card); border: 0;
  border-radius: var(--nl-radius-lg); padding: 26px;
  box-shadow: var(--nl-card-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.nlp-card:hover { transform: translateY(-3px); box-shadow: var(--nl-card-shadow-hover); }
.nlp-card--link { text-decoration: none; color: inherit; }
.nlp-card--link:hover { text-decoration: none; }

.nlp-card__icon {
  width: 46px; height: 46px; border-radius: var(--nl-radius);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  background: rgba(84,87,238,.10); color: var(--nl-accent);
}
.nlp-card__icon i { width: 22px; height: 22px; }
.nlp-card__title { font-family: var(--nl-font-serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; color: var(--nl-text); }
.nlp-card__text { color: var(--nl-text-dim); font-size: .95rem; line-height: 1.6; margin: 0; }
.nlp-card__list { margin: 4px 0 0; padding-left: 1.1em; color: var(--nl-text-dim); font-size: .95rem; }
.nlp-card__list li { margin: 6px 0; }
.nlp-card__link {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--nl-accent); font-weight: 600; font-size: .92rem;
}
.nlp-card--link:hover .nlp-card__link { color: var(--nl-accent); gap: 10px; }
.nlp-card__link i { width: 16px; height: 16px; }

/* ───────────────────────────────────────────────
   4) FLOW (items in → AI → human-in-the-loop → items out)
   ─────────────────────────────────────────────── */
.nlp-flow {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; position: relative;
}
.nlp-flow__step {
  position: relative; background: var(--nl-card);
  border: 0; border-radius: var(--nl-radius-lg);
  box-shadow: var(--nl-card-shadow);
  padding: 26px 20px; text-align: center;
}
.nlp-flow__step--ai { box-shadow: inset 0 0 0 1px rgba(84,87,238,.35), var(--nl-card-shadow); }
.nlp-flow__step--human { box-shadow: inset 0 0 0 1px rgba(234,122,46,.4), var(--nl-card-shadow); }
.nlp-flow__icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: var(--nl-radius); display: flex; align-items: center; justify-content: center;
  background: rgba(84,87,238,.10); color: var(--nl-accent);
}
.nlp-flow__step--human .nlp-flow__icon { background: rgba(234,122,46,.12); color: var(--nl-accent-2); }
.nlp-flow__icon i { width: 24px; height: 24px; }
.nlp-flow__label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--nl-accent); margin: 0 0 6px;
}
.nlp-flow__title { font-family: var(--nl-font-serif); font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; }
.nlp-flow__text { font-size: .88rem; color: var(--nl-text-dim); line-height: 1.5; margin: 0; }
.nlp-flow__step:not(:last-child)::after {
  content: "›"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; line-height: 1; color: var(--nl-accent); opacity: .65; z-index: 2;
}
@media (max-width: 900px) {
  .nlp-flow { grid-template-columns: 1fr 1fr; }
  .nlp-flow__step:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .nlp-flow { grid-template-columns: 1fr; }
  .nlp-flow__step::after { content: "⌄" !important; right: 50% !important; left: 50%; top: auto; bottom: -20px; transform: translateX(-50%); display: block !important; }
  .nlp-flow__step:last-child::after { display: none !important; }
}

/* ───────────────────────────────────────────────
   5) CHIPS (sectors / audiences)
   ─────────────────────────────────────────────── */
.nlp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.nlp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--nl-radius);
  background: var(--nl-card); border: 0;
  box-shadow: var(--nl-card-shadow);
  color: var(--nl-text); font-size: .9rem; font-weight: 500;
}
.nlp-chip i { width: 16px; height: 16px; color: var(--nl-accent); }

/* ───────────────────────────────────────────────
   6) CALLOUT (cross-link)
   ─────────────────────────────────────────────── */
.nlp-callout {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(84,87,238,.08), rgba(234,122,46,.05)),
    var(--nl-card);
  box-shadow: inset 0 0 0 1px rgba(84,87,238,.18), var(--nl-card-shadow); border-radius: var(--nl-radius-lg);
  padding: clamp(24px, 3vw, 38px);
}
.nlp-callout__body { flex: 1 1 320px; }
.nlp-callout__eyebrow { color: var(--nl-accent); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 10px; }
.nlp-callout h3 { font-family: var(--nl-font-serif); font-weight: 600; margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -0.01em; }
.nlp-callout p { margin: 0; color: var(--nl-text-dim); }

/* ───────────────────────────────────────────────
   7) FINAL CTA BAND
   ─────────────────────────────────────────────── */
.nlp-cta {
  position: relative; overflow: hidden; text-align: center;
  border: 0; border-radius: var(--nl-radius-lg);
  box-shadow: inset 0 0 0 1px var(--nl-border), var(--nl-card-shadow);
  padding: clamp(44px, 6vw, 76px);
  background:
    radial-gradient(700px 300px at 50% -30%, rgba(84,87,238,.12), transparent 60%),
    linear-gradient(135deg, rgba(84,87,238,.06), rgba(234,122,46,.04)),
    var(--nl-card);
}
.nlp-cta h2 { font-family: var(--nl-font-serif); font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; }
.nlp-cta h2 em, .nlp-cta h2 .accent { font-style: italic; color: var(--nl-accent); }
.nlp-cta p { color: var(--nl-text-soft); max-width: 620px; margin: 0 auto 28px; font-size: 1.08rem; font-weight: 400; }
.nlp-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ───────────────────────────────────────────────
   8) SERVICE PAGE LAYOUT (content + sticky aside) + PROSE
   ─────────────────────────────────────────────── */
.nlp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.nlp-aside { position: sticky; top: 110px; display: grid; gap: 18px; }

.nlp-prose { color: var(--nl-text); }
.nlp-prose > :first-child { margin-top: 0; }
.nlp-prose h2 { font-family: var(--nl-font-serif); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; margin: 1.7em 0 .5em; }
.nlp-prose h3 { font-family: var(--nl-font-serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; margin: 1.4em 0 .4em; }
.nlp-prose p { color: var(--nl-text-dim); margin: 0 0 1em; line-height: 1.75; }
.nlp-prose ul, .nlp-prose ol { color: var(--nl-text-dim); padding-left: 1.3em; margin: 0 0 1em; }
.nlp-prose li { margin: .4em 0; }
.nlp-prose ul { list-style: none; padding-left: 0; }
.nlp-prose ul li { position: relative; padding-left: 28px; }
.nlp-prose ul li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--nl-accent); box-shadow: 0 0 0 4px rgba(84,87,238,.14);
}
.nlp-prose a { color: var(--nl-link); }
.nlp-prose ol { list-style: decimal; }

@media (max-width: 900px) {
  .nlp-layout { grid-template-columns: 1fr; }
  .nlp-aside { position: static; }
}

/* ───────────────────────────────────────────────
   9) RESPONSIVE GRID COLLAPSE
   ─────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nlp-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .nlp-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nlp-grid--2, .nlp-grid--3, .nlp-grid--4 { grid-template-columns: 1fr; }
}

/* ───────────────────────────────────────────────
   10) CONTACT PAGE — mobile stacking fix
   ─────────────────────────────────────────────── */
.nl-contact-grid { grid-template-columns: 1.7fr 1fr; align-items: start; }
@media (max-width: 640px) {
  .nl-contact-grid { grid-template-columns: 1fr; }
}

/* ───────────────────────────────────────────────
   11) BLOG INDEX — post cards + pagination
   ─────────────────────────────────────────────── */
.nlp-posts .nlp-card { padding: 0; overflow: hidden; }
.nlp-posts__inner { display: flex; flex-direction: column; flex: 1 1 auto; padding: 26px; }
.nlp-card__thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.nlp-card__thumb-wrap { display: block; line-height: 0; }
.nlp-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .8rem; color: var(--nl-text-dim); }
.nlp-card__cat {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--nl-radius);
  background: rgba(84,87,238,.10);
  color: var(--nl-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem;
}
.nlp-card__title a { color: inherit; text-decoration: none; }
.nlp-card__title a:hover { color: var(--nl-accent); text-decoration: none; }

.nlp-pagination { margin-top: 40px; display: flex; justify-content: center; }
.nlp-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nlp-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--nl-radius);
  border: 0; background: var(--nl-card); box-shadow: var(--nl-card-shadow);
  color: var(--nl-text); font-weight: 600; text-decoration: none;
  transition: box-shadow .2s ease;
}
.nlp-pagination a.page-numbers:hover { box-shadow: var(--nl-card-shadow-hover); text-decoration: none; }
.nlp-pagination .page-numbers.current { background: linear-gradient(135deg, var(--nl-accent), var(--nl-accent-strong)); color: var(--nl-on-primary); box-shadow: 0 6px 18px rgba(84,87,238,.28); }
.nlp-pagination .page-numbers.dots { background: transparent; box-shadow: none; }
