/* ============================================================
   ins-pi Core CSS
   Typography, layout, utilities, components
   ============================================================ */

@import url('tokens.css');

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
body.nav-open { overflow: hidden; }

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   Typography
   ============================================================ */

.display-xl, .display-l, h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

.display-xl {
  font-size: clamp(48px, 8vw, var(--fs-display-xl));
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display-xl);
}
.display-l {
  font-size: clamp(40px, 6vw, var(--fs-display-l));
  line-height: var(--lh-display-l);
  letter-spacing: var(--tr-display-l);
}
h1 {
  font-size: clamp(32px, 4.5vw, var(--fs-h1));
  line-height: var(--lh-h1);
  letter-spacing: var(--tr-h1);
}
h2 {
  font-size: clamp(26px, 3.5vw, var(--fs-h2));
  line-height: var(--lh-h2);
  letter-spacing: var(--tr-h2);
}
h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}
h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 600;
}

p { margin: 0 0 var(--sp-4); }
.body-l { font-size: var(--fs-body-l); line-height: var(--lh-body); }
.body-s { font-size: var(--fs-body-s); line-height: var(--lh-body); }
.caption {
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--fg-muted);
  letter-spacing: 0.01em;
}
.eyebrow {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 1;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
[data-theme="dark"] .mono { background: var(--gray-800); }

/* Reading column */
.prose {
  max-width: var(--container-reading);
}
.prose p { font-size: var(--fs-body-l); color: var(--fg); }
.prose p + p { margin-top: var(--sp-4); }

/* ============================================================
   Layout
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--sp-8); }
}

.section {
  padding: var(--sp-20) 0;
}
@media (min-width: 768px) {
  .section { padding: var(--sp-24) 0; }
}
.section-sm { padding: var(--sp-12) 0; }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-5 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}

.flex { display: flex; gap: var(--sp-4); }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }

/* ============================================================
   Monochrome corporate band (hero, about, CTAs)
   ============================================================ */

.band-corporate {
  background: var(--bg-corporate);
  color: var(--fg-corporate);
  position: relative;
  overflow: hidden;
}
.band-corporate .eyebrow,
.band-corporate .caption { color: var(--gray-400); }
.band-corporate a:hover { opacity: 0.75; }

/* Ambient mesh gradient — signature green tint */
.band-corporate::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 201, 80, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 201, 80, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(0, 201, 80, 0.06) 0%, transparent 60%);
  filter: blur(40px);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
  animation: mesh-drift 20s ease-in-out infinite;
}
.band-corporate > * { position: relative; z-index: 1; }

@keyframes mesh-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(3%, -2%) rotate(1deg); }
  66% { transform: translate(-2%, 3%) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .band-corporate::before { animation: none; }
}

/* Gradient headline — animated, WCAG compliant (min contrast 4.5:1 even at darkest stop).
   padding-bottom reserves space for descenders so -webkit-background-clip doesn't clip them. */
.headline-gradient {
  background: linear-gradient(
    120deg,
    var(--ins-white) 0%,
    var(--ins-white) 40%,
    #8fe8b0 55%,
    var(--ins-white) 70%,
    var(--ins-white) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-slide 8s ease-in-out infinite;
  padding-bottom: 0.12em;
  display: inline-block;
  line-height: 1.12;
}
@keyframes gradient-slide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .headline-gradient {
    animation: none;
    background-position: 0% 50%;
  }
}

/* Theme-aware headline gradient used on LIGHT sections of the page
   (band-light, bg). In dark mode it flips automatically to remain readable. */
.headline-gradient-light {
  background: linear-gradient(
    120deg,
    var(--ins-near-black) 0%,
    var(--ins-near-black) 40%,
    #008936 55%,
    var(--ins-near-black) 70%,
    var(--ins-near-black) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-slide 8s ease-in-out infinite;
  padding-bottom: 0.12em;
  display: inline-block;
  line-height: 1.12;
}
[data-theme="dark"] .headline-gradient-light {
  background: linear-gradient(
    120deg,
    var(--ins-white) 0%,
    var(--ins-white) 40%,
    #8fe8b0 55%,
    var(--ins-white) 70%,
    var(--ins-white) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Accent text underline with animated reveal */
.underline-accent {
  background-image: linear-gradient(to right, var(--md-500), var(--md-500));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: 0 100%;
  padding-bottom: 4px;
  display: inline;
}

/* Signature pulse — uses Models green */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--md-500);
  box-shadow: 0 0 0 0 rgba(0, 201, 80, 0.5);
  animation: pulse-glow 2.4s ease-in-out infinite;
  margin-right: var(--sp-2);
  flex-shrink: 0;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 201, 80, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(0, 201, 80, 0); }
}

.band-light {
  background: var(--bg-elevated);
  color: var(--fg);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  font-size: var(--fs-body);
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out);
  min-height: 48px;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--ins-near-black);
  color: var(--ins-white);
}
.btn-primary:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-primary {
  background: var(--ins-white);
  color: var(--ins-near-black);
}
[data-theme="dark"] .btn-primary:hover { background: var(--gray-200); }

