/* VantaWeb shared design tokens + base styles
   Used across home.html, build.html, pricing.html, industries.html
   These mirror packages/marketing/src/styles/tokens.css — engineer can lift directly. */

:root {
  /* ── Brand color tokens (LOCKED — do not redefine) ───────── */
  --vw-bg: #050307;
  --vw-surface: #0d0a14;
  --vw-surface-2: #14101f;
  --vw-surface-strong: #1a0f2e;
  --vw-elev-1: rgba(255, 255, 255, 0.024);
  --vw-elev-2: rgba(255, 255, 255, 0.04);

  --vw-text-1: #f5f0ff;
  --vw-text-2: #c4b5d4;
  --vw-text-3: #9b8cb2;
  --vw-text-muted: #6b6086;

  --vw-brand-lavender: #c4b5ff;
  --vw-brand-lavender-soft: rgba(196, 181, 255, 0.12);
  --vw-brand-indigo: #5a2896;
  --vw-brand-indigo-deep: #3d1668;
  --vw-accent: #7c3aed;
  --vw-accent-bright: #9b6dff;

  --vw-success: #34d399;
  --vw-warn: #fbbf24;
  --vw-danger: #fb7185;

  --vw-border-soft: rgba(196, 181, 255, 0.08);
  --vw-border-strong: rgba(196, 181, 255, 0.18);
  --vw-border-bright: rgba(196, 181, 255, 0.32);

  --vw-shadow-sm: 0 2px 8px rgba(90, 40, 150, 0.15);
  --vw-shadow-md: 0 8px 24px rgba(90, 40, 150, 0.22);
  --vw-shadow-lg: 0 24px 60px -12px rgba(90, 40, 150, 0.55);
  --vw-shadow-glow: 0 0 24px rgba(124, 58, 237, 0.4);

  --vw-radius-sm: 8px;
  --vw-radius-md: 12px;
  --vw-radius-lg: 16px;
  --vw-radius-xl: 22px;

  /* ── Typography stack (LOCKED) ───────────────────────────── */
  --font-display: 'Source Serif 4', 'Newsreader', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* ── Layout ──────────────────────────────────────────────── */
  --container-w: 1240px;
  --container-pad: clamp(20px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--vw-bg);
  color: var(--vw-text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 70% 35% at 25% 0%, rgba(90, 40, 150, 0.2), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 8%, rgba(124, 58, 237, 0.1), transparent 55%);
  background-attachment: fixed;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--vw-brand-lavender);
  text-decoration: none;
}
a:hover {
  color: var(--vw-text-1);
}

/* ── Display headings — Source Serif 4, locked metrics ──── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--vw-text-1);
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
}
h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
}
h3 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.15;
}
h4 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--vw-text-2);
  text-wrap: pretty;
}

/* ── Container ───────────────────────────────────────────── */
.vw-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ── Header / nav ────────────────────────────────────────── */
.vw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(5, 3, 7, 0.72);
  border-bottom: 1px solid var(--vw-border-soft);
}
.vw-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  padding: 14px 0;
}
.vw-nav .vw-logo {
  margin-right: auto;
} /* logo pinned left, nav pushes right but stops short of the edge */
.vw-nav nav {
  margin-right: clamp(40px, 6vw, 96px);
} /* back off from the right edge so links sit center-right */
.vw-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--vw-text-1);
  letter-spacing: -0.045em;
  text-decoration: none;
}
.vw-logo span:last-child {
  background: linear-gradient(180deg, #ffffff 0%, #e1d5ff 60%, #c4b5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.vw-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vw-brand-indigo), var(--vw-accent));
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(90, 40, 150, 0.45);
  overflow: hidden;
}
.vw-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vw-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.vw-nav-links a {
  color: var(--vw-text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms;
}
.vw-nav-links a:hover,
.vw-nav-links a[aria-current='page'] {
  color: var(--vw-text-1);
}

@media (max-width: 880px) {
  .vw-nav-links {
    display: none;
  }
}

/* ── Buttons ─────────────────────────────────────────────── */
.vw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 120ms,
    background 120ms,
    box-shadow 120ms,
    border-color 120ms;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}
.vw-btn:active {
  transform: translateY(1px);
}
.vw-btn-primary {
  background: linear-gradient(135deg, var(--vw-brand-indigo), var(--vw-accent));
  color: #fff;
  box-shadow: 0 8px 22px rgba(90, 40, 150, 0.42);
}
.vw-btn-primary:hover {
  box-shadow: 0 14px 32px rgba(90, 40, 150, 0.55);
  color: #fff;
}
.vw-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--vw-text-1);
  border-color: var(--vw-border-strong);
}
.vw-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--vw-text-1);
}
.vw-btn-link {
  background: transparent;
  padding: 8px 4px;
  color: var(--vw-brand-lavender);
}

