/* ==========================================================================
   NodeAsset Public Landing Pages — Shared Styles
   Used by: /  /ai-research  /partners
   ========================================================================== */

/* ---- RESET & BASE ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #02070a;
  color: #f7fbfa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p, h1, h2, h3, dl, ol, ul, pre, figure {
  margin: 0;
}

button, a {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* ---- PAGE SHELL BACKGROUNDS ---- */
.home-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(48, 75, 88, 0.18), transparent 30%),
    radial-gradient(circle at 50% 58%, rgba(195, 21, 21, 0.08), transparent 36%),
    linear-gradient(135deg, #020304 0%, #061015 48%, #020304 100%);
}

.research-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(48, 75, 88, 0.18), transparent 30%),
    linear-gradient(135deg, #020304 0%, #061015 48%, #020304 100%);
}

.partners-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(62, 99, 82, 0.18), transparent 30%),
    linear-gradient(135deg, #020304 0%, #061015 48%, #020304 100%);
}

/* ---- SITE NAV (shared across all three pages) ---- */
.site-nav {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(190px, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 74px;
  padding: 0 clamp(18px, 4vw, 50px);
}

.site-nav.research-nav,
.site-nav.partners-nav {
  grid-template-columns: minmax(210px, 1fr) auto minmax(42px, 1fr);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  border: 0;
  background: transparent;
  color: #f8fbfb;
  text-align: left;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 170px;
  height: auto;
  object-fit: contain;
}

.site-nav nav,
.nav-actions {
  display: flex;
  align-items: center;
}

.site-nav nav {
  gap: clamp(18px, 3vw, 42px);
}

.site-nav a {
  color: #f4f7f8;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a[aria-current="page"].research-current {
  color: #ff4040;
}

.site-nav a[aria-current="page"].partners-current {
  color: #61ffc1;
}

.nav-actions {
  justify-content: flex-end;
  gap: 14px;
}

.landing-menu-btn {
  display: none;
  justify-self: end;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(136, 160, 172, 0.34);
  border-radius: 8px;
  background: rgba(7, 13, 17, 0.8);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

/* Mobile nav toggle via JS */
.nav--open {
  display: flex !important;
}

.site-nav nav.nav--open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 74px;
  left: 0;
  right: 0;
  padding: 16px 18px;
  background: rgba(2, 7, 10, 0.96);
  border-bottom: 1px solid rgba(142, 169, 178, 0.24);
  z-index: 10;
}

.nav-actions.nav--open {
  display: flex;
  position: absolute;
  top: 74px;
  left: 0;
  right: 0;
  justify-content: center;
  padding: 12px 18px;
  background: rgba(2, 7, 10, 0.96);
  border-bottom: 1px solid rgba(142, 169, 178, 0.24);
  z-index: 9;
}

/* Search-engine-only: show full nav on small screens since no JS drawer */
@media (max-width: 900px) {
  .site-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px;
  }

  .site-nav nav:not(.nav--open),
  .nav-actions:not(.nav--open) {
    display: none;
  }

  .landing-menu-btn {
    display: grid;
    place-items: center;
  }
}

/* ---- BUTTONS ---- */
.ghost-btn,
.solid-btn,
.hero-cta,
.product-card button {
  min-height: 42px;
  border: 1px solid rgba(247, 59, 59, 0.78);
  border-radius: 5px;
  color: #ffffff;
  font-weight: 800;
}

.ghost-btn {
  min-width: 86px;
  border-color: rgba(136, 160, 172, 0.34);
  background: rgba(7, 13, 17, 0.8);
}

