/* Nexis Labs marketing site — tokens aligned with Flow / Elevate / Assess */

:root {
  --ds-primary: #4f46e5;
  --ds-primary-hover: #6366f1;
  --ds-primary-tint: #eef2ff;
  --ds-primary-dark: color-mix(in srgb, var(--ds-primary) 82%, black);
  --ds-accent: color-mix(in srgb, var(--ds-primary) 45%, #06b6d4);
  --ds-text: #111827;
  --ds-heading: #0f172a;
  --ds-text-muted: #6b7280;
  --ds-text-faint: #9ca3af;
  --ds-surface: #f8fafc;
  --ds-card: #ffffff;
  --ds-border: rgba(0, 0, 0, 0.1);
  --ds-border-strong: rgba(0, 0, 0, 0.18);
  --ds-success: #22c55e;
  --ds-warning: #f59e0b;
  --ds-danger: #ef4444;
  --ds-info: #3b82f6;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --max: 1120px;
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ds-text);
  background: var(--ds-surface);
  min-height: 100vh;
}

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

a {
  color: var(--ds-primary);
  text-decoration: none;
}

a:hover {
  color: var(--ds-primary-hover);
}

h1,
h2,
h3,
h4 {
  color: var(--ds-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
  color: var(--ds-text-muted);
}

/* ——— Atmosphere ——— */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 55% at 0% 0%, color-mix(in srgb, var(--ds-primary) 16%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 10%, color-mix(in srgb, var(--ds-accent) 14%, transparent), transparent 50%),
    linear-gradient(180deg, var(--ds-surface) 0%, color-mix(in srgb, var(--ds-surface) 70%, var(--ds-primary-tint)) 100%);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ——— Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--ds-border);
  background: color-mix(in srgb, var(--ds-card) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ds-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.brand:hover {
  color: var(--ds-heading);
}

.brand img,
.brand svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--ds-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ds-primary);
  background: var(--ds-primary-tint);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ds-border);
  border-radius: 10px;
  background: var(--ds-card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ds-heading);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ds-heading);
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--ds-primary) 0%, var(--ds-primary-dark) 100%);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--ds-primary) 28%, transparent);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ds-primary-hover) 0%, var(--ds-primary) 100%);
}

.btn-secondary {
  color: var(--ds-heading) !important;
  background: var(--ds-card);
  border-color: var(--ds-border-strong);
}

.btn-secondary:hover {
  border-color: var(--ds-primary);
  color: var(--ds-primary) !important;
  background: var(--ds-primary-tint);
}

.btn-ghost {
  color: var(--ds-primary) !important;
  background: transparent;
}

.btn-ghost:hover {
  background: var(--ds-primary-tint);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3.5rem 0 4rem;
}

.hero .container {
  width: min(100% - 2.5rem, 920px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 2rem;
  align-items: center;
  width: 100%;
}

.hero__wordmark {
  width: min(100%, 420px);
  height: auto;
  margin: 0 0 1.1rem;
}

.hero__brand {
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--ds-heading);
  margin: 0 0 0.85rem;
  line-height: 1.05;
}

.hero__brand span {
  color: var(--ds-primary);
}

.hero__headline {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  color: var(--ds-heading);
  margin: 0 0 0.85rem;
  max-width: 28ch;
}

.hero__lead {
  font-size: 1.05rem;
  max-width: 40ch;
  margin-bottom: 1.75rem;
}

.hero-visual {
  position: relative;
  min-height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--ds-primary) 35%, white), transparent 55%),
    radial-gradient(circle at 75% 65%, color-mix(in srgb, var(--ds-accent) 40%, white), transparent 50%),
    linear-gradient(145deg, #312e81 0%, #4f46e5 45%, #0891b2 100%);
  box-shadow: var(--shadow-md);
  animation: visual-in 0.9s ease both;
}

.hero-visual__panel {
  position: absolute;
  inset: 12%;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: panel-float 7s ease-in-out infinite;
}

.hero-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ds-heading);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transform: translateX(0);
  animation: chip-in 0.7s ease both;
}

.hero-chip:nth-child(2) { animation-delay: 0.15s; }
.hero-chip:nth-child(3) { animation-delay: 0.3s; }

.hero-chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ds-primary);
  flex-shrink: 0;
}

.hero-chip:nth-child(2) .hero-chip__dot { background: #0891b2; }
.hero-chip:nth-child(3) .hero-chip__dot { background: #6366f1; }

.hero-chip__meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ds-text-muted);
}

/* ——— Sections ——— */
.section {
  padding: 5rem 0;
}

.section--tight {
  padding: 3.5rem 0;
}

.section__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-primary);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  max-width: 20ch;
  margin-bottom: 0.75rem;
}

