/* style.css — Decoder Design System (getdesign.md format) */

/* ========================================
   TOKENS
   ======================================== */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.8125rem);
  --text-sm:   clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg:   clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --text-xl:   clamp(1.25rem,  1rem  + 1vw, 1.75rem);
  --text-2xl:  clamp(1.75rem,  1rem  + 2.5vw, 2.75rem);
  --text-3xl:  clamp(2rem,     1rem  + 3.5vw, 3.5rem);
  --text-hero: clamp(2.75rem,  1rem  + 5vw,  5rem);

  /* Spacing (8px base) */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;

  /* Fonts */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'General Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', monospace;

  /* Secondary brand thread — capacity / ops emphasis (use sparingly) */
  --color-spine: #E69A2E;
  --color-spine-soft: rgba(230, 154, 46, 0.22);
  --color-spine-glow: rgba(230, 154, 46, 0.35);

  /* Brand Primary */
  --color-brand: #6C3CE1;
  --color-brand-hover: #5429B5;
  --color-brand-glow: rgba(108, 60, 225, 0.25);
  --color-brand-tint: rgba(108, 60, 225, 0.07);

  /* Aliases (legacy inline vars on subpages → brand) */
  --color-primary: var(--color-brand);
  --color-accent: var(--color-brand);

  /* Interface Chrome */
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F3F2EE;
  --color-border: #E5E3DD;
  --color-text: #1A1A2E;
  --color-text-muted: #6B6B7B;
  --color-text-faint: #A0A0AC;

  /* Solution Domain Colors */
  --color-teal: #0EA5E9;
  --color-amber: #F59E0B;
  --color-emerald: #10B981;
  --color-coral: #F43F5E;
  --color-violet: #8B5CF6;
  --color-blue: #3B82F6;

  --tint-teal: rgba(14, 165, 233, 0.08);
  --tint-amber: rgba(245, 158, 11, 0.08);
  --tint-emerald: rgba(16, 185, 129, 0.08);
  --tint-coral: rgba(244, 63, 94, 0.08);
  --tint-violet: rgba(139, 92, 246, 0.08);
  --tint-blue: rgba(59, 130, 246, 0.08);

  /* Gradients */
  --color-hero-start: #1C0F3A;
  --gradient-hero: linear-gradient(
    135deg,
    var(--color-hero-start) 0%,
    #1A1445 30%,
    #141B3D 60%,
    #0D1B2E 100%
  );
  /* Navbar “Book a Demo”: same 135° + stops as hero, with a brighter lead-in so the
     blend reads on a narrow pill (full hero gradient looks like flat black). */
  --gradient-hero-nav-cta: linear-gradient(
    135deg,
    #3d2868 0%,
    var(--color-hero-start) 28%,
    #1a1445 52%,
    #141b3d 76%,
    #0d1b2e 100%
  );
  --gradient-brand: linear-gradient(135deg, #6C3CE1 0%, #0EA5E9 100%);

  /* Glass */
  --glass-dark: rgba(0, 0, 0, 0.06);
  --glass-light: rgba(255, 255, 255, 0.18);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 50px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 4px 20px var(--color-brand-glow);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 200ms;

  /* Content widths */
  --content-narrow: 800px;
  --content-default: 1120px;
}

/* ========================================
   GLOBAL
   ======================================== */

a { color: var(--color-brand); text-decoration: none; }
a:hover { color: var(--color-brand-hover); }

body { background: var(--color-bg); }

::selection {
  background: rgba(108, 60, 225, 0.15);
  color: var(--color-text);
}

/* ========================================
   NAVBAR
   ======================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo img { height: 34px; width: auto; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}
.navbar-links > li { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.nav-link:hover {
  color: var(--color-brand);
  background: var(--color-brand-tint);
}

.nav-link .chevron {
  width: 12px; height: 12px;
  transition: transform var(--duration) var(--ease);
}

/* Dropdowns */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 200ms, transform 200ms, visibility 200ms;
  z-index: 200;
}
.navbar-links > li:hover .dropdown-menu,
.navbar-links > li:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.navbar-links > li:hover .chevron { transform: rotate(180deg); }

.dropdown-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.dropdown-menu a:hover {
  background: var(--color-brand-tint);
  color: var(--color-brand);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px; height: 36px;
  gap: 5px;
  border-radius: var(--radius-md);
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  overflow-y: auto;
  padding: var(--space-6);
}
.mobile-nav.active { display: block; }

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-nav-group-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-3) 0 var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-top: var(--space-4);
}
.mobile-nav-group-title:first-child { margin-top: 0; }
.mobile-nav-links a:not(.btn) {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
}
.mobile-nav-links a:not(.btn):hover { color: var(--color-brand); }

.mobile-nav-cta {
  margin-top: var(--space-6);
  text-align: center;
}

