/* ==========================================================================
   AETHERIS LIVING DESIGN SYSTEM & STYLE GUIDE STYLESHEET
   ========================================================================== */

/* @font-face declarations */
@font-face {
  font-family: 'darkerGrotesque';
  src: url('../fonts/darkerGrotesque-500.woff2') format('woff2');
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: 'archivo';
  src: url('../fonts/archivo-500.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'berkeleyMono';
  src: url('../fonts/berkeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'berkeleyMono';
  src: url('../fonts/berkeleyMono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'berkeleyMonoNumerals';
  src: url('../fonts/berkeleyMonoNumerals-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'berkeleyMonoNumerals';
  src: url('../fonts/berkeleyMonoNumerals-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'berkeleyMonoNumeralsDisplay';
  src: url('../fonts/berkeleyMonoNumeralsDisplay-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* Design Tokens & CSS Variables */
:root {
  /* Colors */
  --ax-accent: #FF6901;
  --ax-accent-hover: #E05A00;
  --ax-accent-glow: rgba(255, 105, 1, 0.25);
  --ax-accent-subtle: rgba(255, 105, 1, 0.1);
  --ax-bg: #0B0D0E;
  --ax-bg-subtle: #0F1214;
  --ax-surface-1: #14171A;
  --ax-surface-2: #1B2024;
  --ax-surface-3: #242B30;
  --ax-surface-elevated: #2A3238;
  --ax-border-subdued: #1E2429;
  --ax-border: #2A333C;
  --ax-border-strong: #404D59;
  --ax-border-hover: #5A6977;
  --ax-text-1: #F4F5F6;
  --ax-text-2: #8E98A3;
  --ax-text-3: #58636E;
  --ax-text-inverse: #0B0D0E;

  /* Status Colors */
  --ax-success: #10B981;
  --ax-success-glow: rgba(16, 185, 129, 0.2);
  --ax-warning: #F59E0B;
  --ax-warning-glow: rgba(245, 158, 11, 0.2);
  --ax-danger: #EF4444;
  --ax-danger-glow: rgba(239, 68, 68, 0.2);
  --ax-info: #0EA5E9;
  --ax-info-glow: rgba(14, 165, 233, 0.2);

  /* Typography */
  --font-sans: 'archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'darkerGrotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'berkeleyMono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-numerals: 'berkeleyMonoNumerals', var(--font-mono);

  /* Spacing Scale (4px Base Grid) */
  --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;

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px var(--ax-accent-glow);
  --shadow-glow-lg: 0 0 48px rgba(255, 105, 1, 0.35);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.2, 0, 0, 1);
  --transition-normal: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base Reset & Layout */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--ax-bg);
  color: var(--ax-text-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(255, 105, 1, 0.04) 0%, transparent 60%),
              var(--ax-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ax-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--ax-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ax-border-strong);
}

/* Layout Containers */
.ax-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ax-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.ax-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ax-border-subdued);
  height: 64px;
}

.ax-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.ax-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--ax-text-1);
}

.ax-logo-icon {
  width: 26px;
  height: 26px;
  background: var(--ax-accent);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 0 12px var(--ax-accent-glow);
}

.ax-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ax-nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--ax-text-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.ax-nav-link:hover, .ax-nav-link.active {
  color: var(--ax-text-1);
  background: var(--ax-surface-2);
}

.ax-nav-link.active {
  color: var(--ax-accent);
}

.ax-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Main Two-Column Docs / Styleguide Layout */
.ax-main-wrap {
  display: flex;
  flex: 1;
}

.ax-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--ax-border-subdued);
  background: var(--ax-bg);
  padding: var(--space-6) var(--space-4);
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.ax-sidebar-group {
  margin-bottom: var(--space-6);
}

.ax-sidebar-title {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ax-text-3);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-3);
}

.ax-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--ax-text-2);
  margin-bottom: 2px;
  transition: all var(--transition-fast);
}

