/* Generated by scripts/build_css.py — do not edit this file.
   Sources: css/fonts.css, vendor/open-props-subset.css, css/tokens.css, vendor/basecoat-ui.css, css/components.css, css/main.css, css/spatial-3d.css, css/typography.css, css/ascii-motion.css */

/* ---- css/fonts.css ---- */
/* ==========================================================================
   SELF-HOSTED TYPEFACES
   Vazirmatn (OFL) for Persian, Fraunces (OFL) for English display,
   JetBrains Mono (OFL) for code and ASCII. Files live in /static/fonts.
   font-display: swap keeps text visible on the first frame.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Extra weight for headlines: the 900 cut is what gives a Persian title
   presence without faking it with a browser-synthesised bold. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn-900.woff2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jbmono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jbmono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- vendor/open-props-subset.css ---- */
/* Open Props — Standardized CSS Custom Property Scales (Self-Hosted Subset)
 * Source convention: https://open-props.style (vendored locally for zero CDN dependency)
 */
:root {
  /* Size & Spacing Scale */
  --size-0: 0;
  --size-1: 0.25rem;
  --size-2: 0.5rem;
  --size-3: 0.75rem;
  --size-4: 1rem;
  --size-5: 1.25rem;
  --size-6: 1.5rem;
  --size-7: 2rem;
  --size-8: 2.5rem;
  --size-9: 3rem;
  --size-10: 4rem;
  --size-11: 5rem;
  --size-12: 6rem;

  /* Fluid Type Scale */
  --font-size-00: 0.75rem;
  --font-size-0: 0.8125rem;
  --font-size-1: 0.9375rem;
  --font-size-2: 1.0625rem;
  --font-size-3: 1.25rem;
  --font-size-4: 1.5rem;
  --font-size-5: 1.875rem;
  --font-size-6: 2.375rem;
  --font-size-7: 3rem;

  /* Line Heights */
  --font-lineheight-0: 1.15;
  --font-lineheight-1: 1.3;
  --font-lineheight-2: 1.5;
  --font-lineheight-3: 1.72;
  --font-lineheight-4: 1.85;

  /* Radii */
  --radius-1: 4px;
  --radius-2: 8px;
  --radius-3: 12px;
  --radius-4: 16px;
  --radius-5: 24px;
  --radius-round: 9999px;

  /* Shadows (Dark Mode Tuned) */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.38), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.48), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-glow-amber: 0 0 0 1px rgba(226, 168, 87, 0.28), 0 8px 28px rgba(226, 168, 87, 0.10);

  /* Easings */
  --ease-2: cubic-bezier(0.25, 0, 0.4, 1);
  --ease-3: cubic-bezier(0.25, 0, 0.3, 1);
  --ease-out-3: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 220ms;
  --duration-slow: 340ms;

  /* Z-index layers */
  --layer-1: 10;
  --layer-2: 20;
  --layer-3: 40;
  --layer-4: 60;
  --layer-5: 100;
}

/* ---- css/tokens.css ---- */
/* amirparsa.dev v2 — Editorial Luxury-Tech Design Tokens
 * Self-hosted font hooks with clean local system fallbacks (zero external CDN).
 */