.band-corporate .btn-primary {
  background: var(--ins-white);
  color: var(--ins-near-black);
}
.band-corporate .btn-primary:hover { background: var(--gray-200); }

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--fg);
  background: var(--gray-100);
}
[data-theme="dark"] .btn-secondary:hover { background: var(--gray-800); }

.band-corporate .btn-secondary {
  color: var(--ins-white);
  border-color: var(--gray-600);
}
.band-corporate .btn-secondary:hover {
  border-color: var(--ins-white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-product {
  color: var(--ins-white);
}
.btn-product:hover { transform: translateY(-1px); filter: brightness(1.1); }

.btn-docs {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.btn-docs svg { flex-shrink: 0; }

/* Brand primary CTA — ins-pi signature green.
   Light mode: #008936 bg + white text (4.6:1 WCAG AA).
   Dark mode: #00C950 bg + near-black text (11:1 WCAG AAA). */
.btn-brand {
  background: #008936;
  color: var(--ins-white);
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(0,137,54,0.2), 0 4px 12px rgba(0,137,54,0.15);
  font-weight: 600;
}
.btn-brand:hover {
  background: #006c2a;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,137,54,0.25), 0 8px 20px rgba(0,137,54,0.25);
}
.btn-brand:active { transform: translateY(0); }
[data-theme="dark"] .btn-brand {
  background: #00C950;
  color: var(--ins-near-black);
  box-shadow: 0 0 0 1px rgba(0,201,80,0.3), 0 4px 16px rgba(0,201,80,0.3);
}
[data-theme="dark"] .btn-brand:hover {
  background: #2AD36D;
  box-shadow: 0 0 0 1px rgba(0,201,80,0.5), 0 6px 22px rgba(0,201,80,0.4);
}

/* ---- Product-colored brand CTA ----
   On product pages the body gets .accent-fl / -bp / -md / -pr / -cd,
   which sets --accent. Override .btn-brand to use the product color. */
body[class*="accent-"] .btn-brand {
  background: var(--accent);
  color: var(--ins-white);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent),
    0 6px 18px color-mix(in srgb, var(--accent) 25%, transparent);
}
body[class*="accent-"] .btn-brand:hover {
  background: var(--accent);
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px color-mix(in srgb, var(--accent) 35%, transparent),
    0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
/* Dark-mode accent is the brighter 500-level; flip text to near-black for AA. */
[data-theme="dark"] body[class*="accent-"] .btn-brand { color: var(--ins-near-black); }
[data-theme="dark"] body[class*="accent-"] .btn-brand:hover { filter: brightness(1.15); }

/* Theme toggle — icon-only, sun in light mode, moon in dark */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  border: none;
}
.theme-toggle:hover {
  color: var(--fg);
  background: var(--gray-100);
}
.theme-toggle:active { transform: scale(0.92); }
[data-theme="dark"] .theme-toggle:hover { background: var(--gray-800); }
.theme-toggle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.theme-toggle .t-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .t-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .t-sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .t-moon { opacity: 1; transform: rotate(0deg) scale(1); }

.btn-arrow::after {
  content: '→';
  transition: transform var(--dur-fast) var(--ease-out);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ============================================================
   Product accent utilities
   ============================================================ */

.accent-fl { --accent: var(--fl-accent); --accent-500: var(--fl-500); --accent-100: var(--fl-100); --accent-900: var(--fl-900); }
.accent-bp { --accent: var(--bp-accent); --accent-500: var(--bp-500); --accent-100: var(--bp-100); --accent-900: var(--bp-900); }
.accent-md { --accent: var(--md-accent); --accent-500: var(--md-500); --accent-100: var(--md-100); --accent-900: var(--md-900); }
.accent-pr { --accent: var(--pr-accent); --accent-500: var(--pr-500); --accent-100: var(--pr-100); --accent-900: var(--pr-900); }
.accent-cd { --accent: var(--cd-accent); --accent-500: var(--cd-500); --accent-100: var(--cd-100); --accent-900: var(--cd-900); }

.text-accent { color: var(--accent); }
.bg-accent { background: var(--accent); color: #fff; }
.border-accent { border-color: var(--accent); }

/* In dark mode, the product accent becomes the brighter 500-level which
   drops contrast with white text below WCAG AA. Flip to dark text. */
[data-theme="dark"] .bg-accent,
[data-theme="dark"] .btn-product { color: var(--ins-near-black); }

/* ============================================================
   Product cards
   ============================================================ */

.product-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.product-card-visual {
  aspect-ratio: 16 / 10;
  background: var(--ins-near-black);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.product-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  flex: 1;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.product-card:hover::before { transform: scaleX(1); }

.product-card .product-mark {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: block;
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.product-card .tagline {
  font-size: var(--fs-body);
  color: var(--fg-muted);
}

/* ============================================================
   Navigation
   ============================================================ */

[data-component="nav"] { display: contents; }
[data-component="footer"] { display: contents; }

/* ============================================================
   Announcement bar — above the nav, dismissible, rotating
   ============================================================ */
.announcement-bar {
  background: var(--ins-near-black);
  color: var(--ins-white);
  border-bottom: 1px solid rgba(0, 201, 80, 0.25);
  position: relative;
  overflow: hidden;
  max-height: 200px;
  transition: max-height var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
}
.announcement-bar.is-dismissed {
  max-height: 0;
  opacity: 0;
  border-bottom-width: 0;
}
.announcement-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 201, 80, 0.05) 50%, transparent 100%);
  pointer-events: none;
}
.announcement-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 10px var(--sp-6);
  min-height: 44px;
}
@media (min-width: 768px) {
  .announcement-bar-inner { padding: 10px var(--sp-8); }
}

.announcement-track {
  flex: 1;
  position: relative;
  min-height: 24px;
  overflow: hidden;
}
.announcement-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  font-size: var(--fs-body-s);
  color: var(--gray-300);
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  pointer-events: none;
}
.announcement-item.is-active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}
.announcement-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--md-500);
  color: var(--ins-near-black);
  white-space: nowrap;
  flex-shrink: 0;
}
.announcement-msg {
  color: var(--ins-white);
  font-weight: 500;
  flex: 1 1 auto;
  min-width: 0;
}
.announcement-cta {
  color: var(--md-500);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.announcement-cta:hover { border-bottom-color: var(--md-500); }
.announcement-cta span { transition: transform var(--dur-fast) var(--ease-out); display: inline-block; }
.announcement-cta:hover span { transform: translateX(3px); }

.announcement-nav {
  width: 24px;
  height: 24px;
  color: var(--gray-500);
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.announcement-nav:hover { color: var(--ins-white); background: rgba(255,255,255,0.08); }

.announcement-close {
  width: 28px;
  height: 28px;
  color: var(--gray-400);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
  margin-left: var(--sp-2);
}
.announcement-close:hover { color: var(--ins-white); background: rgba(255,255,255,0.1); }

@media (max-width: 640px) {
  .announcement-msg { font-size: 13px; }
  .announcement-cta { font-size: 13px; }
  .announcement-nav { display: none !important; }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav.is-scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
[data-theme="dark"] .nav { background: rgba(23, 23, 23, 0.85); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--sp-8);
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  color: var(--fg);
}
.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}
[data-theme="dark"] .nav-logo-img { filter: invert(1); }

.product-icon-sm {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--sp-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 1080px) {
  .nav-links { display: flex; }
}
.nav-links a {
  font-size: var(--fs-body-s);
  font-weight: 500;
  color: var(--fg-muted);
  padding: 8px 14px;
  border-radius: 8px;
  position: relative;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--md-accent) 10%, transparent);
}
.nav-links a[aria-current="page"] {
  color: var(--fg);
  background: color-mix(in srgb, var(--md-accent) 8%, transparent);
}
.nav-links a.nav-link-accent {
  color: var(--md-accent);
  font-weight: 600;
}
.nav-links a.nav-link-accent:hover {
  color: var(--md-accent);
  background: color-mix(in srgb, var(--md-accent) 14%, transparent);
}
[data-theme="dark"] .nav-links a.nav-link-accent:hover {
  color: #2AD36D;
}
.nav-links a.nav-link-accent sup { font-size: 0.6em; margin-left: 2px; opacity: 0.8; }

