/* ============================================================================
   Equilens Design System - Consolidated Base Stylesheet
   Version: 2.1 (Modern Professional)
   Last Updated: 2025-12-03
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================================
   1. CSS VARIABLES / DESIGN TOKENS
   ============================================================================ */

:root {
  /* --- Color System --- */
  /* Primary Palette (Indigo) */
  --color-primary: #4f46e5;        /* Indigo-600 - Primary brand */
  --color-primary-hover: #4338ca;  /* Indigo-700 - Hover states */
  --color-primary-light: #6366f1;  /* Indigo-500 - Light accent */
  --color-primary-dark: #3730a3;   /* Indigo-800 - Dark accent */
  --color-primary-text: #3730a3;   /* Indigo-800 - WCAG AA text (7.2:1 contrast) */
  --color-primary-a10: rgba(79, 70, 229, 0.1);
  --color-primary-a15: rgba(79, 70, 229, 0.15);
  --color-primary-a08: rgba(79, 70, 229, 0.08);
  --color-primary-a12: rgba(79, 70, 229, 0.12);

  /* Neutrals */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Semantic Colors */
  --color-success: #10b981;        /* Green-500 */
  --color-warning: #f59e0b;        /* Amber-500 */
  --color-error: #ef4444;          /* Red-500 */
  --color-info: #3b82f6;           /* Blue-500 */

  /* Surface Colors */
  --bg-main: var(--color-white);
  --bg-subtle: #f8fafc;            /* Slate-50 */
  --bg-alt: var(--color-gray-100);
  --bg-muted: var(--color-gray-50);

  /* Text Colors - Updated to Slate (Rich Blue-Grays) for Depth */
  --text-primary: #0f172a;       /* Slate-900 */
  --text-secondary: #334155;     /* Slate-700 */
  --text-muted: #64748b;         /* Slate-500 */
  --text-subtle: #94a3b8;        /* Slate-400 */

  /* Border Colors */
  --border-default: var(--color-gray-200);
  --border-light: var(--color-gray-100);
  --border-medium: var(--color-gray-300);
  --border-dark: var(--color-gray-400);

  /* --- Typography System --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;

  /* --- Spacing Scale --- */
  --space-0: 0;
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-7: 1.75rem;    /* 28px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* --- Typography Scale --- */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;  /* Increased from 1.625 for elegance */
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.04em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* --- Border Radius --- */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  --radius: var(--radius-lg);  /* Default */

  /* --- Shadows --- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.15);
  --shadow-accent: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
  --shadow-accent-hover: 0 6px 20px rgba(79, 70, 229, 0.23);

  /* --- Layout --- */
  --max-width-xs: 20rem;      /* 320px */
  --max-width-sm: 24rem;      /* 384px */
  --max-width-md: 28rem;      /* 448px */
  --max-width-lg: 32rem;      /* 512px */
  --max-width-xl: 36rem;      /* 576px */
  --max-width-2xl: 42rem;     /* 672px */
  --max-width-3xl: 56rem;     /* 896px */
  --max-width-4xl: 64rem;     /* 1024px */
  --max-width-5xl: 70rem;     /* 1120px */
  --max-width-6xl: 72rem;     /* 1152px */
  --max-width-7xl: 80rem;     /* 1280px */
  --max-width-full: 100%;
  --container-width: var(--max-width-5xl);
  --content-width: var(--max-width-3xl);

  /* --- Z-Index Scale --- */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-nav: 1000;
  --z-subnav: 900;

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-base: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;
}

/* Superscript for footnotes */
sup {
  font-size: 0.6em;
  top: -0.5em;
  vertical-align: baseline;
  position: relative;
  font-weight: var(--font-bold);
  color: var(--text-muted);
}

/* ============================================================================
   2. BASE & RESET
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html {
  overflow-y: scroll;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-main);
  line-height: var(--leading-relaxed); /* Updated to relaxed */
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Sticky footer layout */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main content grows to push footer to bottom */
main {
  flex: 1 0 auto;
  margin-top: var(--space-20);
}

/* Landing pages center content vertically */
.landing main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

/* Inline content links */
p a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.cta),
li a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.cta),
.card a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.cta) {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--color-primary-a15);
  color: var(--color-primary-text);
}

p a:hover,
li a:hover {
  text-decoration-color: var(--color-primary);
  color: var(--color-primary-hover);
}

