/* ===== DESIGN TOKENS ===== */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --font-display: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-2xl: 1.5rem; --radius-full: 9999px;

  /* Hex corner cuts — chamfered rectangle clip-paths */
  --hex-xs: 6px;  /* tiny elements: badges, dots */
  --hex-sm: 10px; /* small: buttons, pills, inputs */
  --hex-md: 16px; /* medium: cards, containers */
  --hex-lg: 24px; /* large: hero elements, big cards */
  --hex-clip-xs: polygon(var(--hex-xs) 0, calc(100% - var(--hex-xs)) 0, 100% var(--hex-xs), 100% calc(100% - var(--hex-xs)), calc(100% - var(--hex-xs)) 100%, var(--hex-xs) 100%, 0 calc(100% - var(--hex-xs)), 0 var(--hex-xs));
  --hex-clip-sm: polygon(var(--hex-sm) 0, calc(100% - var(--hex-sm)) 0, 100% var(--hex-sm), 100% calc(100% - var(--hex-sm)), calc(100% - var(--hex-sm)) 100%, var(--hex-sm) 100%, 0 calc(100% - var(--hex-sm)), 0 var(--hex-sm));
  --hex-clip-md: polygon(var(--hex-md) 0, calc(100% - var(--hex-md)) 0, 100% var(--hex-md), 100% calc(100% - var(--hex-md)), calc(100% - var(--hex-md)) 100%, var(--hex-md) 100%, 0 calc(100% - var(--hex-md)), 0 var(--hex-md));
  --hex-clip-lg: polygon(var(--hex-lg) 0, calc(100% - var(--hex-lg)) 0, 100% var(--hex-lg), 100% calc(100% - var(--hex-lg)), calc(100% - var(--hex-lg)) 100%, var(--hex-lg) 100%, 0 calc(100% - var(--hex-lg)), 0 var(--hex-lg));

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --content-narrow: 640px; --content-default: 960px; --content-wide: 1200px;
}

/* ===== LIGHT MODE ===== */
:root, [data-theme='light'] {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-2: #f5f5f5;
  --color-surface-offset: #eeeeee;
  --color-divider: #e0e0e0;
  --color-border: #d4d4d4;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-text-faint: #a3a3a3;
  --color-text-inverse: #fafafa;
  --color-primary: #b91c2c;
  --color-primary-hover: #9b1624;
  --color-primary-active: #7d111c;
  --color-primary-light: rgba(185, 28, 44, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --glass-blur: blur(20px);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
}

/* ===== DARK MODE ===== */
[data-theme='dark'] {
  --color-bg: #000000;
  --color-surface: #0a0a0a;
  --color-surface-2: #111111;
  --color-surface-offset: #0e0e0e;
  --color-divider: #1a1a1a;
  --color-border: #222222;
  --color-text: #f0f0f0;
  --color-text-muted: #999999;
  --color-text-faint: #555555;
  --color-text-inverse: #000000;
  --color-primary: #dc2636;
  --color-primary-hover: #ef4444;
  --color-primary-active: #b91c2c;
  --color-primary-light: rgba(220, 38, 54, 0.14);
  --glass-bg: rgba(10, 10, 10, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(20px);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #000000; --color-surface: #0a0a0a; --color-surface-2: #111111;
    --color-surface-offset: #0e0e0e; --color-divider: #1a1a1a; --color-border: #222222;
    --color-text: #f0f0f0; --color-text-muted: #999999; --color-text-faint: #555555;
    --color-text-inverse: #000000;
    --color-primary: #dc2636; --color-primary-hover: #ef4444; --color-primary-active: #b91c2c;
    --color-primary-light: rgba(220,38,54,0.14);
    --glass-bg: rgba(10,10,10,0.7); --glass-border: rgba(255,255,255,0.06);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.5); --glass-blur: blur(20px);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3); --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}

/* ===== GLOBAL ===== */
body { overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-display); }

.skip-link {
  position: absolute; top: -100%; left: var(--space-4);
  background: var(--color-primary); color: #fff;
  padding: var(--space-2) var(--space-4); clip-path: var(--hex-clip-xs); border-radius: 0;
  z-index: 100; font-size: var(--text-sm);
}
.skip-link:focus { top: var(--space-4); }

/* ===== HEADER ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: var(--space-3) var(--space-6);
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.header--scrolled {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--glass-border);
}
.header-inner {
  max-width: var(--content-wide); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--color-text); }
.logo-img { height: 40px; width: auto; }
/* Logo theme switching */
.logo-dark { display: none; }
[data-theme='dark'] .logo-light { display: none; }
[data-theme='dark'] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo-light { display: none; }
  :root:not([data-theme='light']) .logo-dark { display: block; }
}
.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav-link {
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted);
  text-decoration: none; transition: color var(--transition-interactive); letter-spacing: 0.01em;
}
.nav-link:hover { color: var(--color-text); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.theme-toggle {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  clip-path: var(--hex-clip-xs); border-radius: 0; color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-offset); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6); font-size: var(--text-sm); font-weight: 600;
  clip-path: var(--hex-clip-sm); border-radius: 0; text-decoration: none; letter-spacing: 0.01em;
  transition: background var(--transition-interactive), color var(--transition-interactive),
    transform var(--transition-interactive), filter var(--transition-interactive);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: #ffffff; }
.btn-primary:hover { background: var(--color-primary-hover); filter: drop-shadow(0 4px 12px rgba(200,16,46,0.3)); }
.btn-ghost {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none; color: var(--color-text);
  position: relative;
}
.btn-ghost::before {
  content: ''; position: absolute; inset: 0;
  clip-path: var(--hex-clip-sm);
  background: var(--glass-border); z-index: -1;
}
.btn-ghost::after {
  content: ''; position: absolute; inset: 1px;
  clip-path: var(--hex-clip-sm);
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); z-index: -1;
}
.btn-ghost:hover { background: var(--color-surface); filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); }
.btn-lg {
  padding: var(--space-4) var(--space-8); font-size: var(--text-base);
}

/* Mobile menu */
.mobile-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--color-text); }
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-toggle { display: flex; }
  .nav.open {
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-bg); z-index: 100; align-items: center; justify-content: center; gap: var(--space-8);
  }
  .nav.open .nav-link { font-size: var(--text-xl); color: var(--color-text); }
  .nav.open .nav-actions { flex-direction: column; }
  .mobile-close {
    position: absolute; top: var(--space-4); right: var(--space-4);
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--color-text);
  }
}

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-32) var(--space-4) var(--space-16); overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, var(--color-primary-light) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 20% 80%, rgba(200,16,46,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 20%, rgba(200,16,46,0.03) 0%, transparent 70%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--color-border) 1px, transparent 1px);
  background-size: 32px 32px; opacity: 0.3;
}
.hero-layout {
  position: relative; z-index: 1; max-width: var(--content-wide); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center;
}
@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 1; }
  .hero-visual { order: 2; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); background: var(--glass-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: none; clip-path: var(--hex-clip-xs); border-radius: 0;
  font-size: var(--text-xs); font-weight: 500; color: var(--color-text-muted);
  margin-bottom: var(--space-6); letter-spacing: 0.04em; text-transform: uppercase;
}
.hero-badge-dot { width: 6px; height: 6px; background: var(--color-primary); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0; }
.hero h1 {
  font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.05; margin-bottom: var(--space-6); color: var(--color-text);
}
.hero h1 em { font-style: normal; color: var(--color-primary); }
.hero-sub {
  font-size: var(--text-lg); color: var(--color-text-muted);
  max-width: 520px; margin-bottom: var(--space-4); line-height: 1.6;
}
.hero-supporting {
  font-size: var(--text-base); color: var(--color-text-faint);
  max-width: 480px; margin-bottom: var(--space-8); line-height: 1.6;
  font-weight: 500;
}
@media (max-width: 900px) {
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-supporting { margin-left: auto; margin-right: auto; }
}
.hero-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
@media (max-width: 900px) { .hero-actions { justify-content: center; } }