.ax-sidebar-item:hover {
  color: var(--ax-text-1);
  background: var(--ax-surface-1);
}

.ax-sidebar-item.active {
  color: var(--ax-accent);
  background: var(--ax-accent-subtle);
  font-weight: 600;
}

.ax-content {
  flex: 1;
  padding: var(--space-8) var(--space-10);
  max-width: 1020px;
}

/* ==========================================================================
   ATOMS
   ========================================================================== */

/* Buttons */
.ax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.ax-btn:focus-visible {
  outline: 2px solid var(--ax-accent);
  outline-offset: 2px;
}

.ax-btn-primary {
  background: var(--ax-accent);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 16px var(--ax-accent-glow);
}
.ax-btn-primary:hover {
  background: var(--ax-accent-hover);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 24px rgba(255, 105, 1, 0.4);
}

.ax-btn-secondary {
  background: var(--ax-surface-2);
  color: var(--ax-text-1);
  border-color: var(--ax-border);
}
.ax-btn-secondary:hover {
  background: var(--ax-surface-3);
  border-color: var(--ax-border-strong);
}

.ax-btn-outline {
  background: transparent;
  color: var(--ax-text-1);
  border-color: var(--ax-border);
}
.ax-btn-outline:hover {
  background: var(--ax-surface-1);
  border-color: var(--ax-border-strong);
}

.ax-btn-ghost {
  background: transparent;
  color: var(--ax-text-2);
}
.ax-btn-ghost:hover {
  color: var(--ax-text-1);
  background: var(--ax-surface-2);
}

.ax-btn-danger {
  background: var(--ax-danger);
  color: #FFFFFF;
}
.ax-btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 0 16px var(--ax-danger-glow);
}

.ax-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.ax-btn-lg {
  padding: 14px 26px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.ax-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Badges & Chips */
.ax-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--ax-surface-2);
  color: var(--ax-text-2);
  border: 1px solid var(--ax-border);
}

.ax-badge-accent {
  background: var(--ax-accent-subtle);
  color: var(--ax-accent);
  border-color: rgba(255, 105, 1, 0.3);
}

.ax-badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--ax-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.ax-badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--ax-warning);
  border-color: rgba(245, 158, 11, 0.3);
}

.ax-badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--ax-danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.ax-badge-pill {
  border-radius: var(--radius-full);
  padding: 3px 12px;
}

/* Status Indicators */
.ax-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ax-text-3);
  display: inline-block;
  flex-shrink: 0;
}

.ax-status-dot.active {
  background: var(--ax-success);
  box-shadow: 0 0 8px var(--ax-success);
  animation: pulse 2s infinite;
}

.ax-status-dot.warning {
  background: var(--ax-warning);
  box-shadow: 0 0 8px var(--ax-warning);
}

.ax-status-dot.danger {
  background: var(--ax-danger);
  box-shadow: 0 0 8px var(--ax-danger);
}

/* Form Controls */
.ax-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ax-text-1);
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition-fast);
}

.ax-input:focus {
  outline: none;
  border-color: var(--ax-accent);
  box-shadow: 0 0 0 3px var(--ax-accent-subtle);
}

.ax-input::placeholder {
  color: var(--ax-text-3);
}

.ax-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ax-search-input-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--ax-text-3);
  pointer-events: none;
}

.ax-search-input-wrap input {
  padding-left: 36px;
  padding-right: 64px;
}

.ax-kbd-badge {
  position: absolute;
  right: 10px;
  background: var(--ax-surface-3);
  border: 1px solid var(--ax-border);
  color: var(--ax-text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  pointer-events: none;
}

/* Checkbox & Toggle */
.ax-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.ax-toggle {
  width: 40px;
  height: 22px;
  background: var(--ax-surface-3);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
  border: 1px solid var(--ax-border);
}

.ax-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFF;
  transition: transform var(--transition-fast);
}

