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

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

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

:root {
  --bg: #080c12;
  --bg-elevated: #0f1520;
  --bg-card: #141c28;
  --bg-card-hover: #1a2433;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --green: #10b981;
  --green-bright: #34d399;
  --green-dim: rgba(16, 185, 129, 0.14);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --blue-deep: #1e40af;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 60px rgba(34, 211, 238, 0.08);
  --container: 1120px;
  --header-h: 72px;
  --font: Vazirmatn, Tahoma, sans-serif;
  --transition: 0.22s ease;

  /* Semantic surfaces (themable) */
  --surface: rgba(255, 255, 255, 0.02);
  --surface-soft: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-3: rgba(255, 255, 255, 0.05);
  --surface-4: rgba(255, 255, 255, 0.06);
  --surface-5: rgba(255, 255, 255, 0.07);
  --header-bg: rgba(8, 12, 18, 0.82);
  --nav-bg: rgba(8, 12, 18, 0.96);
  --footer-bg: rgba(0, 0, 0, 0.18);
  --backdrop-top: #0a1018;
  --grid-line: rgba(148, 163, 184, 0.03);
  --card-gradient: linear-gradient(180deg, rgba(20, 28, 40, 0.72), rgba(12, 17, 24, 0.92));
  --panel-gradient: linear-gradient(180deg, rgba(20, 28, 40, 0.95), rgba(10, 14, 20, 0.98));
  --bg-glow-1: rgba(30, 64, 175, 0.22);
  --bg-glow-2: rgba(16, 185, 129, 0.08);
}