.nav-cta {
  display: none;
  align-items: center;
  gap: var(--sp-3);
}
@media (min-width: 1080px) {
  .nav-cta { display: flex; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--fg);
}
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
}
.nav-toggle svg { width: 24px; height: 24px; }

.nav-mobile {
  display: none;
  position: fixed;
  top: 72px;
  left: 0; right: 0; bottom: 0;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 49;
  overscroll-behavior: contain;
}
.nav-mobile.open { display: flex; }

.nav-mobile-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.nav-mobile-hero {
  padding: var(--sp-4) var(--sp-5);
  background: linear-gradient(135deg, rgba(0,201,80,0.08), transparent);
  border: 1px solid rgba(0,201,80,0.2);
  border-radius: var(--radius-md);
}
.nav-mobile-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body-l);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-2);
}
.nav-mobile-hero-link {
  font-size: var(--fs-body-s);
  font-weight: 600;
  color: var(--md-accent);
}
.nav-mobile-hero-link span {
  transition: transform var(--dur-fast) var(--ease-out);
  display: inline-block;
}
.nav-mobile-hero-link:active span { transform: translateX(3px); }

.nav-mobile-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-mobile-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  margin: 0 0 var(--sp-3);
  padding: 0 var(--sp-2);
}

.nav-mobile-product {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--fg);
  min-height: 56px;
  transition: background var(--dur-fast) var(--ease-out);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
}
.nav-mobile-product:active,
.nav-mobile-product:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elevated));
}
.nav-mobile-product img {
  width: 44px; height: 44px;
  border-radius: 8px;
}
.nav-mobile-product div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.np-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.np-tag {
  font-size: var(--fs-caption);
  color: var(--fg-muted);
  line-height: 1.4;
}
.np-ai {
  background: var(--cd-accent);
  color: var(--ins-white);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.1em;
}
[data-theme="dark"] .np-ai { color: var(--ins-near-black); }

.nav-mobile-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-weight: 600;
  font-size: var(--fs-body);
  min-height: 48px;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-mobile-link:active,
