@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

/* =========================================================
   APIRE Design System — single source of truth
   ========================================================= */

:root {
  /* Color tokens */
  --bg-base: #000000;
  --bg-surface: #0a0a0f;
  --bg-card: #0f0f1a;
  --bg-card-hover: #141428;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(139, 92, 246, 0.4);

  --purple-primary: #7c3aed;
  --purple-bright: #8b5cf6;
  --purple-light: #a78bfa;
  --cyan-accent: #06b6d4;
  --cyan-bright: #22d3ee;
  --blue-accent: #2563eb;
  --emerald-accent: #10b981;

  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --gradient-hero: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #06b6d4 100%);
  --gradient-brand: linear-gradient(135deg, #8b5cf6, #06b6d4);
  --gradient-cta: linear-gradient(135deg, #7c3aed, #5b21b6);

  /* Font stacks */
  --font-display: 'Poppins', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: clamp(2.5rem, 6vw, 4rem);
  --text-hero: clamp(2.8rem, 7vw, 5rem);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; position: relative; }

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

/* Card (base — overridden by V13 rules below) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--gradient-cta);
  color: white; font-weight: 600; font-size: 0.9rem;
  border: none; border-radius: 8px; cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: white; font-weight: 600; font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 8px;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* Eyebrow badge (base — overridden below) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
  margin-bottom: 16px;
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--purple-bright);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

/* Stat card (base — overridden below) */
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px 32px;
  text-align: center;
}
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-4xl);
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.2;
}
.stat-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: 4px;
}

/* Feature icon box */
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--purple-light);
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section heading */
.section-heading {
  font-size: var(--text-6xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 640px;
  line-height: 1.7;
}
.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin: 0 auto; }

/* Ambient glows */
.glow-purple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
  filter: blur(60px);
}
.glow-cyan {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
  filter: blur(60px);
}

/* Scroll reveal (overridden in V13 block) */
.reveal { opacity: 0; transform: translateY(40px); }
.reveal.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hero background animation */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
  pointer-events: none;
}
.hero-wave {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: wave-drift 12s ease-in-out infinite;
}
.hero-wave.delay-1 { animation-delay: -4s; }
.hero-wave.delay-2 { animation-delay: -8s; }
@keyframes wave-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(0.95); }
}

/* =========================================================
   Navigation
   ========================================================= */