/* Neural network graphic */
.neural-graphic {
  width: 100%; aspect-ratio: 1; max-width: 500px; margin: 0 auto;
}
.neural-graphic svg { width: 100%; height: 100%; }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none; border-radius: 0;
  clip-path: var(--hex-clip-md);
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.12));
  transition: transform var(--transition-interactive), filter var(--transition-interactive);
  position: relative;
}
.glass-card::before {
  content: ''; position: absolute; inset: 0;
  clip-path: var(--hex-clip-md);
  border: 1px solid var(--glass-border);
  border-radius: 0;
  pointer-events: none;
  z-index: 1;
}

/* ===== SECTIONS ===== */
.section { padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4); }
.section-inner { max-width: var(--content-wide); margin: 0 auto; }
.section-label {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--color-primary); margin-bottom: var(--space-4);
}
.section-title {
  font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em;
  color: var(--color-text); margin-bottom: var(--space-4);
}
.section-desc {
  font-size: var(--text-base); color: var(--color-text-muted);
  max-width: 560px; margin-bottom: var(--space-12); line-height: 1.7;
}
.section-center { text-align: center; }
.section-center .section-desc { margin-left: auto; margin-right: auto; }

/* ===== TRUSTED BY BAR (below hero) ===== */
.trusted-bar {
  padding: var(--space-8) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.trusted-bar-inner {
  max-width: var(--content-wide); margin: 0 auto;
  display: flex; align-items: center; gap: var(--space-10); flex-wrap: wrap; justify-content: center;
}

/* ===== CLIENTS (shared styles) ===== */
.clients-section-inner {
  display: flex; align-items: center; gap: var(--space-10); flex-wrap: wrap; justify-content: center;
  padding-bottom: var(--space-12); margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-divider);
}
.clients-label {
  font-size: var(--text-xs); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-text-faint); white-space: nowrap;
}
.client-logos {
  display: flex; align-items: center; gap: var(--space-10); flex-wrap: wrap; justify-content: center;
}
.client-logo-link {
  display: flex; align-items: center; justify-content: center;
  height: 52px; transition: opacity var(--transition-interactive);
  text-decoration: none;
}
.client-logo-link:hover { opacity: 0.7; }
.client-logo-img {
  height: 48px; width: auto; max-width: 200px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter var(--transition-interactive), opacity var(--transition-interactive);
}
.client-logo-link:hover .client-logo-img { filter: grayscale(0%); opacity: 0.9; }

/* Invert white-on-transparent logos in light mode */
[data-theme='light'] .client-logo-img[alt='Huston Electric'],
[data-theme='light'] .client-logo-img[alt='Crane Construction Group'] {
  filter: grayscale(100%) invert(1);
}
[data-theme='light'] .client-logo-link:hover .client-logo-img[alt='Huston Electric'],
[data-theme='light'] .client-logo-link:hover .client-logo-img[alt='Crane Construction Group'] {
  filter: invert(1); opacity: 0.9;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .client-logo-img[alt='Huston Electric'],
  :root:not([data-theme='dark']) .client-logo-img[alt='Crane Construction Group'] {
    filter: grayscale(100%) invert(1);
  }
  :root:not([data-theme='dark']) .client-logo-link:hover .client-logo-img[alt='Huston Electric'],
  :root:not([data-theme='dark']) .client-logo-link:hover .client-logo-img[alt='Crane Construction Group'] {
    filter: invert(1); opacity: 0.9;
  }
}
/* Invert black PUBLSH logo in dark mode */
[data-theme='dark'] .client-logo-img[alt='PUBLSH'] {
  filter: grayscale(100%) invert(1);
}
[data-theme='dark'] .client-logo-link:hover .client-logo-img[alt='PUBLSH'] {
  filter: invert(1); opacity: 0.9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .client-logo-img[alt='PUBLSH'] {
    filter: grayscale(100%) invert(1);
  }
  :root:not([data-theme='light']) .client-logo-link:hover .client-logo-img[alt='PUBLSH'] {
    filter: invert(1); opacity: 0.9;
  }
}
@media (max-width: 768px) {
  .client-logo-img { height: 36px; max-width: 150px; }
  .client-logo-link { height: 40px; }
}

/* ===== CTA ===== */
.cta-card {
  padding: clamp(var(--space-12), 6vw, var(--space-24));
  text-align: center; max-width: 800px; margin: 0 auto;
}
.cta-card h2 {
  font-size: var(--text-2xl); font-weight: 700; color: var(--color-text);
  margin-bottom: var(--space-4); letter-spacing: -0.02em;
}
.cta-card p {
  font-size: var(--text-base); color: var(--color-text-muted);
  max-width: 480px; margin: 0 auto var(--space-8); line-height: 1.7;
}
.cta-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-4); flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer { padding: var(--space-12) var(--space-4) var(--space-8); border-top: 1px solid var(--color-divider); }
.footer-inner {
  max-width: var(--content-wide); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-12);
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; gap: var(--space-8); } }
.footer-brand p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-4); max-width: 320px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  color: var(--color-text); margin-bottom: var(--space-4);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none; transition: color var(--transition-interactive); }
.footer-col a:hover { color: var(--color-text); }
.footer-bottom {
  max-width: var(--content-wide); margin: var(--space-8) auto 0;
  padding-top: var(--space-6); border-top: 1px solid var(--color-divider);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-xs); color: var(--color-text-faint);
}
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: var(--space-3); } }