.solid-btn,
.hero-cta {
  min-width: 96px;
  background: linear-gradient(180deg, #e73535, #9f0e0e);
}

/* ---- HOME PAGE ---- */
.hero {
  display: grid;
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px 18px 8px;
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.hero-copy h1 {
  max-width: 1040px;
  color: #e9e9ed;
  font-size: clamp(32px, 5.2vw, 49px);
  line-height: 1.08;
}

.hero-copy h1 span {
  color: #ff3030;
}

.hero-copy p {
  max-width: 720px;
  color: #f3f3f5;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
}

.hero-cta {
  min-width: 226px;
  padding: 0 28px;
}

.hero-preview {
  position: relative;
  width: min(100%, 1060px);
  margin: 2px auto 0;
  max-height: clamp(260px, 32vw, 380px);
  overflow: hidden;
  border: 1px solid rgba(32, 217, 166, 0.28);
  border-radius: 8px;
  background: #031014;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.48);
}

.hero-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 7, 10, 0), #02070a 88%);
}

.hero-preview img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.76) 74%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.76) 74%, transparent 100%);
}

/* Products */
.products-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 18px 18px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 15px;
  text-align: center;
}

.section-heading h2 {
  color: #f5f7f8;
  font-size: clamp(25px, 3vw, 32px);
}

.section-heading p {
  color: #cbd5d8;
  font-size: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  align-content: start;
  min-height: 420px;
  padding: 24px 28px 20px;
  border: 1px solid rgba(142, 169, 178, 0.28);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(5, 14, 19, 0.92), rgba(2, 8, 11, 0.96));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
}

.product-card h3 {
  max-width: 270px;
  color: #f4f7f8;
  font-size: 25px;
  line-height: 1.12;
}

.product-card > strong {
  display: block;
  margin: 15px 0 12px;
  color: #ff3030;
  font-size: 16px;
}

.product-card p {
  color: #e4ebed;
  font-size: 14px;
  line-height: 1.48;
}

.product-card ul {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.product-card li {
  position: relative;
  min-height: 17px;
  padding-left: 24px;
  color: #dce5e7;
  font-size: 14px;
  line-height: 1.25;
}

.product-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  border: 1px solid #ff3030;
  border-radius: 3px;
}

.product-card li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 5px;
  height: 9px;
  border-right: 1px solid #ff3030;
  border-bottom: 1px solid #ff3030;
  transform: rotate(40deg);
}

.product-card button {
  width: fit-content;
  min-width: 116px;
  margin-top: 24px;
  padding: 0 20px;
  background: rgba(255, 48, 48, 0.06);
}

/* Direct Routing */
.routing-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(142, 169, 178, 0.28);
  border-radius: 8px;
  background: rgba(2, 8, 11, 0.72);
}

.routing-row span {
  display: block;
  color: #ff3030;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.routing-row p {
  margin-top: 5px;
  color: #dce5e7;
  font-size: 14px;
  line-height: 1.4;
}

.routing-row ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.routing-row li {
  color: #dce5e7;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.routing-row li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #61ffc1;
  vertical-align: 1px;
}

/* API Section */
.api-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 1fr);
  gap: 0;
  max-width: 1120px;
  margin: 0 auto 28px;
  border: 1px solid rgba(142, 169, 178, 0.28);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(5, 14, 19, 0.92), rgba(2, 8, 11, 0.96));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
}

.api-copy {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px 24px;
  border-right: 1px solid rgba(142, 169, 178, 0.22);
}

.api-copy h2 {
  color: #f5f7f8;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

.api-copy p,
.api-copy dd {
  color: #cbd5d8;
  font-size: 14px;
  line-height: 1.45;
}

.api-copy code {
  color: #ffef9b;
  font-family: "Courier New", monospace;
}

.api-copy dl {
  display: grid;
  gap: 10px;
}

.api-copy dt {
  color: #ff4040;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.api-copy dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.api-code-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  min-width: 0;
}

.api-example-panel,
.api-response {
  min-width: 0;
  border-right: 1px solid rgba(142, 169, 178, 0.18);
  border-bottom: 1px solid rgba(142, 169, 178, 0.18);
}

.api-response {
  border-right: 0;
  border-bottom: 0;
}

.api-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 48px;
  border-bottom: 1px solid rgba(142, 169, 178, 0.18);
}

