/* ============================================================
   Afaq Harness Gateway — Production Marketing Landing Page
   Aesthetic: Developer Infrastructure, Dark, Precise, Calm
   Tokens based on DESIGN.md: #0B1020 bg, #111827 surface,
   #3B82F6 primary, #8B5CF6 accent, #22D3EE highlights.
   Self-contained: Zero CDNs, zero remote fonts.
   ============================================================ */

:root {
  /* Brand Tokens */
  --bg-primary: #0b1020;
  --bg-surface: #111827;
  --bg-surface-elevated: #162033;
  --bg-surface-2: #151e32;
  --bg-surface-hover: #1e2b4a;

  --border-default: #1e2e4a;
  --border-subtle: #1a2642;
  --border-strong: #253a63;

  --brand-primary: #3b82f6;
  --brand-primary-dark: #1d4ed8;
  --brand-primary-glow: rgba(59, 130, 246, 0.2);
  --brand-accent: #8b5cf6;
  --brand-accent-glow: rgba(139, 92, 246, 0.2);
  --brand-cyan: #22d3ee;
  --brand-cyan-glow: rgba(34, 211, 238, 0.15);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --status-success: #22c55e;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #38bdf8;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-arabic: "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 16px 36px -6px rgba(0, 0, 0, 0.6), 0 4px 12px -2px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-height: 68px;
  --container-max: 1200px;
}

/* RTL Typography */
[dir="rtl"] {
  font-family: var(--font-arabic);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background grid pattern - purely technical & low-contrast */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 46, 74, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 46, 74, 0.2) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

code, pre {
  font-family: var(--font-mono);
}

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

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(11, 16, 32, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher */
.lang-toggle-group {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background-color: var(--brand-primary);
  color: #ffffff;
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* GitHub Link Button */
.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-github:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.github-version-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.mobile-nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: currentColor;
  border-radius: 1px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  inset-inline: 0;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-strong);
  padding: 20px 24px 28px;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-elevated);
  z-index: 99;
}

.mobile-drawer[hidden] {
  display: none !important;
}

.mobile-drawer.open:not([hidden]) {
  display: flex;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

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

.mobile-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero-section {
  padding-top: 56px;
  padding-bottom: 72px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-beta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--brand-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--brand-cyan);
}

.badge-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.hero-title {
  font-size: 46px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--brand-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background-color: var(--brand-primary-dark);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.hero-meta-signals {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.signal-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.signal-item svg {
  color: var(--status-success);
  flex-shrink: 0;
}

/* ============================================================
   Hero Visualization: One Gateway Routing to Multiple Harnesses
   ============================================================ */
.hero-visual-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-visual-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-primary), var(--brand-accent));
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.visual-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visual-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-success);
  box-shadow: 0 0 6px var(--status-success);
}

.visual-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.visual-status-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* The Core Architecture Diagram Layout */
.routing-diagram {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Row 1: Inbound Client Call */
.routing-inbound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.inbound-endpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.http-method {
  color: var(--brand-primary);
  font-weight: 700;
}

.http-path {
  color: var(--text-primary);
}

.inbound-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--brand-accent);
  background-color: rgba(139, 92, 246, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Flow connector down */
.routing-flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  position: relative;
}

.connector-line {
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--brand-primary), var(--brand-accent));
}

.connector-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-cyan);
  box-shadow: 0 0 8px var(--brand-cyan);
}

/* Row 2: Central Gateway Core */
.gateway-core-node {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--brand-primary);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.gateway-core-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.core-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.core-spec {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.core-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.core-module-chip {
  min-width: 0;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: center;
}

.chip-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chip-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* Row 3: Adapter Nodes Grid */
.adapters-fanout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 4px;
}

.fanout-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.fanout-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-accent);
}

.adapters-fanout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.adapter-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: all var(--transition-fast);
}

.adapter-pill.highlight {
  border-color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.05);
}

.adapter-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.adapter-cmd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================================
   Interactive Code Example / Architecture Signal Card
   ============================================================ */
.code-showcase-section {
  padding-block: 40px;
}

.code-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface-elevated);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-default);
  gap: 12px;
  flex-wrap: wrap;
}

.code-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-tab-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: transparent;
  transition: all var(--transition-fast);
}