.site-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1.1rem; letter-spacing: 0.04em;
  color: white;
}
.nav-logo-mark {
  width: 22px; height: 22px;
  background: var(--gradient-brand);
  border-radius: 6px;
  position: relative;
}
.nav-logo-mark::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 3px;
  background: #000;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.nav-pill {
  display: flex; align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  gap: 4px;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.875rem; font-weight: 500;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  background: none; border: none;
}
.nav-link:hover, .nav-link.active { color: white; }
.nav-link .caret {
  width: 10px; height: 10px; opacity: 0.6;
  transition: transform 0.2s;
}
.nav-item:hover .nav-link .caret { transform: rotate(180deg); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-btn-partner {
  display: inline-flex; align-items: center;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white; font-size: 0.85rem; font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.nav-btn-partner:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}
.nav-btn-cta {
  display: inline-flex; align-items: center;
  padding: 8px 20px;
  background: var(--gradient-cta);
  border-radius: 8px;
  color: white; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-btn-cta:hover { opacity: 0.92; transform: translateY(-1px); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%; left: 50%;
  transform: translate(-50%, 8px);
  background: rgba(10, 10, 20, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  min-width: 260px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1100;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.open .nav-dropdown {
  opacity: 1; visibility: visible;
  transform: translate(-50%, 0);
}
.nav-dropdown.platform-dd {
  min-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.nav-dd-header {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 12px 8px;
}
.nav-dd-link {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: background 0.2s, color 0.2s;
}
.nav-dd-link:hover {
  background: rgba(139, 92, 246, 0.12);
  color: white;
}

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: white;
}
.nav-mobile-toggle svg { width: 24px; height: 24px; }
.nav-mobile-panel {
  display: none;
  position: fixed; inset: 64px 0 0 0;
  background: rgba(0, 0, 0, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 24px;
  overflow-y: auto;
  z-index: 999;
}
.nav-mobile-panel.open { display: block; }
.nav-mobile-group { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.nav-mobile-group h4 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.nav-mobile-group a {
  display: block; padding: 10px 0; color: var(--text-secondary);
  font-size: 0.95rem;
}
.nav-mobile-group a:hover { color: white; }

@media (max-width: 1024px) {
  .nav-pill, .nav-actions { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero-section {
  position: relative;
  padding: 120px 0 96px;
  text-align: center;
  overflow: hidden;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
}
.hero-title {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-cta {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: 12px;
}
.hero-stats {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-section { padding: 80px 0 64px; }
}

/* =========================================================
   How it works — 3 step flow
   ========================================================= */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 48px;
}
.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
}
.flow-step.featured {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.04));
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.18);
}
.flow-step h4 {
  font-size: var(--text-lg);
  margin-bottom: 8px;
}
.flow-step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
  font-size: 1.5rem;
  font-weight: 300;
}
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* Code snippet block (legacy — overridden below) */
.code-block {
  margin-top: 40px;
  background: #0d0d1a;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}
.code-block .comment { color: #6b7280; }
.code-block .string  { color: #a78bfa; }
.code-block .keyword { color: #22d3ee; }
.code-block .ident   { color: #e5e7eb; }

/* =========================================================
   Five-layer defense
   ========================================================= */
.layers {
  margin-top: 56px;
  display: flex; flex-direction: column;
  gap: 16px;
  position: relative;
}
.layer-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: stretch;
}
.layer-index {
  display: flex; flex-direction: column;
  align-items: center;
  position: relative;
}
.layer-index .badge {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: white;
}
.layer-index .line {
  flex: 1; width: 2px;
  background: linear-gradient(180deg, var(--purple-bright), transparent);
  margin-top: 8px;
}
.layer-row:last-child .layer-index .line { display: none; }

.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.layer-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.layer-card h3 { font-size: var(--text-xl); margin-bottom: 6px; }
.layer-card .layer-tag {
  display: inline-block;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 8px;
}
.layer-card p { color: var(--text-secondary); font-size: 0.95rem; }

.layer-row[data-accent="cyan"]    .badge { border-color: rgba(6, 182, 212, 0.4); color: var(--cyan-bright); }
.layer-row[data-accent="cyan"]    .layer-tag { color: var(--cyan-bright); }
.layer-row[data-accent="purple"]  .badge { border-color: rgba(139, 92, 246, 0.4); color: var(--purple-light); }
.layer-row[data-accent="purple"]  .layer-tag { color: var(--purple-light); }
.layer-row[data-accent="blue"]    .badge { border-color: rgba(37, 99, 235, 0.4); color: #60a5fa; }
.layer-row[data-accent="blue"]    .layer-tag { color: #60a5fa; }
.layer-row[data-accent="emerald"] .badge { border-color: rgba(16, 185, 129, 0.4); color: var(--emerald-accent); }
.layer-row[data-accent="emerald"] .layer-tag { color: var(--emerald-accent); }

@media (max-width: 700px) {
  .layer-row { grid-template-columns: 1fr; gap: 12px; }
  .layer-index { flex-direction: row; gap: 12px; }
  .layer-index .line { display: none; }
}

/* =========================================================
   Feature grid (capabilities)
   ========================================================= */
.feature-card { display: flex; flex-direction: column; }
.feature-card h3 { font-size: var(--text-xl); margin-bottom: 10px; }
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}
.feature-card .feature-link {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--purple-light);
  font-size: 0.875rem; font-weight: 500;
}
.feature-card .feature-link:hover { color: white; }

/* =========================================================
   Compliance pills
   ========================================================= */
.compliance-pills {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin: 32px 0 56px;
}
.compliance-pill {
  padding: 8px 18px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.06);
  color: white;
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 500;
}

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  background: linear-gradient(135deg, #2e1065 0%, #1e1b4b 50%, #0c4a6e 100%);
  border-radius: 24px;
  padding: 72px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.3), transparent 60%);
  pointer-events: none;
}
.cta-band h2 {
  font-size: var(--text-5xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-lg);
  max-width: 580px;
  margin: 0 auto 28px;
  position: relative;
}
.cta-band .hero-cta { position: relative; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: #050508;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.3fr;
  gap: 56px;
  padding-bottom: 56px;
}
.footer-col h4 {
  font-size: 0.85rem; font-weight: 600;
  color: white;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }

.footer-product-sub {
  margin-top: 20px;
}
.footer-product-sub h5 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-brand-logo {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-weight: 700; font-size: 1.05rem;
}
.footer-stay-connected p {
  color: var(--text-secondary);
  font-size: 0.85rem; margin-bottom: 16px;
}
.footer-newsletter {
  display: flex; gap: 8px;
}
.footer-newsletter input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 16px;
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.footer-newsletter input:focus {
  border-color: var(--purple-bright);
}
.footer-newsletter button {
  background: var(--gradient-cta);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.footer-newsletter button:hover { opacity: 0.92; transform: translateY(-1px); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero-section { padding: 80px 0 64px; }
  .cta-band { padding: 56px 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 640px) {
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* =========================================================
   ✦ V13 UPGRADE — Cosmic black, glassmorphism, JetBrains Mono accents
   ========================================================= */

/* Typography assignments */
h1, h2, h3, h4 { font-family: var(--font-display); }
.eyebrow, .tag, .stat-label, code, pre, .mono { font-family: var(--font-mono); }

/* Card upgrade — full V13 glassmorphic */
.card {
  background: linear-gradient(155deg, rgba(14,14,26,0.95), rgba(8,8,20,0.98));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: skewX(-15deg);
  animation: gloss-sweep 9s ease-in-out infinite;
  pointer-events: none;
}

.card-top-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    rgba(124,58,237,0.9), rgba(6,182,212,0.4), transparent);
  border-radius: 18px 18px 0 0;
  transition: height 0.3s;
}

.card:hover {
  border-color: rgba(124,58,237,0.4);
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.2),
    0 28px 60px rgba(0,0,0,0.7),
    0 0 80px rgba(124,58,237,0.1);
}
.card:hover .card-top-bar { height: 3px; }

.card-corner {
  position: absolute; width: 12px; height: 12px;
  border-color: rgba(124,58,237,0.6); border-style: solid;
  opacity: 0; transition: opacity 0.3s;
}
.card-corner-tl { top: 12px; left: 12px; border-width: 1.5px 0 0 1.5px; }
.card-corner-br { bottom: 12px; right: 12px; border-width: 0 1.5px 1.5px 0; }
.card:hover .card-corner { opacity: 1; }

@keyframes gloss-sweep {
  0%, 100% { left: -120%; }
  55% { left: 160%; }
}

/* Hero canvas */
#hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* Eyebrow upgrade */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgb(139,92,246);
  border: 1px solid rgba(139,92,246,0.3);
  background: rgba(139,92,246,0.07);
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgb(139,92,246);
  box-shadow: 0 0 8px rgba(139,92,246,0.9);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Stat cards upgrade */
.stat-card {
  background: linear-gradient(155deg, rgba(14,14,26,0.9), rgba(8,8,20,0.95));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(124,58,237,0.8), rgba(6,182,212,0.4), transparent);
}
.stat-card:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 0 40px rgba(124,58,237,0.1);
}
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Layer stack upgrade (new system, complements existing .layer-row) */
.layer-item {
  background: linear-gradient(155deg, rgba(14,14,26,0.95), rgba(8,8,20,0.98));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 24px 28px;
  position: relative; overflow: hidden;
  transition: border-color 0.4s, transform 0.4s;
}
.layer-item::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    rgba(var(--layer-accent),0.9),
    rgba(var(--layer-accent),0.2),
    transparent);
}
.layer-item:hover {
  border-color: rgba(var(--layer-accent),0.4);
  transform: translateX(8px);
  box-shadow: -4px 0 30px rgba(var(--layer-accent),0.15);
}
.layer-0 { --layer-accent: 6,182,212; }
.layer-1 { --layer-accent: 139,92,246; }
.layer-2 { --layer-accent: 139,92,246; }
.layer-3 { --layer-accent: 56,189,248; }
.layer-4 { --layer-accent: 16,185,129; }