/* ===== Light theme ===== */
[data-theme="light"] {
  --bg: #eef2f8;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --green: #059669;
  --green-bright: #047857;
  --green-dim: rgba(5, 150, 105, 0.12);
  --cyan: #0891b2;
  --shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 60px rgba(8, 145, 178, 0.10);

  --surface: rgba(15, 23, 42, 0.015);
  --surface-soft: #ffffff;
  --surface-2: rgba(15, 23, 42, 0.04);
  --surface-3: rgba(15, 23, 42, 0.05);
  --surface-4: rgba(15, 23, 42, 0.06);
  --surface-5: rgba(15, 23, 42, 0.08);
  --header-bg: rgba(255, 255, 255, 0.82);
  --nav-bg: rgba(255, 255, 255, 0.97);
  --footer-bg: rgba(15, 23, 42, 0.03);
  --backdrop-top: #e7edf6;
  --grid-line: rgba(15, 23, 42, 0.035);
  --card-gradient: linear-gradient(180deg, #ffffff, #f6f9fc);
  --panel-gradient: linear-gradient(180deg, #ffffff, #f4f8fc);
  --bg-glow-1: rgba(59, 130, 246, 0.12);
  --bg-glow-2: rgba(5, 150, 105, 0.08);
}

/* Light-theme readability fixes for callout boxes (alert / info / lead) */
[data-theme="light"] .alert-box {
  border-color: rgba(220, 38, 38, 0.30);
  background: rgba(220, 38, 38, 0.06);
}

[data-theme="light"] .alert-box h3 {
  color: #b91c1c;
}

[data-theme="light"] .alert-box p {
  color: #991b1b;
}

[data-theme="light"] .info-box {
  border-color: rgba(8, 145, 178, 0.30);
  background: rgba(8, 145, 178, 0.07);
}

[data-theme="light"] .info-box h3 {
  color: #0e7490;
}

[data-theme="light"] .info-box p {
  color: var(--text);
}

[data-theme="light"] .article-lead {
  background: rgba(5, 150, 105, 0.08);
  color: #0f172a;
}

[data-theme="light"] .checklist-danger li::before {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, var(--bg-glow-1), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, var(--bg-glow-2), transparent 50%),
    linear-gradient(180deg, var(--backdrop-top) 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  right: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--green);
  color: #052e1f;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section-header {
  max-width: 720px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--green-bright);
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--green-dim);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.section-desc {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.08rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.site-header .brand {
  margin-inline-end: auto;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-tagline {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.3;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green) 0%, #0d8f63 100%);
  color: #ecfdf5;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

html:not([data-theme="light"]) .btn-primary {
  background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
  color: #052e2b;
  box-shadow: 0 10px 26px rgba(52, 211, 153, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

html:not([data-theme="light"]) .btn-primary:hover {
  background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
  box-shadow: 0 14px 32px rgba(52, 211, 153, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(4, 120, 87, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  box-shadow: 0 12px 26px rgba(4, 120, 87, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-5);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(4rem, 9vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 500;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.55);
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: linear-gradient(135deg, #67e8f9 0%, var(--green-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 1.25rem;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.5rem;
}

.stat-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-bright);
}

.stat-label {
  margin-top: 0.25rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hero-visual {
  position: relative;
}

.hero-glow {
  position: absolute;
  inset: 10% -5% -5% -5%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.preview-card {
  position: relative;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
  background: var(--panel-gradient);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.preview-card img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.preview-caption {
  margin-top: 0.85rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-gradient);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.35);
  background: var(--bg-card-hover);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--green-dim);
  color: var(--green-bright);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.content-panel {
  padding: clamp(1.5rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-panel h3 {
  margin-bottom: 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.content-panel p,
.content-panel li {
  color: var(--text-muted);
}

.content-panel ul {
  list-style: none;
  margin-top: 1rem;
}

.content-panel li {
  position: relative;
  padding-right: 1.35rem;
  margin-bottom: 0.65rem;
}

.content-panel li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.step-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-dim);
  color: var(--green-bright);
  font-weight: 700;
}

.step-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
}

.step-item p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.browser-install-guides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.browser-guide {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.10), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.browser-guide--firefox {
  border-color: color-mix(in srgb, #f97316 28%, var(--border));
  background:
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.10), transparent 34%),
    var(--surface);
}

.browser-guide-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.browser-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px;
  background: var(--green-dim);
  color: var(--green-bright);
  font-size: 1.1rem;
  font-weight: 800;
}

.browser-guide--firefox .browser-mark {
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
}

.browser-kicker {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  direction: ltr;
  text-align: right;
}

.browser-guide h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.browser-steps {
  display: grid;
  gap: 0;
  list-style: none;
  counter-reset: browser-step;
}

.browser-steps li {
  position: relative;
  min-height: 58px;
  padding: 0 2.75rem 1.15rem 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.browser-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 31px;
  right: 15px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.browser-steps li::before {
  counter-increment: browser-step;
  content: counter(browser-step);
  position: absolute;
  top: -2px;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--green-dim);
  color: var(--green-bright);
  font-weight: 800;
}

.browser-guide--firefox .browser-steps li::before {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
}

.browser-steps strong {
  color: var(--text);
}

.browser-steps code,
.browser-guide code {
  display: inline-block;
  max-width: 100%;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--green-bright);
  font-family: Consolas, monospace;
  font-size: 0.82em;
  direction: ltr;
  overflow-wrap: anywhere;
}

.browser-warning {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.08);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.browser-warning strong {
  color: #fb923c;
}

.install-support-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.install-support-panel h3 {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.install-support-panel p {
  color: var(--text-muted);
  font-size: 0.87rem;
}

.browser-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.browser-store-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 150px;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--card-gradient);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.browser-store-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  inset: -70px auto auto -60px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.12);
  filter: blur(4px);
}

.browser-store-card--firefox::before {
  background: rgba(255, 113, 57, 0.14);
}

.browser-store-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.store-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgba(0, 0, 0, 0.14);
}

.store-icon img {
  width: 64px;
  height: 64px;
}

.store-copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.store-kicker {
  color: var(--text-dim);
  font-size: 0.78rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.store-copy strong {
  font-size: 1.08rem;
}

.store-copy > span:last-child {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.store-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-dim);
  color: var(--green-bright);
  font-size: 1.15rem;
  transition: transform var(--transition);
}

.browser-store-card:hover .store-arrow {
  transform: translate(-2px, -2px);
}

.store-disclaimer {
  max-width: 78ch;
  margin: 1rem auto 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  text-align: center;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: left;
  color: var(--green-bright);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.14), transparent 42%),
    var(--panel-gradient);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: right;
}

.cta-band h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.45;
}

.cta-band p {
  max-width: 64ch;
  margin: 0.7rem 0 0;
  color: var(--text-muted);
}