/* External link indicator - shows arrow for links opening in new tab */
a[target="_blank"]:not(.btn):not(.btn-primary):not(.btn-secondary)::after {
  content: " ↗";
  font-size: 0.75em;
  vertical-align: super;
  opacity: 0.7;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: var(--font-extrabold); /* Heavier for impact */
  letter-spacing: var(--tracking-tighter);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Subtle depth */
}

h2 {
  font-size: clamp(1.875rem, 3.75vw, 2.75rem);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-6);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.95rem);
}

h4 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin: 0.75rem 0;
  line-height: var(--leading-relaxed); /* 1.7 line-height */
  max-width: 72ch;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  line-height: var(--leading-tight);
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.brand-title {
  font-weight: var(--font-semibold); /* Matching h1 */
  letter-spacing: var(--tracking-tight);
  font-size: clamp(3rem, 6vw, 4.5rem);
  margin: 0; /* Removed bottom margin as eyebrow handles it */
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.05);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-logo {
  display: block;
  height: 110px;
  width: auto;
  max-width: 100%;
}

.lead {
  max-width: 64ch;
  margin: 0 auto var(--space-6);
  color: var(--text-secondary);
  font-size: clamp(1.125rem, 1.8vw, 1.35rem); /* Slightly larger */
  font-weight: var(--font-normal); /* Cleaner look */
  line-height: var(--leading-relaxed);
}

ul, ol {
  margin: 0.75rem 0 1rem 1.25rem;
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-subtle {
  color: var(--text-subtle);
}

/* Acronyms */
abbr {
  text-decoration: none;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px dotted var(--border-medium);
  cursor: help;
}

/* ============================================================================
   4. HEADER & NAVIGATION
   ============================================================================ */

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  padding: var(--space-4) var(--space-6);
  color: var(--text-primary);
}

.navbar.site-nav a {
  color: var(--text-primary);
}

.navbar.site-nav .nav-link {
  color: var(--text-secondary);
  font-weight: var(--font-medium);
}

.navbar.site-nav .nav-link:hover {
  color: var(--color-primary);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  min-height: 44px;
  margin-left: -32px;  /* Align with left margin */
}

.logo img {
  display: block;
  height: 54px;
  width: auto;
  margin-top: 16px;  /* Push logo down */
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: var(--space-7);
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  font-size: var(--text-sm); /* Slightly smaller, cleaner */
  font-weight: var(--font-medium);
  transition: color var(--transition-base);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0 var(--space-2);
  white-space: nowrap;
  will-change: color;
  transform: translateZ(0);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8px;
  height: 2px;
  background: transparent;
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
  opacity: 0;
  transform: translateY(2px);
}

.nav-link:hover {
  color: var(--color-primary-text);
}

.nav-link:hover::after {
  background: var(--color-primary-a15);
  opacity: 1;
  transform: translateY(0);
}

.nav-link[aria-current="page"] {
  color: var(--color-primary-text);
}

.nav-link[aria-current="page"]::after {
  background: var(--color-primary);
  opacity: 1;
  transform: translateY(0);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-2);
  background: transparent;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

/* Product Sub-Navigation (FL-BSA pages) */
.product-subnav {
  position: sticky;
  top: 72px;
  z-index: var(--z-subnav);
  margin-top: var(--space-4);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.subnav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-7);
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  justify-content: center;
}

.subnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: var(--space-2) 0;
  white-space: nowrap;
  transition: color var(--transition-base);
}

.subnav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * var(--space-3));
  height: 2px;
  border-radius: var(--radius-full);
  background: transparent;
  transition: background var(--transition-base);
}

.subnav-link:hover {
  color: var(--color-primary-text);
}

.subnav-link[aria-current="page"] {
  color: var(--color-primary);
}

.subnav-link[aria-current="page"]::after {
  background: var(--color-primary);
}

/* Table of Contents (Sidebar) */
.page-with-toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: var(--container-width);
  margin: 0 auto;
}

.toc {
  display: none;
}

.page-content {
  min-width: 0;
}