/* ===== TEAM ===== */
.team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6);
}
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; } }
.team-card {
  padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; align-items: center;
  gap: var(--space-6); text-align: center; overflow: hidden;
}
.team-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.team-avatar-img {
  width: 180px; height: 220px; clip-path: var(--hex-clip-md); border-radius: 0; object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  filter: grayscale(100%) drop-shadow(0 0 0 transparent);
  transition: filter var(--transition-interactive), transform var(--transition-interactive);
}
.team-card:hover .team-avatar-img {
  filter: grayscale(0%) drop-shadow(0 0 4px var(--color-primary));
  transform: scale(1.03);
}
@media (max-width: 900px) {
  .team-avatar-img { width: 140px; height: 180px; clip-path: var(--hex-clip-sm); }
}
.team-info { display: flex; flex-direction: column; gap: var(--space-2); }
.team-info h3 {
  font-size: var(--text-lg); font-weight: 700; color: var(--color-text);
}
.team-role {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-primary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.team-info p {
  font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6;
}

/* ===== SCROLL REVEAL ===== */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0; animation: reveal-fade linear both;
    animation-timeline: view(); animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade { to { opacity: 1; } }

/* ===== DATAFLOW ANIMATION ===== */
.flow-path {
  stroke: var(--color-primary);
  stroke-width: 1;
  stroke-opacity: 0.12;
  fill: none;
}
.source-node .hex-shape {
  transition: stroke 0.3s ease, stroke-opacity 0.3s ease, filter 0.3s ease;
}
.source-node:hover .hex-shape {
  stroke: var(--color-primary);
  stroke-opacity: 0.5;
}
@keyframes core-breathe {
  0%, 100% { opacity: 0.08; transform-origin: 260px 260px; transform: scale(1); }
  50% { opacity: 0.14; transform-origin: 260px 260px; transform: scale(1.08); }
}
.core-ring-3 { animation: core-breathe 4s ease-in-out infinite; }
.core-ring-2 { animation: core-breathe 4s ease-in-out infinite 0.5s; }
@keyframes core-glow {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 8px var(--color-primary)); }
}
.core-center { animation: core-glow 4s ease-in-out infinite; }
@keyframes ambient-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.core-ambient { animation: ambient-pulse 4s ease-in-out infinite; }
.particle, .particle-b {
  will-change: transform, opacity;
}


/* ============================================================
   NEW SECTIONS — Problem, Process, Module Grid, Outputs,
   Differentiators, Speed, Demo CTA, Closing
   ============================================================ */

/* ===== PROBLEM STATEMENT ===== */
.problem-section {
  background: var(--color-surface-2);
}
.problem-pills {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  justify-content: center; margin: var(--space-10) auto;
  max-width: 820px;
}
.problem-pill {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: none; clip-path: var(--hex-clip-sm); border-radius: 0;
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text);
  transition: transform var(--transition-interactive);
}
.problem-pill:hover {
  transform: translateY(-2px); filter: drop-shadow(0 2px 8px rgba(200,16,46,0.15));
}
.problem-pill-icon {
  width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0;
}
.problem-conclusion {
  text-align: center; max-width: 640px; margin: var(--space-10) auto 0;
}
.problem-conclusion p {
  font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.6;
  margin-bottom: var(--space-4);
}
.problem-bold {
  font-weight: 700; color: var(--color-text) !important;
  font-size: var(--text-lg);
}

/* ===== PROCESS STEPS (How It Works) ===== */
/* ===== PROCESS TIMELINE ===== */
.proc-timeline {
  position: relative; margin-top: var(--space-16);
  display: flex; flex-direction: column; gap: var(--space-16);
}

/* Center vertical line */
.proc-line {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: var(--color-divider); opacity: 0.3;
}
.proc-line-fill {
  width: 100%; height: 0%; transition: none;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary));
  border-radius: 1px;
}