.cta-band .btn {
  min-width: 190px;
  min-height: 52px;
  margin-top: 0;
}

.cta-band > h2,
.cta-band > p {
  grid-column: 1;
}

.cta-band > h2 {
  align-self: end;
}

.cta-band > p {
  align-self: start;
}

.cta-band > .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.cta-band > .cta-copy {
  min-width: 0;
}

[data-theme="light"] .cta-band {
  border-color: rgba(5, 150, 105, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.10), transparent 42%),
    #ffffff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.site-footer {
  margin-top: 2rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  margin-top: 0.85rem;
  max-width: 36ch;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer-col h4 {
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
}

.footer-col li + li {
  margin-top: 0.55rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.84rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb span[aria-current] {
  color: var(--text-muted);
}

.page-hero {
  padding-block: clamp(2.5rem, 6vw, 4rem) 1rem;
}

.page-hero .hero-title {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-card {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.detail-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.article-content {
  min-width: 0;
  max-width: 780px;
}

.article-content > * + * {
  margin-top: 1.15rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  font-size: 1.12rem;
  font-weight: 700;
}

.article-content p,
.article-content li {
  color: var(--text-muted);
  font-size: 1rem;
}

.article-content ul,
.article-content ol {
  padding-right: 1.35rem;
}

.article-content li + li {
  margin-top: 0.45rem;
}

.article-content strong {
  color: var(--text);
  font-weight: 700;
}

.article-content code {
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: var(--surface-4);
  color: var(--green-bright);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88em;
  direction: ltr;
  unicode-bidi: embed;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-lead {
  padding: 1.25rem 1.35rem;
  border-right: 3px solid var(--green);
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.85;
}

.alert-box {
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.08);
}

.alert-box h3 {
  margin: 0 0 0.5rem;
  color: #fca5a5;
  font-size: 1rem;
}

.alert-box p {
  margin: 0;
  color: #fecaca;
  font-size: 0.94rem;
}

.info-box {
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.06);
}

.info-box h3 {
  margin: 0 0 0.5rem;
  color: var(--cyan);
  font-size: 1rem;
}

.info-box p {
  margin: 0;
  font-size: 0.94rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.checklist li {
  position: relative;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  margin-top: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  right: 0.85rem;
  top: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-dim);
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.checklist-danger li::before {
  content: "!";
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.data-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.data-table td {
  color: var(--text-muted);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table code {
  white-space: nowrap;
}

.toc-box {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc-box h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.toc-box ol {
  margin: 0;
  padding-right: 1.25rem;
  color: var(--text-muted);
}

.toc-box a {
  color: var(--green-bright);
  transition: color var(--transition);
}

.toc-box a:hover {
  color: var(--text);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  align-items: start;
}

.article-layout > * {
  min-width: 0;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

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

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .split-section,
  .footer-grid,
  .features-grid,
  .detail-grid,
  .browser-install-guides,
  .browser-store-grid {
    grid-template-columns: 1fr;
  }

  .install-support-panel {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a,
  .site-nav .btn {
    width: 100%;
    justify-content: center;
  }

  .header-inner:has(.site-nav.is-open) .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .header-inner:has(.site-nav.is-open) .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .header-inner:has(.site-nav.is-open) .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: 3rem;
  }

  .site-header,
  .header-inner {
    height: 64px;
  }

  :root {
    --header-h: 64px;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-controls {
    gap: 0.4rem;
  }

  .site-header .brand {
    gap: 0.5rem;
  }

  .site-header .brand img {
    width: 36px;
    height: 36px;
  }

  .site-header .brand-name {
    font-size: 0.95rem;
  }

  .site-header .brand-tagline {
    display: none;
  }

  .theme-toggle,
  .language-toggle,
  .nav-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cta-band {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2rem 1.25rem;
    text-align: center;
  }

  .cta-band p {
    margin-inline: auto;
  }

  .cta-band .btn {
    width: 100%;
    max-width: 320px;
    justify-self: center;
  }

  .cta-band > h2,
  .cta-band > p,
  .cta-band > .btn,
  .cta-band > .cta-copy {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0.7rem;
    width: 100%;
    font-size: clamp(0.7rem, 3vw, 0.8rem);
    text-align: center;
  }

  .footer-bottom > span {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }

  .footer-credit {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .footer-grid {
    gap: 1.5rem;
    text-align: center;
  }

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

  .footer-brand p {
    max-width: none;
    margin-inline: auto;
  }

  .footer-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem 1rem;
  }

  .footer-col li + li {
    margin-top: 0;
  }

  .browser-store-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
    padding: 1.1rem;
  }

  .store-icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }

  .store-icon img {
    width: 52px;
    height: 52px;
  }

  .store-arrow {
    display: none;
  }

  .page-hero {
    padding-block: 2.25rem 0.5rem;
  }

  .page-hero .hero-title {
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    line-height: 1.45;
  }

  .page-hero .hero-lead {
    font-size: 0.96rem;
  }

  .article-content h2 {
    margin-top: 2rem;
    font-size: 1.35rem;
  }

  .article-content h3 {
    font-size: 1.05rem;
  }

  .article-content p,
  .article-content li {
    font-size: 0.95rem;
  }

  .article-content ul,
  .article-content ol {
    padding-right: 1.1rem;
  }

  .article-lead,
  .alert-box,
  .info-box,
  .toc-box {
    padding: 1rem;
  }

  .checklist li {
    padding-left: 0.65rem;
  }

  .data-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .data-table {
    display: block;
    min-width: 0;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }

  .data-table td {
    display: grid;
    grid-template-columns: minmax(88px, 0.75fr) minmax(0, 1.25fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .data-table td::before {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 700;
  }

  .data-table td:nth-child(1)::before {
    content: "پیشوند دامنه";
  }

  .data-table td:nth-child(2)::before {
    content: "شرکت PSP";
  }

  .data-table td:nth-child(3)::before {
    content: "نمونه آدرس";
  }

  .data-table code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ===== Theme toggle ===== */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--green);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.theme-toggle .icon-sun {
  display: none;
}

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

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

/* Toggle inside the mobile drawer keeps full width with a label */
.theme-toggle .toggle-label {
  display: none;
}

.language-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  flex-shrink: 0;
  padding-inline: 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.language-toggle:hover {
  border-color: var(--green);
  color: var(--green-bright);
  transform: translateY(-1px);
}

html[dir="ltr"] body {
  text-align: left;
}

html[lang="en"] {
  --font: "Segoe UI", Inter, Arial, sans-serif;
}

html[dir="ltr"] .section-header,
html[dir="ltr"] .cta-band,
html[dir="ltr"] .browser-kicker {
  text-align: left;
}

html[dir="ltr"] .content-panel li {
  padding-right: 0;
  padding-left: 1.35rem;
}

html[dir="ltr"] .content-panel li::before {
  right: auto;
  left: 0;
}

html[dir="ltr"] .browser-steps li {
  padding-right: 0;
  padding-left: 2.75rem;
}

html[dir="ltr"] .browser-steps li::before {
  right: auto;
  left: 0;
}

html[dir="ltr"] .browser-steps li:not(:last-child)::after {
  right: auto;
  left: 15px;
}

html[dir="ltr"] .faq-item summary::after {
  float: right;
}

html[dir="ltr"] .info-box {
  border-right: 1px solid var(--border);
  border-left: 3px solid var(--green);
}

html[dir="ltr"] .timeline {
  direction: ltr;
  padding-right: 0;
  padding-left: 2rem;
}

html[dir="ltr"] .timeline::before {
  right: auto;
  left: 7px;
}

html[dir="ltr"] .release::before {
  right: auto;
  left: -2rem;
}

html[dir="ltr"] .release-card li {
  padding-right: 0;
  padding-left: 1.6rem;
}

html[dir="ltr"] .release-card li::before {
  right: auto;
  left: 0;
}

html[dir="ltr"] code {
  direction: ltr;
}

/* ===== Footer credit (made with love) ===== */
.footer-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text-muted);
  font-size: inherit;
  text-align: center;
  white-space: nowrap;
}

.footer-credit .credit-name {
  font-weight: 700;
  color: var(--green-bright);
}

.footer-credit .heart {
  display: inline-block;
  color: #ef4444;
  font-style: normal;
  transform-origin: center;
  animation: heartbeat 1.3s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  10%,
  30% {
    transform: scale(1.25);
  }
  20% {
    transform: scale(1.1);
  }
  40% {
    transform: scale(1);
  }
}

/* ===== 404 page ===== */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding-block: clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.error-inner {
  max-width: 600px;
}

.error-art {
  position: relative;
  width: clamp(220px, 60vw, 340px);
  margin: 0 auto 1.5rem;
}

.error-art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.error-shield {
  transform-origin: 50% 55%;
  animation: floaty 4s ease-in-out infinite;
}

.error-scan {
  animation: scanline 2.6s ease-in-out infinite;
}

.error-spark {
  transform-origin: center;
  animation: twinkle 2.2s ease-in-out infinite;
}

.error-spark.s2 {
  animation-delay: 0.6s;
}

.error-spark.s3 {
  animation-delay: 1.2s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes scanline {
  0%,
  100% {
    transform: translateY(-18px);
    opacity: 0;
  }
  50% {
    transform: translateY(18px);
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.error-code {
  font-size: clamp(4.5rem, 18vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #67e8f9 0%, var(--green-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-title {
  margin-top: 0.5rem;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
}

.error-text {
  margin: 1rem auto 0;
  max-width: 44ch;
  color: var(--text-muted);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2rem;
}

.error-links {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.error-links h2 {
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
}

.error-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  list-style: none;
}

.error-links a {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.error-links a:hover {
  color: var(--text);
  border-color: var(--green);
  background: var(--green-dim);
}

/* ===== Changelog timeline ===== */
.timeline {
  position: relative;
  max-width: 820px;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-right: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  right: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--green), transparent);
}

.release {
  position: relative;
  padding: 0 0 2rem;
}

.release:last-child {
  padding-bottom: 0;
}

.release::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: -2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.release-version {
  font-size: 1.2rem;
  font-weight: 700;
}

.release-date {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.release-tag {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.release-tag.tag-new {
  background: var(--green-dim);
  color: var(--green-bright);
}

.release-tag.tag-current {
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
}

.release-tag.tag-fix {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
}

.release-card {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-gradient);
}

.release-card ul {
  list-style: none;
}

.release-card li {
  position: relative;
  padding-right: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.release-card li:last-child {
  margin-bottom: 0;
}

.release-card li::before {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.95rem;
}

.release-card li.added::before {
  content: "✚";
  color: var(--green-bright);
}

.release-card li.improved::before {
  content: "↑";
  color: var(--cyan);
}

.release-card li.fixed::before {
  content: "✓";
  color: #f59e0b;
}

/* ===== Product screenshot gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.gallery figure:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.35);
}

.gallery .shot {
  display: grid;
  place-items: center;
  height: 300px;
  padding: 1.1rem;
  background: radial-gradient(circle at 50% 0%, var(--surface-3), transparent 70%);
}

.gallery .shot img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.gallery figcaption {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* ===== Hero animations (homepage) ===== */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes cardShine {
  0% {
    transform: translateX(-130%) rotate(8deg);
  }
  60%,
  100% {
    transform: translateX(130%) rotate(8deg);
  }
}

@keyframes titleSheen {
  to {
    background-position: 200% center;
  }
}

@keyframes auroraSpin {
  to {
    transform: rotate(360deg);
  }
}

.hero-content > * {
  opacity: 0;
  animation: heroFadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-content > *:nth-child(5) { animation-delay: 0.45s; }

.hero-title span {
  background-size: 200% auto;
  animation: titleSheen 6s linear infinite;
}

.hero-visual {
  animation: heroFadeIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both;
}

/* rotating aurora ring behind the preview */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(34, 211, 238, 0) 0deg,
    rgba(34, 211, 238, 0.18) 90deg,
    rgba(16, 185, 129, 0.16) 200deg,
    rgba(34, 211, 238, 0) 360deg
  );
  filter: blur(34px);
  animation: auroraSpin 18s linear infinite;
  pointer-events: none;
}

.hero-glow {
  animation: glowPulse 7s ease-in-out infinite;
}

.preview-card {
  animation: floatCard 6s ease-in-out infinite;
  overflow: hidden;
}

/* glossy light sweep across the preview card */
.preview-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 55%;
  height: 180%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.10) 50%,
    transparent 100%
  );
  transform: translateX(-130%) rotate(8deg);
  animation: cardShine 6.5s ease-in-out 1.2s infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .error-shield,
  .error-scan,
  .error-spark,
  .footer-credit .heart,
  .hero-title span,
  .hero-visual,
  .hero-visual::before,
  .hero-glow,
  .preview-card,
  .preview-card::after {
    animation: none !important;
  }

  .hero-content > * {
    opacity: 1;
    animation: none !important;
  }
}

/* ===== Homepage hero — protected checkout concept ===== */
.hero {
  position: relative;
  display: grid;
  min-height: auto;
  align-items: center;
  overflow: clip;
  padding-block: clamp(4rem, 6vw, 5.75rem);
  isolation: isolate;
  background:
    radial-gradient(circle at 17% 46%, rgba(16, 185, 129, 0.11), transparent 34%),
    linear-gradient(110deg, rgba(8, 12, 18, 0) 35%, rgba(8, 12, 18, 0.66) 72%),
    #080c12;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 183, 0.28), transparent);
}

.hero > .container {
  width: min(1320px, calc(100% - 2rem));
}

.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(550px, 1.08fr);
  gap: clamp(2rem, 3.5vw, 4.5rem);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 670px;
}

.hero-badge {
  margin-bottom: 1.35rem;
  border-color: rgba(110, 231, 183, 0.24);
  background: rgba(16, 185, 129, 0.07);
  color: #9ee9cf;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-title {
  max-width: 16ch;
  font-size: clamp(2.35rem, 3.2vw, 3.35rem);
  line-height: 1.34;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-title span {
  background-image: linear-gradient(120deg, #a7f3d0 0%, #6ee7b7 48%, #67e8f9 100%);
  background-size: 100% auto;
  animation: none;
}

.hero-lead {
  max-width: 60ch;
  margin-top: 1.5rem;
  color: #a7b2c4;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 2;
}

.hero-actions {
  margin-top: 1.85rem;
}

.hero-actions .btn {
  min-height: 52px;
  padding-inline: 1.6rem;
}

.hero-actions .btn-primary {
  box-shadow: 0 14px 34px rgba(52, 211, 153, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-actions .btn-primary:hover {
  box-shadow: 0 18px 42px rgba(52, 211, 153, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-actions .btn-secondary {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.025);
  color: #f1f5f9;
}

.hero-actions .btn-secondary:hover {
  border-color: rgba(110, 231, 183, 0.36);
  background: rgba(110, 231, 183, 0.07);
}

.hero-stats {
  gap: 0;
  margin-top: 2.25rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 21, 32, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
}

.hero .stat-card {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hero .stat-card + .stat-card {
  border-inline-start: 1px solid rgba(148, 163, 184, 0.13);
}

.hero .stat-value {
  color: #78dfb5;
  font-size: 1rem;
}

.hero .stat-label {
  color: #7f8da3;
  font-size: 0.76rem;
  line-height: 1.65;
}

.hero-visual {
  --parallax-x: 0deg;
  --parallax-y: 0deg;
  z-index: 2;
  width: min(53vw, 760px);
  margin-inline: -4vw -1.5vw;
  perspective: 1200px;
}

.hero-visual::before {
  inset: 4% 8% 2%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.13), rgba(34, 211, 238, 0.035) 42%, transparent 70%);
  filter: blur(42px);
  animation: heroAura 12s ease-in-out infinite;
}

.hero-glow {
  inset: 16% 8% 8%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.11), transparent 67%);
  filter: blur(46px);
  animation: none;
}

.security-stage {
  position: relative;
  margin: 0;
  transform: perspective(1200px) rotateX(var(--parallax-y)) rotateY(var(--parallax-x));
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.75, 0.2, 1);
  will-change: transform;
}

.security-stage picture {
  display: block;
  animation: securityFloat 9s ease-in-out infinite;
}

.security-stage .hero-art-light {
  display: none;
}

.security-stage img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 32px 42px rgba(0, 0, 0, 0.42));
  -webkit-mask-image: radial-gradient(ellipse 73% 76% at 50% 49%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 73% 76% at 50% 49%, #000 58%, transparent 100%);
}

.security-scan {
  position: absolute;
  top: 16%;
  right: 18%;
  left: 18%;
  z-index: 4;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(167, 243, 208, 0.72) 38%, #6ee7b7 50%, rgba(103, 232, 249, 0.68) 62%, transparent);
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.48), 0 0 22px rgba(52, 211, 153, 0.26);
  opacity: 0;
  animation: securityScan 7.2s cubic-bezier(0.4, 0, 0.2, 1) 1.2s infinite;
}

.security-scan::after {
  content: "";
  position: absolute;
  inset: -22px 20% -22px;
  background: linear-gradient(180deg, transparent, rgba(110, 231, 183, 0.13), transparent);
  filter: blur(8px);
}

[data-theme="light"] .hero {
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --surface-2: rgba(15, 23, 42, 0.04);
  --surface-5: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  background:
    radial-gradient(circle at 18% 46%, rgba(16, 185, 129, 0.12), transparent 31%),
    linear-gradient(110deg, rgba(248, 250, 252, 0) 35%, rgba(248, 250, 252, 0.78) 72%),
    #f8fafc;
}

[data-theme="light"] .hero::after {
  background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.25), transparent);
}

[data-theme="light"] .hero-badge {
  border-color: rgba(5, 150, 105, 0.22);
  background: rgba(5, 150, 105, 0.07);
  color: #047857;
  box-shadow: none;
}

[data-theme="light"] .hero-title span {
  background-image: linear-gradient(120deg, #047857 0%, #059669 55%, #0891b2 100%);
}

[data-theme="light"] .hero-lead {
  color: #475569;
}

[data-theme="light"] .hero-actions .btn-secondary {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
}

[data-theme="light"] .hero-actions .btn-secondary:hover {
  border-color: rgba(5, 150, 105, 0.32);
  background: rgba(5, 150, 105, 0.07);
}

[data-theme="light"] .hero-stats {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

[data-theme="light"] .hero .stat-card + .stat-card {
  border-color: rgba(15, 23, 42, 0.10);
}

[data-theme="light"] .hero .stat-value {
  color: #047857;
}

[data-theme="light"] .hero .stat-label {
  color: #64748b;
}

[data-theme="light"] .hero-visual::before {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12), rgba(8, 145, 178, 0.035) 42%, transparent 70%);
}

[data-theme="light"] .hero-glow {
  background: radial-gradient(circle, rgba(5, 150, 105, 0.10), transparent 67%);
}

[data-theme="light"] .security-stage img {
  filter: drop-shadow(0 24px 38px rgba(15, 23, 42, 0.16));
  -webkit-mask-image: none;
  mask-image: none;
}

[data-theme="light"] .security-stage {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="light"] .security-stage .hero-art-dark {
  display: none;
}

[data-theme="light"] .security-stage .hero-art-light {
  display: block;
}

@keyframes securityFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -7px, 0);
  }
}