@media (min-width: 1100px) {
  .page-with-toc {
    padding-left: 240px;
  }

  .toc {
    display: block;
    position: fixed;
    left: var(--space-6);
    top: 96px;
    width: 200px;
  }

  .toc-inner {
    padding-top: var(--space-4);  /* Reduced from --space-6 to bring closer to navbar */
  }

  .toc-label {
    display: block;
    font-size: 0.875rem;  /* Increased to text-sm */
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    text-decoration: none;
    transition: color var(--transition-base);
  }

  .toc-label:hover {
    color: var(--color-primary);
  }

  .toc-link {
    display: block;
    padding: 0.5rem 0; /* Increased padding */
    padding-left: var(--space-4);
    border-left: 2px solid var(--border-default);
    font-size: 1rem;  /* Increased to text-base */
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-base);
    line-height: var(--leading-normal);
  }

  .toc-link:hover {
    color: var(--color-primary-text);
    border-left-color: rgba(79, 70, 229, 0.4);
  }

  .toc-link[aria-current="location"] {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    border-left-width: 3px; /* Thicker active border */
    font-weight: var(--font-medium);
    background: linear-gradient(to right, var(--color-primary-a08), transparent); /* Subtle highlight */
  }
}

/* ============================================================================
   5. LAYOUT & CONTAINERS
   ============================================================================ */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.wrap {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}

.section.alt {
  background: var(--bg-subtle);
}

.section h2 {
  margin-bottom: var(--space-8);
  text-align: center;
}

/* Direct children paragraphs in section containers should be centered */
.section > .container > p:not(.note) {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section .lead {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-10);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Centered section variant */
.section-centered {
  text-align: center;
}

.section-centered.card {
  padding: var(--space-10) var(--space-6);
  align-items: center;  /* Center flex children including .checks */
}

.section-centered > p {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-6);
}

.section-centered .checks {
  text-align: left;
  display: inline-block;
  margin: 0 0 var(--space-6);
  padding-left: 0;
}

.section-centered .note {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

[id] {
  scroll-margin-top: 110px;
}

/* Hero Section */
.hero {
  min-height: auto;  /* Remove full-viewport height requirement */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) 0 var(--space-12);
  position: relative;
  /* New Atmospheric Gradient */
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, rgba(255,255,255,0) 60%);
}

/* Hero inside page-content gets adjusted padding */
.page-content .hero {
  padding: var(--space-12) 0 var(--space-16);
}

.hero-content {
  text-align: center;
  width: 100%;
  margin: 0 auto;
  max-width: var(--max-width-3xl);
  background: transparent; /* Removed white box */
  padding: var(--space-10) var(--space-8);
  border-radius: 0;
  border: none;
  box-shadow: none;
}

@media (min-width: 768px) {
  .hero-content {
    padding: var(--space-12) var(--space-10);
  }
}