.ax-toggle.checked {
  background: var(--ax-accent);
  border-color: var(--ax-accent);
}

.ax-toggle.checked::after {
  transform: translateX(18px);
}

/* Color Swatch Card */
.ax-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.ax-swatch-card {
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ax-swatch-card:hover {
  transform: translateY(-2px);
  border-color: var(--ax-border-strong);
  box-shadow: var(--shadow-md);
}

.ax-swatch-color {
  height: 80px;
  width: 100%;
}

.ax-swatch-info {
  padding: var(--space-3);
}

.ax-swatch-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ax-text-1);
}

.ax-swatch-hex {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ax-accent);
  margin-top: 2px;
}

.ax-swatch-role {
  font-size: 11px;
  color: var(--ax-text-3);
  margin-top: 4px;
}

/* ==========================================================================
   MOLECULES
   ========================================================================== */

/* Stat Cell */
.ax-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.ax-stat-card {
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-fast);
}

.ax-stat-card:hover {
  border-color: var(--ax-accent);
  box-shadow: 0 0 16px var(--ax-accent-subtle);
}

.ax-stat-val {
  font-family: var(--font-numerals);
  font-size: 32px;
  font-weight: 700;
  color: var(--ax-text-1);
  line-height: 1.1;
}

.ax-stat-label {
  font-size: 13px;
  color: var(--ax-text-2);
  margin-top: var(--space-1);
}

/* Mega Link Card */
.ax-mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.ax-mega-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  position: relative;
}

.ax-mega-item:hover {
  background: var(--ax-surface-2);
  border-color: var(--ax-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ax-mega-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--ax-text-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ax-mega-desc {
  font-size: 14px;
  color: var(--ax-text-2);
  margin-top: var(--space-2);
}

/* Model Selector Row */
.ax-model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  transition: all var(--transition-fast);
}

.ax-model-row:hover {
  background: var(--ax-surface-2);
  border-color: var(--ax-border-strong);
}

.ax-model-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.ax-model-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ax-text-1);
}

/* Code Block & Tabs */
.ax-code-block {
  background: #090B0C;
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-4) 0;
}

.ax-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ax-surface-1);
  border-bottom: 1px solid var(--ax-border-subdued);
  padding: var(--space-2) var(--space-4);
}

.ax-code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ax-text-3);
}

.ax-copy-btn {
  background: transparent;
  border: 1px solid var(--ax-border-subdued);
  border-radius: var(--radius-sm);
  color: var(--ax-text-2);
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.ax-copy-btn:hover {
  color: var(--ax-text-1);
  background: var(--ax-surface-2);
  border-color: var(--ax-border);
}

pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #D1D5DB;
}

/* Callouts */
.ax-callout {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  border-left: 4px solid var(--ax-accent);
  background: var(--ax-surface-1);
}

.ax-callout-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: var(--space-1);
  color: var(--ax-text-1);
}

.ax-callout-note { border-left-color: var(--ax-info); }
.ax-callout-tip { border-left-color: var(--ax-success); }
.ax-callout-warning { border-left-color: var(--ax-warning); }
.ax-callout-caution { border-left-color: var(--ax-danger); }

/* ==========================================================================
   ORGANISMS
   ========================================================================== */

/* Hero Section */
.ax-hero {
  padding: var(--space-16) 0 var(--space-12);
  text-align: center;
}

.ax-hero-badge {
  margin-bottom: var(--space-4);
}

.ax-hero-title {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ax-text-1);
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto var(--space-4);
}

.ax-hero-title span {
  color: var(--ax-accent);
}

.ax-hero-sub {
  font-size: 20px;
  color: var(--ax-text-2);
  max-width: 680px;
  margin: 0 auto var(--space-8);
}

.ax-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

/* Interactive Terminal Runner */
.ax-terminal {
  background: #060809;
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 32px rgba(0, 0, 0, 0.8);
  font-family: var(--font-mono);
  font-size: 13px;
  margin: var(--space-8) 0;
}