/* Each timeline row */
.proc-item {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  align-items: center; gap: 0;
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.proc-item.proc-visible {
  opacity: 1; transform: translateY(0);
}

/* Stagger children */
.proc-item.proc-visible .proc-card { transition-delay: 0.15s; }
.proc-item.proc-visible .proc-visual { transition-delay: 0.3s; }

/* Center dot with icon */
.proc-dot {
  width: 52px; height: 52px;
  clip-path: var(--hex-clip-sm); border-radius: 0;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; justify-self: center;
  box-shadow: 0 0 0 6px var(--color-bg);
  transition: box-shadow 0.4s ease;
}
.proc-visible .proc-dot {
  box-shadow: 0 0 0 6px var(--color-bg), 0 0 20px rgba(220, 38, 54, 0.25);
}
.proc-dot svg, .proc-dot i { width: 22px; height: 22px; }

/* Card side */
.proc-card {
  padding: var(--space-6) var(--space-8);
  opacity: 0; transform: translateX(-30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.proc-item--right .proc-card {
  transform: translateX(30px);
}
.proc-visible .proc-card {
  opacity: 1; transform: translateX(0);
}
.proc-num {
  font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 800;
  color: var(--color-primary); opacity: 0.15; line-height: 1;
  margin-bottom: var(--space-2);
}
.proc-title {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700;
  color: var(--color-text); margin-bottom: var(--space-3); line-height: 1.2;
}
.proc-desc {
  font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.7;
  max-width: 380px;
}
.proc-item--left .proc-card { text-align: right; margin-left: auto; }
.proc-item--left .proc-desc { margin-left: auto; }
.proc-item--right .proc-card { text-align: left; }

/* Visual side */
.proc-visual {
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateX(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.proc-item--left .proc-visual { transform: translateX(30px); }
.proc-item--right .proc-visual { transform: translateX(-30px); }
.proc-visible .proc-visual {
  opacity: 1; transform: translateX(0);
}
.proc-svg {
  width: 100%; max-width: 220px; height: auto;
}

/* SVG micro-animations */
@keyframes procScan {
  0% { x: 10; opacity: 0.6; }
  100% { x: 186; opacity: 0; }
}
.proc-visible .proc-scan {
  animation: procScan 2.5s ease-in-out 0.8s infinite;
}
@keyframes procBuildIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 0.5; transform: translateY(0); }
}
.proc-visible .proc-build-1 { animation: procBuildIn 0.5s ease-out 1s forwards; }
.proc-visible .proc-build-2 { animation: procBuildIn 0.5s ease-out 1.3s forwards; }
.proc-visible .proc-build-3 { animation: procBuildIn 0.5s ease-out 1.6s forwards; }

@keyframes procClick {
  0% { r: 0; opacity: 0.5; }
  50% { r: 14; opacity: 0.2; }
  100% { r: 20; opacity: 0; }
}
.proc-visible .proc-click {
  animation: procClick 1.8s ease-out 1s infinite;
}
@keyframes procCursorMove {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, 4px); }
}
.proc-visible .proc-cursor {
  animation: procCursorMove 2.5s ease-in-out 0.6s infinite;
}

@keyframes procLaunchRing {
  0% { r: 35; opacity: 0.2; }
  100% { r: 50; opacity: 0; }
}
.proc-visible .proc-launch-ring {
  animation: procLaunchRing 2s ease-out 1s infinite;
}
@keyframes procRocketUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.proc-visible .proc-rocket {
  animation: procRocketUp 2s ease-in-out 0.8s infinite;
}

/* ===== MOBILE PROCESS ===== */
@media (max-width: 900px) {
  .proc-timeline { gap: var(--space-12); }
  .proc-item,
  .proc-item.proc-item--left,
  .proc-item.proc-item--right {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 0 var(--space-4);
  }
  .proc-line {
    left: 24px; transform: none;
  }
  .proc-dot {
    width: 48px; height: 48px;
    grid-row: 1; grid-column: 1;
    align-self: start; margin-top: var(--space-1);
  }
  .proc-card {
    grid-row: 1; grid-column: 2;
    text-align: left !important;
    padding: 0 0 0 var(--space-2);
    margin-left: 0 !important;
  }
  .proc-item--left .proc-card,
  .proc-item--right .proc-card {
    transform: translateX(20px);
  }
  .proc-item--left .proc-desc,
  .proc-item--right .proc-desc { margin-left: 0; max-width: 100%; }
  .proc-timeline { padding-right: var(--space-4); }
  .proc-visual {
    grid-row: 2; grid-column: 2;
    justify-content: flex-start;
    padding: var(--space-4) 0 0 var(--space-2);
  }
  .proc-item--left .proc-visual,
  .proc-item--right .proc-visual {
    transform: translateY(20px);
  }
  .proc-visible .proc-visual { transform: translateY(0) translateX(0); }
  .proc-svg { max-width: 180px; }
  .proc-title { font-size: var(--text-lg); }
  .proc-desc { font-size: var(--text-sm); }
  .proc-num { font-size: var(--text-2xl); }
}

/* ===== PIPELINE ANIMATION ===== */
.pipeline-visual {
  margin-top: var(--space-12); padding: var(--space-8) var(--space-4);
  background: var(--glass-bg); border: none;
  clip-path: var(--hex-clip-md); border-radius: 0; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.12));
}
.pipe-track {
  display: flex; align-items: flex-start; gap: 0; justify-content: space-between;
}
.pipe-node {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  text-align: center; position: relative;
}
.pipe-node-icon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg); border: none; clip-path: var(--hex-clip-sm); border-radius: 0;
  color: var(--color-text-muted); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1)); position: relative; z-index: 1;
}
.pipe-node-icon--primary { background: var(--color-primary-light); color: var(--color-primary); border-color: rgba(200,16,46,0.2); }
.pipe-node-icon--success { background: var(--color-primary-light); color: var(--color-primary); border-color: rgba(200,16,46,0.2); }
.pipe-node-label {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text); margin-top: var(--space-2);
}
.pipe-node-detail {
  font-size: 0.65rem; color: var(--color-text-faint); max-width: 120px; line-height: 1.4;
}
.pipe-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 56px; position: relative; flex-shrink: 0;
}
.pipe-arrow::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px;
  background: var(--color-primary); opacity: 0.2;
}
.pipe-arrow-dot {
  width: 6px; height: 6px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0; background: var(--color-primary);
  animation: pipe-dot-move 2.4s ease-in-out infinite;
  position: relative; z-index: 1;
}
@keyframes pipe-dot-move {
  0% { transform: translateX(-16px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(16px); opacity: 0; }
}
.pipe-arrow:nth-child(2) .pipe-arrow-dot { animation-delay: 0s; }
.pipe-arrow:nth-child(4) .pipe-arrow-dot { animation-delay: 0.6s; }
.pipe-arrow:nth-child(6) .pipe-arrow-dot { animation-delay: 1.2s; }
.pipe-scan-line {
  position: absolute; top: 0; left: 8px; right: 8px; height: 2px;
  background: var(--color-primary); border-radius: 1px; opacity: 0.6;
  animation: pipe-scan 2s ease-in-out infinite;
}
@keyframes pipe-scan {
  0%, 100% { top: 4px; opacity: 0; }
  10% { opacity: 0.6; }
  50% { top: 48px; opacity: 0.6; }
  60% { opacity: 0; }
}
.pipe-typing {
  display: flex; gap: 3px; margin-top: var(--space-1); justify-content: center;
}
.pipe-typing span {
  width: 5px; height: 5px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0; background: var(--color-primary); opacity: 0.3;
  animation: pipe-type 1.4s ease-in-out infinite;
}
.pipe-typing span:nth-child(2) { animation-delay: 0.2s; }
.pipe-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pipe-type {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.pipe-check { margin-top: var(--space-1); }
.pipe-check-path {
  stroke-dasharray: 30; stroke-dashoffset: 30;
  animation: pipe-check-draw 0.6s ease forwards 1.8s;
}
@keyframes pipe-check-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 600px) {
  .pipe-track { flex-direction: column; align-items: center; gap: var(--space-2); }
  .pipe-arrow { width: 56px; height: 24px; transform: rotate(90deg); }
  .pipe-node-detail { max-width: 180px; }
}

/* ===== TASKS & AGENTS ===== */
.tasks-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8);
}
@media (max-width: 768px) { .tasks-layout { grid-template-columns: 1fr; } }
.task-card {
  padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-5);
}
.task-card-icon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-light); clip-path: var(--hex-clip-sm); border-radius: 0; color: var(--color-primary);
}
.task-card h3 { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); }
.task-card p { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.6; }

