/* ============================================================
   Chitafy — web design system
   Mirrors the Flutter client palette (lib/core/theme/app_colors.dart):
   primary #A389FF, backgroundDeep #0A0C16, surfaceCard #151624,
   glassBorder #25283A, textSecondary #6B6D7B, online #2ECC71.
   Used by: /index.html (landing), /FAQ (faq.html), /policy (policy.html)
   Vazirmatn is self-hosted below (no third-party font CDN).
   ============================================================ */

/* ---------- Self-hosted font (variable: weights 100–900 in one file) ---------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Variable.woff2?v=2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Background scale */
  --bg: #0a0c16;

  /* Surfaces (match client surfaceCard / surfaceBright) */
  --surface: #151624;
  --surface-2: #1a1c2c;
  --surface-glass: rgba(21, 22, 36, 0.7);
  --surface-glass-strong: rgba(21, 22, 36, 0.86);

  /* Borders (match client glassBorder + divider) */
  --border: #25283a;
  --border-strong: #2f334a;
  --border-bright: rgba(163, 137, 255, 0.24);

  /* Text — tuned for WCAG AA on --bg (tertiary lifted from #6b6d7b → AA) */
  --text: #ffffff;
  --text-2: #aab0c4;
  --text-3: #868aa0;

  /* Accent — exact client primary scale */
  --accent: #a389ff;
  --accent-strong: #8470d6;
  --accent-light: #d7ccff;
  --accent-bright: #c4aaff;
  --accent-soft: rgba(163, 137, 255, 0.1);
  --accent-softer: rgba(163, 137, 255, 0.05);

  /* Radius — match client (8/16/24/32) */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Elevation — wired to every raised surface */
  --shadow-sm:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 6px 16px rgba(0, 0, 0, 0.32);
  --shadow-md:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-accent:
    0 12px 30px rgba(163, 137, 255, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  --shadow-accent-strong:
    0 20px 48px rgba(163, 137, 255, 0.46),
    0 0 40px rgba(163, 137, 255, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);

  /* Type scale (fluid, one ladder shared by all pages) */
  --fs-hero: clamp(40px, 6.2vw, 66px);
  --fs-display: clamp(30px, 4.4vw, 46px);
  --fs-prose-title: clamp(32px, 5.4vw, 52px);
  --fs-h2: clamp(22px, 2.6vw, 28px);
  --fs-h3: 17.5px;
  --fs-lead: clamp(16px, 1.9vw, 18px);
  --fs-body: 16px;
  --fs-sm: 14.5px;
  --fs-xs: 13px;

  /* Spacing rhythm */
  --space-section: clamp(56px, 8vw, 104px);
  --space-stack: clamp(20px, 3vw, 32px);

  /* Layout */
  --header-height: 72px;
  --content-max: 1200px;
  --prose-max: 740px;

  /* Typography families */
  --font-fa:
    'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-display:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-fa);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
}

::selection {
  background: rgba(163, 137, 255, 0.34);
  color: var(--text);
  text-shadow: none;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Skip link — visible only when focused (keyboard a11y) */
.skip-link {
  position: fixed;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Scrollbar ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg);
}

*::-webkit-scrollbar-thumb:hover {
  background: #3a3e5c;
}

/* ---------- Focus ---------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

a:focus-visible,
.btn:focus-visible {
  outline-offset: 4px;
}

/* ---------- Ambient backdrop — drifting aurora ---------- */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      60% 40% at 50% 0%,
      rgba(163, 137, 255, 0.14) 0%,
      rgba(163, 137, 255, 0.04) 35%,
      transparent 70%
    ),
    radial-gradient(80% 60% at 50% 100%, rgba(132, 112, 214, 0.06) 0%, transparent 60%),
    radial-gradient(40% 30% at 12% 28%, rgba(91, 63, 201, 0.07) 0%, transparent 60%),
    radial-gradient(40% 30% at 88% 68%, rgba(196, 170, 255, 0.05) 0%, transparent 60%);
}

.ambient--soft {
  background:
    radial-gradient(
      60% 30% at 50% 0%,
      rgba(163, 137, 255, 0.08) 0%,
      rgba(163, 137, 255, 0.02) 35%,
      transparent 70%
    ),
    radial-gradient(40% 30% at 20% 60%, rgba(132, 112, 214, 0.04) 0%, transparent 60%);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 28px;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .container {
    padding-inline: 20px;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition:
    background 220ms var(--ease-in-out),
    border-color 220ms var(--ease-in-out),
    backdrop-filter 220ms var(--ease-in-out),
    box-shadow 220ms var(--ease-in-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 12, 22, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  transition: transform 220ms var(--ease-out);
}

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

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background-image: url('/icon.png');
  background-size: cover;
  background-position: center;
  box-shadow:
    0 0 0 1px var(--border),
    0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 280ms var(--ease-spring);
}

.brand:hover .brand__mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.025em;
  direction: ltr;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 180ms var(--ease-out);
  position: relative;
}