/* Optional self-hosted font files placed in /static/fonts/ activate automatically */
:root {
  /* Surfaces */
  --bg-base: #0B0D10;
  --bg-surface: #12151B;
  --bg-elevated: #181C24;
  --bg-glass: rgba(18, 21, 27, 0.80);

  /* Typography */
  --text-primary: #F4F3EE;
  --text-secondary: #A6ADBB;
  --text-muted: #7C8598;

  /* Accents */
  --accent-primary: #E2A857;
  --accent-primary-hover: #EDB96F;
  --accent-secondary: #34D399;
  --accent-telegram: #2AABEE;
  --accent-danger: #F87171;

  /* Borders & Radii */
  --border-subtle: rgba(244, 243, 238, 0.08);
  --border-strong: rgba(244, 243, 238, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Layout */
  --container-max: 1180px;
  --prose-max: 72ch;
  --section-space: 5.5rem;
  --nav-height: 68px;

  /* Font Stacks */
  --font-fa: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  --font-display-en: "Fraunces", Georgia, "Times New Roman", serif;
  --font-en: "Vazirmatn", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 768px) {
  :root {
    --section-space: 3.5rem;
  }
}

/* ---- vendor/basecoat-ui.css ---- */
/* Basecoat / shadcn-inspired Framework-Agnostic UI Primitives (Self-Hosted)
 * Zero external CDN; built with CSS Logical Properties for seamless RTL/LTR mirroring.
 */

/* Buttons */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.625rem;
  padding-inline: 1.125rem;
  padding-block: 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease-out-3),
              border-color var(--duration-fast) var(--ease-out-3),
              color var(--duration-fast) var(--ease-out-3),
              transform var(--duration-fast) var(--ease-out-3),
              box-shadow var(--duration-fast) var(--ease-out-3);
}
.ui-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.ui-btn:disabled,
.ui-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.ui-btn--sm {
  min-height: 2.125rem;
  padding-inline: 0.825rem;
  padding-block: 0.35rem;
  font-size: 0.84rem;
}
.ui-btn--lg {
  min-height: 3rem;
  padding-inline: 1.45rem;
  padding-block: 0.72rem;
  font-size: 1rem;
}
.ui-btn--primary {
  background: var(--accent-primary);
  color: #0B0D10;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-1);
}
.ui-btn--primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  transform: translateY(-1px);
}
.ui-btn--secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.ui-btn--secondary:hover {
  background: #202530;
  border-color: rgba(244, 243, 238, 0.28);
}
.ui-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
.ui-btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(244, 243, 238, 0.05);
  border-color: var(--border-strong);
}
.ui-btn--telegram {
  background: rgba(42, 171, 238, 0.14);
  color: #7AD4FF;
  border-color: rgba(42, 171, 238, 0.38);
}
.ui-btn--telegram:hover {
  background: rgba(42, 171, 238, 0.22);
  border-color: rgba(42, 171, 238, 0.62);
  color: #E8F8FF;
}
.ui-btn--danger {
  background: rgba(248, 113, 113, 0.14);
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.35);
}
.ui-btn--danger:hover {
  background: rgba(248, 113, 113, 0.24);
  border-color: rgba(248, 113, 113, 0.6);
}

/* Cards */
.ui-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color var(--duration-base) var(--ease-out-3),
              background-color var(--duration-base) var(--ease-out-3),
              transform var(--duration-base) var(--ease-out-3);
}
.ui-card--elevated {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
}
.ui-card--interactive:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* Badges */
.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-inline: 0.7rem;
  padding-block: 0.24rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid var(--border-subtle);
  background: rgba(244, 243, 238, 0.04);
  color: var(--text-secondary);
}
.ui-badge--amber {
  background: rgba(226, 168, 87, 0.12);
  border-color: rgba(226, 168, 87, 0.32);
  color: #F2C57C;
}
.ui-badge--emerald {
  background: rgba(52, 211, 153, 0.11);
  border-color: rgba(52, 211, 153, 0.32);
  color: #6EE7B7;
}
.ui-badge--telegram {
  background: rgba(42, 171, 238, 0.12);
  border-color: rgba(42, 171, 238, 0.32);
  color: #7AD4FF;
}
.ui-badge--danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.34);
  color: #FCA5A5;
}
.ui-badge--neutral {
  background: rgba(244, 243, 238, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

/* Callouts / Alerts */
.ui-alert {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-inline-start-width: 3px;
  background: rgba(244, 243, 238, 0.03);
  font-size: 0.92rem;
  line-height: 1.7;
}
.ui-alert__icon {
  flex-shrink: 0;
  margin-top: 0.18rem;
}
.ui-alert__title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.ui-alert--info {
  border-inline-start-color: var(--accent-telegram);
  background: rgba(42, 171, 238, 0.06);
}
.ui-alert--tip {
  border-inline-start-color: var(--accent-secondary);
  background: rgba(52, 211, 153, 0.06);
}
.ui-alert--warn,
.ui-alert--caveat {
  border-inline-start-color: var(--accent-primary);
  background: rgba(226, 168, 87, 0.07);
}
.ui-alert--danger {
  border-inline-start-color: var(--accent-danger);
  background: rgba(248, 113, 113, 0.08);
}

/* Tabs */
.ui-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
}
.ui-tabs__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-inline: 0.95rem;
  padding-block: 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-3);
}
.ui-tabs__trigger:hover {
  color: var(--text-primary);
  background: rgba(244, 243, 238, 0.04);
}
.ui-tabs__trigger[aria-selected="true"],
.ui-tabs__trigger.is-active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}
.ui-tabs__panel {
  margin-top: 1.25rem;
}
.ui-tabs__panel[hidden] {
  display: none;
}