.layer-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.62rem;
  text-transform: uppercase;
  color: rgb(var(--layer-accent));
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.layer-badge::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: rgb(var(--layer-accent));
  box-shadow: 0 0 6px rgba(var(--layer-accent),0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Nav upgrade */
.nav-scroll {
  background: rgba(0,0,0,0.95) !important;
  backdrop-filter: blur(24px) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06),
              0 4px 30px rgba(0,0,0,0.5) !important;
}

/* Magnetic button */
.btn-magnetic {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

/* Proxy diagram */
.proxy-diagram {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 40px 0; position: relative;
  flex-wrap: wrap;
}
.proxy-node {
  background: linear-gradient(155deg, rgba(14,14,26,0.95), rgba(8,8,20,0.98));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 20px 24px;
  text-align: center; min-width: 160px;
  position: relative;
  font-family: var(--font-mono);
}
.proxy-node-label {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #6b7280; margin-bottom: 8px;
}
.proxy-node-name {
  font-size: 1rem; font-weight: 600; color: white;
}
.proxy-node.apire-node {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 60px rgba(124,58,237,0.2),
              0 0 0 1px rgba(124,58,237,0.2);
  min-width: 200px;
}
.proxy-node.apire-node .proxy-node-name {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.2rem;
}
.proxy-arrow {
  display: flex; flex-direction: column;
  align-items: center; padding: 0 12px;
  gap: 6px;
}
.proxy-arrow svg {
  width: 80px; height: 20px; overflow: visible;
}
.arrow-line {
  stroke: rgba(124,58,237,0.5);
  stroke-width: 1.5;
  stroke-dasharray: 6 3;
  animation: dash-flow 2s linear infinite;
}
.arrow-return-line {
  stroke: rgba(6,182,212,0.5);
  stroke-width: 1.5;
  stroke-dasharray: 6 3;
  animation: dash-flow-reverse 2s linear infinite;
}
.proxy-arrow-label {
  font-family: var(--font-mono);
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #6b7280;
}
@keyframes dash-flow {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}
@keyframes dash-flow-reverse {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 24; }
}