.site-nav a:not(.btn):hover {
  color: var(--text);
}

.site-nav .btn {
  color: #ffffff;
}

.site-nav a[aria-current='page']:not(.btn) {
  color: var(--text);
}

.site-nav a[aria-current='page']:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -8px;
  inset-inline: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.site-nav__cta {
  margin-inline-start: 8px;
}

/* Mobile menu toggle (hamburger) — hidden on desktop */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  transition:
    background 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__close {
  display: block;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    gap: 12px;
  }

  /* The header download pill folds into the menu panel on phones */
  .site-nav__cta {
    display: none;
  }

  /* Links collapse into a dropdown panel under the header */
  .site-nav__links {
    position: fixed;
    top: calc(var(--header-height) + 4px);
    inset-inline: 16px;
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: var(--surface-glass-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 200ms var(--ease-out),
      transform 200ms var(--ease-out),
      visibility 200ms var(--ease-out);
  }

  .site-nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__links a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 15.5px;
    transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
  }

  .site-nav__links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .site-nav a[aria-current='page']:not(.btn)::after {
    display: none;
  }

  .site-nav__links a[aria-current='page']:not(.btn) {
    background: var(--accent-soft);
    color: var(--accent-light);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  line-height: 1;
  transition:
    transform 220ms var(--ease-out),
    background 220ms var(--ease-out),
    box-shadow 260ms var(--ease-out),
    color 220ms var(--ease-out);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Primary button — purple gradient with WHITE text (matches client ElevatedButton) */
.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #ffffff;
}

/* Subtle top sheen for depth */
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 45%);
  opacity: 0.7;
  pointer-events: none;
}

.btn--primary:hover {
  transform: translateY(-2px) scale(1.03);
  color: #ffffff;
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-1px) scale(1.02);
}

.btn--ghost:active {
  transform: translateY(0);
}

/* Accent glow — wired to the accent elevation tokens */
.btn--glow {
  box-shadow: var(--shadow-accent);
}

.btn--glow:hover {
  box-shadow: var(--shadow-accent-strong);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn--sm {
  padding: 10px 18px;
  font-size: 13.5px;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(32px, 5vw, 72px) clamp(28px, 4vw, 56px);
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 580px;
}

@media (max-width: 900px) {
  .hero__copy {
    align-items: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 8px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0;
}

/* In always-centered blocks the chip centers with the title */
.section__header .eyebrow,
.download__card .eyebrow {
  align-self: center;
}

@media (max-width: 900px) {
  .eyebrow {
    align-self: center;
  }
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: eyebrowPulse 2.8s var(--ease-in-out) infinite;
}

@keyframes eyebrowPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(163, 137, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(163, 137, 255, 0);
  }
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text);
  text-wrap: balance;
}

.hero__title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s var(--ease-in-out) infinite;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero__lead {
  font-size: var(--fs-lead);
  color: var(--text-2);
  line-height: 1.8;
  max-width: 52ch;
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .hero__cta {
    justify-content: center;
  }
}

/* ---------- Phone mockup ---------- */
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  position: relative;
}

.hero__visual::before,
.hero__visual::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: -1;
}

.hero__visual::before {
  width: 320px;
  height: 320px;
  background: rgba(163, 137, 255, 0.18);
  top: -40px;
  inset-inline-end: -10px;
}

.hero__visual::after {
  width: 280px;
  height: 280px;
  background: rgba(132, 112, 214, 0.14);
  bottom: -40px;
  inset-inline-start: 5%;
}

.phone {
  --phone-w: 360px;
  width: var(--phone-w);
  position: relative;
  background: linear-gradient(160deg, #1d2034 0%, #14162a 100%);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 4px #0d0f1d,
    0 30px 80px rgba(0, 0, 0, 0.6);
  animation: phoneFloat 6s var(--ease-in-out) infinite;
  margin-inline: auto;
}

@media (min-width: 1100px) {
  .phone {
    --phone-w: 400px;
  }
}

@media (max-width: 480px) {
  .phone {
    --phone-w: 280px;
  }
}

/* side button */
.phone::after {
  content: '';
  position: absolute;
  inset-inline-start: -2px;
  top: 18%;
  width: 3px;
  height: 40px;
  background: linear-gradient(180deg, #0d0f1d, #1d2034, #0d0f1d);
  border-radius: 2px 0 0 2px;
}

.phone__screen {
  width: 100%;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  line-height: 0;
  padding: 2px;
}

/* subtle glass sheen catching the top corner of the screen */
.phone__screen::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 28px;
  pointer-events: none;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 16%,
    transparent 38%
  );
}

