/* ==========================================================================
   Alternative Payment Methods — Design System
   A production CSS framework for alternativepaymentmethods.com
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (Custom Properties)
   -------------------------------------------------------------------------- */

:root {
  /* — Brand Colors — */
  --color-primary-50:  #eef2ff;
  --color-primary-100: #e0e7ff;
  --color-primary-200: #c7d2fe;
  --color-primary-300: #a5b4fc;
  --color-primary-400: #818cf8;
  --color-primary-500: #6366f1;
  --color-primary-600: #4f46e5;
  --color-primary-700: #4338ca;
  --color-primary-800: #3730a3;
  --color-primary-900: #312e81;
  --color-primary-950: #1e1b4b;

  /* — Accent (Cyan/Teal) — */
  --color-accent-50:  #ecfeff;
  --color-accent-100: #cffafe;
  --color-accent-200: #a5f3fc;
  --color-accent-300: #67e8f9;
  --color-accent-400: #22d3ee;
  --color-accent-500: #06b6d4;
  --color-accent-600: #0891b2;
  --color-accent-700: #0e7490;
  --color-accent-800: #155e75;
  --color-accent-900: #164e63;

  /* — Neutral (Slate) — */
  --color-neutral-50:  #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;
  --color-neutral-950: #020617;

  /* — Semantic Colors — */
  --color-success: #059669;
  --color-warning: #d97706;
  --color-error:   #dc2626;
  --color-info:    #2563eb;

  /* — Theme Colors (Light Mode Default) — */
  --bg-body:       #ffffff;
  --bg-surface:    var(--color-neutral-50);
  --bg-elevated:   #ffffff;
  --bg-hero:       var(--color-neutral-950);
  --text-heading:  var(--color-neutral-900);
  --text-body:     var(--color-neutral-700);
  --text-muted:    var(--color-neutral-500);
  --text-inverse:  #ffffff;
  --border-default: var(--color-neutral-200);
  --border-subtle:  var(--color-neutral-100);
  --link-color:    var(--color-primary-600);
  --link-hover:    var(--color-primary-700);

  /* — Typography — */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;

  --text-xs:   clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --text-sm:   clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg:   clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-xl:   clamp(1.15rem, 1.05rem + 0.5vw, 1.25rem);
  --text-2xl:  clamp(1.3rem, 1.1rem + 1vw, 1.5rem);
  --text-3xl:  clamp(1.6rem, 1.3rem + 1.5vw, 1.875rem);
  --text-4xl:  clamp(1.9rem, 1.5rem + 2vw, 2.25rem);
  --text-5xl:  clamp(2.2rem, 1.6rem + 3vw, 3rem);
  --text-6xl:  clamp(2.5rem, 1.8rem + 3.5vw, 3.75rem);

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.625;
  --leading-relaxed: 1.75;

  --tracking-tight:  -0.025em;
  --tracking-normal: 0;
  --tracking-wide:   0.025em;

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

  /* — Layout — */
  --container-max:    1200px;
  --container-narrow: 800px;
  --container-wide:   1400px;
  --gutter:           clamp(1rem, 0.5rem + 2.5vw, 2rem);

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

  /* — Shadows — */
  --shadow-xs:  0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-sm:  0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.2);

  /* — Transitions — */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.55, 0, 1, 0.45);
  --ease-both: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* — Z-Index — */
  --z-base:     1;
  --z-dropdown: 10;
  --z-sticky:   20;
  --z-header:   30;
  --z-overlay:  40;
  --z-modal:    50;
  --z-toast:    60;
}


/* --------------------------------------------------------------------------
   2. DARK MODE TOKENS
   -------------------------------------------------------------------------- */