.api-tabs button {
  min-width: 0;
  border: 0;
  border-right: 1px solid rgba(142, 169, 178, 0.12);
  background: rgba(255, 255, 255, 0.01);
  color: #e8eff1;
  font-size: 13px;
  font-weight: 900;
}

.api-tabs button:last-child {
  border-right: 0;
}

.api-tabs button.active {
  border-bottom: 2px solid #ff4040;
  color: #ff4040;
}

.api-response h3 {
  min-height: 44px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(142, 169, 178, 0.18);
  color: #ff4040;
  font-size: 14px;
}

.api-example-panel pre,
.api-response pre {
  max-height: 420px;
  padding: 18px;
  overflow: auto;
  color: #f1c04d;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

.api-response pre {
  max-height: 480px;
  color: #79db62;
}

/* ---- RESEARCH PAGE ---- */
.research-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 42px 18px 72px;
}

.research-hero,
.research-section {
  border: 1px solid rgba(142, 169, 178, 0.24);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(5, 14, 19, 0.92), rgba(2, 8, 11, 0.96));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.36);
}

.research-hero {
  display: grid;
  gap: 18px;
  padding: clamp(32px, 6vw, 62px);
  text-align: center;
}

.eyebrow {
  color: #ff4040;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.research-hero h1 {
  color: #f4f7f8;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
}

.dek,
.research-summary {
  max-width: 760px;
  margin: 0 auto;
  color: #dce5e7;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.42;
}

.research-summary {
  max-width: 720px;
  color: #b9c6ca;
  font-size: 16px;
}

.byline {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: #9fb0b7;
  font-size: 14px;
  font-weight: 800;
}

.research-section {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding: clamp(24px, 4vw, 42px);
}

.research-section h2 {
  color: #f4f7f8;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.12;
}

.research-section p,
.research-section li,
figcaption {
  color: #d2dcdf;
  font-size: 16px;
  line-height: 1.58;
}

.research-section strong {
  color: #f8fbfb;
}

.research-section ul {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.research-section a {
  color: #61ffc1;
}

figure {
  display: grid;
  gap: 10px;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(142, 169, 178, 0.24);
  border-radius: 8px;
  background: #010507;
}

.narrow-figure {
  justify-self: center;
  width: min(100%, 700px);
}

.phone-figure {
  width: min(100%, 360px);
}

.final-section {
  border-color: rgba(255, 64, 64, 0.36);
}

/* ---- PARTNERS PAGE ---- */
.partners-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 18px 72px;
}

.partners-hero,
.partners-section,
.diagram-section {
  border: 1px solid rgba(142, 169, 178, 0.24);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(5, 14, 19, 0.92), rgba(2, 8, 11, 0.96));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.36);
}

.partners-hero {
  display: grid;
  gap: 18px;
  padding: clamp(32px, 6vw, 62px);
  text-align: center;
}

.partners-hero .eyebrow {
  color: #61ffc1;
}

.partners-hero h1 {
  color: #f4f7f8;
  font-size: clamp(36px, 6.4vw, 72px);
  line-height: 1.02;
}

.partners-hero .dek {
  max-width: 820px;
  margin: 0 auto;
  color: #dce5e7;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.42;
}

.diagram-section,
.partners-section {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding: clamp(24px, 4vw, 42px);
}