/* Task assignment animation */
.task-anim {
  display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-6);
  padding: var(--space-5); background: var(--color-surface-2); clip-path: var(--hex-clip-sm); border-radius: 0;
}
.task-anim-sources, .task-anim-outputs {
  display: flex; flex-direction: column; gap: var(--space-3); flex: 1;
}
.task-anim-src {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.7rem; color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3); background: var(--glass-bg); border: none;
  clip-path: var(--hex-clip-xs); border-radius: 0; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  animation: task-src-pulse 3s ease-in-out infinite;
}
.task-anim-src svg { flex-shrink: 0; color: var(--color-text-faint); }
@keyframes task-src-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  30% { opacity: 1; transform: translateX(4px); }
  60% { opacity: 0.5; transform: translateX(0); }
}
.task-anim-brain {
  flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.task-anim-brain-ring {
  position: absolute; inset: -4px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--color-primary);
  opacity: 0.08; animation: brain-ring-pulse 2s ease-in-out infinite;
}
@keyframes brain-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.15); opacity: 0.3; }
}
.task-anim-out {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.7rem; color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3); background: var(--glass-bg); border: none;
  clip-path: var(--hex-clip-xs); border-radius: 0; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  animation: task-out-slide 3s ease-in-out infinite;
}
@keyframes task-out-slide {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  30% { opacity: 1; transform: translateX(-4px); }
  60% { opacity: 0.5; transform: translateX(0); }
}
.task-anim-avatar {
  width: 22px; height: 22px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0;
  background: var(--color-primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; flex-shrink: 0;
}
.task-anim-priority {
  margin-left: auto; font-size: 0.55rem; font-weight: 600; padding: 2px 8px;
  clip-path: var(--hex-clip-xs); border-radius: 0; text-transform: uppercase; letter-spacing: 0.04em;
}
.task-anim-priority--high { background: rgba(200,16,46,0.12); color: var(--color-primary); }
.task-anim-priority--med { background: rgba(245,158,11,0.12); color: #b45309; }
.task-anim-priority--low { background: rgba(34,197,94,0.12); color: #15803d; }
[data-theme='dark'] .task-anim-priority--med { color: #fbbf24; }
[data-theme='dark'] .task-anim-priority--low { color: #4ade80; }

@media (max-width: 500px) {
  .task-anim { flex-direction: column; }
}

/* Agent V2 animation */
.agent-anim-v2 { margin-top: var(--space-6); }
.agent-v2-card {
  padding: var(--space-5); background: var(--color-surface-2); border: none;
  clip-path: var(--hex-clip-sm);
}
.agent-v2-header {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-divider);
}
.agent-v2-icon {
  width: 32px; height: 32px; clip-path: var(--hex-clip-xs); border-radius: 0;
  background: var(--color-primary-light); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.agent-v2-title { flex: 1; }
.agent-v2-name { font-size: 0.65rem; font-weight: 500; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.06em; display: block; }
.agent-v2-task { font-size: var(--text-xs); font-weight: 600; color: var(--color-text); }
.agent-v2-status {
  font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 10px; clip-path: var(--hex-clip-xs); border-radius: 0;
  background: rgba(34,197,94,0.1); color: #15803d;
  animation: agent-v2-status-pulse 2s ease-in-out infinite;
}
[data-theme='dark'] .agent-v2-status { color: #4ade80; background: rgba(34,197,94,0.15); }
@keyframes agent-v2-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.agent-v2-timeline {
  display: flex; flex-direction: column; gap: 0; padding-left: var(--space-2);
}
.agent-v2-step {
  display: flex; align-items: center; gap: var(--space-3); position: relative;
  padding-bottom: var(--space-4);
}
.agent-v2-step:last-child { padding-bottom: 0; }
.agent-v2-step-line {
  position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px;
  background: var(--color-divider);
}
.agent-v2-step:last-child .agent-v2-step-line { display: none; }
.agent-v2-step-dot {
  width: 16px; height: 16px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0; flex-shrink: 0;
  background: var(--color-divider);
  position: relative; z-index: 1; transition: all 0.3s ease;
}
.agent-v2-step-content {
  display: flex; align-items: center; gap: var(--space-3); flex: 1;
}
.agent-v2-step-label {
  font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 500;
}
.agent-v2-step-time {
  font-size: 0.6rem; color: var(--color-text-faint); font-family: var(--font-body);
  margin-left: auto;
}
.agent-v2-step[data-step="1"] { animation: agent-v2-complete-step 8s ease-in-out infinite; animation-delay: 0s; }
.agent-v2-step[data-step="2"] { animation: agent-v2-complete-step 8s ease-in-out infinite; animation-delay: 1.2s; }
.agent-v2-step[data-step="3"] { animation: agent-v2-complete-step 8s ease-in-out infinite; animation-delay: 2.4s; }
.agent-v2-step[data-step="4"] { animation: agent-v2-complete-step 8s ease-in-out infinite; animation-delay: 3.6s; }
.agent-v2-step[data-step="5"] { animation: agent-v2-complete-step 8s ease-in-out infinite; animation-delay: 4.8s; }
.agent-v2-step[data-step="1"] .agent-v2-step-dot { animation: agent-v2-dot-fill 8s ease-in-out infinite; animation-delay: 0s; }
.agent-v2-step[data-step="2"] .agent-v2-step-dot { animation: agent-v2-dot-fill 8s ease-in-out infinite; animation-delay: 1.2s; }
.agent-v2-step[data-step="3"] .agent-v2-step-dot { animation: agent-v2-dot-fill 8s ease-in-out infinite; animation-delay: 2.4s; }
.agent-v2-step[data-step="4"] .agent-v2-step-dot { animation: agent-v2-dot-fill 8s ease-in-out infinite; animation-delay: 3.6s; }
.agent-v2-step[data-step="5"] .agent-v2-step-dot { animation: agent-v2-dot-fill 8s ease-in-out infinite; animation-delay: 4.8s; }
.agent-v2-step[data-step="1"] .agent-v2-step-line { animation: agent-v2-line-fill 8s ease-in-out infinite; animation-delay: 0s; }
.agent-v2-step[data-step="2"] .agent-v2-step-line { animation: agent-v2-line-fill 8s ease-in-out infinite; animation-delay: 1.2s; }
.agent-v2-step[data-step="3"] .agent-v2-step-line { animation: agent-v2-line-fill 8s ease-in-out infinite; animation-delay: 2.4s; }
.agent-v2-step[data-step="4"] .agent-v2-step-line { animation: agent-v2-line-fill 8s ease-in-out infinite; animation-delay: 3.6s; }
.agent-v2-step[data-step="1"] .agent-v2-step-label { animation: agent-v2-label-active 8s ease-in-out infinite; animation-delay: 0s; }
.agent-v2-step[data-step="2"] .agent-v2-step-label { animation: agent-v2-label-active 8s ease-in-out infinite; animation-delay: 1.2s; }
.agent-v2-step[data-step="3"] .agent-v2-step-label { animation: agent-v2-label-active 8s ease-in-out infinite; animation-delay: 2.4s; }
.agent-v2-step[data-step="4"] .agent-v2-step-label { animation: agent-v2-label-active 8s ease-in-out infinite; animation-delay: 3.6s; }
.agent-v2-step[data-step="5"] .agent-v2-step-label { animation: agent-v2-label-active 8s ease-in-out infinite; animation-delay: 4.8s; }
@keyframes agent-v2-dot-fill {
  0%, 5% { background: var(--color-primary); filter: drop-shadow(0 0 3px rgba(200,16,46,0.3)); }
  15%, 70% { background: var(--color-primary); filter: none; }
  85%, 100% { background: var(--color-divider); filter: none; }
}
@keyframes agent-v2-line-fill {
  0%, 5% { background: var(--color-divider); }
  15%, 70% { background: var(--color-primary); }
  85%, 100% { background: var(--color-divider); }
}
@keyframes agent-v2-label-active {
  0%, 5% { color: var(--color-text); font-weight: 600; }
  15%, 70% { color: var(--color-text-muted); font-weight: 500; }
  85%, 100% { color: var(--color-text-muted); font-weight: 500; }
}
.agent-v2-step--final .agent-v2-step-label { font-weight: 600; }
.agent-v2-step--final .agent-v2-step-time { display: none; }
.agent-v2-progress {
  margin-top: var(--space-4); height: 3px; background: var(--color-divider); border-radius: 2px;
  overflow: hidden;
}
.agent-v2-progress-fill {
  height: 100%; width: 0%; background: var(--color-primary); border-radius: 2px;
  animation: agent-v2-progress-grow 8s ease-in-out infinite;
}
@keyframes agent-v2-progress-grow {
  0% { width: 0%; }
  10% { width: 20%; }
  25% { width: 40%; }
  40% { width: 60%; }
  55% { width: 80%; }
  70% { width: 100%; }
  80%, 100% { width: 0%; }
}

/* ===== PLATFORM MOCKUP ===== */
.platform-mockup-wrap {
  perspective: 1200px;
  margin-top: var(--space-10);
  margin-bottom: var(--space-10);
}
.platform-mockup {
  display: flex; clip-path: var(--hex-clip-lg); border-radius: 0; overflow: hidden;
  border: none; filter: drop-shadow(0 12px 32px rgba(0,0,0,0.15));
  background: var(--color-surface); font-family: var(--font-body);
  transform: rotateY(-2deg) rotateX(1deg);
  transition: transform 0.4s ease;
  min-height: 520px;
}
.platform-mockup:hover { transform: rotateY(0) rotateX(0); }
@media (max-width: 900px) {
  .platform-mockup { transform: none; min-height: 420px; }
}
.pm-sidebar {
  width: 160px; flex-shrink: 0; background: var(--color-surface-offset);
  border-right: 1px solid var(--color-divider); padding: var(--space-6) 0;
  display: flex; flex-direction: column;
}
.pm-sidebar-logo {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-6); font-size: 0.75rem;
  font-weight: 700; color: var(--color-text); letter-spacing: 0.06em;
}
.pm-logo-dot {
  width: 16px; height: 16px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border-radius: 0; background: var(--color-primary);
}
.pm-nav-items { display: flex; flex-direction: column; gap: 2px; }
.pm-nav-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-4); font-size: 0.75rem; color: var(--color-text-faint);
  font-weight: 500; cursor: pointer; transition: color 0.15s ease, background 0.15s ease;
  user-select: none;
}
.pm-nav-item:hover { color: var(--color-text-muted); background: var(--color-primary-light); }
.pm-nav-item--active {
  color: var(--color-text); background: var(--color-primary-light);
  border-left: 2px solid var(--color-primary);
}
.pm-nav-icon {
  width: 14px; height: 14px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border-radius: 0; background: var(--color-divider);
}
.pm-nav-item--active .pm-nav-icon { background: var(--color-primary); }
.pm-main {
  flex: 1; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4);
  min-width: 0; overflow: hidden; position: relative;
}
.pm-header-bar {
  font-size: 0.85rem; font-weight: 700; color: var(--color-text);
  letter-spacing: 0.04em; padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}
.pm-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.pm-kpi {
  background: var(--color-surface-2); border: none;
  clip-path: var(--hex-clip-xs); border-radius: 0; padding: var(--space-4);
  display: flex; flex-direction: column; gap: 4px;
}
.pm-kpi-label { font-size: 0.65rem; color: var(--color-text-faint); font-weight: 500; }
.pm-kpi-val { font-size: 1.1rem; font-weight: 700; color: var(--color-text); font-family: var(--font-display); }
.pm-pipeline-row {
  background: var(--color-surface-2); border: none;
  clip-path: var(--hex-clip-xs); border-radius: 0; padding: var(--space-4);
}
.pm-section-title {
  font-size: 0.7rem; font-weight: 700; color: var(--color-text);
  display: block; margin-bottom: var(--space-3); letter-spacing: 0.02em;
}
.pm-pipeline-stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-3); }
.pm-stage { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pm-stage-num { font-size: 1rem; font-weight: 700; color: var(--color-text); font-family: var(--font-display); }
.pm-stage-badge {
  font-size: 0.5rem; font-weight: 600; padding: 3px 10px;
  clip-path: var(--hex-clip-xs); border-radius: 0; text-transform: uppercase; letter-spacing: 0.04em;
}
.pm-stage-badge--lead { background: rgba(99,102,241,0.15); color: #818cf8; }
.pm-stage-badge--demo { background: rgba(59,130,246,0.15); color: #60a5fa; }
.pm-stage-badge--proposal { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pm-stage-badge--signed { background: rgba(34,197,94,0.15); color: #4ade80; }
.pm-stage-badge--progress { background: rgba(236,72,153,0.15); color: #f472b6; }
.pm-stage-badge--complete { background: rgba(20,184,166,0.15); color: #2dd4bf; }
.pm-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); flex: 1; }
.pm-widget {
  background: var(--color-surface-2); border: none;
  clip-path: var(--hex-clip-xs); border-radius: 0; padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.pm-meeting { display: flex; align-items: center; gap: var(--space-3); padding: 6px 0; }
.pm-meeting-icon {
  width: 22px; height: 22px; clip-path: var(--hex-clip-xs); border-radius: 0;
  background: rgba(59,130,246,0.15); flex-shrink: 0;
}
.pm-meeting-name { display: block; font-size: 0.65rem; font-weight: 600; color: var(--color-text); }
.pm-meeting-time { display: block; font-size: 0.55rem; color: var(--color-text-faint); }
.pm-email {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--color-divider);
}
.pm-email:last-child { border-bottom: none; }
.pm-email-subject { font-size: 0.65rem; font-weight: 500; color: var(--color-text); }
.pm-email-time { font-size: 0.55rem; color: var(--color-text-faint); white-space: nowrap; }
.pm-view { animation: pm-fade-in 0.3s ease; display: flex; flex-direction: column; gap: var(--space-4); }
@keyframes pm-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.pm-mobile-indicator { display: none; }
@media (max-width: 600px) {
  .pm-sidebar { display: none; }
  .pm-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .pm-pipeline-stages { grid-template-columns: repeat(3, 1fr); }
  .pm-bottom-row { grid-template-columns: 1fr; }
  .platform-mockup { min-height: 380px; flex-direction: column; }
  .pm-main { padding: var(--space-4); overflow-y: auto; }
  .pm-mobile-indicator {
    display: flex; flex-direction: column; gap: 8px;
    padding: var(--space-3) var(--space-4) 0;
    border-bottom: 1px solid var(--color-divider);
    background: var(--color-surface-offset);
  }
  .pm-mobile-tab-label {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em;
    color: var(--color-text); text-transform: uppercase;
    display: flex; align-items: center; justify-content: space-between;
  }
  .pm-mobile-tab-label span {
    font-size: 0.55rem; font-weight: 400; color: var(--color-text-faint);
    letter-spacing: normal; text-transform: none;
  }
  .pm-mobile-dots { display: flex; gap: 6px; justify-content: center; padding-bottom: var(--space-3); }
  .pm-mobile-dot {
    width: 6px; height: 6px; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); border-radius: 0;
    background: var(--color-divider); transition: background 0.3s ease, transform 0.3s ease;
  }
  .pm-mobile-dot--active { background: var(--color-primary); transform: scale(1.3); }
  .pm-mobile-progress {
    height: 2px; background: var(--color-divider); border-radius: 1px; overflow: hidden; margin-bottom: -1px;
  }
  .pm-mobile-progress-fill {
    height: 100%; background: var(--color-primary); border-radius: 1px;
    width: 0%; transition: width 0.15s linear;
  }
}

/* ===== PLATFORM DEMO + FEATURE LIST ===== */
.platform-demo {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: var(--space-12);
}
.platform-demo-title {
  font-size: var(--text-2xl); font-weight: 700; color: var(--color-text);
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: var(--space-5);
}
.platform-demo-desc {
  font-size: var(--text-base); color: var(--color-text-muted);
  max-width: 560px; margin: 0 auto var(--space-8); line-height: 1.7;
}
.platform-divider {
  width: 100%; height: 1px;
  background: var(--color-divider);
  margin-bottom: var(--space-12);
}

/* Feature list — clean inline tags */
.feature-list {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-8);
  max-width: 900px;
  margin-left: auto; margin-right: auto;
}
.feature-item {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  clip-path: var(--hex-clip-sm); border-radius: 0;
  border: none;
  background: var(--color-surface);
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text);
  transition: transform var(--transition-interactive), background var(--transition-interactive), filter var(--transition-interactive);
  white-space: nowrap;
}
.feature-item:hover {
  transform: translateY(-1px);
  background: var(--color-primary-light);
  filter: drop-shadow(0 2px 6px rgba(200,16,46,0.12));
}
.feature-item i, .feature-item svg {
  width: 16px; height: 16px; color: var(--color-primary); flex-shrink: 0;
}

@media (max-width: 600px) {
  .feature-list { gap: var(--space-2); }
  .feature-item { font-size: var(--text-xs); padding: var(--space-2) var(--space-3); }
}

/* ===== OUTPUTS GRID ===== */
/* ===== DELIVERABLES GRID ===== */
.deliv-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6);
  margin-top: var(--space-10);
}
.deliv-card {
  clip-path: var(--hex-clip-sm); border-radius: 0;
  background: var(--color-surface);
  overflow: hidden;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out), filter 0.3s ease;
}
.deliv-card.deliv-visible {
  opacity: 1; transform: translateY(0);
}
.deliv-card:hover {
  filter: drop-shadow(0 8px 24px rgba(200,16,46,0.12));
}
.deliv-visual {
  padding: var(--space-2) var(--space-2) 0;
}
.deliv-svg {
  width: 100%; height: auto; display: block;
}
.deliv-title {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700;
  color: var(--color-text); padding: var(--space-4) var(--space-5) var(--space-1);
  line-height: 1.3;
}
.deliv-desc {
  font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5;
  padding: 0 var(--space-5) var(--space-5);
}