[data-theme="dark"] {
  --bg-body:       var(--color-neutral-950);
  --bg-surface:    var(--color-neutral-900);
  --bg-elevated:   var(--color-neutral-800);
  --bg-hero:       var(--color-neutral-950);
  --text-heading:  var(--color-neutral-50);
  --text-body:     var(--color-neutral-300);
  --text-muted:    var(--color-neutral-400);
  --text-inverse:  var(--color-neutral-900);
  --border-default: var(--color-neutral-700);
  --border-subtle:  var(--color-neutral-800);
  --link-color:    var(--color-primary-400);
  --link-hover:    var(--color-primary-300);

  --shadow-xs:  0 1px 2px rgb(0 0 0 / 0.2);
  --shadow-sm:  0 1px 3px rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.2);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.2);
}


/* --------------------------------------------------------------------------
   3. RESET & BASE
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: 100%;
}

@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;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--link-hover);
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: var(--space-8) 0;
}


/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */

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

h1 { font-size: var(--text-5xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); font-weight: 600; }
h6 { font-size: var(--text-lg); font-weight: 600; }

p {
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

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

strong, b { font-weight: 600; }

small { font-size: var(--text-sm); }

.lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  max-width: 60ch;
}

.overline {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary-600);
}

[data-theme="dark"] .overline {
  color: var(--color-primary-400);
}

.prose h2 { margin-top: var(--space-12); margin-bottom: var(--space-4); }
.prose h3 { margin-top: var(--space-8);  margin-bottom: var(--space-3); }
.prose h4 { margin-top: var(--space-6);  margin-bottom: var(--space-2); }
.prose p  { margin-bottom: var(--space-4); max-width: none; }
.prose ul, .prose ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--space-2); }
.prose li::marker { color: var(--color-primary-500); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { text-decoration-color: var(--color-primary-400); }
.prose blockquote {
  border-left: 3px solid var(--color-primary-500);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-muted);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
}


/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--space-16);
}

.section--lg {
  padding-block: var(--space-24);
}

.section--sm {
  padding-block: var(--space-10);
}

.section--surface {
  background-color: var(--bg-surface);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }
}

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

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


/* --------------------------------------------------------------------------
   6. SKIP LINK (Accessibility)
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary-600);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-toast);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}


/* --------------------------------------------------------------------------
   7. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

[data-theme="dark"] .site-header {
  background: rgb(2 6 23 / 0.85);
  border-bottom-color: var(--color-neutral-800);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: var(--space-8);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-heading);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover { color: var(--color-primary-600); }
[data-theme="dark"] .site-logo:hover { color: var(--color-primary-400); }

.site-logo svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.site-logo .logo-text-short { display: none; }

@media (max-width: 900px) {
  .site-logo .logo-text-full { display: none; }
  .site-logo .logo-text-short { display: inline; }
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-md);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-primary-600);
  background: var(--color-primary-50);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link[aria-current="page"] {
  color: var(--color-primary-400);
  background: rgb(99 102 241 / 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  color: var(--text-heading);
  background: var(--bg-surface);
}

.theme-toggle svg { width: 1.25rem; height: 1.25rem; }
.theme-toggle .icon-moon  { display: none; }
.theme-toggle .icon-sun   { display: block; }

[data-theme="dark"] .theme-toggle .icon-moon  { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun   { display: none; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  color: var(--text-body);
}

.nav-toggle svg { width: 1.5rem; height: 1.5rem; }
.nav-toggle .icon-close { display: none; }

.nav-toggle[aria-expanded="true"] .icon-menu  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .nav-primary {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-body);
    padding: var(--space-4);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--duration-base) var(--ease-out);
    z-index: var(--z-overlay);
  }

  .nav-primary.is-open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
  }
}


/* --------------------------------------------------------------------------
   8. HERO SECTIONS
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--bg-hero);
  color: var(--text-inverse);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgb(99 102 241 / 0.25), transparent),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgb(6 182 212 / 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgb(139 92 246 / 0.1), transparent);
  pointer-events: none;
}

.hero--home {
  padding: var(--space-24) 0 var(--space-20);
}

.hero--page {
  padding: var(--space-16) 0 var(--space-12);
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
}

.hero h1 {
  color: #ffffff;
  margin-bottom: var(--space-6);
}

.hero .lead {
  color: var(--color-neutral-300);
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.03) 1px, transparent 1px);
  background-size: 4rem 4rem;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}


/* --------------------------------------------------------------------------
   9. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

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

.btn svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }

/* Primary */
.btn--primary {
  background: var(--color-primary-600);
  color: #ffffff;
  border-color: var(--color-primary-600);
}
.btn--primary:hover {
  background: var(--color-primary-700);
  border-color: var(--color-primary-700);
  color: #ffffff;
  box-shadow: var(--shadow-md), 0 0 0 1px rgb(79 70 229 / 0.2);
}

