/* ============================================================
   Final Nexus — static marketing site
   Self-contained styles (no Tailwind, no Medusa). Ported from the
   storefront's nexus/nx design language, commerce styles removed.
   ============================================================ */

:root {
  --nexus-bg: #f6f8fb;
  --nexus-bg-deep: #eef2f7;
  --nexus-panel: #ffffff;
  --nexus-ink: #0f172a;
  --nexus-muted: #56657a;
  --nexus-gold: #0ea5e9;
  --nexus-forest: #2563eb;
  --nexus-border: rgba(15, 23, 42, 0.1);

  --nexus-heading-font: "Space Grotesk";
  --nexus-body-font: "Manrope";
  --nexus-accent-font: "Sora";
}

* {
  box-sizing: border-box;
}

/* Always reserve space for the vertical scrollbar so centered content (and the
   sticky header) never shifts horizontally between short and tall pages. */
html {
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 14% 12%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 32%),
    radial-gradient(circle at 88% 14%, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0) 32%),
    linear-gradient(180deg, #ffffff 0%, var(--nexus-bg) 55%, var(--nexus-bg-deep) 100%);
  color: var(--nexus-ink);
  font-family: var(--nexus-body-font), "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Layout shell ---------- */
.nexus-page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Grows to fill the viewport on short pages, pushing the footer to the bottom. */
.nexus-page-main {
  flex: 1 0 auto;
}

.nexus-container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.nexus-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: var(--nexus-accent-font), "Segoe UI", sans-serif;
  font-size: 0.75rem;
  color: var(--nexus-forest);
  margin: 0;
}

/* ---------- Header ---------- */
.nexus-header-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--nexus-border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

.nexus-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nexus-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}

.nexus-wordmark-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nexus-main-nav {
  display: flex;
  gap: 1.4rem;
  font-family: var(--nexus-accent-font), "Segoe UI", sans-serif;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nexus-main-nav a {
  position: relative;
  color: var(--nexus-muted);
  transition: color 200ms ease;
}

.nexus-main-nav a:hover,
.nexus-main-nav a[aria-current="page"] {
  color: var(--nexus-ink);
}

.nexus-main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  border-radius: 2px;
  background: var(--nexus-forest);
}

/* ---------- Generic hero (Services) ---------- */
.nexus-hero {
  padding: 4.4rem 0 3rem;
}

.nexus-hero h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.04;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
}

.nexus-hero-copy {
  margin-top: 1.1rem;
  max-width: 62ch;
  color: var(--nexus-muted);
  line-height: 1.7;
}

.nexus-hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------- Section heads & pillars ---------- */
.nexus-section-head {
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.nexus-section-head h2 {
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
}

.nexus-pillars {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nexus-pillars article {
  border: 1px solid var(--nexus-border);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: 1rem;
}

.nexus-pillars h3 {
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
}

/* ---------- Store (empty state) ---------- */
.nexus-store-wrap {
  margin-top: 2.4rem;
  margin-bottom: 2.8rem;
}

.nexus-store-head h1 {
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
}

.nexus-store-head p {
  max-width: 64ch;
  color: var(--nexus-muted);
}

.nx-store-empty {
  margin: 2.4rem auto 3rem;
  max-width: 620px;
  text-align: center;
  border: 1px solid var(--nexus-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 60%),
    rgba(255, 255, 255, 0.9);
  padding: 3.4rem 2rem;
}

.nx-store-empty-mark {
  font-size: 2.8rem;
  color: rgba(37, 99, 235, 0.4);
  animation: nx-pulse 3.4s ease-in-out infinite;
}

.nx-store-empty h2 {
  margin: 0.8rem 0 0.5rem;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: 1.7rem;
}

.nx-store-empty p {
  margin: 0 auto 1.6rem;
  max-width: 46ch;
  color: var(--nexus-muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.nexus-footer-wrap {
  border-top: 1px solid var(--nexus-border);
  margin-top: 3rem;
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.84);
  flex-shrink: 0;
}

.nexus-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}

.nexus-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.nexus-footer-title {
  margin: 0;
  text-transform: uppercase;
  font-family: var(--nexus-accent-font), "Segoe UI", sans-serif;
  letter-spacing: 0.1em;
  color: var(--nexus-forest);
}

.nexus-footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.6rem;
}

.nexus-footer-grid p,
.nexus-footer-grid li {
  color: var(--nexus-muted);
}

.nexus-footer-grid ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.nexus-text-link {
  color: var(--nexus-forest);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-family: var(--nexus-accent-font), "Segoe UI", sans-serif;
}

/* ============================================================
   Landing (Home) — informational, immersive
   ============================================================ */
.nx-landing-hero {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0 5rem;
  isolation: isolate;
}

.nx-landing-grid {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at 50% 32%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 32%, #000 0%, transparent 70%);
  z-index: -2;
  animation: nx-grid-drift 28s linear infinite;
}

.nx-landing-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.7;
  z-index: -1;
}

.nx-landing-glow-a {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, rgba(37, 99, 235, 0) 70%);
  top: -120px;
  right: -60px;
  animation: nx-float 16s ease-in-out infinite;
}