@keyframes securityScan {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  15%,
  70% {
    opacity: 0.72;
  }
  82%,
  100% {
    opacity: 0;
    transform: translateY(clamp(230px, 27vw, 430px));
  }
}

@keyframes heroAura {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.025);
  }
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(460px, 0.98fr);
  }

  .hero-title {
    max-width: 16ch;
    font-size: clamp(2.2rem, 3.5vw, 3rem);
  }

  .hero-visual {
    width: min(55vw, 700px);
    margin-inline: -5vw -3vw;
  }
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding-block: 3.5rem 4.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    max-width: 720px;
  }

  .hero-title {
    max-width: 16ch;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-visual {
    width: min(94vw, 740px);
    margin: -0.5rem auto -2.25rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-block: 2.5rem 3.5rem;
  }

  .hero-title {
    max-width: 13ch;
    font-size: clamp(2.05rem, 9.4vw, 2.65rem);
    line-height: 1.34;
  }

  .hero-lead {
    line-height: 1.9;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero .stat-card + .stat-card {
    border-inline-start: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
  }

  .hero-visual {
    width: 100%;
    margin-inline: 0;
    margin-top: -0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .security-stage,
  .security-stage picture,
  .security-scan {
    animation: none !important;
    transform: none !important;
  }

  .security-scan {
    opacity: 0;
  }
}