/* ========================================
   BUTTONS — Pill Geometry
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
  border: none;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  background: var(--color-brand-hover);
  color: #fff;
  box-shadow: 0 4px 16px var(--color-brand-glow);
  transform: translateY(-1px);
}

.navbar .btn-primary,
.mobile-nav .btn-primary {
  background: var(--gradient-hero-nav-cta);
  color: #fff;
  box-shadow: 0 2px 12px rgba(28, 15, 58, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: color var(--duration) var(--ease), box-shadow var(--duration) var(--ease),
    filter var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.navbar .btn-primary:hover,
.mobile-nav .btn-primary:hover {
  background: var(--gradient-hero-nav-cta);
  filter: brightness(1.06);
  color: #fff;
  box-shadow: 0 4px 18px rgba(13, 27, 46, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.btn-dark {
  background: var(--color-text);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
}
.btn-dark:hover {
  background: #2a2a40;
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--color-text);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
}
.btn-white:hover {
  background: rgba(255,255,255,0.9);
  color: var(--color-text);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-base);
}

/* ========================================
   PILLS / TAGS
   ======================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}
.pill-teal    { background: var(--tint-teal);    color: var(--color-teal); }
.pill-amber   { background: var(--tint-amber);   color: #B27308; }
.pill-emerald { background: var(--tint-emerald); color: #0A7B55; }
.pill-coral   { background: var(--tint-coral);   color: #BE1D3A; }
.pill-violet  { background: var(--tint-violet);  color: var(--color-violet); }
.pill-blue    { background: var(--tint-blue);    color: var(--color-blue); }
.pill-brand   { background: var(--color-brand-tint); color: var(--color-brand); }

/* ========================================
   SECTIONS
   ======================================== */

.section {
  padding: clamp(64px, 10vw, 128px) var(--space-6);
}
.section-alt { background: var(--color-surface-alt); }
.section-dark {
  background: var(--color-text);
  color: #fff;
}
.section-dark .section-label { color: rgba(255,255,255,0.45); }
.section-dark .section-title { color: #fff; }
.section-dark .section-subtitle { color: rgba(255,255,255,0.65); }

.container { max-width: var(--content-default); margin: 0 auto; }
.container-narrow { max-width: var(--content-narrow); margin: 0 auto; }

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 580px;
  line-height: 1.65;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

/* Solution cards — colored top border */
.card-solution {
  border-top: 3px solid var(--card-accent, var(--color-border));
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card-solution:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Glass card — for use on gradient/dark backgrounds */
.card-glass {
  background: var(--glass-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  color: #fff;
}

/* ========================================
   HERO
   ======================================== */

.hero {
  position: relative;
  padding: clamp(80px, 15vw, 160px) var(--space-6) clamp(64px, 10vw, 120px);
  overflow: hidden;
  background: var(--gradient-hero);
  color: #fff;
}

/* Subtle ambient glow — muted, enterprise-grade */
.hero::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(ellipse 60% 50% at 25% 40%, rgba(108, 60, 225, 0.18), transparent 60%),
              radial-gradient(ellipse 50% 40% at 75% 55%, rgba(14, 165, 233, 0.1), transparent 55%);
  animation: hero-drift 25s ease-in-out infinite alternate;
  z-index: 0;
}

/* Film grain + soft mesh — hero only */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(108, 60, 225, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 60%, rgba(14, 165, 233, 0.08), transparent 50%);
  background-size: 200px 200px, 100% 100%, 100% 100%;
  mix-blend-mode: overlay;
}

@keyframes hero-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 1%) scale(1.03); }
}

@keyframes hero-stagger-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 0.68rem + 0.3vw, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-5);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .hero-content > *,
  .hero .hero-showcase {
    opacity: 0;
    animation: hero-stagger-in 0.85s var(--ease) forwards;
  }
  .hero .hero-label { animation-delay: 0.1s; }
  .hero .hero-title { animation-delay: 0.22s; }
  .hero .hero-subtitle { animation-delay: 0.34s; }
  .hero .hero-actions { animation-delay: 0.46s; }
  .hero .hero-showcase { animation-delay: 0.6s; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-content > *,
  .hero .hero-showcase {
    opacity: 1;
    animation: none;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
}
.hero-title em {
  font-style: italic;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 540px;
  margin: 0 auto var(--space-8);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero .btn-white {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.hero .btn-white:hover {
  box-shadow:
    0 4px 24px var(--color-spine-glow),
    0 2px 12px rgba(0, 0, 0, 0.2);
}
.hero .btn-white:focus-visible {
  outline: 2px solid var(--color-spine);
  outline-offset: 3px;
}
.hero .btn-outline {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.hero .btn-outline:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ========================================
   TRUST BAR
   ======================================== */

.trust-bar {
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.trust-bar-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.trust-text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-faint);
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}
.trust-logo-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 6px 14px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-pill);
}

/* Avoid 3+1 flex-wrap on narrow viewports — 2×2 reads cleaner than a lone fourth pill */
@media (max-width: 640px) {
  .trust-logos {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
    column-gap: var(--space-3);
    row-gap: var(--space-3);
  }
}

/* ========================================
   STAT CARDS
   ======================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: var(--space-2);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Colored stat values */
.stat-teal    .stat-value { color: var(--color-teal); }
.stat-amber   .stat-value { color: #B27308; }
.stat-emerald .stat-value { color: #0A7B55; }
.stat-coral   .stat-value { color: var(--color-coral); }

/* ========================================
   CALLOUT
   ======================================== */

.callout-box {
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-brand);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-8);
}
.callout-box p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text);
  max-width: 600px;
  line-height: 1.5;
}