.ax-term-header {
  background: var(--ax-surface-1);
  border-bottom: 1px solid var(--ax-border-subdued);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ax-term-dots {
  display: flex;
  gap: 6px;
}

.ax-term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2E353B;
}

.ax-term-title {
  font-size: 12px;
  color: var(--ax-text-3);
}

.ax-term-body {
  padding: var(--space-4);
  min-height: 220px;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.6;
}

.ax-term-line {
  margin-bottom: 4px;
}

.ax-term-prompt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.ax-term-ps1 {
  color: var(--ax-accent);
  font-weight: 700;
}

.ax-term-input {
  background: transparent;
  border: none;
  color: var(--ax-text-1);
  font-family: var(--font-mono);
  font-size: 13px;
  flex: 1;
  outline: none;
}

.ax-term-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--ax-accent);
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

/* Feature Grid */
.ax-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

.ax-feat-card {
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.ax-feat-card:hover {
  border-color: var(--ax-border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(255, 105, 1, 0.08);
}

.ax-feat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--ax-accent-subtle);
  color: var(--ax-accent);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
}

.ax-feat-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--ax-text-1);
  margin-bottom: var(--space-2);
}

.ax-feat-desc {
  font-size: 15px;
  color: var(--ax-text-2);
  line-height: 1.6;
}

/* Model Comparison Matrix Table */
.ax-matrix-wrapper {
  overflow-x: auto;
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
  background: var(--ax-surface-1);
}

.ax-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.ax-matrix-table th {
  background: var(--ax-surface-2);
  color: var(--ax-text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--ax-border);
}

.ax-matrix-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--ax-border-subdued);
  color: var(--ax-text-1);
}

.ax-matrix-table tr:hover td {
  background: var(--ax-surface-2);
}

/* Pricing Grid */
.ax-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

.ax-pricing-card {
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
}

.ax-pricing-card.featured {
  border-color: var(--ax-accent);
  box-shadow: 0 0 24px var(--ax-accent-glow);
}

.ax-pricing-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--ax-text-1);
}

.ax-pricing-price {
  font-family: var(--font-numerals);
  font-size: 40px;
  font-weight: 700;
  color: var(--ax-text-1);
  margin: var(--space-3) 0;
}

.ax-pricing-features {
  list-style: none;
  margin: var(--space-6) 0;
  flex: 1;
}

.ax-pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  color: var(--ax-text-2);
  margin-bottom: var(--space-3);
}

/* Footer */
.ax-footer {
  border-top: 1px solid var(--ax-border-subdued);
  background: var(--ax-bg);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: auto;
}

.ax-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-8);
}

.ax-footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ax-text-3);
  margin-bottom: var(--space-4);
}

.ax-footer-links {
  list-style: none;
}

.ax-footer-links li {
  margin-bottom: var(--space-2);
}

.ax-footer-links a {
  font-size: 14px;
  color: var(--ax-text-2);
  transition: color var(--transition-fast);
}

.ax-footer-links a:hover {
  color: var(--ax-accent);
}

.ax-footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--ax-border-subdued);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ax-text-3);
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */

@keyframes aetherisNavartBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.97); }
}

@keyframes riseIn {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

@keyframes cellIn {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes aetherisSearchIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes aetherisSheetPanel {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 105, 1, 0.4);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 0 10px rgba(255, 105, 1, 0);
  }
}

@keyframes aetherisFade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes aetherisNavartDash {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -100; }
}

@keyframes enter {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes shimmerBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes matrixScanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(1000%); }
}