/* Accordion (Semantic <details>/<summary>) */
.ui-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ui-accordion__item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out-3);
}
.ui-accordion__item[open] {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}
.ui-accordion__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}
.ui-accordion__summary::-webkit-details-marker {
  display: none;
}
.ui-accordion__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--duration-base) var(--ease-out-3);
}
.ui-accordion__item[open] .ui-accordion__chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}
.ui-accordion__body {
  padding-inline: 1.25rem;
  padding-bottom: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.94rem;
}

/* Tables */
.ui-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: start;
}
.ui-table th,
.ui-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.ui-table thead th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.ui-table tbody tr:last-child td {
  border-bottom: none;
}
.ui-table tbody tr:hover {
  background: rgba(244, 243, 238, 0.025);
}
.ui-table__col-highlight {
  background: rgba(226, 168, 87, 0.06);
}

/* Form Controls */
.ui-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.ui-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}
.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.68rem 0.9rem;
  font-family: inherit;
  font-size: 0.93rem;
  line-height: 1.5;
  transition: border-color var(--duration-fast) var(--ease-out-3),
              box-shadow var(--duration-fast) var(--ease-out-3);
}
.ui-input::placeholder,
.ui-textarea::placeholder {
  color: var(--text-muted);
}
.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(226, 168, 87, 0.14);
}
.ui-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  cursor: pointer;
}
.ui-checkbox-row input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--accent-primary);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Toast Notification */
.ui-toast-stack {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: var(--layer-5);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 24rem;
}
.ui-toast {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-inline-start: 3px solid var(--accent-secondary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  box-shadow: var(--shadow-3);
  animation: toastIn 220ms var(--ease-out-3);
}
.ui-toast--error {
  border-inline-start-color: var(--accent-danger);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- css/components.css ---- */
/* Reusable Component Styles composed on top of Open Props + Basecoat primitives */

/* Section Header */
.section-header {
  max-width: 44rem;
  margin-bottom: 2.25rem;
}
.section-header__eyebrow {
  margin-bottom: 0.75rem;
}
.section-header__title {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.28;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.015em;
}
.section-header__subtitle {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

/* Status Dot */
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
  display: inline-block;
  flex-shrink: 0;
}

/* Stat Pill */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(244, 243, 238, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.stat-pill svg {
  color: var(--accent-primary);
}

/* Code / Terminal Window */
.code-window {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #080A0D;
  overflow: hidden;
  direction: ltr;
  text-align: left;
}
.code-window__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.code-window__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.code-window__dots {
  display: inline-flex;
  gap: 0.35rem;
}
.code-window__dots span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(244, 243, 238, 0.18);
}
.code-window__title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-window__pre {
  margin: 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #D9E2EC;
}

/* Breadcrumbs */
.breadcrumbs {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 21, 27, 0.45);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.83rem;
  color: var(--text-muted);
}
.breadcrumbs__list a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumbs__list a:hover {
  color: var(--accent-primary);
}
.breadcrumbs__sep {
  opacity: 0.45;
}

/* Service Package Card */
.service-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}
.service-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.service-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(226, 168, 87, 0.12);
  border: 1px solid rgba(226, 168, 87, 0.25);
  color: var(--accent-primary);
  flex-shrink: 0;
}
.service-card__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text-primary);
}
.service-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.service-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.service-card__list svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
  margin-top: 0.22rem;
}
.service-card__price {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(244, 243, 238, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  color: var(--text-primary);
}
.service-card__footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

/* CTA Banner */
.cta-banner {
  background:
    radial-gradient(600px circle at 15% 20%, rgba(226, 168, 87, 0.10), transparent 60%),
    var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-banner__copy {
  max-width: 38rem;
}
.cta-banner__title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  color: var(--text-primary);
}
.cta-banner__sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Pipeline Steps */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.pipeline-step {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}
.pipeline-step__title {
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.94rem;
  margin-bottom: 0.4rem;
}
.pipeline-step__detail {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-pill {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-3);
}
.filter-pill:hover,
.filter-pill.is-active {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: rgba(226, 168, 87, 0.12);
}

/* ---- css/main.css ---- */
/* amirparsa.dev v2 — Main Layout, Typography, Demo Lab, GEO Tool & Editorial Prose */

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

html {
  scroll-behavior: smooth;
  background: var(--bg-base);
  color: var(--text-primary);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px circle at 85% -5%, rgba(226, 168, 87, 0.08), transparent 55%),
    radial-gradient(700px circle at 10% 10%, rgba(52, 211, 153, 0.05), transparent 55%),
    var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-fa);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