/* Editorial pull quote — problem callout */
.problem-callout {
  position: relative;
  margin-top: var(--space-10);
  border-left: none;
  padding: var(--space-8) var(--space-8) var(--space-8) clamp(var(--space-8), 6vw, var(--space-12));
  background:
    linear-gradient(135deg, var(--color-surface-alt) 0%, rgba(230, 154, 46, 0.07) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.problem-callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-6);
  bottom: var(--space-6);
  width: 3px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--color-spine), rgba(230, 154, 46, 0.35));
}
.problem-callout::after {
  content: '“';
  position: absolute;
  left: var(--space-5);
  top: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  line-height: 1;
  color: var(--color-spine);
  opacity: 0.2;
  pointer-events: none;
}
.problem-callout p {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw + 0.75rem, 1.65rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  padding-top: var(--space-4);
}

/* Problem section — asymmetric layout (breaks centered label/title/grid rhythm) */
.problem-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
  gap: clamp(var(--space-8), 5vw, var(--space-12));
  align-items: start;
}
.problem-split-intro .section-title {
  max-width: 14em;
  margin-bottom: var(--space-5);
}
.problem-split-intro .section-subtitle {
  margin: 0;
  max-width: 38ch;
}
.problem-stat-grid {
  grid-template-columns: 1fr 1fr;
}

/* ========================================
   COMPARISON
   ======================================== */

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.comparison-col {
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.comparison-col-new {
  border-top: 3px solid var(--color-spine);
  box-shadow: inset 0 1px 0 var(--color-spine-soft);
}
.comparison-col-old {
  border-top: 3px solid var(--color-border);
}
.comparison-col h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}
.comparison-col p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.limitation-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* ========================================
   SOLUTION GRID
   ======================================== */

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.solution-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
}
.solution-card h4 {
  font-size: var(--text-base);
  font-weight: 600;
}
.solution-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Solutions page — domain detail cards */
.solutions-detail-intro {
  margin-bottom: var(--space-10);
}

.solutions-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.solution-detail-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

.solution-detail-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.solution-detail-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--color-brand));
  background: color-mix(in srgb, var(--card-accent, var(--color-brand)) 16%, var(--color-surface));
}

.solution-detail-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.08rem + 0.55vw, 1.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  padding-top: 0.3rem;
  color: var(--color-text);
}

.solution-beats {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.solution-beat__chip {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--card-accent, var(--color-brand));
  margin-bottom: var(--space-2);
}

.solution-beat__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

.solution-beat--highlight {
  margin-left: calc(-1 * var(--space-6));
  margin-right: calc(-1 * var(--space-6));
  padding: var(--space-4) var(--space-6);
  background: color-mix(in srgb, var(--card-accent, var(--color-brand)) 8%, var(--color-surface));
  border-radius: var(--radius-md);
}

/* ========================================
   CASE STUDY
   ======================================== */

.case-study-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.case-study-card { padding: var(--space-8); }
.case-study-card h3,
.case-study-narrative h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.case-study-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.case-study-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.case-study-stat {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
}
.case-study-stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.case-study-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ========================================
   INTEGRATIONS
   ======================================== */

.integration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.integration-block {
  text-align: center;
  padding: var(--space-5);
}
.integration-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}
.integration-icon svg {
  width: 28px; height: 28px;
  color: var(--color-text-muted);
}
.integration-block h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}
.integration-block p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Homepage integrations — flow (see #integrations) */
.integration-flow-wrap {
  position: relative;
}

.integration-flow-grid {
  display: grid;
  grid-template-columns: 1fr minmax(20px, 48px) 1fr minmax(20px, 48px) 1fr minmax(20px, 48px) 1fr;
  gap: 0 var(--space-2);
  align-items: center;
  position: relative;
}

/* Stacking: connector lines (1) < pulse dot (2) < cards (3) */
.integration-flow-grid .integration-node {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.integration-flow-grid .integration-block {
  height: 100%;
}

.integration-connector {
  position: relative;
  z-index: 1;
  align-self: center;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-connector-track {
  position: relative;
  width: 100%;
  height: 2px;
}

.integration-connector-line-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.integration-connector-line-fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  transform-origin: left center;
  background: linear-gradient(
    90deg,
    rgba(230, 154, 46, 0.25),
    var(--color-spine),
    rgba(230, 154, 46, 0.65)
  );
  box-shadow: 0 0 12px var(--color-spine-soft);
}

/* One pulse dot — above connector lines, below cards; clipped to gutters only (no paint on cards) */
.integration-flow-pulse-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  /* Three horizontal windows (~connector columns) in user units 0–100; dot + glow invisible over cards */
  clip-path: path(
    'M 20 36 L 32 36 L 32 64 L 20 64 Z M 45 36 L 57 36 L 57 64 L 45 64 Z M 70 36 L 82 36 L 82 64 L 70 64 Z'
  );
}

.integration-flow-pulse-dot {
  position: absolute;
  top: 50%;
  margin-top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-spine);
  /* Tighter glow so the mask edge stays clean */
  box-shadow:
    0 0 6px var(--color-spine-glow),
    0 0 14px rgba(230, 154, 46, 0.28);
  animation: integration-pulse-journey-h 5.75s linear infinite;
}