.nav-mobile-link:hover { background: color-mix(in srgb, var(--md-accent) 10%, var(--bg-elevated)); }
.np-sub {
  font-size: var(--fs-caption);
  color: var(--fg-muted);
  font-weight: 400;
}

.nav-mobile-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.nav-mobile-ctas .btn { justify-content: center; min-height: 52px; font-size: var(--fs-body-l); }

/* Dropdown (Suite menu, Resources menu) */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;             /* sit flush against the label */
  left: 0;
  min-width: 320px;
  margin-top: 8px;       /* visual gap preserved via margin */
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--dur-fast) var(--ease-out);
}
/* Invisible hover bridge — fills the 8px gap so the mouse can cross
   from the label to the menu without losing hover state (no flicker). */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Slight close delay so small mouse overshoots don't close the menu. */
.nav-dropdown:not(:hover):not(:focus-within) .nav-dropdown-menu {
  transition-delay: 100ms;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--fg);
}
.nav-dropdown-menu a:hover { background: color-mix(in srgb, var(--md-accent) 10%, var(--bg-elevated)); }
[data-theme="dark"] .nav-dropdown-menu a:hover { background: color-mix(in srgb, var(--md-accent) 14%, var(--bg-elevated)); }
.nav-dropdown-menu .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0;
}
.nav-dropdown-menu .product-name { font-weight: 600; font-size: var(--fs-body); }
.nav-dropdown-menu .product-tag { font-size: var(--fs-caption); color: var(--fg-muted); }

.nav-dropdown-menu { min-width: 400px; }
.nav-dropdown-header {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-4) !important;
  background: linear-gradient(135deg, rgba(0,201,80,0.06), transparent);
  border: 1px solid rgba(0,201,80,0.15) !important;
  margin-bottom: var(--sp-2);
}
.nav-dropdown-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.nav-dropdown-sub {
  font-size: var(--fs-caption);
  color: var(--fg-muted);
  line-height: 1.5;
  margin-top: 2px;
}
.nav-dropdown-cta {
  color: var(--md-accent);
  font-weight: 600;
  font-size: var(--fs-caption);
  margin-top: var(--sp-2);
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-2) 0;
}

/* ============================================================
   Hero layout
   ============================================================ */
.hero-corporate {
  padding: 96px 0 120px;
  min-height: 72vh;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: var(--sp-16); }
}
.hero-visual {
  aspect-ratio: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.hero-visual svg { width: 100%; height: 100%; }

/* Hero animation — layered enterprise architecture being designed */
.build-layer {
  opacity: 0;
  transform: translateY(20px);
  animation: build-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.3s + var(--i) * 0.45s);
}
@keyframes build-in {
  to { opacity: 1; transform: translateY(0); }
}
.build-edge {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: edge-draw 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.8s + var(--i) * 0.08s);
}
@keyframes edge-draw {
  to { stroke-dashoffset: 0; }
}
.hero-particle { opacity: 0.85; filter: drop-shadow(0 0 6px rgba(0,201,80,0.6)); }

.hero-pulse-core {
  transform-origin: center;
  transform-box: fill-box;
  animation: hero-core 2.4s ease-in-out infinite;
}
@keyframes hero-core {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(2.4); opacity: 0.3; }
}

.os-ring {
  transform-origin: 320px 250px;
  animation: os-ring-rotate 20s linear infinite;
}
@keyframes os-ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dq-ring {
  transform-origin: 320px 250px;
  animation: dq-rotate 30s linear infinite reverse;
}
@keyframes dq-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.design-cursor {
  opacity: 0;
  animation: cursor-appear 0.4s ease-out forwards, cursor-move 8s ease-in-out infinite 3s;
  animation-delay: 2.8s, 3s;
}
.design-cursor circle {
  transform-origin: center;
  transform-box: fill-box;
  animation: cursor-pulse 1.6s ease-in-out infinite;
}
@keyframes cursor-appear {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes cursor-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes cursor-move {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(95px, 0); }
  50% { transform: translate(190px, 0); }
  75% { transform: translate(95px, 90px); }
}

/* SVG hero product cards — clickable, with hover feedback */
.hero-product-link {
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
  display: block;
  outline: none;
}
.hero-product-link rect {
  transition: filter var(--dur-fast) var(--ease-out), stroke-width var(--dur-fast) var(--ease-out);
}
.hero-product-link:hover rect {
  filter: brightness(1.3) drop-shadow(0 0 10px currentColor);
  stroke-width: 2.2;
}
.hero-product-link:focus-visible rect {
  stroke-width: 2.4;
  filter: drop-shadow(0 0 8px currentColor);
}
.hero-product-link image,
.hero-product-link text {
  transition: transform var(--dur-fast) var(--ease-out);
}

