/* =========================================================
   Veloxs AI — Enterprise SaaS Design System
   White surface + slate text + blue→purple gradient brand
   Type: Plus Jakarta Sans
   ========================================================= */

:root {
  /* Surfaces — clean white with a hint of warmth */
  --bg:        #FFFFFF;
  --bg-alt:    #FAF9F5;
  --bg-deep:   #F5F2EB;
  --paper:     #FFFFFF;

  /* Text — softer, warmer slate (less harsh than pure cool slate) */
  --ink:       #1A1A1A;
  --ink-2:     #292524;
  --body:      #44403C;
  --body-2:    #57534E;
  --muted:     #78716C;

  /* Borders — warm neutral */
  --line:      #E7E5E4;
  --line-soft: #F1EFEC;

  /* Brand — Anthropic-style warm terracotta primary, ink-dark secondary */
  --primary:    #CC785C;
  --primary-2:  #B86A4F;
  --primary-3:  #A8553A;
  --primary-soft: #F4E5DD;
  --secondary:  #1A1A1A;     /* dark warm ink */
  --accent:     #E8A88A;     /* lighter terracotta highlight */

  --grad:       linear-gradient(135deg, #CC785C 0%, #B86A4F 100%);
  --grad-soft:  linear-gradient(135deg, rgba(204, 120, 92, 0.10) 0%, rgba(168, 85, 58, 0.08) 100%);
  --grad-text:  linear-gradient(135deg, #B86A4F 0%, #A8553A 100%);

  /* Shadows — softer, warm */
  --shadow-xs:    0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow-sm:    0 4px 12px rgba(26, 26, 26, 0.05);
  --shadow:       0 12px 28px rgba(26, 26, 26, 0.08);
  --shadow-lg:    0 24px 48px rgba(26, 26, 26, 0.10);
  --shadow-cta:   0 10px 22px rgba(204, 120, 92, 0.28);

  /* Radii */
  --r-sm:  10px;
  --r-btn: 12px;
  --r:     16px;
  --r-lg:  24px;
  --r-xl:  32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', 'Inter', 'Manrope', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }

/* ====== Typography ====== */
h1, h2, h3, h4, h5 {
  color: var(--ink);
  font-family: inherit;
  letter-spacing: -0.025em;
  font-weight: 700;
}
h1 {
  font-size: clamp(2.6rem, 5vw, 4rem); /* 42-64px */
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(2rem, 3.6vw, 3rem); /* 32-48px */
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}
h3 {
  font-size: clamp(1.35rem, 1.8vw, 1.75rem); /* 22-28px */
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h4 {
  font-size: 1.125rem; /* 18 */
  font-weight: 700;
  letter-spacing: -0.005em;
}
p { color: var(--body); font-size: 1.0625rem; line-height: 1.7; }
.small { font-size: 0.875rem; color: var(--muted); }
.grad-text {
  color: var(--primary);
}

/* ====== Header ====== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid white so scrolled content stays cleanly behind the header
     and never bleeds through around the logo. */
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.brand img { height: 68px; width: auto; object-fit: contain; display: block; }
.brand .brand-name { font-size: 1.2rem; font-weight: 800; }
.navlinks {
  display: flex;
  align-items: center;
  gap: 36px;
  color: var(--body-2);
  font-size: 0.95rem;
  font-weight: 500;
}
.navlinks a {
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.navlinks a:hover,
.navlinks a.active { color: var(--ink); }
.navlinks a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* ====== Buttons — Anthropic-inspired warm palette ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--primary);
  color: #FFFFFF;
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-cta);
  transition: transform .25s ease, box-shadow .25s ease, background .25s, border-color .25s;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover {
  background: var(--primary-2);
  border-color: var(--primary-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(204, 120, 92, 0.35);
}
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: none;
}
.btn.secondary:hover {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(26, 26, 26, 0.18);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover {
  background: var(--bg-alt);
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: none;
}
.btn.light {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn.light:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}
.btn-arrow { font-size: 1em; transition: transform .25s ease; display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(3px); }
.text-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s, color .25s;
}
.text-link:hover { gap: 10px; color: var(--primary-3); }

/* ====== Eyebrow / chips ====== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary-3);
  background: var(--primary-soft);
  border: 1px solid rgba(204, 120, 92, 0.20);
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--body);
  font-weight: 500;
}
.chip svg { width: 14px; height: 14px; color: var(--primary); }
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ====== Hero ====== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 88px 0 96px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(204, 120, 92, 0.10), transparent 60%),
    radial-gradient(700px 400px at 5% 100%, rgba(232, 168, 138, 0.10), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 26, 26, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 80%);
  pointer-events: none;
  opacity: 0.6;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 { margin-bottom: 24px; color: var(--ink); }
.hero .lead {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--body-2);
  max-width: 680px;
  margin: 0 auto 36px;
}
.hero .actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* Hero visual band */
.hero-visual-wrap {
  position: relative;
  z-index: 2;
  margin-top: 64px;
  display: grid;
  place-items: center;
}
.hero-visual {
  position: relative;
  width: min(1080px, 100%);
  aspect-ratio: 16/9;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-alt), var(--paper));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(204, 120, 92, 0.10), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(232, 168, 138, 0.10), transparent 55%);
}
.hero-visual img {
  position: relative;
  width: 56%;
  max-width: 520px;
  animation: float 8s ease-in-out infinite;
}
/* Modifier — use when the image is a full-bleed composition (no float, fills frame) */
.hero-visual--full::before { display: none; }
.hero-visual--full img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  animation: none;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ====== Trust strip ====== */
.trust {
  padding: 48px 0 0;
  background: var(--bg);
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 32px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
}
.trust .stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.025em;
  line-height: 1;
}
.trust .stat .label {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--body-2);
}