/* Hero content paragraphs and lists */
.hero-content p {
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-content .checks {
  text-align: left;
  display: inline-block;
  margin: var(--space-4) auto;
}

.hero-content .note {
  text-align: center;
  font-size: var(--text-sm);
}

.hero-content .email-highlight {
  margin-top: var(--space-4);
}

.hero-content .email-highlight a {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

/* Section block - clean container for content sections */
.section-block {
  background: var(--color-white);
  padding: var(--space-10) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  max-width: var(--max-width-5xl);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .section-block {
    padding: var(--space-12) var(--space-10);
  }
}

@media (min-width: 1100px) {
  .section-block {
    padding: var(--space-12) var(--space-12);
  }
}

/* Narrow variant for text-heavy sections */
.section-block--narrow {
  max-width: var(--max-width-3xl);
  text-align: center;
}

.section-block--narrow p {
  text-align: center;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.section-block h2 {
  margin-top: 0;
  text-align: center;
}

/* Legal/policy page h3 styling (direct children only, not in cards) */
.section-block > .container > h3,
.section-block > h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.section-block > .container > h3:first-of-type,
.section-block > h3:first-of-type {
  margin-top: var(--space-6);
  border-top: none;
  padding-top: 0;
}

.section-block p {
  text-align: left;
  line-height: var(--leading-loose);
  margin-bottom: var(--space-4);
}

.section-block .lead {
  text-align: center;
  line-height: var(--leading-relaxed);
}

.section-block .note {
  text-align: center;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.section-block .checks {
  margin: var(--space-4) 0;
}

.section-block .checks li {
  margin-bottom: var(--space-4);
  line-height: var(--leading-loose);
}

/* Section-block direct paragraphs (outside container) should also be centered */
.section-block > p {
  text-align: center;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Section-block container max-width */
.section-block > .container {
  max-width: var(--content-width);
}

.cta-row {
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  max-width: var(--max-width-xl);
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}

/* CTA row in section-block needs more spacing */
.section-block .cta-row {
  margin-top: var(--space-8);
}

/* CTA row left-aligned variant */
.cta-row--left {
  justify-content: flex-start;
}

/* Stack - single column layout */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: stretch;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================================
   6. COMPONENTS
   ============================================================================ */

/* Cards - Updated for Modern Look */
.card {
  background: var(--color-white);
  /* Softer border but visible */
  border: 1px solid rgba(229, 231, 235, 1); 
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  /* Deeper shadow for pop */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center; /* Center everything by default */
  align-items: center; /* Center flex children */
}

/* Interactive cards get hover effects */
a.card:hover,
.card-interactive:hover,
.card:hover { /* Allow subtle lift on all cards for tactile feel */
  border-color: var(--color-primary-a15);
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.card h2,
.card h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  text-align: center; /* Center all card titles */
}

.card p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  text-align: center; /* Center paragraphs */
}

.card p:last-child {
  margin-bottom: 0;
}

.card h3 + p {
  margin-top: 0;
}

.card .checks {
  margin: var(--space-4) auto; /* Center the block */
  text-align: left; /* Keep list items left-aligned */
  display: inline-block; /* Shrink wrap to content */
  width: 100%; /* Allow full width but content centered if inline-block context allows, or specific width */
  max-width: fit-content; /* Center the list block */
}

.card .checks li {
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.card--compact {
  padding: var(--space-6);
}

.card-hero {
  background: rgba(255, 255, 255, 0.6); /* Glass effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all var(--transition-base);
}

/* Only interactive card-hero elements (links) get hover effects */
a.card-hero {
  transition: all var(--transition-base);
}

a.card-hero:hover,
.card-hero:hover { /* Allow hover on static cards too for delight */
  border-color: var(--color-primary-a15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.8);
}

.card-hero h3,
.card-hero p {
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: var(--radius-full); /* Rounded pills are trendier */
  font-weight: var(--font-medium);
  cursor: pointer;
  line-height: 1.1;
  -webkit-appearance: none;
  appearance: none;
  padding: var(--space-3) var(--space-6); /* Wider padding */
  min-height: 48px;  
  min-width: 44px;
  gap: 8px;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--text-base);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-hover);
}

.btn-primary:active {
  transform: translateY(0);
  color: var(--color-white);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary-text);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--color-gray-50);
  border-color: var(--color-primary-text);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--color-white);
  color: var(--color-primary-text);
  border: 1.5px solid var(--border-default);
}

.btn-ghost:hover {
  background: var(--color-primary-a08);
  border-color: var(--color-primary);
}

.btn-ghost:active {
  transform: translateY(0);
  background: var(--color-primary-a12);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin: var(--space-8) 0;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }

  /* Center odd last item in steps grid */
  .steps > .step:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - var(--space-5));
    margin: 0 auto;
  }
}

.step {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  background: var(--color-white);
  padding: var(--space-7);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.step:hover {
  border-color: var(--color-primary-a15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.step header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
}

.step p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1rem;
  font-family: var(--font-mono);
  font-weight: var(--font-bold);
  flex-shrink: 0;
}

/* Lists */
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-secondary);
}

.checks li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-7);
  position: relative;
  line-height: var(--leading-relaxed);
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--font-bold);
  font-size: 1.1em;
}

.asset-list {
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
}

.asset-list li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-6);
  position: relative;
}

.asset-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* Download link indicator */
a[download]::after {
  content: " ↓";
  font-size: 0.85em;
  opacity: 0.7;
}

/* Note paragraphs */
.note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  line-height: var(--leading-relaxed);
  margin-top: var(--space-4);
}

/* Contact Form */
.contact-form-card {
  max-width: var(--max-width-2xl);
  margin: 0 auto;
}

.contact-form-card h2 {
  text-align: center;
  margin-bottom: var(--space-2);
}

.contact-form-card .lead {
  text-align: center;
  margin-bottom: var(--space-8);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--color-white);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-a10);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

.contact-form .note {
  text-align: center;
  margin-top: var(--space-4);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
  background: var(--color-white);
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  padding: var(--space-5) var(--space-6);
  cursor: pointer;
  font-weight: var(--font-medium);
  color: var(--text-primary);
  list-style: none;
  user-select: none;
  transition: color var(--transition-base);
}