/* ── Pricing card (.featured FIX from Task 6) ────────────── */
.pricing-card {
  background: linear-gradient(180deg, rgba(20, 16, 31, 0.95), rgba(13, 10, 20, 0.95));
  border: 1px solid var(--vw-border-soft);
  border-radius: var(--vw-radius-xl);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 160ms;
}
.pricing-card:hover {
  border-color: var(--vw-border-strong);
}

.pricing-card.featured {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(24, 18, 41, 0.95), rgba(10, 8, 18, 0.95)) padding-box,
    linear-gradient(135deg, var(--vw-brand-indigo), var(--vw-brand-lavender)) border-box;
  transform: scale(1.04) translateY(-4px);
  box-shadow:
    0 24px 60px -12px rgba(90, 40, 150, 0.55),
    0 0 0 1px rgba(196, 181, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 1;
}
.pricing-card.featured::before {
  content: 'RECOMMENDED FOR MOST';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--vw-brand-indigo), var(--vw-accent));
  color: #fff;
  box-shadow: 0 6px 18px rgba(90, 40, 150, 0.45);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .pricing-card.featured {
    transform: scale(1.02);
    margin: 14px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pricing-card.featured {
    transform: none;
  }
}

/* ── Apex (.pricing-card--apex) — amber ribbon, second simultaneous accent ── */
.pricing-card--apex {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(28, 18, 8, 0.95), rgba(14, 10, 8, 0.95)) padding-box,
    linear-gradient(135deg, #f59e0b, #fbbf24) border-box;
  box-shadow:
    0 18px 44px -16px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(251, 191, 36, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pricing-card--apex::before {
  content: 'MOST POWERFUL';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1a0f02;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
  white-space: nowrap;
}
.pricing-card--apex .pricing-eyebrow {
  color: #fbbf24;
}
.pricing-card--apex .pricing-features li.upgrade {
  color: #fbbf24;
}
.pricing-card--apex .pricing-features li.upgrade::before {
  color: #fbbf24;
}

.pricing-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vw-brand-lavender);
}
.pricing-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 0;
}
.pricing-price .num {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vw-text-1);
}
.pricing-price .per {
  color: var(--vw-text-3);
  font-size: 14px;
}
.pricing-tagline {
  color: var(--vw-text-2);
  font-size: 14px;
  line-height: 1.55;
}
.pricing-divider {
  height: 1px;
  background: var(--vw-border-soft);
  margin: 8px 0;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-features li {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  color: var(--vw-text-2);
  line-height: 1.5;
}
.pricing-features li::before {
  content: '';
  flex: 0 0 16px;
  height: 16px;
  margin-top: 3px;
  background: var(--vw-brand-lavender);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M6.5 11.5 3 8l1.4-1.4 2.1 2.1 5.1-5.1L13 5z'/%3E%3C/svg%3E")
    center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M6.5 11.5 3 8l1.4-1.4 2.1 2.1 5.1-5.1L13 5z'/%3E%3C/svg%3E")
    center/contain no-repeat;
}
.pricing-card .vw-btn {
  margin-top: auto;
}

/* ── Reveal CSS class (Task 5) ──────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 550ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.rv.rv-shown {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Section ─────────────────────────────────────────────── */
.vw-section {
  padding: clamp(64px, 9vw, 120px) 0;
  position: relative;
}
.vw-section.dim {
  background: linear-gradient(180deg, transparent, rgba(13, 10, 20, 0.6) 30%, transparent);
}
.vw-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vw-brand-lavender);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}
.vw-eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ── Trace primitive ─────────────────────────────────────── */
.trace-svg {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}
.trace-line {
  fill: none;
  stroke: var(--vw-brand-lavender);
  stroke-opacity: 0.6;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.trace-node {
  fill: var(--vw-brand-lavender);
  fill-opacity: 0.85;
}
.trace-line.animate-once {
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  animation: trace-reveal 600ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
}
@keyframes trace-reveal {
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trace-line.animate-once {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ── Footer ──────────────────────────────────────────────── */
.vw-footer {
  border-top: 1px solid var(--vw-border-soft);
  padding: 56px 0 40px;
  margin-top: 60px;
  color: var(--vw-text-3);
  font-size: 13px;
}
.vw-footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
@media (max-width: 720px) {
  .vw-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.vw-footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vw-text-1);
  margin: 0 0 14px;
  font-weight: 600;
}
.vw-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vw-footer a {
  color: var(--vw-text-2);
}
.vw-footer a:hover {
  color: var(--vw-text-1);
}
.vw-footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--vw-border-soft);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.vw-footer-bottom .vw-tagline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  white-space: normal;
}
.vw-footer-bottom .vw-tagline .ai-mark {
  font-family: 'Space Grotesk', 'Sora', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
}
.vw-footer-bottom .vw-tagline .ai-mark .vanta {
  color: #ffffff;
}
.vw-footer-bottom .vw-tagline .ai-mark .web {
  color: var(--vw-accent);
}
.vw-footer-bottom .vw-tagline .ai-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vw-text-3);
}
.vw-footer-bottom .vw-tagline .ai-copy::before {
  content: '— ';
  margin-right: 2px;
  color: var(--vw-text-muted);
}
.vw-footer-bottom .vw-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--vw-text-3);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--vw-border-soft);
  background: rgba(255, 255, 255, 0.02);
}