/* Chart line draw animation */
.deliv-chart-line {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.5s ease-out;
}
.deliv-visible .deliv-chart-line { stroke-dashoffset: 0; }
.deliv-chart-fill { opacity: 0; transition: opacity 0.8s ease 1s; }
.deliv-visible .deliv-chart-fill { opacity: 0.08; }
.deliv-chart-dot { opacity: 0; transition: opacity 0.3s ease 1.4s; }
.deliv-visible .deliv-chart-dot { opacity: 1; }
.deliv-chart-val { opacity: 0; transition: opacity 0.3s ease 1.4s; }
.deliv-visible .deliv-chart-val { opacity: 1; }

/* Pipeline bars grow */
.deliv-bar { transform-origin: left; transform: scaleX(0); }
.deliv-visible .deliv-bar { transition: transform 0.8s var(--ease-out); transform: scaleX(1); }
.deliv-visible .deliv-bar-1 { transition-delay: 0.2s; }
.deliv-visible .deliv-bar-2 { transition-delay: 0.4s; }
.deliv-visible .deliv-bar-3 { transition-delay: 0.6s; }
.deliv-visible .deliv-bar-4 { transition-delay: 0.8s; }

/* Contract progress bar */
.deliv-contract-progress { transition: width 1.5s ease-out 0.5s; }
.deliv-visible .deliv-contract-progress { width: 50px; }