@keyframes integration-node-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes integration-line-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes integration-pulse-layer-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Left edge of first connector → right edge of last (approx. for 1fr / gap layout) */
@keyframes integration-pulse-journey-h {
  0% {
    left: 10%;
    opacity: 0.75;
    transform: translateX(0);
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    left: 90%;
    opacity: 0.75;
    transform: translateX(-100%);
  }
}

@keyframes integration-pulse-journey-v {
  0% {
    top: 6%;
    left: 50%;
    opacity: 0.75;
    transform: translateX(-50%);
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    top: 94%;
    left: 50%;
    opacity: 0.75;
    transform: translate(-50%, -100%);
  }
}

/* Default: fully visible (no JS, unsupported browsers, print) */
.integration-flow-wrap .integration-node {
  opacity: 1;
}
.integration-flow-wrap .integration-connector-line-fill {
  transform: scaleX(1);
}
.integration-flow-wrap .integration-flow-pulse-layer {
  opacity: 1;
}

/* Scroll-driven: section timeline, stagger as you approach */
@supports (view-timeline-name: --decoder-int) {
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) {
    view-timeline-name: --decoder-int;
    view-timeline-axis: block;
  }

  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-wrap .integration-node {
    opacity: 0;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-wrap .integration-connector-line-fill {
    transform: scaleX(0);
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-wrap .integration-flow-pulse-layer {
    opacity: 0;
  }

  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-node:nth-child(2) {
    animation: integration-node-in linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 2% entry 10%;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-connector:nth-child(3) .integration-connector-line-fill {
    animation: integration-line-grow linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 8% entry 15%;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-node:nth-child(4) {
    animation: integration-node-in linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 13% entry 21%;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-connector:nth-child(5) .integration-connector-line-fill {
    animation: integration-line-grow linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 19% entry 26%;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-node:nth-child(6) {
    animation: integration-node-in linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 24% entry 32%;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-connector:nth-child(7) .integration-connector-line-fill {
    animation: integration-line-grow linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 30% entry 37%;
  }
  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-node:nth-child(8) {
    animation: integration-node-in linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 35% entry 44%;
  }

  html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-pulse-layer {
    animation: integration-pulse-layer-in linear both;
    animation-timeline: --decoder-int;
    animation-range: entry 40% entry 50%;
  }
}

/* Time-based fallback (html.integration-flow-fallback from app.js) */
html.integration-flow-fallback .integration-flow-wrap:not(.integration-flow--ready) .integration-node {
  opacity: 1;
}
html.integration-flow-fallback .integration-flow-wrap:not(.integration-flow--ready) .integration-connector-line-fill {
  transform: scaleX(1);
}
html.integration-flow-fallback .integration-flow-wrap:not(.integration-flow--ready) .integration-flow-pulse-layer {
  opacity: 0;
}

html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-node {
  opacity: 0;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-connector-line-fill {
  transform: scaleX(0);
}
@media (max-width: 900px) {
  html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-connector-line-fill {
    transform: scaleY(0);
  }
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-pulse-layer {
  opacity: 1;
}

html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-node:nth-child(2) {
  animation: integration-node-in 0.48s var(--ease) forwards;
  animation-delay: 0s;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-connector:nth-child(3) .integration-connector-line-fill {
  animation: integration-line-grow 0.36s var(--ease) forwards;
  animation-delay: 0.44s;
  animation-fill-mode: backwards;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-node:nth-child(4) {
  animation: integration-node-in 0.48s var(--ease) forwards;
  animation-delay: 1.05s;
  animation-fill-mode: backwards;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-connector:nth-child(5) .integration-connector-line-fill {
  animation: integration-line-grow 0.36s var(--ease) forwards;
  animation-delay: 1.48s;
  animation-fill-mode: backwards;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-node:nth-child(6) {
  animation: integration-node-in 0.48s var(--ease) forwards;
  animation-delay: 2.1s;
  animation-fill-mode: backwards;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-connector:nth-child(7) .integration-connector-line-fill {
  animation: integration-line-grow 0.36s var(--ease) forwards;
  animation-delay: 2.52s;
  animation-fill-mode: backwards;
}
html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-node:nth-child(8) {
  animation: integration-node-in 0.48s var(--ease) forwards;
  animation-delay: 3.12s;
  animation-fill-mode: backwards;
}

@media (prefers-reduced-motion: reduce) {
  :is(#integrations, #platform-integration) .integration-flow-wrap .integration-node,
  :is(#integrations, #platform-integration) .integration-flow-wrap .integration-connector-line-fill,
  :is(#integrations, #platform-integration) .integration-flow-wrap .integration-flow-pulse-layer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  :is(#integrations, #platform-integration) .integration-flow-wrap .integration-connector-line-fill {
    transform: scaleX(1) !important;
  }
  :is(#integrations, #platform-integration) .integration-flow-pulse-dot {
    animation: none !important;
    left: 90% !important;
    transform: translateX(-100%) !important;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 900px) {
  :is(#integrations, #platform-integration) .integration-flow-wrap .integration-connector-line-fill {
    transform: scaleY(1) !important;
  }
  :is(#integrations, #platform-integration) .integration-flow-pulse-dot {
    top: 94% !important;
    left: 50% !important;
    transform: translate(-50%, -100%) !important;
  }
}

@media (max-width: 900px) {
  .integration-flow-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 400px;
    margin: 0 auto;
  }
  .integration-connector {
    min-height: 28px;
    width: 100%;
    padding: var(--space-2) 0;
  }
  .integration-connector-track {
    width: 2px;
    height: 100%;
    min-height: 24px;
    margin: 0 auto;
  }
  .integration-connector-line-bg {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    margin: 0 0 0 -1px;
  }
  .integration-connector-line-fill {
    left: 50%;
    width: 2px;
    height: 100%;
    top: 0;
    margin-top: 0;
    margin-left: -1px;
    transform-origin: center top;
    transform: scaleY(1);
  }

  @keyframes integration-line-grow-v {
    from {
      transform: scaleY(0);
    }
    to {
      transform: scaleY(1);
    }
  }

  @supports (view-timeline-name: --decoder-int) {
    html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-wrap .integration-connector-line-fill {
      transform: scaleY(0);
    }
    html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-connector:nth-child(3) .integration-connector-line-fill,
    html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-connector:nth-child(5) .integration-connector-line-fill,
    html:not(.integration-flow-fallback) :is(#integrations, #platform-integration) .integration-flow-grid > .integration-connector:nth-child(7) .integration-connector-line-fill {
      animation-name: integration-line-grow-v;
    }
  }

  .integration-flow-pulse-layer {
    align-items: stretch;
    /* Stacked layout: three narrow vertical windows on the connector spine */
    clip-path: path(
      'M 46 6 L 54 6 L 54 26 L 46 26 Z M 46 34 L 54 34 L 54 52 L 46 52 Z M 46 60 L 54 60 L 54 82 L 46 82 Z'
    );
  }
  .integration-flow-pulse-dot {
    animation-name: integration-pulse-journey-v;
    margin-top: 0;
    top: 0;
  }

  html.integration-flow-fallback .integration-flow-wrap:not(.integration-flow--ready) .integration-connector-line-fill {
    transform: scaleY(1);
  }
  html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-connector-line-fill {
    transform: scaleY(0);
  }
  html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-connector:nth-child(3) .integration-connector-line-fill,
  html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-connector:nth-child(5) .integration-connector-line-fill,
  html.integration-flow-fallback .integration-flow-wrap.integration-flow--ready .integration-flow-grid > .integration-connector:nth-child(7) .integration-connector-line-fill {
    animation-name: integration-line-grow-v;
  }
}

/* ========================================
   GOVERNANCE
   ======================================== */

.governance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}
.governance-card {
  text-align: left;
  padding: var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.governance-icon {
  width: 52px; height: 52px; min-width: 52px;
  border-radius: var(--radius-lg);
  background: var(--color-brand-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.governance-icon svg {
  width: 26px; height: 26px;
  color: var(--color-brand);
}
.governance-card h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.governance-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ========================================
   TIMELINE
   ======================================== */

.timeline {
  max-width: 640px;
  margin: var(--space-8) auto;
  position: relative;
  padding-left: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px;
  /* Require .timeline--steps-3 or .timeline--steps-4 so rail stops match dot count */
  background: var(--color-border);
}
.timeline--steps-3::before {
  background: linear-gradient(
    to bottom,
    var(--color-brand),
    var(--color-teal),
    var(--color-emerald)
  );
}
.timeline--steps-4::before {
  background: linear-gradient(
    to bottom,
    var(--color-brand),
    var(--color-teal),
    var(--color-emerald),
    var(--color-amber)
  );
}
.timeline-step {
  position: relative;
  padding-bottom: var(--space-8);
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: calc(var(--space-8) * -1 + 5px);
  top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid var(--color-surface-alt);
  box-shadow: 0 0 0 3px rgba(108, 60, 225, 0.1);
}
.timeline--steps-3 .timeline-step:nth-child(1) .timeline-dot { background: var(--color-brand); }
.timeline--steps-3 .timeline-step:nth-child(2) .timeline-dot { background: var(--color-teal); }
.timeline--steps-3 .timeline-step:nth-child(3) .timeline-dot { background: var(--color-emerald); }

.timeline--steps-4 .timeline-step:nth-child(1) .timeline-dot { background: var(--color-brand); }
.timeline--steps-4 .timeline-step:nth-child(2) .timeline-dot { background: var(--color-teal); }
.timeline--steps-4 .timeline-step:nth-child(3) .timeline-dot { background: var(--color-emerald); }
.timeline--steps-4 .timeline-step:nth-child(4) .timeline-dot { background: var(--color-amber); }

.timeline-step h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.timeline-step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Integrations — AMS capabilities as in-card timeline (matches homepage Getting Started) */
.integrations-ams-timeline {
  margin: 0;
  max-width: none;
}
.card .integrations-ams-timeline .timeline-dot {
  border-color: var(--color-surface);
}

/* Integrations — carrier portals: vertical stack + screenshot slot (see platform experience-stack) */
.integrations-carrier-stack {
  max-width: min(960px, 100%);
}

/* Integrations — philosophy: single centered column (A), divider + rhythm (D), promoted tagline (B) */
.integrations-philosophy-stack {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}
.integrations-philosophy-stack > .section-label {
  margin-bottom: var(--space-3);
}

.integrations-philosophy-callout {
  margin-top: 0;
  margin-bottom: var(--space-3);
  text-align: center;
}

.integrations-philosophy-support {
  margin: 0;
  padding-top: 0;
  border-top: none;
  text-align: center;
}

.integrations-philosophy-tagline-wrap {
  margin: 0 0 var(--space-8);
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Level 2 — technical promise (mono, promoted above body; single line) */
.integrations-philosophy-tagline {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: calc(var(--text-base) * 0.7);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.integrations-philosophy-subtitle {
  margin: 0 auto;
  max-width: none;
  text-align: center;
}

/* ========================================
   METRICS BAR
   ======================================== */

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.metric-value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-spine);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ========================================
   CAPACITY BAR
   ======================================== */

.capacity-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.capacity-item {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-left: var(--space-4);
  border-left: 2px solid;
}
.capacity-item:nth-child(1) { border-color: var(--color-spine); }
.capacity-item:nth-child(2) { border-color: var(--color-teal); }
.capacity-item:nth-child(3) { border-color: var(--color-emerald); }
.capacity-item:nth-child(4) { border-color: var(--color-amber); }

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(165deg, #141826 0%, var(--color-text) 45%, #0f1118 100%);
  text-align: center;
}
.cta-section .section-title {
  color: #fff;
  max-width: 580px;
  margin: 0 auto var(--space-4);
}
.cta-section .section-subtitle {
  color: rgba(255,255,255,0.6);
  margin: 0 auto var(--space-8);
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.cta-link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cta-link:hover { color: rgba(255,255,255,0.8); }

.cta-section .btn-white {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.cta-section .btn-white:hover {
  box-shadow:
    0 4px 24px var(--color-spine-glow),
    0 2px 12px rgba(0, 0, 0, 0.25);
}
.cta-section .btn-white:focus-visible {
  outline: 2px solid var(--color-spine);
  outline-offset: 3px;
}

/* ========================================
   FEATURE LIST
   ======================================== */

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: 7px;
  border-radius: 50%;
}
.feature-list li:nth-child(1)::before { background: var(--color-brand); }
.feature-list li:nth-child(2)::before { background: var(--color-teal); }
.feature-list li:nth-child(3)::before { background: var(--color-emerald); }
.feature-list li:nth-child(4)::before { background: var(--color-amber); }

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) var(--space-6) var(--space-8);
}
.footer-inner { max-width: var(--content-default); margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-brand img { height: 28px; width: auto; }
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 260px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-col a:hover { color: var(--color-brand); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-copyright {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-social a { color: var(--color-text-faint); }
.footer-social a:hover { color: var(--color-brand); }

.legal-doc {
  max-width: 720px;
  margin: 0 auto;
}
.legal-doc .legal-updated {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-8);
}
.legal-doc h2 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}
.legal-doc h2:first-of-type {
  margin-top: 0;
}
.legal-doc p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

.legal-doc--rich {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-doc--rich h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}
.legal-doc--rich h2:first-child {
  margin-top: 0;
}
.legal-doc--rich h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.legal-doc--rich h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}
.legal-doc--rich table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
}
.legal-doc--rich th,
.legal-doc--rich td {
  border: 1px solid rgba(26, 26, 46, 0.12);
  padding: var(--space-3);
  vertical-align: top;
  text-align: left;
}
.legal-doc--rich th {
  font-weight: 600;
  color: var(--color-text);
  background: rgba(26, 26, 46, 0.03);
}
.legal-doc--rich ol,
.legal-doc--rich ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.35em;
}
.legal-doc--rich li {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.legal-doc--rich li::marker {
  color: var(--color-text-faint);
}
.legal-doc--rich a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-doc--rich a:hover {
  color: var(--color-text);
}

/* ========================================
   FORMS
   ======================================== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-tint);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* In-card page titles (smaller than section-title) */
.contact-panel-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

/* Contact form submit — purple→teal thread, softer than solid primary on light card */
.contact-page-form-card .contact-form-submit {
  background: var(--gradient-brand);
  box-shadow: 0 2px 12px rgba(108, 60, 225, 0.16);
}
.contact-page-form-card .contact-form-submit:hover:not(:disabled) {
  filter: brightness(1.05);
  color: #fff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.22);
  transform: translateY(-1px);
}
.contact-page-form-card .contact-form-submit.contact-form-submit--sent {
  background: #115e59;
  color: #fff;
  filter: none;
  box-shadow: 0 2px 8px rgba(17, 94, 89, 0.22);
  transform: none;
}
.contact-page-form-card .contact-form-submit.contact-form-submit--sent:hover:not(:disabled) {
  filter: none;
  transform: none;
}

/* Contact page — meta blocks + office map */
.contact-page-meta {
  margin-top: var(--space-8);
  display: grid;
  gap: var(--space-6);
  width: 100%;
}
.contact-meta-heading {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}
.contact-expect-list {
  gap: var(--space-2);
  margin: 0;
}
.contact-office-card {
  padding: 0;
  overflow: hidden;
}
.contact-office-card__body {
  padding: var(--space-6);
}
.contact-office-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.contact-office-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-text);
}
.contact-office-card__text {
  flex: 1;
  min-width: 0;
}
.contact-office-card__address {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 var(--space-3);
}
.contact-office-card__maps-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-brand);
}
.contact-office-card__maps-link:hover {
  color: var(--color-brand-hover);
}
.contact-office-map {
  width: 100%;
  min-height: clamp(260px, 44vmin, 420px);
  height: clamp(260px, 44vmin, 420px);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-alt);
}

/* ========================================
   PAGE HERO (subpages — matches homepage hero canvas)
   ======================================== */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 120px) var(--space-6) clamp(48px, 6vw, 72px);
  text-align: center;
  background: var(--gradient-hero);
  color: #fff;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(ellipse 60% 50% at 25% 40%, rgba(108, 60, 225, 0.18), transparent 60%),
              radial-gradient(ellipse 50% 40% at 75% 55%, rgba(14, 165, 233, 0.1), transparent 55%);
  animation: hero-drift 25s ease-in-out infinite alternate;
  z-index: 0;
}
.page-hero .container {
  position: relative;
  z-index: 1;
}
/* Match homepage hero kicker (mono caps) */
.page-hero .hero-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 0.68rem + 0.3vw, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-5);
}
.page-hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.page-hero-kicker .hero-label {
  margin-bottom: 0;
}
.page-hero-subtitle + .hero-actions {
  margin-top: var(--space-8);
}
.page-hero .hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.page-hero .btn-white {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.page-hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: transparent;
}
.page-hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.75);
}
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.5vw + 1.25rem, 3.75rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 auto var(--space-5);
  max-width: 920px;
}
.page-hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ========================================
   TEAM
   ======================================== */

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  max-width: 700px;
  margin: 0 auto;
}
.team-member { text-align: center; }
.team-photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-4);
  border: 2px solid var(--color-border);
}
.team-member h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-1);
}
.team-member .role {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
}
.team-member p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* ========================================
   VISION
   ======================================== */