.section-copy {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.section-copy .eyebrow {
  color: #61ffc1;
}

.diagram-section h2,
.partners-section h2 {
  color: #f4f7f8;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.12;
}

.diagram-section p,
.partners-section p {
  color: #d2dcdf;
  font-size: 16px;
  line-height: 1.58;
}

.diagram-frame {
  display: grid;
  gap: 10px;
}

.diagram-frame a {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(142, 169, 178, 0.24);
  border-radius: 8px;
  background: #f7f8f4;
}

.diagram-frame img {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
}

.diagram-frame figcaption {
  color: #9fb0b7;
  font-size: 13px;
  text-align: center;
}

.split-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-section > div {
  display: grid;
  gap: 12px;
}

.progression {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  padding: 0;
  list-style: none;
}

.progression li {
  position: relative;
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(97, 255, 193, 0.28);
  border-radius: 8px;
  background: rgba(12, 45, 36, 0.42);
  color: #f7fbfa;
  line-height: 1.2;
  text-align: center;
}

.progression li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -19px;
  color: #61ffc1;
  font-size: 22px;
  font-weight: 900;
  transform: translateY(-50%);
}

.progression small {
  color: #61ffc1;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.progression span {
  color: #f7fbfa;
  font-size: 16px;
  font-weight: 900;
}

.progression em {
  color: #b9c6ca;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.partners-section a {
  color: #61ffc1;
}

.partners-page .final-section {
  border-color: rgba(97, 255, 193, 0.36);
}

/* ---- FOOTER (shared) ---- */
.site-footer {
  display: grid;
  grid-template-columns: 230px minmax(220px, 1fr) auto;
  gap: 24px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 18px 28px;
  border-top: 1px solid rgba(142, 169, 178, 0.22);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  display: block;
  width: 170px;
  height: auto;
  object-fit: contain;
}

.site-footer p {
  max-width: 360px;
  margin: 0;
  color: #d9e2e4;
  font-size: 14px;
  line-height: 1.35;
}

.site-footer nav {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
}

.site-footer a,
.site-footer small {
  color: #d9e2e4;
  font-size: 13px;
  text-decoration: none;
}

.site-footer small {
  grid-column: 1 / -1;
  text-align: center;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1080px) {
  .site-nav {
    grid-template-columns: minmax(210px, 1fr) auto;
  }

  .site-nav nav {
    display: none;
  }

  .api-section,
  .api-code-panel {
    grid-template-columns: 1fr;
  }

  .api-copy {
    border-right: 0;
    border-bottom: 1px solid rgba(142, 169, 178, 0.22);
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .routing-row,
  .routing-row ul {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .research-page .site-nav,
  .partners-page .site-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 18px;
  }

  .research-page .site-nav nav,
  .partners-page .site-nav nav {
    display: none;
  }

  .research-page .landing-menu-btn,
  .partners-page .landing-menu-btn {
    display: grid;
    place-items: center;
  }

  .split-section,
  .progression {
    grid-template-columns: 1fr;
  }

  .progression {
    gap: 28px;
  }

  .progression li {
    min-height: 72px;
  }

  .progression li:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -27px;
    transform: translateX(50%) rotate(90deg);
  }
}

@media (max-width: 720px) {
  .site-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
  }

  .nav-actions {
    display: none;
  }

  .landing-menu-btn {
    display: grid;
    place-items: center;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-preview {
    width: min(100%, 520px);
    max-height: 180px;
  }

  .hero-preview img {
    width: 190%;
    max-width: none;
    transform: translateX(-24%);
  }

  .product-card {
    min-height: auto;
    padding: 22px;
  }

  .api-section {
    margin-right: 18px;
    margin-left: 18px;
  }

  .api-tabs {
    grid-template-columns: 1fr;
  }

  .api-example-panel pre,
  .api-response pre {
    max-height: 260px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .research-page {
    padding-top: 22px;
  }

  .research-hero,
  .research-section {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    margin-right: -18px;
    margin-left: -18px;
  }

  .byline {
    flex-direction: column;
    gap: 6px;
  }

  .partners-page {
    padding-top: 22px;
  }

  .partners-hero,
  .partners-section,
  .diagram-section {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    margin-right: -18px;
    margin-left: -18px;
  }

  .diagram-frame img {
    max-height: 54vh;
  }
}
