@font-face {
  font-family: 'Vazir';
  src: url('../fonts/vazir/Vazir-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/vazir/Vazir-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/vazir/Vazir-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/vazir/Vazir-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f172a;
  --card: rgba(30, 41, 59, 0.6);
  --line: rgba(255, 255, 255, 0.1);
  --blue: #60a5fa;
  --purple: #a78bfa;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body, button, input, select, textarea {
  font-family: 'Vazir', Tahoma, sans-serif !important;
}

html, body {
  background-color: var(--bg);
  color: #e2e8f0;
}

body {
  background-image:
    radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
  min-height: 100vh;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.glass {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gradient-text {
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.chip {
  display: inline-flex;
  font-size: 12px;
  color: #94a3b8;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.cta-primary:hover { background: #3b82f6; }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s ease;
}

.cta-ghost:hover { background: rgba(255,255,255,0.08); }

.arch-diagram,
.arch-diagram * {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif !important;
}

.arch-diagram {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 1.25rem;
}

.arch-node {
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.92));
  border-radius: 12px;
  padding: 0.72rem 1.15rem;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 132px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}

.arch-node small {
  display: block;
  margin-top: 0.2rem;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  letter-spacing: 0;
}

.arch-node-lg { min-width: 168px; }
.arch-node-wide { min-width: 210px; }

.arch-v {
  width: 2px;
  height: 18px;
  background: linear-gradient(#60a5fa, #818cf8);
  opacity: 0.8;
}

.arch-fork {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-fork-bar {
  width: 148px;
  height: 16px;
  border: 2px solid rgba(129, 140, 248, 0.55);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.arch-fork-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
}

.arch-node-gpu {
  min-width: 84px;
  padding: 0.6rem 0.8rem;
  font-size: 12px;
  border-color: rgba(167, 139, 250, 0.4);
}

.arch-platform {
  width: min(100%, 420px);
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.arch-platform-head {
  padding: 0.7rem 1rem;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(59, 130, 246, 0.12);
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
}

.arch-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.06);
}

.arch-platform-grid span {
  padding: 0.7rem 0.6rem;
  background: rgba(15, 23, 42, 0.95);
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 12px #60a5fa;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.prose-fa h2, .prose-fa h3 { color: #fff; margin-top: 2rem; margin-bottom: 0.8rem; font-weight: 700; }
.prose-fa p, .prose-fa li { color: #cbd5e1; line-height: 1.95; }
.prose-fa ul { padding-inline-start: 1.2rem; margin: 0.8rem 0; }
.prose-fa a { color: #60a5fa; }

#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

.faq-item + .faq-item { border-top: 1px solid var(--line); }

input, select, textarea {
  font-family: inherit;
  font-size: 16px !important; /* iOS: avoid auto-zoom on focus */
  max-width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

a, button {
  -webkit-tap-highlight-color: rgba(96, 165, 250, 0.25);
  touch-action: manipulation;
}

nav.fixed {
  padding-top: env(safe-area-inset-top);
}

#menu-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#mobile-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.skip-link {
  position: absolute;
  right: 1rem;
  top: -4rem;
  z-index: 100;
  background: #2563eb;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
}
.skip-link:focus {
  top: calc(env(safe-area-inset-top) + 5.5rem);
}

.cta-primary, .cta-ghost {
  min-height: 48px;
}

@media (hover: none) {
  .glass-card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .hero-glow {
    width: 280px;
    height: 280px;
  }
  .cta-primary, .cta-ghost {
    width: 100%;
  }
  .arch-node,
  .arch-node-lg,
  .arch-node-wide {
    min-width: 0;
    width: min(100%, 260px);
    font-size: 12px;
    padding: 0.65rem 0.9rem;
  }
  .arch-fork {
    width: min(100%, 200px);
  }
  .arch-platform {
    width: 100%;
  }
  h1 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  h1 { font-size: 1.7rem !important; line-height: 1.4 !important; }
}

.calc-result dt { color: #94a3b8; font-size: 13px; }
.calc-result dd { color: #fff; font-weight: 700; font-size: 18px; margin: 0 0 0.8rem; }

.score-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.score-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
}