.vision-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.vision-step { text-align: center; }
.vision-step-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
}
.vision-step h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.vision-step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ========================================
   BADGES
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}
.badge-live {
  background: var(--tint-emerald);
  color: #0A7B55;
}
.badge-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-emerald);
}
.badge-designed {
  background: var(--color-brand-tint);
  color: var(--color-brand);
}
.badge-planned {
  background: var(--glass-dark);
  color: var(--color-text-muted);
}
.badge-production {
  background: var(--tint-emerald);
  color: #0A7B55;
  padding: 6px 14px;
  font-size: 13px;
}
.badge-production::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-emerald);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========================================
   AOP FLOW (platform page — vertical cards, scroll reveal)
   ======================================== */

.aop-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  margin: var(--space-8) auto 0;
  position: relative;
  padding: 0;
}
.aop-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: start;
  padding: var(--space-6) var(--space-6);
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--duration) var(--ease), opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.aop-step:hover { box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: no-preference) {
  .aop-step.aop-step--reveal {
    opacity: 0;
    transform: translateY(20px);
  }
  .aop-step.aop-step--reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .aop-step.aop-step--reveal {
    opacity: 1;
    transform: none;
  }
}
.aop-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(108, 60, 225, 0.12);
}
.aop-step:nth-child(1) .aop-step-number { background: var(--color-brand); }
.aop-step:nth-child(2) .aop-step-number { background: var(--color-teal); }
.aop-step:nth-child(3) .aop-step-number { background: var(--color-emerald); }
.aop-step:nth-child(4) .aop-step-number { background: var(--color-amber); }
.aop-step:nth-child(5) .aop-step-number { background: var(--color-coral); }
.aop-step-body h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.aop-step-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Platform — experience stack (screenshot + copy) */
.experience-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 720px;
  margin: 0 auto;
}
.experience-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
}
.experience-card-shot {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--color-surface-alt), var(--color-surface));
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.experience-card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.experience-card-placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.experience-card h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0;
}
.experience-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}
.aop-connector {
  position: absolute;
  top: 50%;
  right: calc(var(--space-4) * -1 + 4px);
  transform: translate(50%, -50%);
  width: 20px; height: 20px;
  z-index: 2;
}
.aop-connector svg { color: var(--color-brand); }