/* ── Chatbot launcher — VantaWeb emblem fills the full circle ── */
.vw-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vw-brand-indigo), var(--vw-accent));
  display: block;
  box-shadow: 0 12px 32px rgba(90, 40, 150, 0.5);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0;
  overflow: hidden; /* clip the emblem to the circle */
}
.vw-chat-launcher svg,
.vw-chat-launcher img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* emblem bleeds edge-to-edge */
}
.vw-chat-launcher svg {
  color: #fff;
  fill: #fff;
}
.vw-chat-launcher::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 181, 255, 0.4), transparent 70%);
  animation: vw-chat-pulse 3s ease-in-out infinite;
  z-index: -1;
}
@keyframes vw-chat-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vw-chat-launcher::after {
    animation: none;
  }
}

/* ── Anna voice orb — solid circular avatar in deep violet, gentle breathe + speaking pulse ── */
.anna-orb {
  width: clamp(160px, 20vw, 220px);
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
  background: radial-gradient(
    circle at 30% 30%,
    #c4b5ff 0%,
    var(--vw-accent) 45%,
    var(--vw-brand-indigo) 100%
  );
  border-radius: 62% 38% 51% 49% / 55% 60% 40% 45%;
  box-shadow:
    0 20px 60px rgba(124, 58, 237, 0.45),
    inset 0 0 40px rgba(255, 255, 255, 0.08);
  animation: anna-orb-morph 8s ease-in-out infinite;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 300ms;
}
@keyframes anna-orb-morph {
  0%,
  100% {
    border-radius: 62% 38% 51% 49% / 55% 60% 40% 45%;
  }
  25% {
    border-radius: 50% 50% 60% 40% / 45% 55% 45% 55%;
  }
  50% {
    border-radius: 40% 60% 45% 55% / 55% 45% 60% 40%;
  }
  75% {
    border-radius: 55% 45% 38% 62% / 60% 50% 50% 40%;
  }
}
.anna-orb.speaking {
  animation:
    anna-orb-morph 4s ease-in-out infinite,
    anna-orb-pulse 320ms ease-in-out infinite;
  box-shadow:
    0 24px 80px rgba(124, 58, 237, 0.65),
    0 0 0 8px rgba(196, 181, 255, 0.1),
    inset 0 0 40px rgba(255, 255, 255, 0.12);
}
@keyframes anna-orb-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.anna-orb::before,
.anna-orb::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: inherit;
  border: 1px dashed rgba(196, 181, 255, 0.25);
  animation: anna-orb-orbit 24s linear infinite;
  pointer-events: none;
}
.anna-orb::after {
  inset: -28px;
  border-color: rgba(196, 181, 255, 0.12);
  animation-duration: 36s;
  animation-direction: reverse;
}
@keyframes anna-orb-orbit {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .anna-orb,
  .anna-orb::before,
  .anna-orb::after {
    animation: none;
  }
  .anna-orb.speaking {
    animation: none;
  }
}