.phone__screenshot {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes phoneFloat {
  0%,
  100% {
    transform: translateY(0) rotateZ(0);
  }
  50% {
    transform: translateY(-12px) rotateZ(-0.5deg);
  }
}

/* ---------- Section base ---------- */
.section {
  padding-block: var(--space-section);
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, transparent 0%, rgba(21, 22, 36, 0.55) 50%, transparent 100%);
  position: relative;
}

.section--alt::before,
.section--alt::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.section--alt::before {
  top: 0;
}

.section--alt::after {
  bottom: 0;
}

.section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin-bottom: var(--space-stack);
}

.section__title {
  font-size: var(--fs-display);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
}

.section__lead {
  color: var(--text-2);
  font-size: var(--fs-lead);
  max-width: 58ch;
  line-height: 1.8;
  text-wrap: pretty;
}

/* ---------- Features grid (uniform 3-col) ---------- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 380ms var(--ease-out),
    border-color 380ms var(--ease-out),
    box-shadow 380ms var(--ease-out),
    background 380ms var(--ease-out);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* faint accent wash that warms on hover */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, var(--accent-softer), transparent 60%);
  opacity: 0;
  transition: opacity 380ms var(--ease-out);
  pointer-events: none;
  z-index: -1;
}

.feature-card:hover {
  transform: translateY(-4px);
  background: var(--surface-glass-strong);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--border-bright);
  transition:
    transform 320ms var(--ease-spring),
    background 320ms var(--ease-out);
}

.feature-card:hover .feature-card__icon {
  transform: scale(1.08);
  background: rgba(163, 137, 255, 0.16);
}

.feature-card__icon svg {
  width: 22px;
  height: 22px;
}

.feature-card__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.feature-card__text {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--text-2);
  text-wrap: pretty;
}

/* ---------- Download section ---------- */
.download {
  padding-block: var(--space-section);
}

.download__card {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(163, 137, 255, 0.24) 0%, transparent 60%),
    radial-gradient(120% 100% at 100% 100%, rgba(132, 112, 214, 0.2) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition:
    transform 320ms var(--ease-out),
    border-color 320ms var(--ease-out);
}

.download__card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
}

.download__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(163, 137, 255, 0.05) 100%);
  pointer-events: none;
}