/* Process flow */
.process-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  counter-reset: process-step;
}
.process-step {
  counter-increment: process-step;
  padding: var(--space-4);
  position: relative;
}
.process-step::before {
  content: counter(process-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.process-step h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.process-step p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ========================================
   HERO PRODUCT SHOWCASE (P1)
   ======================================== */

.hero-showcase {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: var(--space-12) auto 0;
  perspective: 1200px;
}
.hero-showcase-inner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 420px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotateX(4deg);
  transition: transform 0.6s var(--ease);
}
.hero-showcase-inner:hover {
  transform: rotateX(1deg);
}
.hero-showcase img {
  width: 100%;
  display: block;
  height: auto;
}
/* Gradient fade at bottom so the image dissolves into the section below */
.hero-showcase-inner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(13, 27, 46, 0.9), transparent);
  pointer-events: none;
}
.hero-showcase-glow {
  position: absolute;
  bottom: -30px;
  left: 15%;
  right: 15%;
  height: 60px;
  background: radial-gradient(ellipse at center, rgba(108, 60, 225, 0.18), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

/* ========================================
   PLATFORM IMAGE (P2)
   ======================================== */

.platform-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}
.platform-image img {
  width: 100%;
  display: block;
  height: auto;
}
.platform-showcase {
  margin-top: var(--space-10);
  position: relative;
}
.platform-showcase .platform-image {
  max-width: 960px;
  margin: 0 auto;
}

/* Inline screenshot — sits in a grid column, cropped to content area */
.platform-inline {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  max-height: 380px;
}
.platform-inline img {
  width: 100%;
  display: block;
  height: auto;
  /* Crop to just the main content pane, skip sidebar */
  object-fit: cover;
  object-position: right top;
  min-height: 380px;
}

/* Overlapping duo — two screenshots at different depths */
.screenshot-duo {
  position: relative;
  max-width: 800px;
  margin: var(--space-10) auto 0;
  height: 360px;
}
.screenshot-duo .duo-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 65%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  transform: rotate(-2deg);
  z-index: 1;
}
.screenshot-duo .duo-front {
  position: absolute;
  top: 30px;
  right: 0;
  width: 60%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  transform: rotate(1.5deg);
  z-index: 2;
}
.screenshot-duo img {
  width: 100%;
  display: block;
  height: auto;
  object-fit: cover;
  max-height: 320px;
  object-position: right top;
}