/* Highlight flicker */
@keyframes delivHighlight {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.35; }
}
.deliv-visible .deliv-highlight { animation: delivHighlight 2s ease-in-out 0.8s infinite; }

/* Donut fill */
.deliv-donut-1 { transition: stroke-dasharray 1.2s ease-out 0.4s; }
.deliv-visible .deliv-donut-1 { stroke-dasharray: 137 201; }

/* Exec bars grow up */
@keyframes delivBarGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.deliv-exec-bar-1, .deliv-exec-bar-2, .deliv-exec-bar-3, .deliv-exec-bar-4 {
  transform-origin: bottom; transform: scaleY(0);
}
.deliv-visible .deliv-exec-bar-1 { animation: delivBarGrow 0.6s ease-out 0.3s forwards; }
.deliv-visible .deliv-exec-bar-2 { animation: delivBarGrow 0.6s ease-out 0.5s forwards; }
.deliv-visible .deliv-exec-bar-3 { animation: delivBarGrow 0.6s ease-out 0.7s forwards; }
.deliv-visible .deliv-exec-bar-4 { animation: delivBarGrow 0.6s ease-out 0.9s forwards; }

/* Onboarding steps light up sequentially */
.deliv-onb { opacity: 0.3; transition: opacity 0.4s ease, fill-opacity 0.4s ease; }
.deliv-onb-line { opacity: 0; transition: opacity 0.4s ease; }
.deliv-visible .deliv-onb-1 { opacity: 1; transition-delay: 0.3s; }
.deliv-visible .deliv-onb-line-1 { opacity: 0.5; transition-delay: 0.5s; }
.deliv-visible .deliv-onb-2 { opacity: 1; transition-delay: 0.7s; }
.deliv-visible .deliv-onb-line-2 { opacity: 0.5; transition-delay: 0.9s; }
.deliv-visible .deliv-onb-3 { opacity: 1; transition-delay: 1.1s; }
.deliv-visible .deliv-onb-line-3 { opacity: 0.5; transition-delay: 1.3s; }
.deliv-visible .deliv-onb-4 { opacity: 1; transition-delay: 1.5s; }

/* Ops hub pulse */
@keyframes delivOpsPulse {
  0% { r: 20; opacity: 0.4; }
  100% { r: 35; opacity: 0; }
}
.deliv-visible .deliv-ops-pulse {
  animation: delivOpsPulse 2s ease-out 0.5s infinite;
}

/* Stagger card reveal */
.deliv-card:nth-child(1) { transition-delay: 0s; }
.deliv-card:nth-child(2) { transition-delay: 0.1s; }
.deliv-card:nth-child(3) { transition-delay: 0.2s; }
.deliv-card:nth-child(4) { transition-delay: 0.3s; }
.deliv-card:nth-child(5) { transition-delay: 0.4s; }
.deliv-card:nth-child(6) { transition-delay: 0.5s; }
.deliv-card:nth-child(7) { transition-delay: 0.6s; }
.deliv-card:nth-child(8) { transition-delay: 0.7s; }
.deliv-card:nth-child(9) { transition-delay: 0.8s; }

@media (max-width: 900px) { .deliv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .deliv-grid { grid-template-columns: 1fr; } }

/* ===== DIFFERENTIATORS GRID ===== */
.diff-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6);
  max-width: 800px; margin: var(--space-8) auto 0;
}
@media (max-width: 600px) { .diff-grid { grid-template-columns: 1fr; } }
.diff-item {
  display: flex; align-items: flex-start; gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  clip-path: var(--hex-clip-sm); border-radius: 0;
  border: none;
  background: var(--color-surface);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.diff-item:hover {
  transform: translateY(-2px); filter: drop-shadow(0 4px 12px rgba(200,16,46,0.12));
}
.diff-icon {
  color: var(--color-primary); flex-shrink: 0; margin-top: 2px;
}
.diff-icon i, .diff-icon svg { width: 22px; height: 22px; }
.diff-item p {
  font-size: var(--text-base); color: var(--color-text); font-weight: 500; line-height: 1.5;
}

/* ====== SPEED RACE ====== */
.speed-race {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-6);
  max-width: 960px;
  margin: var(--space-10) auto 0;
  align-items: start;
}