.nx-landing-glow-b {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.34) 0%, rgba(14, 165, 233, 0) 70%);
  bottom: -160px;
  left: -80px;
  animation: nx-float 20s ease-in-out infinite reverse;
}

.nx-landing-hero-inner {
  position: relative;
  text-align: center;
  max-width: 920px;
}

.nx-landing-title {
  margin: 0.7rem 0 0;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.nx-landing-title-accent {
  background: linear-gradient(110deg, #2563eb 0%, #0ea5e9 60%, #2563eb 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: nx-shimmer 6s linear infinite;
}

.nx-landing-lede {
  margin: 1.4rem auto 0;
  max-width: 60ch;
  color: var(--nexus-muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.nx-landing-actions {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.nx-cta-primary,
.nx-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  font-family: var(--nexus-accent-font), "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 220ms ease, box-shadow 220ms ease, background 320ms ease;
}

.nx-cta-primary {
  border: 1px solid #1d4ed8;
  background: linear-gradient(130deg, #2563eb 0%, #1d4ed8 100%);
  background-size: 150% auto;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.nx-cta-primary:hover {
  transform: translateY(-2px);
  background-position: right center;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.34);
}

.nx-cta-ghost {
  border: 1px solid var(--nexus-border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--nexus-ink);
}

.nx-cta-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.nx-cta-arrow {
  transition: transform 220ms ease;
}

.nx-cta-primary:hover .nx-cta-arrow,
.nx-cta-ghost:hover .nx-cta-arrow {
  transform: translateX(4px);
}

.nx-cta-lg {
  padding: 1rem 1.8rem;
  font-size: 0.86rem;
}

.nx-signal-row {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.6rem;
}

.nx-signal {
  display: grid;
  gap: 0.15rem;
  text-align: center;
}

.nx-signal strong {
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: 1.15rem;
  color: var(--nexus-forest);
}

.nx-signal span {
  color: var(--nexus-muted);
  font-size: 0.86rem;
}

.nx-fields-head {
  margin-top: 4.5rem;
  text-align: center;
}

.nx-fields-head h2 {
  margin: 0.4rem 0 0;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}

.nx-fields-sub {
  margin: 0.9rem auto 0;
  max-width: 56ch;
  color: var(--nexus-muted);
  line-height: 1.7;
}

.nx-fields-grid {
  margin: 1.8rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.nx-field-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--nexus-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  padding: 1.5rem 1.3rem 1.4rem;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.nx-field-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.1);
}

.nx-field-index {
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(37, 99, 235, 0.16);
}

.nx-field-card h3 {
  margin: 0.6rem 0 0.4rem;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: 1.25rem;
}

.nx-field-card p {
  margin: 0;
  color: var(--nexus-muted);
  line-height: 1.65;
}

.nx-closing {
  margin: 4.5rem auto 4rem;
}

.nx-closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 28px;
  padding: 2.6rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0) 45%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 242, 247, 0.96) 100%);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.1);
}

.nx-closing-inner h2 {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.nx-closing-inner p {
  margin: 0;
  max-width: 48ch;
  color: var(--nexus-muted);
  line-height: 1.7;
}

/* ============================================================
   Services
   ============================================================ */
.nx-services-hero {
  padding-bottom: 1rem;
}

.nx-services-title {
  margin: 0.4rem 0 0;
  max-width: 18ch;
  font-family: var(--nexus-heading-font), "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
}

.nx-services-grid {
  margin: 1.4rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.nx-service-card {
  border: 1px solid var(--nexus-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  padding: 1.6rem;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.nx-service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.nx-service-summary {
  margin: 0.5rem 0 1rem;
  color: var(--nexus-ink);
  font-size: 1.05rem;
  line-height: 1.55;
}

.nx-service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.nx-service-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--nexus-muted);
  line-height: 1.5;
}

.nx-service-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--nexus-forest);
}

/* ============================================================
   Motion
   ============================================================ */
.nx-fade {
  opacity: 0;
  animation: nx-fade-up 760ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes nx-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nx-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-26px, 22px);
  }
}

@keyframes nx-shimmer {
  to {
    background-position: 200% center;
  }
}

@keyframes nx-grid-drift {
  to {
    background-position: 54px 54px;
  }
}

@keyframes nx-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .nx-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .nexus-header {
    flex-wrap: wrap;
  }

  .nexus-main-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .nexus-hero {
    padding-top: 2.4rem;
  }

  .nexus-pillars,
  .nexus-footer-grid {
    grid-template-columns: 1fr;
  }

  .nx-landing-hero {
    padding: 4.2rem 0 3.4rem;
  }

  .nx-fields-grid,
  .nx-services-grid {
    grid-template-columns: 1fr;
  }

  .nx-closing-inner {
    padding: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-fade,
  .nx-landing-grid,
  .nx-landing-glow,
  .nx-landing-title-accent,
  .nx-store-empty-mark {
    animation: none;
  }

  .nx-fade {
    opacity: 1;
  }
}