/* Command AI differentiator — glow + floating badge */
.cmd-ai-glow {
  filter: drop-shadow(0 0 6px rgba(154, 99, 255, 0.4));
  animation: cmd-ai-pulse 2.8s ease-in-out infinite;
}
@keyframes cmd-ai-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(154, 99, 255, 0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(154, 99, 255, 0.7)); }
}
.cmd-ai-badge {
  animation: ai-badge-float 3s ease-in-out infinite;
  transform-origin: 544px 402px;
  transform-box: fill-box;
}
@keyframes ai-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.ai-beam {
  stroke-dasharray: 5 3;
  animation: ai-beam-flow 2s linear infinite;
}
@keyframes ai-beam-flow {
  to { stroke-dashoffset: -16; }
}

@media (prefers-reduced-motion: reduce) {
  .build-layer { opacity: 1; transform: none; animation: none; }
  .build-edge { stroke-dashoffset: 0; animation: none; }
  .hero-particle, .design-cursor { display: none; }
  .cmd-ai-glow, .cmd-ai-badge, .ai-beam { animation: none !important; }
}

/* ============================================================
   AI tiers section
   ============================================================ */
.ai-tiers { gap: var(--sp-4); }
.ai-tier {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-8);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-md);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.ai-tier:hover { transform: translateY(-4px); border-color: var(--md-accent); }
.ai-tier.featured {
  background: linear-gradient(180deg, rgba(0,201,80,0.1), rgba(255,255,255,0.02));
  border-color: var(--md-accent);
}
.ai-tier-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.ai-tier-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--md-500);
  letter-spacing: -0.02em;
  opacity: 0.75;
}
.ai-tier h3 {
  color: var(--ins-white);
  font-size: var(--fs-h3);
  margin: 0;
}
.ai-tier-tag {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--md-500);
  margin: 0 0 var(--sp-2);
}
.ai-tier .text-muted { color: var(--gray-400); }
.ai-tier-products {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-4);
}
.ai-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gray-700);
  border-left: 3px solid var(--accent);
  border-radius: 999px;
  font-size: var(--fs-caption);
  color: var(--ins-white);
  font-weight: 500;
}
.ai-tier-chip img {
  width: 20px; height: 20px;
  border-radius: 4px;
}

.ai-principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--gray-700);
}
@media (min-width: 768px) {
  .ai-principles { grid-template-columns: repeat(3, 1fr); }
}
.ai-principle {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.ai-principle strong {
  color: var(--md-500);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body-l);
}
.ai-principle span { color: var(--gray-400); font-size: var(--fs-body-s); }

/* ============================================================
   Customer logo marquee
   ============================================================ */
.logo-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logo-marquee-track {
  display: flex;
  gap: var(--sp-16);
  width: max-content;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.logo-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--fg-muted);
  opacity: 0.7;
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.7;
  filter: grayscale(1);
  transition: opacity var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.logo-img:hover { opacity: 1; filter: grayscale(0); }