@keyframes skeletonLoading {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Animation Showcase Cards */
.ax-anim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

.ax-anim-card {
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.ax-anim-stage {
  height: 180px;
  background: #07090A;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ax-border-subdued);
}

.ax-anim-controls {
  padding: var(--space-4);
}

.ax-anim-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

/* ==========================================================================
   CROSS-PLATFORM DEVICE SIMULATOR & CLICK DUMMIES
   ========================================================================== */

.ax-device-app {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  background: #060809;
}

.ax-device-toolbar {
  background: var(--ax-surface-1);
  border-bottom: 1px solid var(--ax-border);
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  position: sticky;
  top: 64px;
  z-index: 50;
}

.ax-device-selector-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ax-device-btn {
  background: var(--ax-surface-2);
  border: 1px solid var(--ax-border);
  color: var(--ax-text-2);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.ax-device-btn:hover, .ax-device-btn.active {
  background: var(--ax-surface-3);
  color: var(--ax-text-1);
  border-color: var(--ax-border-strong);
}

.ax-device-btn.active {
  border-color: var(--ax-accent);
  color: var(--ax-accent);
}

.ax-device-stage-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  overflow: auto;
  position: relative;
  background: radial-gradient(circle at center, #111518 0%, #060809 100%);
}

/* Device Shells & Bezels */
.ax-device-bezel {
  background: #1E2328;
  border: 12px solid #2B323A;
  border-radius: 48px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 2px #444E57;
  position: relative;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.ax-device-bezel.phone {
  border-width: 12px;
  border-radius: 54px;
}

.ax-device-bezel.tablet {
  border-width: 16px;
  border-radius: 36px;
}

.ax-device-bezel.laptop {
  border-width: 14px 14px 22px 14px;
  border-radius: 18px 18px 4px 4px;
}

.ax-device-bezel.frameless {
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.ax-device-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.ax-device-screen {
  background: var(--ax-bg);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  height: 100%;
  width: 100%;
}

/* Modal Search Overlay */
.ax-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.ax-search-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.ax-search-dialog {
  width: 100%;
  max-width: 640px;
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 32px var(--ax-accent-glow);
  overflow: hidden;
  animation: aetherisSearchIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ax-search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: var(--space-2);
}

.ax-search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--ax-text-2);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.ax-search-result-item:hover, .ax-search-result-item.selected {
  background: var(--ax-surface-2);
  color: var(--ax-text-1);
}

/* Toast Notification */
.ax-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ax-surface-2);
  border: 1px solid var(--ax-accent);
  color: var(--ax-text-1);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 16px var(--ax-accent-glow);
  font-size: 14px;
  font-family: var(--font-mono);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.ax-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   DOCUMENTATION READER, MARKDOWN & COMPONENT EXTENSIONS
   ========================================================================== */

/* Markdown Headings */
.ax-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ax-text-1);
  line-height: 1.15;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  position: relative;
  scroll-margin-top: 80px;
}

.ax-h1 { font-size: 38px; line-height: 1.1; margin-top: 0; }
.ax-h2 { font-size: 30px; border-bottom: 1px solid var(--ax-border-subdued); padding-bottom: var(--space-2); margin-top: var(--space-8); }
.ax-h3 { font-size: 24px; margin-top: var(--space-6); }
.ax-h4 { font-size: 19px; margin-top: var(--space-5); }
.ax-h5 { font-size: 16px; margin-top: var(--space-4); }
.ax-h6 { font-size: 14px; text-transform: uppercase; color: var(--ax-text-3); margin-top: var(--space-4); }

.ax-anchor {
  position: absolute;
  left: -24px;
  color: var(--ax-text-3);
  opacity: 0;
  transition: opacity var(--transition-fast);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 16px;
  top: 4px;
}

.ax-heading:hover .ax-anchor {
  opacity: 0.7;
}

.ax-anchor:hover {
  color: var(--ax-accent) !important;
  opacity: 1 !important;
}

/* Markdown Paragraphs & Text */
.ax-p {
  color: var(--ax-text-2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.ax-code-inline {
  background: var(--ax-surface-2);
  border: 1px solid var(--ax-border);
  color: var(--ax-accent);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Markdown Tables */
.ax-table-wrapper {
  overflow-x: auto;
  margin: var(--space-6) 0;
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-lg);
  background: var(--ax-surface-1);
}

.ax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.ax-table th {
  background: var(--ax-surface-2);
  color: var(--ax-text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--ax-border);
}

.ax-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--ax-border-subdued);
  color: var(--ax-text-1);
}

.ax-table tr:last-child td {
  border-bottom: none;
}

.ax-table tr:hover td {
  background: var(--ax-surface-2);
}

/* Markdown Blockquote */
.ax-blockquote {
  border-left: 3px solid var(--ax-accent);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  background: var(--ax-surface-1);
  color: var(--ax-text-2);
  font-style: italic;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Markdown Lists */
.ax-list {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--ax-text-2);
  font-size: 15px;
  line-height: 1.7;
}

.ax-list li {
  margin-bottom: var(--space-1);
}

.ax-task-item {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: -20px;
}

.ax-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ax-border-strong);
  border-radius: var(--radius-xs);
  background: var(--ax-surface-2);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