.faq-item summary:hover {
  color: var(--color-primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  font-size: 1.5em;
  font-weight: var(--font-light);
  color: var(--color-primary);
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-4);
}

.faq-item p {
  padding: 0 var(--space-6) var(--space-5);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Pricing Section Accents */
#pricing .card h3 {
  color: var(--color-primary);
}

/* ============================================================================
   7. FOOTER
   ============================================================================ */

.site-footer {
  margin-top: auto;  /* Push to bottom in flex layout */
  border-top: 1px solid var(--border-default);
  background: var(--bg-subtle);
  padding: var(--space-6) var(--space-6) var(--space-4);  /* Match navbar horizontal padding */
  flex-shrink: 0;  /* Don't shrink footer */
}

.site-footer .container {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.site-footer .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  text-align: center;
  margin-bottom: var(--space-4);
}

.site-footer section {
  padding: 0;
}

.site-footer section h3 {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.site-footer section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer section li {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-base);
  line-height: var(--leading-normal);
  display: inline-block;
}

.site-footer a:hover {
  color: var(--color-primary);
}

.site-footer small {
  display: block;
  text-align: center;
  color: var(--text-primary);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  font-family: var(--font-sans);
}

.site-footer .container:last-of-type {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
}

/* ============================================================================
   8. ACCESSIBILITY
   ============================================================================ */

/* Skip to Content Link */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-to-content:focus {
  position: fixed;
  left: var(--space-6);
  top: var(--space-6);
  width: auto;
  height: auto;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  z-index: 1100;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================================
   9. RESPONSIVE / MOBILE
   ============================================================================ */

@media (max-width: 768px) {
  .navbar {
    padding: var(--space-3) var(--space-4);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: var(--space-4);
    padding-top: var(--space-3);
  }

  .nav-links[data-open="true"] {
    display: flex;
  }

  .nav-link {
    padding: var(--space-3) var(--space-4);
  }

  .nav-link::after {
    display: none;
  }

  .logo {
    width: 210px;
    height: 48px;
  }

  .hero {
    padding: var(--space-24) var(--space-4) var(--space-16);
  }

  .product-subnav {
    top: 64px;
    margin-top: var(--space-3);
  }

  .subnav-inner {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .subnav-link {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .grid {
    gap: 1.5rem;
  }
}

@media (max-width: 560px) {
  .container,
  .wrap {
    padding: 0 var(--space-4);
  }

  .site-footer .grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }

  .site-footer {
    padding: var(--space-8) 0 var(--space-4);
  }
}

/* ============================================================================
   10. UTILITIES
   ============================================================================ */

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.text-muted { color: var(--text-muted); }

.icon-hero {
  width: 28px; /* Slightly larger for better visibility */
  height: 28px;
  stroke: var(--color-primary);
  stroke-width: 2;
  fill: none;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.icon-inline {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  stroke-width: 2;
  fill: none;
  margin-right: 10px;
  vertical-align: text-bottom;
  display: inline-block;
}

/* ============================================================================
   11. TIMELINE COMPONENT (Process Grid)
   ============================================================================ */

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin: var(--space-8) 0;
  padding: var(--space-4); /* Space for shadows */
  counter-reset: step-counter;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Hide old markers */
.timeline-marker {
  display: none;
}

.timeline-content {
  flex: 1;
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center; /* Center flex children (badge) */
  text-align: center; /* Center text */
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-a15);
}

/* Step Number Badge inside Card */
.timeline-content::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary-a10);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
}

.timeline-content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
  text-align: center;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
  text-align: center;
  font-size: var(--text-sm);
}

@media (min-width: 768px) {
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .timeline {
    grid-template-columns: repeat(2, 1fr); /* 2x2 on desktop as requested */
  }
}

/* ============================================================================
   12. CHAIN VISUAL COMPONENT
   ============================================================================ */

.chain-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-8) 0;
  flex-wrap: wrap;
}

.chain-node {
  background: var(--color-white);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans); /* Clean sans-serif */
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.chain-node:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary-a15);
}

.chain-arrow {
  color: var(--color-primary-light);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

@media (max-width: 640px) {
  .chain-visual {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .chain-arrow {
    transform: rotate(90deg);
  }
}