/* Compact showcase — smaller, tilted, with glow */
.platform-compact {
  max-width: 720px;
  margin: var(--space-8) auto 0;
  perspective: 900px;
}
.platform-compact .platform-image {
  transform: rotateY(-2deg) rotateX(1deg);
  transition: transform 0.6s var(--ease);
}
.platform-compact .platform-image img {
  object-fit: cover;
  max-height: 360px;
  object-position: center top;
}
.platform-compact:hover .platform-image {
  transform: rotateY(0deg) rotateX(0deg);
}

/* ========================================
   SECTION NAVY (P3 — dark variant)
   ======================================== */

.section-navy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0e14 0%, #0f1419 38%, #111827 100%);
  color: #fff;
}

/* Control room — grid veil + spine hairline (integrations + final CTA) */
.section-navy::before,
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.12) 42%, transparent 78%);
}
.section-navy::after,
.cta-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-spine-soft) 20%,
    rgba(230, 154, 46, 0.45) 50%,
    var(--color-spine-soft) 80%,
    transparent
  );
}
.section-navy > .container,
.cta-section > .container {
  position: relative;
  z-index: 2;
}

.section-navy .section-label { color: rgba(255, 255, 255, 0.4); }
.section-navy .section-title { color: #fff; }
.section-navy .section-subtitle { color: rgba(255, 255, 255, 0.6); }
.section-navy .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.section-navy .card:hover {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.section-navy .card h4 { color: #fff; }
.section-navy .card p { color: rgba(255, 255, 255, 0.55); }
.section-navy .integration-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.section-navy .integration-icon svg { color: rgba(255, 255, 255, 0.6); }
.section-navy .text-center > p {
  color: rgba(255, 255, 255, 0.58);
}
.integrations-footnote {
  margin-top: var(--space-6);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ========================================
   ENHANCED STAT CARDS (P3)
   ======================================== */

.stat-card {
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
  border-left: 3px solid transparent;
}
.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.stat-coral   { border-left-color: var(--color-coral); }
.stat-amber   { border-left-color: var(--color-amber); }
.stat-teal    { border-left-color: var(--color-teal); }
.stat-emerald { border-left-color: var(--color-emerald); }

/* Enhanced cards — stronger presence (P3) */
.card {
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Limitation cards with icons (P4) */
.limitation-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.limitation-card-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.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 25%;
  }
}
@keyframes reveal-fade { to { opacity: 1; } }

@supports not (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    transform: translateY(12px);
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .navbar-links { display: none; }
  .hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

@media (max-width: 900px) {
  .problem-split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .problem-split-intro .section-title,
  .problem-split-intro .section-subtitle {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr 1fr; }
  .case-study-stats { grid-template-columns: 1fr 1fr; }
  .integration-grid { grid-template-columns: 1fr 1fr; }
  .governance-grid { grid-template-columns: 1fr; }
  .limitation-cards { grid-template-columns: 1fr; }
  .capacity-bar { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .vision-steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .solutions-detail-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .screenshot-duo { height: 240px; }
  .screenshot-duo .duo-back { width: 70%; }
  .screenshot-duo .duo-front { width: 65%; top: 20px; }
  .screenshot-duo img { max-height: 220px; }
  .platform-inline { max-height: 260px; }
  .platform-inline img { min-height: 260px; }
  .hero-showcase-inner { max-height: 280px; }
  .form-grid { grid-template-columns: 1fr; }
  .metrics-bar { grid-template-columns: 1fr 1fr; }
  .process-flow { grid-template-columns: 1fr; }
  .aop-step {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .aop-step-number { margin: 0 auto; }
  .aop-step-body { text-align: left; }
  .aop-connector { display: none; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .capacity-bar { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .case-study-stats { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(2rem, 7vw, 2.75rem); }
}