/* Secondary */
.btn--secondary {
  background: rgb(255 255 255 / 0.1);
  color: #ffffff;
  border-color: rgb(255 255 255 / 0.2);
}
.btn--secondary:hover {
  background: rgb(255 255 255 / 0.18);
  color: #ffffff;
  border-color: rgb(255 255 255 / 0.35);
}

/* Outline */
.btn--outline {
  background: transparent;
  color: var(--text-heading);
  border-color: var(--border-default);
}
.btn--outline:hover {
  background: var(--bg-surface);
  border-color: var(--color-neutral-300);
  color: var(--text-heading);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--color-primary-600);
  padding-inline: var(--space-3);
}
.btn--ghost:hover {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}
[data-theme="dark"] .btn--ghost:hover {
  background: rgb(99 102 241 / 0.1);
  color: var(--color-primary-400);
}

/* Sizes */
.btn--lg {
  padding: 0.75rem 1.75rem;
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn--sm {
  padding: 0.375rem 0.875rem;
  font-size: var(--text-xs);
}

.btn--icon {
  padding: 0.5rem;
  border-radius: var(--radius-md);
}


/* --------------------------------------------------------------------------
   10. CARDS
   -------------------------------------------------------------------------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--color-primary-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

[data-theme="dark"] .card:hover {
  border-color: var(--color-primary-800);
}

.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card--link:hover {
  color: inherit;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: var(--color-primary-50);
  color: var(--color-primary-600);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

[data-theme="dark"] .card__icon {
  background: rgb(99 102 241 / 0.15);
  color: var(--color-primary-400);
}

.card__icon svg { width: 1.5rem; height: 1.5rem; }

.card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

.card__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

.card__link-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary-600);
  margin-top: var(--space-4);
  transition: gap var(--duration-fast) var(--ease-out);
}

.card:hover .card__link-text {
  gap: var(--space-2);
}

[data-theme="dark"] .card__link-text {
  color: var(--color-primary-400);
}

.card__link-text svg { width: 1rem; height: 1rem; }

/* Feature Card (larger, homepage) */
.card--feature {
  padding: var(--space-8);
}

.card--feature .card__icon {
  width: 3.5rem;
  height: 3.5rem;
}

/* Stat Card */
.card--stat {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.card--stat .stat-value {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-primary-600);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  margin-bottom: var(--space-2);
}

[data-theme="dark"] .card--stat .stat-value {
  color: var(--color-primary-400);
}

.card--stat .stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}


/* --------------------------------------------------------------------------
   11. BADGES / TAGS
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2em 0.6em;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge--primary {
  background: var(--color-primary-50);
  color: var(--color-primary-700);
}
[data-theme="dark"] .badge--primary {
  background: rgb(99 102 241 / 0.15);
  color: var(--color-primary-300);
}

.badge--accent {
  background: var(--color-accent-50);
  color: var(--color-accent-700);
}
[data-theme="dark"] .badge--accent {
  background: rgb(6 182 212 / 0.15);
  color: var(--color-accent-300);
}

.badge--neutral {
  background: var(--color-neutral-100);
  color: var(--color-neutral-600);
}
[data-theme="dark"] .badge--neutral {
  background: var(--color-neutral-800);
  color: var(--color-neutral-400);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}


/* --------------------------------------------------------------------------
   12. BREADCRUMBS
   -------------------------------------------------------------------------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-neutral-400);
  margin-bottom: var(--space-6);
}

.breadcrumbs a {
  color: var(--color-neutral-400);
  transition: color var(--duration-fast) var(--ease-out);
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.breadcrumbs__sep {
  display: inline-flex;
  user-select: none;
}

.breadcrumbs__sep svg { width: 0.875rem; height: 0.875rem; }

.breadcrumbs__current {
  color: var(--color-neutral-200);
  font-weight: 500;
}

/* Breadcrumbs on light pages */
.breadcrumbs--light {
  color: var(--text-muted);
}

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