[data-theme="dark"] .logo-img { filter: grayscale(1) invert(1) brightness(1.1); opacity: 0.8; }
.logo-marquee:hover .logo-marquee-track { animation-play-state: paused; }
.logo-mark:hover { opacity: 1; color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track { animation: none; }
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--ins-near-black);
  color: var(--ins-white);
  padding: var(--sp-20) 0 var(--sp-8);
}
.footer a { color: var(--gray-300); }
.footer a:hover { color: var(--ins-white); }
.footer-grid {
  display: grid;
  gap: var(--sp-12);
  grid-template-columns: 1fr;
  padding-bottom: var(--sp-16);
  border-bottom: 1px solid var(--gray-700);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
}
.footer h4 {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: var(--sp-4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer ul a { font-size: var(--fs-body-s); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-6);
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.footer-bottom .caption { color: var(--gray-500); }
.footer-copy { flex: 1 1 auto; }
.footer-legal {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.footer-legal a {
  font-size: var(--fs-caption);
  color: var(--gray-400);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.footer-legal a:hover {
  color: var(--ins-white);
  background: rgba(255,255,255,0.05);
}
.footer-sep { color: var(--gray-700); font-size: 12px; }

/* Footer social — icon buttons in a nicer pill row */
.footer-social {
  display: inline-flex;
  gap: var(--sp-2);
  align-items: center;
}
.footer-social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--gray-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.footer-social-btn:hover {
  background: var(--md-500);
  color: var(--ins-near-black);
  border-color: var(--md-500);
  transform: translateY(-2px);
}

/* ============================================================
   Animations
   ============================================================ */

.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Product card SVG visual animations
   ============================================================ */

/* Freelucy — drag-drop relationship */
.fl-line {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: fl-draw 3s ease-in-out infinite;
}
@keyframes fl-draw {
  0%, 15% { stroke-dashoffset: 140; }
  45%, 65% { stroke-dashoffset: 0; }
  95%, 100% { stroke-dashoffset: 140; }
}
.fl-cursor {
  animation: fl-cursor 3s ease-in-out infinite;
}
@keyframes fl-cursor {
  0%, 10% { transform: translate(-50px, -25px); opacity: 0; }
  15% { opacity: 1; }
  45%, 55% { transform: translate(30px, 25px); opacity: 1; }
  70%, 100% { transform: translate(30px, 25px); opacity: 0; }
}
.fl-node { transition: transform 300ms ease; }

/* Blueprints — bar filling + alert pulse */
.bp-bar {
  transform-origin: left center;
  animation: bp-fill 4s ease-in-out infinite;
}
@keyframes bp-fill {
  0%, 10% { transform: scaleX(0); }
  40%, 60% { transform: scaleX(1); }
  90%, 100% { transform: scaleX(0); }
}
.bp-alert {
  animation: bp-blink 1.5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes bp-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Models — live graph */
.md-center {
  animation: md-breathe 2.5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes md-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0, 201, 80, 0)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(0, 201, 80, 0.6)); }
}
.md-link {
  stroke-dasharray: 4 4;
  animation: md-flow 6s linear infinite;
}
@keyframes md-flow {
  to { stroke-dashoffset: -40; }
}
.md-pulse {
  animation: md-pulse 1.5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes md-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Command — bars animate in */
.cd-bar {
  animation: cd-grow 4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes cd-grow {
  0%, 10% { transform: scaleY(0); }
  30%, 70% { transform: scaleY(1); }
  90%, 100% { transform: scaleY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fl-line, .fl-cursor, .bp-bar, .bp-alert, .md-center, .md-link, .md-pulse, .cd-bar,
  .pr-token { animation: none !important; }
  .fl-line { stroke-dashoffset: 0; }
  .bp-bar { transform: scaleX(1); }
  .cd-bar { transform: scaleY(1); }
}

/* ============================================================
   Misc utilities
   ============================================================ */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.text-muted { color: var(--fg-muted); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); } .mt-12 { margin-top: var(--sp-12); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); } .mb-8 { margin-bottom: var(--sp-8); } .mb-12 { margin-bottom: var(--sp-12); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--fg-muted);
}
.chip-dark {
  border-color: var(--gray-700);
  color: var(--gray-300);
}
.sn-badge {
  height: 52px;
  width: auto;
  display: block;
}

/* ============================================================
   Get-it CTA dropdown — single primary button with options menu.
   Used on product pages (Blueprints, Models, Command, Processes).
   ============================================================ */
.cta-group {
  position: relative;
  display: inline-block;
  z-index: 20;
}
.cta-group.is-open { z-index: 100; }
.cta-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font: inherit;
}
.cta-group-trigger * { pointer-events: none; }
.cta-group-trigger .chev {
  transition: transform var(--dur-fast) var(--ease-out);
  display: inline-block;
  margin-left: 2px;
}

.cta-group-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  flex-direction: column;
  gap: 2px;
  z-index: 101;
  display: none;
}
.cta-group.is-open .cta-group-menu {
  display: flex;
  animation: cta-menu-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes cta-menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cta-group.is-open .cta-group-trigger .chev { transform: rotate(180deg); }
.cta-option {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--fg);
  transition: background var(--dur-fast) var(--ease-out);
}
.cta-option:hover,
.cta-option:focus-visible {
  background: color-mix(in srgb, var(--accent, var(--md-accent)) 8%, var(--bg-elevated));
  outline: none;
}
.cta-option .cta-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent, var(--md-accent)) 12%, transparent);
  color: var(--accent, var(--md-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cta-option .cta-icon svg { width: 18px; height: 18px; }
.cta-option .cta-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cta-option strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
}
.cta-option .cta-sub {
  font-size: var(--fs-caption);
  color: var(--fg-muted);
  line-height: 1.4;
}
.cta-option .cta-arrow {
  color: var(--accent, var(--md-accent));
  font-weight: 700;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.cta-option:hover .cta-arrow,
.cta-option:focus-visible .cta-arrow { opacity: 1; transform: translateX(2px); }

@media (max-width: 640px) {
  .cta-group-menu { min-width: 280px; left: 0; right: 0; }
}

/* Nav contact hub — menu right-aligned under the trigger */
.contact-hub { z-index: 60; }
.contact-hub .cta-group-menu {
  left: auto;
  right: 0;
  min-width: 360px;
}
.contact-hub.is-open { z-index: 200; }
.contact-hub .cta-group-menu { z-index: 201; }

/* ============================================================
   Freelucy interactive demo (in-page, non-gated)
   ============================================================ */
#freelucy-demo {
  --fd-card: #0a1612;
  --fd-grid: rgba(0,187,167,0.15);
  --fd-label-bg: #0a1612;
  --fd-label-fg: #EEEEEE;
  --fd-icon-fg: #0a1612;
  background: #050a08;
  border: 1px solid rgba(0,187,167,0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,187,167,0.1);
}
.fd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: #071a16;
  border-bottom: 1px solid rgba(0,187,167,0.18);
  flex-wrap: wrap;
}
.fd-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: #8CE9B1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}
.fd-status .live-dot { background: #00BBA7; }
.fd-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #88E3DA;
  letter-spacing: 0.08em;
}
.fd-counter span { color: #EEEEEE; font-weight: 700; }
.fd-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  background: transparent;
  color: #88E3DA;
  border: 1px solid rgba(0,187,167,0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.fd-btn:hover { background: #00BBA7; color: #0a1612; }

.fd-canvas-wrap {
  position: relative;
  padding: var(--sp-4);
}
.fd-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 7/5;
  border-radius: var(--radius-md);
  touch-action: none;
}
.fd-canvas.fd-is-dragging { cursor: crosshair; }
.fd-node { cursor: default; }
.fd-node-card { transition: filter var(--dur-fast) var(--ease-out); }
.fd-node:hover .fd-node-card { filter: brightness(1.4); }
.fd-port {
  cursor: crosshair;
  transition: filter var(--dur-fast) var(--ease-out);
}
.fd-port:hover { filter: drop-shadow(0 0 6px #00BBA7); }
.fd-edge { opacity: 0.85; }

.fd-hint {
  position: absolute;
  left: var(--sp-6); bottom: var(--sp-6);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #88E3DA;
  letter-spacing: 0.04em;
  background: rgba(7, 26, 22, 0.85);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0,187,167,0.2);
  pointer-events: none;
}
.fd-hint strong { color: #EEEEEE; font-weight: 600; }
.fd-hint-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00BBA7;
  vertical-align: middle;
  margin: 0 6px;
  box-shadow: 0 0 0 3px rgba(0,187,167,0.25);
  animation: fd-port-pulse 2s ease-in-out infinite;
}
@keyframes fd-port-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,187,167,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(0,187,167,0.02); }
}

.fd-toast {
  position: absolute;
  top: var(--sp-6); left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 8px 14px;
  background: rgba(0,187,167,0.95);
  color: #0a1612;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.fd-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fd-hint-dot { animation: none; }
}

/* ============================================================
   Product demo wrapper (reusable across all product pages)
   ============================================================ */
.product-demo-section { padding: var(--sp-16) 0; }
.product-demo-head { max-width: 760px; margin-bottom: var(--sp-8); }
.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.demo-chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   Placeholder component — labeled slots for missing imagery.
   Use anywhere a real screenshot/GIF/photo will go later.
   ============================================================ */
.placeholder-slot {
  position: relative;
  background: repeating-linear-gradient(
    135deg,
    var(--bg-elevated),
    var(--bg-elevated) 12px,
    var(--bg) 12px,
    var(--bg) 24px
  );
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-8);
  min-height: 240px;
  color: var(--fg-muted);
  gap: var(--sp-2);
  overflow: hidden;
}
.placeholder-slot[data-aspect="16/9"] { aspect-ratio: 16/9; min-height: 0; }
.placeholder-slot[data-aspect="4/3"] { aspect-ratio: 4/3; min-height: 0; }
.placeholder-slot[data-aspect="1/1"] { aspect-ratio: 1/1; min-height: 0; }
.placeholder-slot::before {
  content: attr(data-type);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--md-accent);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--md-accent);
}
.placeholder-slot .ph-desc {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-body-s);
  color: var(--fg);
  max-width: 320px;
}
.placeholder-slot .ph-hint {
  font-size: var(--fs-caption);
  color: var(--fg-subtle);
  font-style: italic;
}