a {
  color: var(--accent-primary);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-primary-hover);
}

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

.section {
  padding-block: var(--section-space);
}
.section--compact {
  padding-block: 3rem;
}
.section--surface {
  background: rgba(18, 21, 27, 0.55);
  border-block: 1px solid var(--border-subtle);
}

/* Site Notice Banner */
.site-notice {
  background: rgba(226, 168, 87, 0.10);
  border-bottom: 1px solid rgba(226, 168, 87, 0.25);
  color: #F4D29A;
  font-size: 0.85rem;
  padding-block: 0.5rem;
  text-align: center;
}

/* Sticky Glass Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--layer-4);
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-link:hover {
  color: var(--text-primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link {
  padding: 0.42rem 0.72rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.89rem;
  font-weight: 500;
  transition: color var(--duration-fast), background-color var(--duration-fast);
}
.nav-link:hover,
.nav-link.is-active {
  color: var(--text-primary);
  background: rgba(244, 243, 238, 0.05);
}

/* Dropdown for Solutions */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  inset-inline-start: 0;
  min-width: 15.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  box-shadow: var(--shadow-3);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  z-index: var(--layer-5);
}
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  display: flex;
}
.nav-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
}
.nav-dropdown__item:hover {
  background: rgba(244, 243, 238, 0.06);
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  height: 2.15rem;
  padding-inline: 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.lang-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.nav-mobile-btn {
  display: none;
}
.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: rgba(11, 13, 16, 0.96);
  backdrop-filter: blur(12px);
  z-index: var(--layer-4);
  padding: 1.5rem;
  overflow-y: auto;
}
.mobile-drawer.is-open {
  display: block;
}
.mobile-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-drawer__links a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 960px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile-btn {
    display: inline-flex;
  }
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1024px) {
  .grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-5 {
    grid-template-columns: 1fr;
  }
}

/* Hero Section */
.hero {
  padding-block: 4.5rem 4rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 960px) {
  .hero {
    padding-block: 2.75rem 3rem;
  }
  .hero__grid {
    grid-template-columns: 1fr;
  }
}
.hero__title {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 1.24;
  font-weight: 800;
  margin: 1rem 0 1rem;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: 1.04rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 1.6rem;
  max-width: 58ch;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Live Preview Card in Hero */
.arch-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-3);
}
.arch-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.arch-node {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.65rem;
}
.arch-node__num {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: rgba(226, 168, 87, 0.14);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.arch-node__label {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.arch-node__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Interactive Demo Lab */
.demo-shell {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-2);
}
.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block: 0.75rem 1rem;
}
.demo-chip {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-base);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.demo-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.demo-output {
  margin-top: 1rem;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
}
.trace-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.trace-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 0.82rem;
}