/* Lane cards */
.speed-lane {
  clip-path: var(--hex-clip-md);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.speed-lane--old {
  background: var(--color-surface);
}
.speed-lane--new {
  background: var(--color-surface);
  border: 1px solid rgba(220, 38, 54, 0.15);
}
[data-theme="dark"] .speed-lane--new {
  background: rgba(220, 38, 54, 0.06);
  border-color: rgba(220, 38, 54, 0.2);
}

/* Lane icon */
.speed-lane-icon {
  color: var(--color-text-faint);
  opacity: 0.5;
}
.speed-lane--new .speed-lane-icon {
  opacity: 1;
  color: var(--color-primary);
}

/* Lane label */
.speed-lane-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
}
.speed-lane-label--highlight {
  color: var(--color-primary);
}

/* Counter */
.speed-lane-counter {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.speed-lane-counter--fast {
  color: var(--color-primary);
}
.speed-lane-unit {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-faint);
  margin-top: calc(var(--space-1) * -1);
}
.speed-lane-unit--fast {
  color: var(--color-primary);
}

/* Progress bar */
.speed-lane-bar {
  width: 100%;
  height: 6px;
  background: var(--color-divider);
  clip-path: var(--hex-clip-xs);
  overflow: hidden;
  margin: var(--space-2) 0;
}
.speed-lane-fill {
  height: 100%;
  width: 0%;
  transition: width 0.15s linear;
}
.speed-lane-fill--slow {
  background: var(--color-text-faint);
}
.speed-lane-fill--fast {
  background: var(--color-primary);
  box-shadow: 0 0 12px rgba(220, 38, 54, 0.4);
}
.speed-lane-bar--fast {
  border: 1px solid rgba(220, 38, 54, 0.15);
}

/* Phase dots (traditional side) */
.speed-lane-phases {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  min-height: 28px;
}
.speed-phase {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.speed-phase.active {
  opacity: 1;
  transform: translateY(0);
}
.speed-phase-dot {
  width: 8px; height: 8px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--color-text-faint);
}
.speed-phase.active .speed-phase-dot {
  background: var(--color-text-muted);
}
.speed-phase-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Check marks (HoosAI side) */
.speed-lane-checkmarks {
  display: flex;
  gap: var(--space-5);
  min-height: 28px;
}
.speed-check {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.speed-check.active {
  opacity: 1;
  transform: scale(1);
}
.speed-check span {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Verdict */
.speed-lane-verdict {
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}
.speed-lane-verdict.visible {
  opacity: 1;
  transform: translateY(0);
}
.speed-lane-verdict--done {
  color: var(--color-primary);
}
.speed-lane-verdict--done.visible {
  animation: speed-verdict-glow 2s ease-in-out infinite;
}
@keyframes speed-verdict-glow {
  0%, 100% { filter: drop-shadow(0 0 0px transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(220, 38, 54, 0.3)); }
}

/* VS divider */
.speed-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-top: var(--space-16);
}
.speed-vs span {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--color-text-faint);
  background: var(--color-surface);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom stats */
.speed-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 720px;
  margin: var(--space-10) auto 0;
  text-align: center;
}
.speed-stat {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.speed-stat.visible {
  opacity: 1;
  transform: translateY(0);
}
.speed-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}
.speed-stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Mobile speed */
@media (max-width: 700px) {
  .speed-race {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .speed-vs {
    margin-top: 0;
  }
  .speed-lane {
    padding: var(--space-6) var(--space-5);
  }
  .speed-lane-counter {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
  .speed-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
  .speed-stat-num {
    font-size: var(--text-xl);
  }
}



/* ===== CLOSING SECTION ===== */
.closing-message {
  text-align: center; max-width: 640px; margin: 0 auto;
}
.closing-message .section-title {
  margin-bottom: var(--space-4);
}
.closing-message .section-desc {
  margin-left: auto; margin-right: auto;
  margin-bottom: var(--space-8);
}

/* ===== DEMO REQUEST MODAL ===== */
.demo-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: var(--space-4);
}
.demo-overlay--open {
  opacity: 1; visibility: visible;
}
.demo-modal {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  clip-path: var(--hex-clip-lg);
  padding: var(--space-10) var(--space-8) var(--space-8);
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.2));
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease-out);
}
.demo-overlay--open .demo-modal {
  transform: translateY(0) scale(1);
}
.demo-close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  clip-path: var(--hex-clip-xs); border-radius: 0;
  color: var(--color-text-muted); background: var(--color-surface-offset);
  transition: color var(--transition-interactive), background var(--transition-interactive);
  z-index: 1;
}
.demo-close:hover {
  color: var(--color-text); background: var(--color-surface-2);
}
.demo-modal-header {
  text-align: center; margin-bottom: var(--space-6);
}
.demo-modal-title {
  font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: 700; color: var(--color-text); margin-bottom: var(--space-2);
}
.demo-modal-desc {
  font-size: var(--text-sm); color: var(--color-text-muted);
  line-height: 1.6; max-width: 380px; margin: 0 auto;
}

/* Form fields */
.demo-form {
  display: flex; flex-direction: column; gap: var(--space-4);
}
.demo-field {
  display: flex; flex-direction: column; gap: var(--space-1);
}
.demo-label {
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text);
  letter-spacing: 0.02em;
}
.demo-optional {
  font-weight: 400; color: var(--color-text-faint);
}
.demo-input {
  width: 100%; padding: var(--space-3) var(--space-4);
  font-family: var(--font-body); font-size: var(--text-sm);
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border);
  clip-path: var(--hex-clip-sm); border-radius: 0;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  outline: none;
}
.demo-input::placeholder {
  color: var(--color-text-faint);
}
.demo-input:focus {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.demo-textarea {
  resize: vertical; min-height: 80px; line-height: 1.5;
}
.demo-submit {
  width: 100%; justify-content: center;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base); margin-top: var(--space-2);
}

/* Success state */
.demo-success {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: var(--space-4); padding: var(--space-8) 0;
}
.demo-success-icon {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-light);
  clip-path: var(--hex-clip-sm); border-radius: 0;
}
.demo-success-title {
  font-family: var(--font-display); font-size: var(--text-lg);
  font-weight: 700; color: var(--color-text);
}
.demo-success-desc {
  font-size: var(--text-sm); color: var(--color-text-muted);
  line-height: 1.6; max-width: 320px;
}

/* Dark mode overrides */
[data-theme='dark'] .demo-modal {
  background: rgba(10, 10, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme='dark'] .demo-input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme='dark'] .demo-input:focus {
  border-color: var(--color-primary);
  background: rgba(220, 38, 54, 0.1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .demo-modal {
    background: rgba(10, 10, 10, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
  }
  :root:not([data-theme='light']) .demo-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
  }
  :root:not([data-theme='light']) .demo-input:focus {
    border-color: var(--color-primary);
    background: rgba(220, 38, 54, 0.1);
  }
}

/* Mobile modal adjustments */
@media (max-width: 600px) {
  .demo-modal {
    padding: var(--space-8) var(--space-5) var(--space-6);
    clip-path: var(--hex-clip-md);
  }
  .demo-modal-title { font-size: var(--text-lg); }
}
