/* FormFit — landing page styles
   Tokens follow FormFit_DESIGN_SYSTEM.md (light + dark). */

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

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F0F2F4;
  --text: #111417;
  --text-2: #687078;
  --text-3: #3B4249;
  --border: #E5E8EB;
  --link: #006BC7;
  --brand: #008CFF;
  --brand-hover: #339FFF;
  --on-brand: #131314;
  --tint: #E6F3FF;
  --tint-cell: #F5FAFF;
  --ok-bg: #EAF9F0;
  --ok-text: #146B3A;
  --ok-sub: #3E5A4A;
  --success: #25C46B;
  --header-bg: rgba(247, 248, 250, 0.92);
  --cta-bg: #131314;
  --cta-border: #131314;
  --cta-text: #F5F7F8;
  --cta-sub: #9DA6AD;
  --phone: #1D1F22;
  --shadow: 0 24px 64px rgba(17, 20, 23, 0.14);
  --media-bg: #EFEFED;
  --radius-card: 20px;
  --max: 1200px;
  --gutter: 20px;
  --section-y: clamp(56px, 8vw, 88px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #131314;
  --surface: #171B1F;
  --surface-2: #20252A;
  --text: #F5F7F8;
  --text-2: #9DA6AD;
  --text-3: #C4CBD1;
  --border: #2A3035;
  --link: #69BAFF;
  --tint: #10283D;
  --tint-cell: #121D27;
  --ok-bg: #122A1D;
  --ok-text: #6FE0A0;
  --ok-sub: #A9C9B5;
  --header-bg: rgba(19, 19, 20, 0.92);
  --cta-bg: #171B1F;
  --cta-border: #2A3035;
  --phone: #2A2D31;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
a { color: var(--link); }
a:hover { color: var(--brand); }
button { font: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -48px; z-index: 50;
  padding: 10px 16px; background: var(--brand); color: var(--on-brand);
  border-radius: 12px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 16px; border: 0;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 15px; border-radius: 14px; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { color: var(--text); background: var(--border); }
.btn-ghost { background: transparent; color: var(--text); padding-inline: 14px; }
.btn-ghost:hover { color: var(--brand); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { color: var(--bg); opacity: .9; }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { color: var(--text); border-color: var(--text-2); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 34px; height: 34px; }
.wordmark { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.6px; direction: ltr; }
.main-nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.main-nav a { color: var(--text); text-decoration: none; }
.main-nav a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.theme-toggle {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--text-2); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 860px) { .main-nav { display: none; } }
@media (max-width: 420px) {
  .header-actions .btn-ghost { display: none; }
  .wordmark { font-size: 20px; }
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-block: clamp(40px, 6vw, 72px) 56px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.pill .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.3; font-weight: 800; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.9; color: var(--text-2); max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; font-weight: 500; }

/* iPhone mockup */
.hero-visual { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.iphone { position: relative; width: 310px; max-width: 100%; }
.iphone-btn { position: absolute; width: 3px; background: var(--phone); }
.iphone-btn.l1 { left: -3px; top: 120px; height: 32px; border-radius: 2px 0 0 2px; }
.iphone-btn.l2 { left: -3px; top: 168px; height: 56px; border-radius: 2px 0 0 2px; }
.iphone-btn.l3 { left: -3px; top: 236px; height: 56px; border-radius: 2px 0 0 2px; }
.iphone-btn.r1 { right: -3px; top: 190px; height: 88px; border-radius: 0 2px 2px 0; }
.iphone-body { background: var(--phone); border-radius: 54px; padding: 11px; box-shadow: var(--shadow); outline: 1px solid rgba(255,255,255,.06); }
.iphone-screen { background: #FFFFFF; border-radius: 44px; overflow: hidden; }
.iphone-top { height: 46px; display: flex; align-items: center; justify-content: center; }
.iphone-island { width: 96px; height: 28px; border-radius: 999px; background: #000; }
.iphone-screen img { width: 100%; height: auto; aspect-ratio: 720 / 1335; object-fit: cover; }
.iphone-bottom { height: 22px; display: flex; align-items: center; justify-content: center; }
.iphone-bottom span { width: 110px; height: 4px; border-radius: 999px; background: #111417; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.band { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--link); }
.section h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.4; font-weight: 700; }
.section-lead { font-size: 17px; line-height: 1.9; color: var(--text-2); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.step { background: var(--bg); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.step-num { font-size: 32px; font-weight: 700; color: var(--brand); direction: ltr; text-align: right; line-height: 1.2; }
.step h3, .feature h3 { font-size: 19px; font-weight: 600; }
.step p, .feature p { font-size: 15px; line-height: 1.8; color: var(--text-2); }

.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature svg { width: 28px; height: 28px; color: var(--brand); }

/* Exercises */
.ex-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ex-player { flex: 3 1 520px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; }
.ex-player video { width: 100%; height: auto; aspect-ratio: 650 / 360; border-radius: 14px; background: var(--media-bg); object-fit: contain; }
.ex-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 8px 4px; }
.ex-name { font-size: 19px; font-weight: 600; }
.ex-tag { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.ex-list { flex: 2 1 320px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ex-item {
  display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px;
  background: var(--surface); border: 2px solid var(--border); color: var(--text);
  text-align: right; cursor: pointer; transition: border-color .15s ease;
}
.ex-item:hover { border-color: var(--text-2); }
.ex-item[aria-pressed="true"] { border-color: var(--brand); }
.ex-item img { width: 100%; height: auto; aspect-ratio: 650 / 360; border-radius: 10px; background: var(--media-bg); object-fit: contain; }
.ex-item span { font-size: 14px; font-weight: 600; line-height: 1.6; }

/* Personalization */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 440px; min-width: 0; }
.split-copy { display: flex; flex-direction: column; gap: 16px; }
.stages { display: flex; flex-direction: column; gap: 12px; }
.stage { background: var(--bg); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 16px; border: 2px solid transparent; }
.stage.is-final { border-color: var(--brand); }
.stage-dots { direction: ltr; width: 72px; flex: none; font-size: 20px; letter-spacing: 4px; color: var(--brand); }
.stage-name { display: block; direction: ltr; text-align: right; font-size: 17px; font-weight: 600; }
.stage-desc { font-size: 15px; color: var(--text-2); }

/* Plans */
.trial-note {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px;
  padding: 10px 18px; border-radius: 999px; background: var(--ok-bg); font-size: 15px;
}
.trial-note b { font-weight: 600; color: var(--ok-text); }
.trial-note span { color: var(--ok-sub); }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.plan { background: var(--bg); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 16px; border: 2px solid transparent; }
.plan.is-featured { background: var(--surface); border-color: var(--brand); }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.plan-label { display: block; font-size: 15px; color: var(--text-2); }
.plan-name { display: block; direction: ltr; text-align: right; font-size: 24px; font-weight: 700; line-height: 1.4; }
.badge { padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--link); font-size: 13px; font-weight: 600; white-space: nowrap; }
.price { font-size: 28px; font-weight: 700; line-height: 1.4; }
.price small { font-size: 16px; font-weight: 500; }
.price-note { display: block; font-size: 14px; color: var(--text-2); }
.plan-summary { font-size: 15px; line-height: 1.8; }
.checklist { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.7; color: var(--text-3); }
.checklist li { display: flex; gap: 8px; }
.checklist li::before { content: "✓"; color: var(--link); font-weight: 700; flex: none; }
.plan .btn { margin-top: auto; }

.compare-toggle { display: flex; justify-content: center; margin-top: 32px; }
.compare-toggle .btn { border-radius: 999px; }
.compare-toggle svg { width: 18px; height: 18px; transition: transform .2s ease; }
.compare-toggle [aria-expanded="true"] svg { transform: rotate(180deg); }
.compare { margin-top: 24px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); -webkit-overflow-scrolling: touch; }
.compare[hidden] { display: none; }
.compare table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
.compare thead tr { background: var(--bg); }
.compare th, .compare td { padding: 14px 20px; }
.compare thead th { text-align: center; font-weight: 700; width: 18%; padding-block: 16px; }
.compare thead th:first-child { text-align: right; width: auto; font-weight: 600; color: var(--text-2); }
.compare thead th.col-plus { background: var(--tint); }
.compare tbody tr { border-top: 1px solid var(--border); }
.compare tbody th { text-align: right; font-weight: 500; line-height: 1.7; }
.compare td { text-align: center; }
.compare td:nth-child(3) { background: var(--tint-cell); }
.compare .yes { color: var(--link); font-weight: 700; font-size: 16px; }
.compare .no { color: var(--text-2); }
.compare .val { font-weight: 600; white-space: nowrap; }

/* FAQ */
.faq { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 20px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-size: 17px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--text-2); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 18px; font-size: 15px; line-height: 1.9; color: var(--text-2); }

/* Final CTA */
.cta {
  background: var(--cta-bg); border: 1px solid var(--cta-border); color: var(--cta-text);
  border-radius: 24px; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.cta svg { width: 56px; height: 56px; }
.cta p { font-size: 17px; line-height: 1.8; color: var(--cta-sub); max-width: 520px; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px 48px; padding-block: 56px 40px; }
.footer-about { flex: 2 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.footer-about p { font-size: 14px; line-height: 1.9; color: var(--text-2); max-width: 320px; }
.footer-col { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col.contact { flex: 1.5 1 240px; }
.footer-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--brand); }
.contact-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.contact-row svg { width: 18px; height: 18px; flex: none; margin-top: 4px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-slot {
  width: 96px; height: 104px; border-radius: 12px; border: 1.5px dashed var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 11px; line-height: 1.6; color: var(--text-2); padding: 8px;
}
.footer-bottom { border-top: 1px solid var(--border); padding-block: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-2); }

/* ---------- Inner pages (about, contact, legal) ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; gap: 8px; font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.35; font-weight: 800; }
.page-hero p { margin-top: 12px; font-size: 17px; line-height: 1.9; color: var(--text-2); max-width: 680px; }
.updated { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--text-2); }

.page-body { display: flex; flex-wrap: wrap; gap: 40px 56px; padding-block: clamp(32px, 5vw, 56px) var(--section-y); align-items: flex-start; }
.toc { flex: 1 1 220px; min-width: 0; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.toc-title { font-size: 14px; font-weight: 700; padding: 4px 8px 8px; }
.toc a { font-size: 14px; color: var(--text-2); text-decoration: none; padding: 6px 8px; border-radius: 8px; line-height: 1.6; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 860px) { .toc { position: static; } }

.prose { flex: 999 1 560px; min-width: 0; max-width: 760px; font-size: 16px; line-height: 2; }
.prose h2 { font-size: 22px; line-height: 1.5; font-weight: 700; margin: 40px 0 12px; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.prose p { margin: 0 0 14px; color: var(--text-3); }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 22px; color: var(--text-3); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--text); font-weight: 600; }
.callout { margin: 0 0 20px; padding: 16px 20px; border-radius: 16px; background: var(--tint); color: var(--text); font-size: 15px; line-height: 1.9; }
.callout.warn { background: var(--surface-2); border-inline-start: 0; }

.steps-list { list-style: none !important; padding: 0 !important; display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
.steps-list li { counter-increment: s; display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin: 0; }
.steps-list li::before { content: counter(s, persian); flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps-list b { display: block; color: var(--text); font-weight: 600; }

.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.info-card svg { width: 26px; height: 26px; color: var(--brand); }
.info-card h2, .info-card h3 { font-size: 17px; font-weight: 600; margin: 0; }
.info-card p { font-size: 15px; line-height: 1.9; color: var(--text-2); margin: 0; }
.info-card a.big { font-size: 18px; font-weight: 600; text-decoration: none; }