/* By role strip (home page) */
.by-role-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 640px) {
  .by-role-strip { grid-template-columns: repeat(3, 1fr); }
}
.by-role-card {
  padding: var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--fg);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.by-role-card:hover {
  transform: translateY(-2px);
  border-color: var(--md-accent);
}
.by-role-card strong {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  letter-spacing: -0.01em;
}
.by-role-card span { color: var(--fg-muted); font-size: var(--fs-body-s); }
.by-role-card .arrow { color: var(--md-accent); font-weight: 700; margin-top: var(--sp-2); font-size: var(--fs-body-s); }

/* "What it does in 3 lines" — product page quick summary */
.what-it-does {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
}
@media (min-width: 768px) {
  .what-it-does { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
}
.what-it-does-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.what-it-does-item .num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.what-it-does-item strong {
  font-family: var(--font-display);
  font-size: var(--fs-body-l);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.what-it-does-item span { color: var(--fg-muted); font-size: var(--fs-body-s); line-height: 1.5; }

/* Case study card — social proof with specific metrics */
.case-study-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 768px) {
  .case-study-grid { grid-template-columns: repeat(3, 1fr); }
}
.case-study-card {
  padding: var(--sp-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.case-study-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.case-study-metric {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--md-accent);
}
.case-study-context {
  font-size: var(--fs-body-s);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.case-study-card h4 { margin: 0; line-height: 1.3; }
.case-study-card .industry {
  display: inline-flex;
  font-size: var(--fs-caption);
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
  margin-top: auto;
}

/* Trust bar — under the hero, under-stated authority */
.trust-bar {
  padding: var(--sp-6) 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.trust-bar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-8);
  font-size: var(--fs-body-s);
  color: var(--fg-muted);
}
.trust-bar-list li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  letter-spacing: 0.04em;
  position: relative;
}
.trust-bar-list li + li::before {
  content: '·';
  position: absolute;
  left: calc(var(--sp-8) / -2 - 2px);
  color: var(--fg-subtle);
}
.trust-bar-list strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* Four pillars cards — home page section */
.pillar-card {
  padding: var(--sp-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.pillar-card:hover { transform: translateY(-4px); border-color: var(--md-accent); }
.pillar-card.featured {
  background: linear-gradient(180deg, rgba(0,201,80,0.05), var(--bg-elevated));
  border: 2px solid var(--md-accent);
}
.pillar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--md-accent);
  margin: 0 0 var(--sp-4);
}
.pillar-card h3 {
  font-size: var(--fs-h3);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Shift grid — transformation pairs with visual flow */
.shift-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
}
.shift-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5) var(--sp-8);
  border-top: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease-out);
}
.shift-row:first-child { border-top: none; }
.shift-row:hover {
  background: color-mix(in srgb, var(--md-accent) 7%, var(--bg-elevated));
}
.shift-row:hover .shift-arrow {
  transform: translateX(4px);
  color: var(--md-accent);
}
.shift-from {
  text-align: right;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: line-through;
  text-decoration-color: var(--fg-subtle);
  text-decoration-thickness: 1px;
}
.shift-arrow {
  color: var(--fg-subtle);
  font-size: 22px;
  font-weight: 700;
  padding: 0 var(--sp-4);
  transition: transform var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
  line-height: 1;
}
.shift-to {
  text-align: left;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
}
.shift-to::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--md-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
}
.shift-to {
  display: inline-block;
  padding-right: 0;
}
.shift-row:hover .shift-to { color: var(--md-accent); }
.shift-row:hover .shift-to::after { transform: scaleX(0.3); }