/* Mobile Mockup for IG/TG Demo */
.phone-mock {
  background: #080A0D;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.phone-mock__head {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}
.chat-bubble {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 92%;
}
.chat-bubble--user {
  background: rgba(226, 168, 87, 0.14);
  border: 1px solid rgba(226, 168, 87, 0.3);
  align-self: flex-end;
}
.chat-bubble--bot {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
}

/* ROI Sliders */
.roi-range {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.roi-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.roi-stat {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.roi-stat__val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.2;
}
.roi-stat__lbl {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* GEO Checker Score Meter */
.geo-score-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.geo-score-ring {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  border: 4px solid var(--accent-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
}
.geo-score-ring__num {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}
.geo-score-ring__cap {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Blog Editorial Layout */
.editorial-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}
.editorial-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.toc-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
}
.toc-list a:hover {
  color: var(--accent-primary);
}
.toc-list__h3 {
  padding-inline-start: 0.85rem;
  font-size: 0.81rem;
}

.prose {
  max-width: var(--prose-max);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}
.prose h2 {
  color: var(--text-primary);
  font-size: 1.45rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}
.prose h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.prose p {
  margin-block: 0 1.05rem;
}
.prose strong {
  color: var(--text-primary);
}
.prose pre {
  background: #080A0D;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: #D9E2EC;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(244, 243, 238, 0.07);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  color: #F2C57C;
}
.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
}
.prose th, .prose td {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-subtle);
  text-align: start;
}
.prose th {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #080A0D;
  padding-block: 3.5rem 2.25rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.footer-col h4 {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.86rem;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent-primary);
}
.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Utilities */
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }
.stack-sm { display: flex; flex-direction: column; gap: 0.65rem; }
.stack-md { display: flex; flex-direction: column; gap: 1.15rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }
.mb-1 { margin-bottom: 0.75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.microcopy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
  line-height: 1.55;
}

/* ==========================================================================
   24. Narrow-screen hardening
   Grid and flex children default to min-width: auto, so one unbreakable child
   (a <pre> with white-space: pre, a long badge, an inline code sample) sizes
   the whole column and pushes the page sideways. Measured at 320px: the hero
   column was 567px wide and the document scrolled 48px. Zeroing the minimum
   on the children fixes the cause, not the symptom.
   ========================================================================== */

.hero__grid > *,
.grid > *,
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.grid-5 > *,
.pipeline-grid > *,
.article-grid > *,
.service-grid > *,
.cards > * {
  min-width: 0;
}

/* Anything that can hold a long token scrolls inside itself instead of
   widening its parent. */
.ascii-banner,
pre,
table,
.code-window {
  max-width: 100%;
}

.ui-badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  /* Long Latin product names and URLs have no break opportunity. */
  h1, h2, h3, p, li, dd, dt {
    overflow-wrap: anywhere;
  }
  .hero__grid,
  .grid-2,
  .grid-3,
  .pipeline-grid,
  .article-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Buttons assume a single line, which is right on desktop and wrong in a
   narrow column: "مشاهده جزئیات کامل، فرآیند اجرا و مقایسه" was 346px wide
   inside a 280px column and pushed the page 48px sideways. */
.ui-btn {
  max-width: 100%;
}

@media (max-width: 560px) {
  .ui-btn {
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    padding-block: 0.6rem;
  }
}

/* ==========================================================================
   25. Header on narrow screens
   Brand + language pill + CTA + menu button were 316px of content inside a
   272px box, so the header scrolled the whole document 15px sideways at
   320px. The brand now yields and truncates; the controls keep their size.
   ========================================================================== */