.code-tab-btn.active {
  color: #ffffff;
  background-color: var(--bg-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.code-tab-btn:hover:not(.active) {
  color: var(--text-secondary);
}

.code-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.copy-btn.copied {
  color: var(--status-success);
  border-color: var(--status-success);
}

.code-pre-block {
  padding: 18px 20px;
  margin: 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
}

.code-models-note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

/* Syntax Highlighting Tokens (CSS pure) */
.c-cmd { color: var(--brand-cyan); font-weight: 600; }
.c-flag { color: #a5b4fc; }
.c-str { color: #86efac; }
.c-prop { color: #93c5fd; }
.c-num { color: #fca5a5; }
.c-comment { color: var(--text-faint); font-style: italic; }

/* ============================================================
   Section Headers Common
   ============================================================ */
.section-common {
  padding-block: 72px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-eyebrow {
  display: inline-block;
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.section-title {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.section-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ============================================================
   Supported Harnesses Section
   ============================================================ */
.harness-disclaimer-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background-color: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 32px;
}

.disclaimer-icon {
  color: var(--brand-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.disclaimer-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.disclaimer-text strong {
  color: var(--text-primary);
}

.harness-category-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-tag {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--brand-accent);
  background-color: rgba(139, 92, 246, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.harnesses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.harness-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
  position: relative;
}

.harness-card:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.harness-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.harness-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.harness-adapter-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.type-custom {
  color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.type-generic {
  color: var(--text-muted);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
}

.harness-exec-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-primary);
}

.harness-detail-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.harness-model-sample {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
}

.sample-label {
  color: var(--text-faint);
}

.sample-id {
  color: var(--text-secondary);
}

/* ============================================================
   How It Works Section
   ============================================================ */
.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.step-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: all var(--transition-fast);
}

.step-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.step-number-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--brand-cyan);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.step-tech-note {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   Features Grid
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}

.feature-card:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card:nth-child(2n) .feature-icon-box {
  color: var(--brand-accent);
}

.feature-card:nth-child(3n) .feature-icon-box {
  color: var(--brand-cyan);
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-tags {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-primary);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

/* ============================================================
   Security & Boundaries Section
   ============================================================ */
.security-banner {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, rgba(17, 24, 39, 0.6) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.security-banner-icon {
  color: var(--status-error);
  flex-shrink: 0;
  margin-top: 2px;
}

.security-banner-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.security-banner-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.security-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.security-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.security-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.security-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.badge-hardened {
  color: var(--status-success);
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-isolated {
  color: var(--brand-cyan);
  background-color: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.security-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ============================================================
   Quick Start Section
   ============================================================ */
.quickstart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.quickstart-nav {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-default);
  padding-inline: 16px;
  gap: 8px;
}

.quickstart-tab {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 14px 18px;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.quickstart-tab.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}

.quickstart-tab:hover:not(.active) {
  color: var(--text-primary);
}

.quickstart-body {
  padding: 28px 24px;
}

.install-flow-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
}

.flow-step-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-step-idx {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flow-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.flow-step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  padding-inline-start: 34px;
}

.flow-snippet-box {
  margin-inline-start: 34px;
  position: relative;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.flow-snippet-box pre {
  padding: 12px 16px;
  font-size: 13px;
  overflow-x: auto;
}

.snippet-copy-btn {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.snippet-copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.snippet-copy-btn.copied {
  color: var(--status-success);
  border-color: var(--status-success);
}

/* ============================================================
   Beta Release Callout Notice
   ============================================================ */
.beta-callout-section {
  padding-block: 20px 60px;
}

.beta-callout-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-inline-start: 4px solid var(--status-warning);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.beta-callout-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.beta-callout-icon {
  color: var(--status-warning);
  flex-shrink: 0;
}

.beta-callout-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.beta-callout-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  padding-block: 56px 36px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo-img {
  height: 28px;
  width: auto;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.55;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--brand-primary);
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-legal-link {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

/* ============================================================
   RTL Specific Adjustments
   ============================================================ */
[dir="rtl"] .hero-title {
  letter-spacing: normal;
}

[dir="rtl"] .beta-callout-box {
  border-inline-start: 4px solid var(--status-warning);
  border-inline-end: 1px solid var(--border-strong);
}

[dir="rtl"] .icon-flip-rtl {
  transform: scaleX(-1);
}

/* ============================================================
   Scroll Reveal Animation (Progressive Enhancement)
   ============================================================ */
.js .reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1), transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   No-JavaScript Progressive Enhancement Fallbacks
   ============================================================ */
html:not(.js) .mobile-nav-toggle,
html:not(.js) .lang-toggle-group {
  display: none !important;
}

@media (max-width: 768px) {
  html:not(.js) .site-header {
    height: auto;
  }

  html:not(.js) .header-container {
    flex-wrap: wrap;
    padding-block: 8px;
    gap: 8px 12px;
  }

  html:not(.js) .nav-desktop {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    order: 3;
    padding-block: 4px;
    gap: 4px;
    scrollbar-width: none;
  }

  html:not(.js) .nav-desktop::-webkit-scrollbar {
    display: none;
  }

  html:not(.js) .nav-link {
    white-space: nowrap;
    font-size: 13px;
    padding: 6px 8px;
  }
}

/* ============================================================
   Responsive Media Queries
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .workflow-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .header-actions > .lang-toggle-group,
  .header-actions > .btn-github {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .hero-title {
    font-size: 34px;
  }
  .section-title {
    font-size: 26px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .security-grid {
    grid-template-columns: 1fr;
  }
  .core-modules-grid {
    grid-template-columns: 1fr;
  }
  .adapters-fanout-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 16px;
  }
  .hero-title {
    font-size: 28px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .workflow-steps-grid {
    grid-template-columns: 1fr;
  }
  .adapters-fanout-grid {
    grid-template-columns: 1fr;
  }
  .flow-step-desc, .flow-snippet-box {
    margin-inline-start: 0;
  }
}