@media (max-width: 640px) {
  .shift-row { padding: var(--sp-4) var(--sp-5); }
  .shift-from, .shift-to { font-size: 18px; }
  .shift-arrow { padding: 0 var(--sp-2); font-size: 18px; }
}

/* ============================================================
   Product page patterns
   ============================================================ */

.product-hero {
  padding: var(--sp-20) 0 var(--sp-24);
  position: relative;
  /* NB: do NOT use overflow:hidden here — it would clip the CTA dropdown. */
}
.product-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.product-hero > .container { position: relative; z-index: 1; }
.product-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
}
@media (min-width: 960px) {
  .product-hero-inner { grid-template-columns: 1.2fr 1fr; gap: var(--sp-20); }
}
.product-hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  margin-bottom: var(--sp-6);
}

/* Product identity header: icon + name side-by-side, name in product color */
.product-identity {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-bottom: var(--sp-6);
}
.product-identity img {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  flex-shrink: 0;
}
.product-identity-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin: 0;
}
.product-identity-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  margin: 6px 0 0;
  text-transform: uppercase;
}

/* Animated gradient tagline in product accent color */
.tagline-gradient {
  background: linear-gradient(
    120deg,
    var(--accent) 0%,
    var(--accent) 40%,
    color-mix(in srgb, var(--accent) 40%, var(--fg)) 55%,
    var(--accent) 70%,
    var(--accent) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-slide 8s ease-in-out infinite;
  padding-bottom: 0.1em;
  display: inline-block;
}
@media (prefers-reduced-motion: reduce) {
  .tagline-gradient { animation: none; background-position: 0% 50%; }
}
.product-hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--sp-4);
}
.product-hero .tagline {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--sp-6);
  font-family: var(--font-display);
}

.wow-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-8);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  height: 100%;
}
.wow-card .number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.ladder-mini {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.ladder-mini-step {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  flex: 1 1 140px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: var(--fs-body-s);
  opacity: 0.55;
  min-width: 0;
}
.ladder-mini-step.active {
  opacity: 1;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
  font-weight: 600;
}
.ladder-mini-step img {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
}

/* Product mock panels (instead of screenshots) */
.mock-panel {
  background: var(--ins-near-black);
  color: var(--ins-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.mock-header {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.mock-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gray-700);
}
.mock-dot.active { background: var(--accent); }
.mock-title {
  margin-left: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-body-s);
  color: var(--gray-400);
}
.mock-body {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  min-height: 320px;
}
.mock-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
}
.mock-row + .mock-row { margin-top: 4px; }
.mock-row.highlight { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.mock-row .m-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.mock-row .m-line {
  flex: 1;
  height: 1px;
  background: var(--gray-700);
}
.mock-row .m-val { color: var(--gray-300); }

/* Banner CTA (end-of-page) */
.banner-cta {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  background: var(--ins-near-black);
  color: var(--ins-white);
  border-radius: var(--radius-lg);
}
.banner-cta h2 { max-width: 720px; margin: 0 auto var(--sp-6); }
.banner-cta p { max-width: 560px; margin: 0 auto var(--sp-8); color: var(--gray-400); }

/* Quote block */
.quote {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 760px;
}
.quote::before {
  content: '"';
  font-size: 1.4em;
  line-height: 0.5;
  color: var(--accent);
  margin-right: 0.1em;
}

/* Persona card */
.persona-card {
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.persona-card h4 { margin-bottom: var(--sp-2); }
.persona-card .role {
  font-size: var(--fs-caption);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

/* Faq/accordion */
details {
  border-bottom: 1px solid var(--border);
  padding: var(--sp-6) 0;
}
details summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h4);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  font-size: 24px;
  color: var(--fg-muted);
  transition: transform var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
details[open] summary::after {
  content: '−';
}
details p { margin-top: var(--sp-4); color: var(--fg-muted); }