@media (max-width: 560px) {
  .container {
    padding-inline: 16px;
  }
  .site-header__inner {
    gap: 0.5rem;
  }
  .brand-link {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .brand-link > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 0.95rem;
  }
  .nav-actions {
    flex: 0 0 auto;
    gap: 0.4rem;
  }
  .nav-actions .ui-btn--primary {
    padding-inline: 0.75rem;
    font-size: 0.8rem;
  }
  .lang-pill {
    padding-inline: 0.5rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   26. Article and card containers on narrow screens
   Measured on /blog/<slug> at 320px: .stack-md was 712px wide because a
   <pre> inside it has a min-content width of 662px and every wrapper had the
   default min-width: auto. Nothing here changes the desktop look; it only
   stops a wide child from defining the parent's width.
   ========================================================================== */

.stack-sm,
.stack-md,
.stack-lg,
.ui-card,
.ui-alert,
.ui-alert__content,
.article-body,
.prose {
  min-width: 0;
}

.stack-md > *,
.stack-lg > *,
.ui-alert > *,
.ui-card > * {
  min-width: 0;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
}

/* A table cannot wrap its columns, so on a phone it scrolls sideways inside
   its own box instead of stretching the article. */
@media (max-width: 720px) {
  .prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ==========================================================================
   27. Very small screens (320–400px)
   Measured at 320px: the wordmark was truncated to "...arsa.dev", the
   article H1 ran to five lines, and the header carried a CTA the drawer
   already offers. Each fix removes a compromise instead of hiding content.
   ========================================================================== */

@media (max-width: 420px) {
  .brand-link > span:last-child {
    font-size: 0.84rem;
    letter-spacing: -0.01em;
  }
  /* The drawer holds the same call to action, so the header keeps only the
     menu button and the language switch. */
  .nav-actions .ui-btn--primary {
    display: none;
  }
  h1,
  .hero__title,
  .page-title,
  .section-header__title {
    font-size: clamp(1.45rem, 7vw, 1.9rem) !important;
    line-height: 1.35;
  }
  .lead,
  .secondary {
    font-size: 0.97rem;
  }
  .card,
  .ui-card {
    padding: 16px;
  }
}

/* ==========================================================================
   28. One type scale for every page title
   Twelve templates carried an inline clamp() that mobile ignored, so the
   article headline at 320px was set at desktop size. The scale now lives in
   CSS: 23px on the smallest phone, 40px on a wide screen.
   ========================================================================== */

h1 {
  font-size: clamp(1.45rem, 4.2vw, 2.5rem);
  line-height: 1.3;
  margin: 0;
}

@media (min-width: 900px) {
  h1 {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    line-height: 1.22;
  }
}

/* ==========================================================================
   29. Touch targets
   On a phone or tablet every control must be reachable with a thumb. The
   small button variant is 34px, which is fine with a mouse and wrong with a
   finger, so touch devices get a 44px floor.
   ========================================================================== */

@media (pointer: coarse) {
  .ui-btn,
  .lang-pill,
  .demo-chip,
  .chip,
  .nav-link,
  .nav-dropdown__item,
  .ui-accordion summary {
    min-height: 44px;
  }
  .ui-btn,
  .lang-pill,
  .demo-chip,
  .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav-link,
  .nav-dropdown__item {
    display: flex;
    align-items: center;
  }
}

/* The accordion question became a real heading for extraction; it must look
   exactly as it did before, not like a section title. */
.ui-accordion__q {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: 0;
}

/* ---- css/spatial-3d.css ---- */
/* ==========================================================================
   AMIRPARSA-V2: SPATIAL 3D & ULTRA-PREMIUM GLASS ARCHITECTURE
   Zero external dependencies | CLS-safe | RTL/LTR aware | Reduced-motion safe
   Every container reserves its own box before JS runs, so paint never moves.
   ========================================================================== */

:root {
  --spatial-perspective: 1100px;
  --spatial-neon-cyan: #38bdf8;
  --spatial-neon-indigo: #818cf8;
  --spatial-neon-emerald: #34d399;
  --spatial-glass-bg: rgba(15, 23, 42, 0.72);
  --spatial-glass-border: rgba(148, 163, 184, 0.16);
  --spatial-glass-highlight: rgba(56, 189, 248, 0.38);
}

/* 1. 3D perspective cyber-grid floor behind the hero */
.spatial-hero-stage {
  position: relative;
  overflow: hidden;
  perspective: var(--spatial-perspective);
  isolation: isolate;
}

.spatial-hero-stage::before {
  content: "";
  position: absolute;
  inset: -30% -20% 0 -20%;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(129, 140, 248, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(700px) rotateX(62deg) translateY(-10%) translateZ(-80px);
  transform-origin: center top;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 35%, transparent 85%);
  pointer-events: none;
  z-index: -1;
}

/* 2. Interactive 3D neural agent core. The aspect ratio and min-height are
   declared here, not by script, so the layout is stable on first paint. */
.neural-core-wrapper {
  position: relative;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 16 / 11;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.14), rgba(15, 23, 42, 0.92) 72%);
  border: 1px solid var(--spatial-glass-border);
  box-shadow:
    0 24px 60px -15px rgba(2, 6, 23, 0.85),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  contain: layout paint;
  margin-bottom: 1.25rem;
}

.neural-core-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.neural-core-canvas:active {
  cursor: grabbing;
}

/* Floating SSR HTML HUD badges over the canvas: real text, so crawlers read it */
.neural-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  z-index: 2;
}