/* ====== Sections ====== */
.section { padding: 112px 0; }
.section.alt { background: var(--bg-alt); }
.section.deep { background: var(--bg-deep); }
.section.ink { background: var(--ink); color: var(--bg); }
.section.ink h1,
.section.ink h2,
.section.ink h3 { color: #FFFFFF; }
.section.ink p { color: #CBD5E1; }

.section-head { max-width: 760px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { display: inline-flex; }
.section-head p {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--body-2);
  max-width: 680px;
}
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ====== Cards ====== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cards.two   { grid-template-columns: repeat(2, 1fr); }
.cards.four  { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(204, 120, 92, 0.30);
}
.card .ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: var(--primary-3);
}
.card .ico svg { width: 22px; height: 22px; stroke: currentColor; }
/* SVG illustration icon — for capability cards using vector image files */
.card .ico.ico-svg {
  width: 64px;
  height: 64px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover .ico.ico-svg {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(204, 120, 92, 0.18);
}
.card .ico.ico-svg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Keep the cream tile on dark ink cards so dark icon details stay readable */
.card.ink-card .ico.ico-svg {
  background: var(--bg-alt);
  border-color: rgba(255, 255, 255, 0.10);
}
.card.ink-card:hover .ico.ico-svg {
  border-color: var(--primary);
}
/* Image-based card icon — illustration PNGs at compact icon scale.
   Larger 3:2 tile (matches the icon ratio so details fill the frame)
   with a cool-neutral light blue background that contrasts cleanly
   against the icons' cream/terracotta palette. */
.card .ico.ico-img {
  width: 96px;
  height: 72px;
  background: #EEF2F7;
  border-radius: 14px;
  border: 1px solid #D6DCE6;
  padding: 5px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 #FFFFFF,
    0 4px 10px rgba(26, 26, 26, 0.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover .ico.ico-img {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow:
    inset 0 1px 0 #FFFFFF,
    0 10px 22px rgba(204, 120, 92, 0.22);
}
.card .ico.ico-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 9px;
}
.card .ico.solid {
  background: var(--grad);
  color: #FFFFFF;
}
.card .ico.solid svg { color: #FFFFFF; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--body-2); font-size: 1rem; }
.card .card-link {
  margin-top: 20px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s;
}
.card:hover .card-link { gap: 10px; }

/* ink cards (on dark sections) */
.card.ink-card {
  background: #1E293B;
  border-color: #334155;
}
.card.ink-card h3 { color: #FFFFFF; }
.card.ink-card p  { color: #94A3B8; }
.card.ink-card .ico {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

/* ====== Page hero (subpages) ====== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 88px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 85% 0%, rgba(204, 120, 92, 0.10), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(232, 168, 138, 0.10), transparent 60%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 2; }
.page-hero h1 { margin-bottom: 20px; }
.page-hero p {
  max-width: 720px;
  font-size: 1.15rem;
  color: var(--body-2);
}

/* ====== Split layouts ====== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.wide   { grid-template-columns: 1.1fr 0.9fr; }
.split.narrow { grid-template-columns: 0.9fr 1.1fr; }

.visual-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-alt), var(--paper));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 5/4;
  display: grid;
  place-items: center;
  padding: 32px;
}
.visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 35% 40%, rgba(204, 120, 92, 0.10), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(232, 168, 138, 0.10), transparent 50%);
  pointer-events: none;
}
.visual-frame > * { position: relative; z-index: 1; }
.visual-frame img {
  width: 80%;
  max-width: 480px;
}
.visual-frame.flat::before { display: none; }
.visual-frame.flat { background: var(--bg-alt); }

/* Modifier — full-bleed image fills the frame (no padding, edge-to-edge) */
.visual-frame--full { padding: 0; }
.visual-frame--full::before { display: none; }
.visual-frame--full img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

/* ====== Bare image block — sits on the page, not a card ======
   Use for full-design infographics (e.g. dashboard-image) so the
   image blends with the page background without card chrome. */
.image-block {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: block;
  background: transparent;
}
.image-block img {
  width: 100%;
  height: auto;
  display: block;
  /* Very subtle radius — barely there */
  border-radius: 14px;
  /* Soft warm glow instead of hard card shadow — blends with cream/white */
  box-shadow:
    0 1px 0 rgba(231, 229, 228, 0.6),
    0 30px 70px -30px rgba(204, 120, 92, 0.15),
    0 12px 30px -12px rgba(26, 26, 26, 0.06);
}
@media (max-width: 720px) {
  .image-block img { border-radius: 10px; }
}

/* Variant — sized for a split-column slot (in-line with text on the other side).
   Used for the intelligence-layer infographic on the platform section. */
.image-block--inset {
  max-width: 100%;
}
.image-block--inset img {
  border-radius: 12px;
  /* Slightly tighter shadow that matches the cream section background */
  box-shadow:
    0 1px 0 rgba(231, 229, 228, 0.5),
    0 20px 50px -24px rgba(204, 120, 92, 0.16),
    0 8px 22px -10px rgba(26, 26, 26, 0.05);
}

/* ====== Image placeholder (swap in <img> when ready) ====== */
.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: var(--muted);
}
.image-placeholder .ph-ico {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.image-placeholder .ph-ico svg { width: 28px; height: 28px; }
.image-placeholder .ph-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.image-placeholder .ph-meta {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.hero-visual .image-placeholder .ph-ico { width: 80px; height: 80px; }
.hero-visual .image-placeholder .ph-label { font-size: 1.05rem; }

/* ====== Capability cards (icon-illustration based) ====== */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cap-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(204, 120, 92, 0.30);
}
.cap-card .cap-art {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cap-card .cap-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  transition: transform .35s ease;
}
.cap-card:hover .cap-art img { transform: scale(1.02); }
.cap-card .cap-body {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cap-card .cap-num {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-3);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cap-card h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 10px;
}
.cap-card p {
  color: var(--body-2);
  font-size: 0.96rem;
  margin: 0;
}
.cap-card .card-link {
  margin-top: 20px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s, color .25s;
}
.cap-card:hover .card-link { gap: 10px; color: var(--primary-3); }
.cap-card .card-link { margin-top: auto; padding-top: 18px; }

/* ====== Layer rows (platform) ====== */
.layers {
  display: grid;
  gap: 14px;
}
.layer {
  display: grid;
  grid-template-columns: 56px 200px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.layer:hover {
  transform: translateX(6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.layer .num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-3);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.layer .label {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.layer p {
  margin: 0;
  color: var(--body-2);
  font-size: 0.98rem;
}

/* ====== Product cards (large) ====== */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow-xs);
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
/* Product card thumbnail — fits inside the card padding, justified to
   the same width as the title and description below. Clean and contained. */
.product-card .product-thumb {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 0 22px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
@media (max-width: 720px) {
  .product-card .product-thumb { margin-bottom: 18px; }
}

.product-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-3);
  background: var(--primary-soft);
  padding: 5px 10px;
  border-radius: 999px;
  width: max-content;
  margin-bottom: 18px;
}
.product-card .tag.teal {
  color: var(--ink);
  background: var(--bg-deep);
}
.product-card .tag.muted {
  color: var(--body-2);
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.product-card h3 { margin-bottom: 8px; }
.product-card .sub {
  color: var(--body-2);
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 14px;
}
.product-card p { color: var(--body-2); font-size: 0.98rem; }
.product-card ul {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}
.product-card ul li {
  position: relative;
  padding-left: 26px;
  color: var(--body);
  font-size: 0.95rem;
}
.product-card ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 14px;
  height: 6px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
.product-card .card-link { margin-top: auto; padding-top: 18px; }

/* ====== Process / steps ====== */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.process .step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}
.process .step .num {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-3);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.process .step h4 { margin-bottom: 8px; }
.process .step p { color: var(--body-2); font-size: 0.96rem; }
.section.ink .process .step {
  background: #1E293B;
  border-color: #334155;
}
.section.ink .process .step h4 { color: #FFFFFF; }
.section.ink .process .step p { color: #94A3B8; }
.section.ink .process .step .num { color: var(--accent); }

/* ====== Feature list ====== */
.feature-list {
  display: grid;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 28px;
}
.feature-list .row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.feature-list .row:last-child { border-bottom: none; }
.feature-list .row .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-3);
  display: grid;
  place-items: center;
}
.feature-list .row .ico svg { width: 20px; height: 20px; }
.feature-list .row h4 { margin-bottom: 6px; font-size: 1.08rem; }
.feature-list .row p { color: var(--body-2); font-size: 0.98rem; }

/* ====== CTA band ====== */
.cta {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
  background: var(--ink);
  color: #FFFFFF;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 90% 0%, rgba(204, 120, 92, 0.28), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(232, 168, 138, 0.22), transparent 60%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.cta h2 { color: #FFFFFF; margin-bottom: 20px; }
.cta p { color: #CBD5E1; font-size: 1.1rem; max-width: 640px; margin: 0 auto 32px; }
.cta .actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta .btn.light {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid transparent;
}
.cta .btn.light:hover { background: var(--primary); color: #FFFFFF; }

/* ====== Form ====== */
.form { display: grid; gap: 16px; }
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--body-2);
  margin-bottom: 8px;
  font-weight: 600;
}
.input, .textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(204, 120, 92, 0.15);
}
.textarea { min-height: 140px; resize: vertical; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

/* Contact info list */
.contact-info {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}
.contact-info .row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  align-items: center;
}
.contact-info .row .ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-3);
  display: grid;
  place-items: center;
}
.contact-info .row .ico svg { width: 20px; height: 20px; }
.contact-info .row .label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.contact-info .row .value {
  font-size: 1.02rem;
  color: var(--ink);
  font-weight: 600;
  margin-top: 2px;
}
.contact-info .row .value a { color: var(--primary); }

/* ====== Footer ====== */
.footer {
  background: var(--ink);
  color: #94A3B8;
  /* Shorter footer — tighter top/bottom padding */
  padding: 48px 0 24px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand,
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Reset all top spacing — columns share an alignment line */
  margin: 0;
  padding: 0;
}
.footer-logo {
  display: block;
  width: 220px;
  height: auto;
  max-width: 100%;
  /* Pull the logo up so its visible baseline aligns with the column h4 headers.
     The PNG has ~14-16px of internal whitespace above the wordmark. */
  margin: -16px 0 8px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer-brand p {
  max-width: 380px;
  color: #94A3B8;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
}
.footer h4 {
  color: #FFFFFF;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 20px;
  font-weight: 700;
  line-height: 1.2;
}
.footer-col a {
  display: block;
  color: #B8C0CC;
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color .2s;
  text-decoration: none;
}
.footer-col a:last-child { margin-bottom: 0; }
.footer-col a:hover { color: #FFFFFF; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 28px;
  font-size: 0.88rem;
  color: #8C95A3;
  line-height: 1.5;
}
.footer-bottom > span { display: inline-flex; align-items: center; }
.footer-bottom .legal-links { display: inline-flex; flex-wrap: wrap; gap: 0; }
.footer-bottom .legal-links a {
  color: #B8C0CC;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  transition: color .2s;
}
.footer-bottom .legal-links a:first-child { border-left: none; padding-left: 0; }
.footer-bottom .legal-links a:hover { color: #FFFFFF; }

/* (Footer responsive rules consolidated into main breakpoint section below) */

/* ====== Legal pages ====== */
.legal-page {
  background: var(--bg-alt);
  padding: 88px 0;
}
.legal-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
}
.legal-header {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 48px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.legal-header h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin-bottom: 16px;
}
.last-updated {
  color: var(--primary-3);
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal-header .note {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 12px;
  color: var(--primary-3);
  font-size: 0.96rem;
}
.legal-content {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 48px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.legal-content section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}
.legal-content section:last-child { border-bottom: none; }
.legal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.legal-content h3 {
  font-size: 1.1rem;
  margin: 20px 0 10px;
  color: var(--ink-2);
}
.legal-content p, .legal-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--body);
}
.legal-content ul { padding-left: 22px; margin-top: 10px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--primary); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }
.contact-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}
.contact-box p { margin: 6px 0; }

/* =========================================================
   Mobile navigation — CSS-only hamburger (checkbox pattern)
   ========================================================= */
.nav-toggle { display: none; }
.nav-toggle-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle-btn:hover { background: var(--bg-alt); border-color: var(--ink); }
.nav-toggle-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: absolute;
  left: 12px;
  transition: transform .25s ease, opacity .25s ease, top .25s ease;
}
.nav-toggle-btn span:nth-child(1) { top: 14px; }
.nav-toggle-btn span:nth-child(2) { top: 21px; }
.nav-toggle-btn span:nth-child(3) { top: 28px; }
.nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* =========================================================
   Responsive breakpoints — desktop → small mobile
   ========================================================= */

/* Large desktop & up — small refinements to keep things from looking sparse */
@media (min-width: 1440px) {
  .container { width: min(1280px, calc(100% - 48px)); }
}

/* Tablet landscape */
@media (max-width: 1180px) {
  .container { width: min(100%, calc(100% - 40px)); }
  .hero-grid, .split.wide, .split.narrow { gap: 48px; }
  .section { padding: 96px 0; }
}

/* Tablet */
@media (max-width: 1024px) {
  .cards, .cards.four { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .navlinks { gap: 24px; font-size: 0.9rem; }
  h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
  h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
  .layer { grid-template-columns: 48px 180px 1fr; gap: 18px; padding: 22px 24px; }
}

/* Mobile menu trigger + main mobile layout shifts */
@media (max-width: 880px) {
  /* Show hamburger, hide desktop links */
  .nav-toggle-btn { display: inline-flex; }
  .navlinks {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }
  .navlinks a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
  }
  .navlinks a:last-child { border-bottom: none; }
  .navlinks a.active::after { display: none; }
  .navlinks a.active { color: var(--primary); }
  .nav-toggle:checked ~ .navlinks {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* Reorder so the order in DOM (brand, toggle-input, toggle-button, links, cta) renders well */
  .nav .btn { display: none; }   /* hide desktop CTA — first nav link will be the demo */

  /* Layout collapses */
  .split, .split.wide, .split.narrow,
  .hero-grid, .cta-box { grid-template-columns: 1fr; gap: 40px; }
  .form-grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .section { padding: 80px 0; }
  .hero { padding: 56px 0 72px; }
  .page-hero { padding: 80px 0 64px; }
  .cta { padding: 72px 0; }
  .footer { padding: 64px 0 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Phone landscape / small tablet */
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1.08; }
  h2 { font-size: clamp(1.75rem, 5.5vw, 2.2rem); }
  h3 { font-size: clamp(1.2rem, 3.6vw, 1.45rem); }
  p { font-size: 1rem; }
  .hero .lead { font-size: 1.05rem; }
  .page-hero p { font-size: 1.05rem; }

  /* Cards collapse */
  .cards, .cards.four, .cards.two, .process, .cap-grid { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: 1fr 1fr; padding: 24px; gap: 18px; }
  .trust .stat .num { font-size: 1.7rem; }

  /* Layer rows stack cleanly */
  .layer {
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 18px 18px;
    row-gap: 4px;
  }
  .layer .label { grid-column: 2; font-size: 1rem; }
  .layer p { grid-column: 1 / -1; padding-left: 0; font-size: 0.94rem; }
  .layer:hover { transform: none; }

  /* Feature list */
  .feature-list .row { grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; }

  /* Hero buttons stretch / wrap */
  .hero .actions, .cta .actions { gap: 12px; }
  .hero .actions .btn, .cta .actions .btn { width: 100%; max-width: 320px; }
  .hero .actions, .cta .actions { flex-direction: column; align-items: stretch; }
  .hero .actions a, .cta .actions a { justify-content: center; }

  /* Visual containers tighten */
  .visual-frame { padding: 22px; aspect-ratio: 4/3; }
  /* Hero visual: drop fixed aspect on mobile so the full image is visible (no crop) */
  .hero-visual { aspect-ratio: auto; min-height: 0; }
  .hero-visual--full img { height: auto; object-fit: contain; }
  .image-placeholder .ph-ico { width: 56px; height: 56px; }
  .image-placeholder .ph-label { font-size: 0.9rem; }

  /* Section spacing */
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 56px; }
  .page-hero { padding: 64px 0 48px; }
  .cta { padding: 64px 0; }

  /* Section headings */
  .section-head { margin-bottom: 40px; }

  /* Contact info rows */
  .contact-info .row { grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 16px; }

  /* Legal pages */
  .legal-page { padding: 56px 0; }
  .legal-header, .legal-content, .form-card { padding: 26px; }

  /* Header sizing — keep logo prominently visible */
  .nav { height: 88px; }
  .brand img { height: 64px; }

  /* Footer */
  .footer { padding: 64px 0 28px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
  .footer-brand p { max-width: 100%; }
  .footer-logo { width: 200px; margin-bottom: 14px; }
}

/* Standard mobile */
@media (max-width: 480px) {
  .container { width: min(100%, calc(100% - 32px)); }
  h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  h2 { font-size: clamp(1.55rem, 6vw, 1.95rem); }
  .hero .lead, .page-hero p { font-size: 1rem; line-height: 1.6; }

  /* Hero meta wraps to single column for clarity */
  .hero-meta { gap: 18px; margin-top: 36px; padding-top: 24px; }
  .hero-meta .item .num { font-size: 1.7rem; }

  /* Trust strip 1 column on tiny screens */
  .trust-inner { grid-template-columns: 1fr; text-align: center; }
  .trust .stat .num { font-size: 1.6rem; }

  /* Smaller paddings */
  .card, .product-card { padding: 24px; }
  .legal-header, .legal-content { padding: 22px; border-radius: 18px; }
  .form-card { padding: 22px; border-radius: 18px; }
  .visual-frame { padding: 18px; border-radius: 18px; }
  .feature-list { padding: 6px 18px; }

  /* Header sizing — keep logo readable but fit */
  .nav { height: 80px; }
  .brand img { height: 56px; }
  .nav-toggle-btn { width: 42px; height: 42px; }

  /* Hide active underline on tiny */
  .navlinks { padding: 8px 16px 16px; }
  .navlinks a { padding: 12px 4px; font-size: 0.98rem; }

  /* Process / steps */
  .process .step { padding: 22px; }

  /* CTA */
  .cta-inner { padding: 0 4px; }
  .cta p { font-size: 1rem; }

  /* Footer logo on tiny screens */
  .footer-logo { width: 180px; }
}

/* Small mobile */
@media (max-width: 360px) {
  .container { width: min(100%, calc(100% - 24px)); }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.45rem; }
  .brand img { height: 50px; }
  .nav { height: 74px; }
  .card, .product-card { padding: 20px; }
  .hero { padding: 32px 0 48px; }
  .section { padding: 56px 0; }
}

/* =========================================================
   Accessibility & touch helpers
   ========================================================= */

/* Minimum touch target everywhere */
@media (hover: none) and (pointer: coarse) {
  .btn, .text-link, .card-link, .tour-link, .chip, .navlinks a { min-height: 44px; }
  .nav-toggle-btn { min-height: 44px; min-width: 44px; }
}

/* Honor user reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-visual img { animation: none; }
}

/* iOS safe-area insets — header, footer, hero edges */
@supports (padding: env(safe-area-inset-left)) {
  .container { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

/* Visible focus rings for keyboard users */
.btn:focus-visible,
.text-link:focus-visible,
.card-link:focus-visible,
.navlinks a:focus-visible,
.input:focus-visible,
.textarea:focus-visible,
.nav-toggle-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* =========================================================
   Guide page — Nexus User & Integrator Guide
   Sidebar TOC + main content + code blocks + callouts
   ========================================================= */

.guide-shell {
  background: var(--bg);
  padding: 56px 0 96px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Sticky table of contents */
.guide-toc {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 8px 0;
  font-size: 0.92rem;
}
.guide-toc h4 {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-3);
  margin-bottom: 14px;
}
.guide-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: tocsec;
  display: grid;
  gap: 4px;
}
.guide-toc ol > li {
  counter-increment: tocsec;
  position: relative;
}
.guide-toc ol > li > a {
  display: block;
  padding: 7px 10px 7px 36px;
  border-radius: 8px;
  color: var(--body-2);
  font-weight: 500;
  line-height: 1.35;
  transition: color .2s, background .2s;
  position: relative;
}
.guide-toc ol > li > a::before {
  content: counter(tocsec, decimal-leading-zero);
  position: absolute;
  left: 10px;
  top: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.guide-toc ol > li > a:hover {
  color: var(--ink);
  background: var(--bg-alt);
}
.guide-toc ol ul {
  list-style: none;
  padding: 0 0 4px 36px;
  margin: 0;
  display: grid;
  gap: 2px;
}
.guide-toc ol ul a {
  display: block;
  padding: 5px 10px;
  font-size: 0.85rem;
  color: var(--muted);
  border-radius: 6px;
}
.guide-toc ol ul a:hover { color: var(--primary); background: var(--bg-alt); }

/* Guide content */
.guide-content { min-width: 0; }

.guide-content .chapter {
  scroll-margin-top: 120px;
  padding: 40px 0 16px;
  border-top: 1px solid var(--line);
}
.guide-content .chapter:first-of-type {
  border-top: none;
  padding-top: 8px;
}
.guide-content .chapter-num {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-3);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.guide-content h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.guide-content h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin: 28px 0 14px;
  color: var(--ink);
  scroll-margin-top: 120px;
}
.guide-content h4 {
  font-size: 1.02rem;
  margin: 22px 0 10px;
  color: var(--ink);
}
.guide-content p,
.guide-content li {
  color: var(--body);
  font-size: 1rem;
  line-height: 1.72;
}
.guide-content p + p { margin-top: 14px; }
.guide-content ul, .guide-content ol {
  padding-left: 22px;
  margin: 12px 0;
}
.guide-content li { margin-bottom: 6px; }

.guide-content strong { color: var(--ink); font-weight: 700; }
.guide-content em { font-style: italic; }

/* Inline code */
.guide-content code:not(pre code) {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.88em;
  background: var(--bg-deep);
  color: var(--primary-3);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* Code blocks */
.guide-content pre {
  margin: 18px 0;
  background: #1A1610;
  color: #F4E5DD;
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid #2A2522;
  position: relative;
}
.guide-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: 0;
  white-space: pre;
  display: block;
  font-size: inherit;
}
.guide-content pre .c-prompt { color: var(--accent); user-select: none; }
.guide-content pre .c-comment { color: #78716C; }
.guide-content pre .c-key { color: var(--accent); }
.guide-content pre .c-str { color: #C9A45C; }
.guide-content pre .c-kw { color: #E8A88A; }

/* Code block label tag */
.guide-content pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Callouts (note / tip / caution) */
.callout {
  display: grid;
  /* Tag column sizes to its content so longer labels (e.g. "Caution") stay
     fully visible without overflowing into the body column. */
  grid-template-columns: max-content 1fr;
  gap: 14px 16px;
  align-items: start;
  margin: 22px 0;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.callout .callout-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: #FAF6E8;
  white-space: nowrap;
  width: max-content;
  flex-shrink: 0;
}
.callout p { font-size: 0.96rem; margin: 0; color: var(--body); }
.callout.note .callout-tag { background: var(--ink); color: #FFFFFF; }
.callout.tip {
  background: var(--primary-soft);
  border-color: rgba(204, 120, 92, 0.20);
}
.callout.tip .callout-tag { background: var(--primary); color: #FFFFFF; }
.callout.tip p { color: var(--primary-3); }
.callout.caution {
  background: #FEF3E8;
  border-color: #F4D4B5;
}
.callout.caution .callout-tag { background: #B45309; color: #FFFFFF; }
.callout.caution p { color: #7C2D12; }

/* Tables (capability / config tables) */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 0.94rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.guide-table th, .guide-table td {
  text-align: left;
  padding: 12px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.guide-table thead th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.guide-table tbody tr:last-child td { border-bottom: none; }
.guide-table tbody tr:hover { background: var(--bg-alt); }
.guide-table td:first-child { font-weight: 600; color: var(--ink); width: 32%; }
.guide-table.three-col td:first-child { width: 24%; }
.guide-table.three-col td:nth-child(2) { width: 18%; color: var(--primary-3); font-family: 'SF Mono', Menlo, monospace; font-size: 0.86rem; }

/* Layer card heading */
.layer-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  margin: 22px 0 16px;
  box-shadow: var(--shadow-xs);
}
.layer-card .layer-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-3);
  background: var(--primary-soft);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.layer-card h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  color: var(--ink);
}
.layer-card .layer-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.layer-card .layer-meta code {
  background: var(--bg-deep);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--ink);
  font-size: 0.8rem;
}

/* =========================================================
   Documentation overview page — Nexus Data Intelligence
   ========================================================= */

/* Page-hero with CTA on the right */
.doc-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.doc-hero-text h1 { margin-bottom: 18px; }
.doc-hero-text p { max-width: 640px; }
.doc-hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 4px;
}
.doc-hero-cta .text-link {
  color: var(--body-2);
  border-bottom: none;
  font-size: 0.92rem;
}
.doc-hero-cta .text-link:hover { color: var(--primary); }

/* Doc body container — slightly narrower than full page for legibility */
.doc-container {
  max-width: 980px;
  margin: 0 auto;
}

.doc-prose {
  display: grid;
  gap: 8px;
}
.doc-section {
  padding: 36px 0 16px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 120px;
}
.doc-section:first-of-type {
  border-top: none;
  padding-top: 8px;
}
.doc-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.doc-section h3 {
  font-size: 1.25rem;
  margin: 0 0 12px;
  scroll-margin-top: 120px;
}
.doc-section h4 {
  font-size: 1rem;
  margin: 18px 0 10px;
  color: var(--ink);
}
.doc-section p {
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--body);
  margin: 0 0 14px;
}
.doc-section ul {
  padding-left: 22px;
  margin: 10px 0 18px;
}
.doc-section li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 8px;
}
.doc-section strong { color: var(--ink); font-weight: 700; }

/* Highlight cards under Overview */
.doc-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.doc-highlight {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-xs);
}
.doc-highlight h4 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.doc-highlight p {
  font-size: 0.94rem;
  color: var(--body-2);
  margin: 0;
}
.doc-highlight::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  margin-bottom: 14px;
}

/* Architecture image — bare display on cream-tinted backdrop */
.doc-architecture {
  margin: 24px 0 8px;
  padding: 0;
  text-align: center;
}
.doc-architecture img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 760px;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(231, 229, 228, 0.5),
    0 20px 50px -24px rgba(204, 120, 92, 0.16),
    0 8px 22px -10px rgba(26, 26, 26, 0.05);
}
.doc-architecture figcaption {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 14px;
  font-style: italic;
}

/* Component cards (per layer) */
.comp-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
  margin: 18px 0;
  box-shadow: var(--shadow-xs);
}
.comp-card .comp-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-3);
  background: var(--primary-soft);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.comp-card.comp-card--accent {
  background: linear-gradient(180deg, var(--paper) 0%, var(--bg-alt) 100%);
  border-color: rgba(204, 120, 92, 0.25);
}
.comp-card .comp-tag--accent {
  background: var(--ink);
  color: #FAF6E8;
}