.ax-checkbox:checked {
  background: var(--ax-accent);
  border-color: var(--ax-accent);
}

.ax-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.ax-hr {
  border: none;
  border-top: 1px solid var(--ax-border-subdued);
  margin: var(--space-8) 0;
}

.ax-md-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ax-border);
  margin: var(--space-4) 0;
  background: var(--ax-surface-1);
}

.ax-kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--ax-surface-2);
  border: 1px solid var(--ax-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--ax-text-2);
}

/* Breadcrumbs */
.ax-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--ax-text-3);
  margin-bottom: var(--space-4);
}

.ax-breadcrumb a {
  color: var(--ax-text-2);
  transition: color var(--transition-fast);
}

.ax-breadcrumb a:hover {
  color: var(--ax-accent);
}

.ax-breadcrumb-sep {
  color: var(--ax-text-3);
}

/* Reading Stats & Doc Header */
.ax-doc-stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin: var(--space-3) 0 var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--ax-border-subdued);
}

.ax-doc-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ax-text-3);
  font-family: var(--font-mono);
  background: var(--ax-surface-1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--ax-border-subdued);
}

/* Table of Contents Aside */
.ax-toc-aside {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: var(--space-6) var(--space-4);
  border-left: 1px solid var(--ax-border-subdued);
}

.ax-toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ax-text-3);
  margin-bottom: var(--space-3);
}

.ax-toc-list {
  list-style: none;
}

.ax-toc-item {
  margin-bottom: var(--space-1);
}

.ax-toc-item a {
  font-size: 13px;
  color: var(--ax-text-3);
  display: block;
  padding: 3px 0;
  line-height: 1.4;
  transition: color var(--transition-fast);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ax-toc-item a:hover {
  color: var(--ax-accent);
}

.ax-toc-l1 a { font-weight: 600; color: var(--ax-text-2); }
.ax-toc-l2 a { padding-left: var(--space-2); }
.ax-toc-l3 a { padding-left: var(--space-4); font-size: 12px; }
.ax-toc-l4 a { padding-left: var(--space-6); font-size: 11px; }

/* Interactive Typography Playground */
.ax-playground {
  background: var(--ax-surface-1);
  border: 1px solid var(--ax-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.ax-playground-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--ax-border-subdued);
}

.ax-playground-preview {
  background: var(--ax-bg);
  border: 1px solid var(--ax-border-subdued);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  min-height: 120px;
  word-break: break-word;
  transition: all var(--transition-fast);
}

/* Spacing Grid Visualizer */
.ax-spacing-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--ax-border-subdued);
}

.ax-spacing-meta {
  width: 140px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.ax-spacing-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.ax-spacing-bar {
  background: var(--ax-accent);
  height: 20px;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 10px var(--ax-accent-glow);
}