.section__lead {
  max-width: 52ch;
  font-size: 1.05rem;
  margin-bottom: 2.25rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

/* ——— Product grid (interaction surfaces) ——— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.35rem;
  border-radius: var(--radius);
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: inherit;
  min-height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--ds-primary) 35%, white);
  color: inherit;
}

.product-card__logo {
  width: 48px;
  height: 48px;
  margin-bottom: 1.15rem;
  border-radius: 12px;
}

.product-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1.15rem;
  background: var(--ds-primary-tint);
  color: var(--ds-primary);
}

.product-card__icon--flow { background: #eef2ff; color: #4f46e5; }
.product-card__icon--elevate { background: #ecfeff; color: #0891b2; }
.product-card__icon--assess { background: #eef2ff; color: #6366f1; }

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.product-card__tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ds-primary);
  margin-bottom: 0.65rem;
}

.product-card p {
  flex: 1;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.product-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ds-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ——— Feature list ——— */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
}

.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature p {
  font-size: 0.95rem;
  margin: 0;
}

/* ——— Split / product detail ——— */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.split--reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.split--reverse > :first-child {
  order: 2;
}

.detail-visual {
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
}

.detail-visual--flow {
  background: linear-gradient(145deg, #312e81, #4f46e5 55%, #818cf8);
}

.detail-visual--elevate {
  background: linear-gradient(145deg, #164e63, #0891b2 55%, #67e8f9);
}

.detail-visual--assess {
  background: linear-gradient(145deg, #3730a3, #6366f1 55%, #c4b5fd);
}

.detail-visual__inner {
  position: absolute;
  inset: 14%;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 1.25rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.detail-visual__title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail-visual__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.detail-visual__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-visual__list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.checklist {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.checklist li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--ds-text);
  font-size: 0.98rem;
}

.checklist li::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ds-primary-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234f46e5' stroke-width='2'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ——— Portfolio ——— */
.portfolio-list {
  display: grid;
  gap: 1.25rem;
}

.portfolio-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portfolio-item:hover {
  border-color: color-mix(in srgb, var(--ds-primary) 35%, white);
  box-shadow: var(--shadow-sm);
}

.portfolio-item__logo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
}

.portfolio-item__mark {
  height: 88px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.portfolio-item__mark--flow { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.portfolio-item__mark--elevate { background: linear-gradient(135deg, #0891b2, #67e8f9); }
.portfolio-item__mark--assess { background: linear-gradient(135deg, #6366f1, #c4b5fd); }

.portfolio-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.portfolio-item p {
  margin: 0;
  font-size: 0.95rem;
}

/* ——— About / Contact ——— */
.prose {
  max-width: 65ch;
}

.prose p {
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--ds-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.stat span {
  font-size: 0.9rem;
  color: var(--ds-text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
}

.contact-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.contact-card p,
.contact-card a {
  font-size: 0.98rem;
}

.contact-card + .contact-card {
  margin-top: 1rem;
}

.form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--ds-card);
  border: 1px solid var(--ds-border);
}

.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ds-heading);
}

.form input,
.form textarea,
.form select {
  font: inherit;
  font-weight: 400;
  color: var(--ds-text);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--ds-border-strong);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-primary) 15%, transparent);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ds-text-faint);
  margin: 0;
}

/* ——— Page hero (inner) ——— */
.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.65rem;
}

.page-hero p {
  font-size: 1.1rem;
  max-width: 52ch;
  margin: 0;
}

/* ——— CTA band ——— */
.cta-band {
  margin: 2rem 0 5rem;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at top right, color-mix(in srgb, var(--ds-accent) 25%, transparent), transparent 55%),
    linear-gradient(135deg, #312e81 0%, #4f46e5 60%, #4338ca 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 0 0 0.4rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 40ch;
}

.cta-band .btn-secondary {
  background: #fff;
  border-color: #fff;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-card);
  padding: 3rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand p {
  font-size: 0.92rem;
  max-width: 28ch;
  margin: 0;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ds-text-faint);
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--ds-text-muted);
  font-size: 0.92rem;
  padding: 0.25rem 0;
}

.footer-col a:hover {
  color: var(--ds-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ds-border);
  font-size: 0.85rem;
  color: var(--ds-text-faint);
}

.footer-bottom a {
  color: var(--ds-text-muted);
}

/* ——— Motion ——— */
@keyframes visual-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes chip-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes panel-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ——— Legal ——— */
.legal {
  max-width: 70ch;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

.legal p,
.legal li {
  font-size: 0.98rem;
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .hero__grid,
  .split,
  .split--reverse,
  .contact-grid,
  .product-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split--reverse > :first-child {
    order: 0;
  }

  .portfolio-item {
    grid-template-columns: 1fr;
  }

  .portfolio-item__actions {
    justify-self: start;
  }

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

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

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--ds-card);
    border-bottom: 1px solid var(--ds-border);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 2.5rem 0 3rem;
  }

  .hero-visual {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