/* Compliance chips */
.compliance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.compliance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--body-2);
}
.compliance-chip strong { color: var(--primary-3); margin-right: 4px; }

/* Responsive */
@media (max-width: 880px) {
  .doc-hero-grid { grid-template-columns: 1fr; align-items: start; }
  .doc-hero-cta { align-items: flex-start; padding-bottom: 0; }
  .doc-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .doc-section { padding: 26px 0 12px; }
  .comp-card { padding: 22px; }
  .doc-architecture img { border-radius: 10px; }
}

/* Closing sign-off block (replaces the long-tag callout for the last chapter) */
.guide-signoff {
  margin: 28px 0 8px;
  padding: 28px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #FAF6E8 100%);
  border: 1px solid rgba(204, 120, 92, 0.18);
  text-align: center;
}
.guide-signoff .signoff-headline {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
}
.guide-signoff .signoff-headline em {
  font-style: normal;
  color: var(--primary);
}
.guide-signoff .signoff-meta {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--body-2);
}
.guide-signoff .signoff-meta a {
  color: var(--primary);
  font-weight: 600;
}
.guide-signoff .signoff-meta a:hover { text-decoration: underline; }

/* Hero badges row */
.guide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.guide-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--body);
  font-weight: 600;
}
.guide-badges .badge.accent {
  background: var(--primary-soft);
  border-color: rgba(204, 120, 92, 0.20);
  color: var(--primary-3);
}

/* Responsive */
@media (max-width: 1024px) {
  .guide-layout { grid-template-columns: 200px 1fr; gap: 36px; }
  .guide-toc { font-size: 0.88rem; }
}
@media (max-width: 880px) {
  .guide-layout { grid-template-columns: 1fr; gap: 24px; }
  .guide-toc {
    position: static;
    max-height: none;
    padding: 18px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 8px;
  }
}
@media (max-width: 720px) {
  .guide-shell { padding: 32px 0 64px; }
  .guide-content .chapter { padding: 28px 0 12px; }
  .guide-content pre { font-size: 0.78rem; padding: 14px 16px; }
  .guide-table { font-size: 0.86rem; }
  .guide-table th, .guide-table td { padding: 10px 12px; }
  .callout { grid-template-columns: 1fr; gap: 10px; }
  .callout .callout-tag { justify-self: start; }
}