.neural-hud-top,
.neural-hud-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.neural-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.45);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.neural-hud-pill[data-node-active="true"] {
  border-color: var(--spatial-neon-emerald);
  transform: translateY(-2px) scale(1.03);
}

.neural-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--spatial-neon-emerald);
  box-shadow: 0 0 10px var(--spatial-neon-emerald);
}

/* 3. Hardware-accelerated 3D tilt cards with specular glare */
[data-tilt] {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  --glare-opacity: 0;
  position: relative;
  transform-style: preserve-3d;
  transform:
    perspective(var(--spatial-perspective))
    rotateX(var(--rx))
    rotateY(var(--ry))
    translateZ(0);
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  [data-tilt] {
    will-change: transform;
  }

  [data-tilt]:hover {
    border-color: var(--spatial-glass-highlight);
    box-shadow:
      0 22px 48px -12px rgba(2, 6, 23, 0.78),
      0 0 28px -8px rgba(56, 189, 248, 0.22);
  }

  [data-tilt]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
      420px circle at var(--mx) var(--my),
      rgba(255, 255, 255, 0.13),
      rgba(56, 189, 248, 0.06) 35%,
      transparent 70%
    );
    opacity: var(--glare-opacity);
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 3;
  }
}

/* Inner z-depth elements inside 3D cards */
[data-tilt] .spatial-z-badge,
[data-tilt] .ui-badge,
[data-tilt] .metric-value {
  transform: translateZ(24px);
  display: inline-block;
}

[data-tilt] h2,
[data-tilt] h3 {
  transform: translateZ(16px);
}

/* 4. Isometric 3D exploded architecture stack */
.isometric-stack-scene {
  perspective: 1200px;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.isometric-stack {
  position: relative;
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform-style: preserve-3d;
  transform: rotateX(22deg) rotateY(-14deg) rotateZ(4deg);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

[dir="rtl"] .isometric-stack {
  transform: rotateX(22deg) rotateY(14deg) rotateZ(-4deg);
}

.isometric-stack:hover,
.isometric-stack:focus-within {
  transform: rotateX(14deg) rotateY(0deg) rotateZ(0deg);
}

[dir="rtl"] .isometric-stack:hover,
[dir="rtl"] .isometric-stack:focus-within {
  transform: rotateX(14deg) rotateY(0deg) rotateZ(0deg);
}

.isometric-layer {
  position: relative;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--spatial-glass-bg);
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 18px 36px -10px rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.isometric-stack:hover .isometric-layer:nth-child(1) {
  transform: translateZ(42px) translateY(-6px);
  border-color: var(--spatial-neon-cyan);
}
.isometric-stack:hover .isometric-layer:nth-child(2) {
  transform: translateZ(24px);
  border-color: var(--spatial-neon-indigo);
}
.isometric-stack:hover .isometric-layer:nth-child(3) {
  transform: translateZ(8px) translateY(6px);
  border-color: var(--spatial-neon-emerald);
}

.isometric-layer__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--spatial-neon-cyan);
  margin-bottom: 0.4rem;
}

.isometric-layer__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

/* 5. Demo pipeline stages */
.pipeline-3d-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.9rem;
  perspective: 1000px;
  margin: 1.25rem 0;
}

.pipeline-3d-node {
  position: relative;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--spatial-glass-border);
  transform-style: preserve-3d;
  transform: translateZ(0);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.pipeline-3d-node.is-active,
.pipeline-3d-node:hover {
  transform: translateY(-5px) rotateX(8deg) translateZ(18px);
  border-color: var(--spatial-neon-cyan);
  box-shadow:
    0 18px 34px -10px rgba(2, 6, 23, 0.8),
    0 0 22px -4px rgba(56, 189, 248, 0.35);
}