@media (max-width: 800px) {
  .proxy-arrow { transform: rotate(90deg); padding: 12px 0; }
  .proxy-diagram { flex-direction: column; gap: 12px; }
}

/* Code block upgrade */
.code-block {
  background: #0d0d1a;
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 12px;
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem; line-height: 1.8;
  position: relative; overflow: hidden;
}
.code-block::before {
  content: '● ● ●';
  display: block; margin-bottom: 16px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 6px; font-size: 0.7rem;
}
.code-comment { color: rgba(107,114,128,0.8); }
.code-comment.code-green { color: #10b981; }
.code-keyword { color: #8b5cf6; }
.code-string  { color: #06b6d4; }
.code-cyan    { color: #06b6d4; }
.code-default { color: #e5e7eb; }
.code-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: #8b5cf6;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Terminal scan line */
.scan-line {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(139,92,246,0.4), transparent);
  animation: scan 4s linear infinite;
  pointer-events: none;
}
@keyframes scan {
  0% { top: 0; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Ambient glows upgraded */
.hero-glow-1 {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(124,58,237,0.18) 0%,
    rgba(124,58,237,0.05) 50%,
    transparent 70%);
  filter: blur(60px);
  top: -200px; left: -200px;
  pointer-events: none; z-index: 0;
  animation: glow-drift-1 15s ease-in-out infinite;
}
.hero-glow-2 {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(6,182,212,0.12) 0%,
    transparent 70%);
  filter: blur(60px);
  top: 100px; right: -100px;
  pointer-events: none; z-index: 0;
  animation: glow-drift-2 18s ease-in-out infinite;
}
@keyframes glow-drift-1 {
  0%,100% { transform: translate(0,0); }
  33% { transform: translate(40px,-30px); }
  66% { transform: translate(-20px,20px); }
}
@keyframes glow-drift-2 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-30px,40px); }
}

/* Section ambient glows */
.section-ambient {
  position: absolute; border-radius: 50%;
  pointer-events: none; z-index: 0;
  filter: blur(80px);
}
.section-ambient-tl {
  width: 400px; height: 400px;
  top: -100px; left: -100px;
  background: radial-gradient(circle,
    rgba(124,58,237,0.12), transparent 70%);
}
.section-ambient-br {
  width: 300px; height: 300px;
  bottom: -80px; right: -80px;
  background: radial-gradient(circle,
    rgba(6,182,212,0.08), transparent 70%);
}

/* Pricing card featured glow */
.card-featured {
  border-color: rgba(124,58,237,0.5) !important;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.25),
    0 0 80px rgba(124,58,237,0.15),
    0 28px 60px rgba(0,0,0,0.7) !important;
}

/* Comparison table upgrade */
.comparison-table tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}
.comparison-table td.apire-col {
  color: rgb(139,92,246);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.comparison-table td.dlp-col {
  color: #6b7280;
}

/* Scroll reveal (staggered) — overrides earlier */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: none;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.9s cubic-bezier(0.22,1,0.36,1),
    transform 0.9s cubic-bezier(0.22,1,0.36,1);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero title word-reveal guards
   word-wrap is a clip box only; never paint anything on it.
   This prevents gradient-text backgrounds from leaking onto
   the wrap rectangle if a child has display:inline-block. */
.hero-title .word-wrap {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: inherit;
}
.hero-title .word { line-height: inherit; }
/* If GSAP fails to load and never animates words, fall back to
   visible after 1.5s rather than leaving them translated offscreen. */
@keyframes word-reveal-fallback {
  to { transform: translateY(0); }
}
.hero-title .word {
  animation: word-reveal-fallback 0.01s 2s forwards;
}

/* Lenis smooth scroll */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* Performance */
@media (max-width: 640px) {
  .hero-glow-1, .hero-glow-2 { display: none; }
  #hero-canvas { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