.download__title {
  font-size: var(--fs-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
  color: var(--text);
}

.download__lead {
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.8;
  max-width: 52ch;
  text-wrap: pretty;
}

.download__actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.download__hint {
  font-size: 13.5px;
  color: var(--text-3);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  position: relative;
  z-index: 1;
  margin-top: var(--space-section);
  background: linear-gradient(180deg, transparent 0%, rgba(10, 12, 22, 0.5) 100%);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

@media (min-width: 820px) {
  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      'brand links trust'
      'copy  links trust';
    align-items: center;
    gap: 12px 40px;
    text-align: start;
  }
  .site-footer__brand {
    grid-area: brand;
    justify-self: start;
  }
  .site-footer__copy {
    grid-area: copy;
    justify-self: start;
  }
  .site-footer__links {
    grid-area: links;
    justify-self: center;
  }
  .trust-card {
    grid-area: trust;
    justify-self: end;
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
  font-size: var(--fs-sm);
}

.site-footer__links a {
  color: var(--text-2);
  transition: color 180ms var(--ease-out);
}

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

.site-footer__copy {
  color: var(--text-3);
  font-size: var(--fs-xs);
}

.trust-card {
  width: 100%;
  max-width: 220px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition:
    transform 260ms var(--ease-out),
    border-color 260ms var(--ease-out);
}

.trust-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.trust-card a,
.trust-card img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Prose (policy + FAQ) ---------- */
.prose {
  max-width: var(--prose-max);
  margin-inline: auto;
  padding-block: clamp(36px, 4.5vw, 64px);
  position: relative;
  z-index: 1;
}

.prose__meta {
  display: inline-block;
  color: var(--text-3);
  font-size: var(--fs-xs);
  margin-bottom: 18px;
  padding: 6px 14px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

.prose__title {
  font-size: var(--fs-prose-title);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  text-wrap: balance;
  color: var(--text);
  line-height: 1.06;
}

.prose__intro {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.95;
  margin-bottom: 24px;
  text-wrap: pretty;
}

.prose__toc {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.prose__toc::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong), transparent);
}

.prose__toc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prose__toc ol {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 28px;
  counter-reset: toc;
}

@media (max-width: 600px) {
  .prose__toc ol {
    grid-template-columns: 1fr;
  }
}

.prose__toc li {
  counter-increment: toc;
}

.prose__toc a {
  color: var(--text-2);
  font-size: var(--fs-sm);
  transition:
    color 180ms var(--ease-out),
    transform 180ms var(--ease-out);
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 6px;
}

.prose__toc a::before {
  content: counter(toc, persian) '.';
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 1.5em;
}

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

[dir='rtl'] .prose__toc a:hover {
  transform: translateX(-2px);
}

.prose__toc a[data-active] {
  color: var(--text);
  font-weight: 600;
}

.prose__toc a[data-active]::before {
  color: var(--accent-light);
}

.prose section {
  margin-bottom: 36px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.prose section:last-child {
  margin-bottom: 0;
}

.prose h2 {
  font-size: var(--fs-h2);
  margin-bottom: 16px;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.prose h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 50%, transparent 100%);
  border-radius: 3px;
}

.prose p {
  color: var(--text-2);
  font-size: var(--fs-body);
  line-height: 1.85;
  margin-bottom: 12px;
  text-wrap: pretty;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose ul {
  list-style: none;
  padding-inline-start: 0;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prose ul li {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.85;
  position: relative;
  padding-inline-start: 26px;
}

.prose ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-softer);
}

.prose a:not(.btn) {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-color: var(--border-bright);
  text-underline-offset: 3px;
  transition: text-decoration-color 180ms var(--ease-out);
}

.prose a:not(.btn):hover {
  text-decoration-color: var(--accent);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 20px;
}

.prose__contact {
  background: var(--surface-glass);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 15px;
  color: var(--text-2);
  margin-top: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.prose__contact p {
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 10px;
  color: var(--text-2);
}

.prose__contact p:last-child {
  margin-bottom: 0;
}

.prose__contact strong {
  color: var(--accent-light);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 800ms var(--ease-out),
    transform 800ms var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) {
  transition-delay: 0ms;
}
.reveal-stagger.is-visible > *:nth-child(2) {
  transition-delay: 90ms;
}
.reveal-stagger.is-visible > *:nth-child(3) {
  transition-delay: 180ms;
}
.reveal-stagger.is-visible > *:nth-child(4) {
  transition-delay: 270ms;
}
.reveal-stagger.is-visible > *:nth-child(5) {
  transition-delay: 360ms;
}
.reveal-stagger.is-visible > *:nth-child(6) {
  transition-delay: 450ms;
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(163, 137, 255, 0.025) 0%, rgba(163, 137, 255, 0.008) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
  will-change: transform;
}

.cursor-glow.is-active {
  opacity: 1;
  transition: opacity 150ms var(--ease-out);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  .hero__title .accent {
    color: var(--accent);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
}

/* ---------- Print — clean black-on-white for the legal pages ---------- */
@media print {
  .ambient,
  .cursor-glow,
  .site-header,
  .site-footer,
  .skip-link,
  .nav-toggle,
  .hero__visual,
  .btn {
    display: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container,
  .prose {
    max-width: none;
  }

  .prose,
  .prose p,
  .prose li,
  .prose strong,
  .prose h1,
  .prose h2,
  .prose__title,
  .prose__intro,
  .prose__meta,
  .prose__contact,
  .prose__contact p,
  .prose__contact strong,
  .prose__toc,
  .prose__toc a,
  .prose__toc-title,
  .hero__title,
  .hero__lead,
  .section__title,
  .section__lead {
    color: #000 !important;
  }

  .prose a:not(.btn) {
    color: #000 !important;
    text-decoration: underline;
  }

  .prose__toc a::before {
    color: #000 !important;
  }

  .prose ul li::before {
    background: #000 !important;
    box-shadow: none !important;
  }

  .prose__toc,
  .prose__contact,
  .feature-card,
  .download__card {
    background: #fff !important;
    border-color: #bbb !important;
    box-shadow: none !important;
  }

  .accent,
  .hero__title .accent {
    background: none !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }

  .prose h2::after {
    display: none;
  }

  .prose section {
    break-inside: avoid;
  }
}