.breadcrumbs--light a:hover {
  color: var(--color-primary-600);
}

.breadcrumbs--light .breadcrumbs__current {
  color: var(--text-heading);
}


/* --------------------------------------------------------------------------
   13. STATS BAR
   -------------------------------------------------------------------------- */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding: var(--space-10) 0;
}

.stats-bar__item {
  text-align: center;
}

.stats-bar__value {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.stats-bar__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
  font-weight: 500;
}

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


/* --------------------------------------------------------------------------
   14. SECTION HEADERS
   -------------------------------------------------------------------------- */

.section-header {
  margin-bottom: var(--space-10);
}

.section-header--center {
  text-align: center;
}

.section-header--center .lead {
  margin-inline: auto;
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header .overline {
  margin-bottom: var(--space-3);
  display: block;
}


/* --------------------------------------------------------------------------
   15. COMPARISON TABLES
   -------------------------------------------------------------------------- */

.comparison-table {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
}

.comparison-table table {
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}

.comparison-table th {
  font-weight: 600;
  color: var(--text-heading);
  background: var(--bg-surface);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--bg-surface);
}

.check-icon { color: var(--color-success); }
.cross-icon { color: var(--color-neutral-400); }


/* --------------------------------------------------------------------------
   16. GLOSSARY
   -------------------------------------------------------------------------- */

.glossary-list {
  display: grid;
  gap: var(--space-1);
}

.glossary-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-5) 0;
}

.glossary-item:last-child { border-bottom: none; }

.glossary-term {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

.glossary-def {
  font-size: var(--text-sm);
  color: var(--text-body);
  line-height: var(--leading-relaxed);
  max-width: 80ch;
}

.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.glossary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-body);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.glossary-nav a:hover,
.glossary-nav a.active {
  background: var(--color-primary-600);
  color: #fff;
  border-color: var(--color-primary-600);
}

.glossary-letter {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary-600);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-primary-100);
  margin-bottom: var(--space-4);
  margin-top: var(--space-10);
}

[data-theme="dark"] .glossary-letter {
  color: var(--color-primary-400);
  border-bottom-color: var(--color-neutral-800);
}


/* --------------------------------------------------------------------------
   17. FORMS
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.625rem var(--space-4);
  font-size: var(--text-base);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-heading);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-status {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-status--error {
  background: rgb(220 38 38 / 0.1);
  color: var(--color-error);
  border: 1px solid rgb(220 38 38 / 0.2);
}

.form-status--info {
  background: rgb(37 99 235 / 0.1);
  color: var(--color-info);
  border: 1px solid rgb(37 99 235 / 0.2);
}

.form-status--success {
  background: rgb(5 150 105 / 0.1);
  color: var(--color-success);
  border: 1px solid rgb(5 150 105 / 0.2);
}


/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--color-neutral-950);
  color: var(--color-neutral-400);
  padding-top: var(--space-16);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-10);
  padding-bottom: var(--space-12);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

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

.footer-brand {
  max-width: 28ch;
}

.footer-brand .site-logo {
  margin-bottom: var(--space-4);
  color: #ffffff;
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.footer-nav h3 {
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.footer-nav ul {
  display: grid;
  gap: var(--space-3);
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-neutral-400);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid var(--color-neutral-800);
  padding: var(--space-6) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-legal a {
  color: var(--color-neutral-500);
}

.footer-legal a:hover {
  color: var(--color-neutral-300);
}


/* --------------------------------------------------------------------------
   19. CTA SECTION
   -------------------------------------------------------------------------- */