.pipeline-3d-node__step {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--spatial-neon-cyan);
  display: block;
  margin-bottom: 0.3rem;
}

.pipeline-3d-node__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  display: block;
}

.pipeline-3d-node__meta {
  font-size: 0.74rem;
  color: #94a3b8;
  display: block;
  margin-top: 0.25rem;
}

/* 6. Accessibility and reduced-motion fallbacks */
@media (prefers-reduced-motion: reduce), (max-width: 767px) {
  [data-tilt] {
    transform: none !important;
  }
  [data-tilt]::after {
    display: none !important;
  }
  .isometric-stack,
  [dir="rtl"] .isometric-stack {
    transform: none !important;
  }
  .neural-core-canvas {
    cursor: default;
  }
}

/* 7. Visually hidden, still in the DOM for screen readers and crawlers.
   This codebase had no sr-only utility, so the SSR fallback list was visible
   on top of the HUD before this rule existed. */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 8. Narrow screens: a fixed aspect ratio forces the width from the height,
   which made the canvas 524px wide inside a 412px column. Let width drive. */
@media (max-width: 767px) {
  .neural-core-wrapper {
    aspect-ratio: auto;
    min-height: 300px;
    height: 300px;
  }
  .neural-hud-pill {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
}

/* ---- css/typography.css ---- */
/* ==========================================================================
   EDITORIAL TYPOGRAPHY
   Persian headlines get the 900 weight and tighter leading; English display
   uses Fraunces so the two languages carry the same editorial weight without
   pretending one is a translation of the other.
   ========================================================================== */

/* Persian headline scale: heavy, tight, no letter-spacing (it breaks joining) */
[dir="rtl"] .hero__title,
[dir="rtl"] .section-title,
[dir="rtl"] .page-title {
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.42;
}

/* English display: Fraunces on the largest type only, never on body copy
   (a serif at 16px costs more legibility than it adds character) */
[dir="ltr"] .hero__title {
  font-family: var(--font-display-en);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

[dir="ltr"] .section-title {
  font-family: var(--font-display-en);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Numerals: tabular in tables and stats so columns never jitter */
.mono,
.stat-value,
.metric-value,
table {
  font-variant-numeric: tabular-nums;
}

/* Body copy: a touch more line-height in Persian, where diacritics and
   descenders crowd the line above */
[dir="rtl"] .secondary,
[dir="rtl"] p {
  line-height: 1.85;
}

/* ==========================================================================
   FOCUS VISIBILITY
   The project had no focus styles of its own, so keyboard users fell back to
   whatever the browser did or nothing at all. A two-tone ring reads on both
   the dark background and on light cards.
   ========================================================================== */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #7fe0ae;
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only-focusable:focus-visible {
  position: static !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  clip-path: none !important;
}

/* The typed headline must not change height while it types: at narrow widths
   the full sentence takes three lines and the partial one takes one, which
   pushed everything below it by up to 97px. */
[data-ascii-type] {
  min-height: 2.9em;
}

/* ---- css/ascii-motion.css ---- */
/* ==========================================================================
   ASCII MOTION MODULE
   The demo headline types itself out as a typed line, one character at a time.
   Motion is bounded: a constant duration, no layout change, and a full stop
   under prefers-reduced-motion. The complete text is always in the DOM first,
   so the headline is complete for crawlers, and the animation only replays it.
   ========================================================================== */

.ascii-motion {
  position: relative;
  display: block;
}

.ascii-motion__cursor {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  margin-inline-start: 2px;
  vertical-align: -0.08em;
  background: var(--accent, #e2a857);
  animation: ascii-caret 1.05s steps(1) infinite;
}

@keyframes ascii-caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* Terminal-style banner: real monospace, no external font request */
.ascii-banner {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: pre;
  overflow-x: auto;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 12px 14px;
  margin-block: 14px;
}

.ascii-banner b {
  color: #7fe0ae;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .ascii-motion__cursor {
    animation: none;
    opacity: 1;
  }
}