.cta-section {
  background: linear-gradient(135deg, var(--color-primary-950) 0%, var(--color-primary-900) 50%, var(--color-primary-800) 100%);
  color: #ffffff;
  border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-10);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgb(99 102 241 / 0.2), transparent 50%),
    radial-gradient(circle at 80% 20%, rgb(6 182 212 / 0.15), transparent 50%);
  pointer-events: none;
}

.cta-section > * { position: relative; z-index: 1; }

.cta-section h2 {
  color: #ffffff;
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: var(--color-primary-200);
  margin-inline: auto;
  margin-bottom: var(--space-8);
  max-width: 50ch;
}


/* --------------------------------------------------------------------------
   20. CONTENT LAYOUT (Detail Pages)
   -------------------------------------------------------------------------- */

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

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

.content-sidebar {
  position: sticky;
  top: 5rem;
}

@media (max-width: 1024px) {
  .content-sidebar {
    position: static;
  }
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.sidebar-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}

.sidebar-card ul {
  display: grid;
  gap: var(--space-2);
}

.sidebar-card a {
  font-size: var(--text-sm);
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.sidebar-card a:hover {
  background: var(--bg-elevated);
  color: var(--color-primary-600);
}

.sidebar-card a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-neutral-400);
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   21. KEY-VALUE INFO (Detail Pages)
   -------------------------------------------------------------------------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.info-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.info-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.info-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-heading);
}


/* --------------------------------------------------------------------------
   22. RELATED CONTENT LINKS
   -------------------------------------------------------------------------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4);
}

.related-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.related-item:hover {
  border-color: var(--color-primary-200);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.related-item__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  color: var(--color-primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .related-item__icon {
  background: rgb(99 102 241 / 0.15);
  color: var(--color-primary-400);
}

.related-item__icon svg { width: 1.25rem; height: 1.25rem; }

.related-item__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-heading);
}

.related-item__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}


/* --------------------------------------------------------------------------
   23. 404 PAGE
   -------------------------------------------------------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-24) var(--gutter);
  min-height: 60vh;
}

.error-code {
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-4);
}

.error-page h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.error-page p {
  margin-bottom: var(--space-8);
  margin-inline: auto;
}


/* --------------------------------------------------------------------------
   24. UTILITIES
   -------------------------------------------------------------------------- */

.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;
}

.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }

.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

.mr-2 { margin-right: var(--space-2); }
.ml-2 { margin-left: var(--space-2); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.w-full { width: 100%; }

.border-dashed { border-style: dashed !important; }
.border-0 { border: 0 !important; }

.text-accent { color: var(--color-accent-400); }
.text-primary-light { color: var(--color-primary-300); }
.text-muted { color: var(--text-muted); }

.bg-surface { background: var(--bg-surface); }
.bg-elevated { background: var(--bg-elevated); }
.bg-neutral-100 { background: var(--color-neutral-100); }
[data-theme="dark"] .bg-neutral-100 { background: var(--color-neutral-800); }

.justify-center { justify-content: center; }

.inline-block { display: inline-block; }

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}


/* --------------------------------------------------------------------------
   25. ANIMATIONS
   -------------------------------------------------------------------------- */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.animate-fade-in {
  animation: fade-in var(--duration-slow) var(--ease-out) both;
}

.animate-fade-in-up {
  animation: fade-in-up var(--duration-slow) var(--ease-out) both;
}

.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }
.delay-4 { animation-delay: 400ms; }


/* --------------------------------------------------------------------------
   26. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .nav-toggle,
  .theme-toggle,
  .cta-section,
  .hero::before,
  .hero-grid { display: none !important; }

  body {
    color: #000;
    background: #fff;
  }

  a { color: #000; text-decoration: underline; }

  .hero {
    background: #f5f5f5 !important;
    color: #000 !important;
    padding: 2rem 0 !important;
  }

  .hero h1, .hero .lead { color: #000 !important; }
}
