/* =========================================================
   Nexora landing — RTL · Vazirmatn · Light & Dark themes
   Tokens: 8px spacing · fluid type · standard breakpoints
   ========================================================= */

:root {
  /* Brand palette */
  --brand-blue: #0015AC;
  --brand-blue-2: #0a2ae0;
  --brand-cyan: #14CDF9;

  /* Light theme surfaces & text */
  --bg: #EDF3FB;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --ink: #0d1230;
  --muted: #4b5470;
  --line: #e2e8f5;

  /* Light theme specifics */
  --header-bg: rgba(255, 255, 255, .88);
  --header-line: #e2e8f5;
  --hero-glow-1: rgba(20, 205, 249, .22);
  --hero-glow-2: rgba(0, 21, 172, .12);
  --badge-bg: rgba(20, 205, 249, .14);
  --badge-border: rgba(20, 205, 249, .45);
  --badge-ink: #0015AC;
  --icon-bg: #EDF3FB;
  --chat-a: #f6faff;
  --chat-b: #EDF3FB;
  --bubble-user: #0015AC;
  --grad-start: #0015AC;
  --footer-bg: #040d3f;
  --footer-ink: #b9c4e6;
  --footer-line: rgba(255, 255, 255, .08);

  /* Elevation */
  --shadow-sm: 0 4px 14px rgba(0, 21, 172, .06);
  --shadow: 0 10px 40px rgba(0, 21, 172, .08);
  --shadow-lg: 0 24px 60px rgba(0, 21, 172, .16);
  --header-shadow: 0 6px 24px rgba(13, 20, 60, .08);

  /* Shape & motion */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --ring: 0 0 0 3px rgba(20, 205, 249, .55);
  --ease: .2s ease;

  color-scheme: light;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #070b18;
  --bg-alt: #0b1122;
  --surface: #101830;
  --ink: #e9eefc;
  --muted: #a6b1d0;
  --line: #1f2a4a;

  --header-bg: rgba(7, 11, 24, .82);
  --header-line: #1f2a4a;
  --hero-glow-1: rgba(20, 205, 249, .12);
  --hero-glow-2: rgba(0, 21, 172, .38);
  --badge-bg: rgba(20, 205, 249, .1);
  --badge-border: rgba(20, 205, 249, .4);
  --badge-ink: #7fe1fb;
  --icon-bg: #0d1430;
  --chat-a: #0d1430;
  --chat-b: #0b1122;
  --bubble-user: #1e3fd6;

  --grad-start: #4d7cff;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --header-shadow: 0 6px 24px rgba(0, 0, 0, .45);

  color-scheme: dark;
}

/* =========================================================
   Base
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* فاصله لنگرها از هدر چسبان هنگام پرش به بخش‌ها */
  scroll-padding-top: 84px;
}

body {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  transition: background var(--ease), color var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.5; color: var(--ink); }
h1, h2 { text-wrap: balance; }

::selection { background: var(--brand-cyan); color: #00222b; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.container-narrow { max-width: 820px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 21, 172, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 21, 172, .34); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-cyan); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--brand-blue); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.btn-sm { padding: .5rem 1.1rem; font-size: .875rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.0625rem; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background var(--ease);
}
.site-header.scrolled { box-shadow: var(--header-shadow); border-color: var(--header-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand-name { font-size: 1.375rem; font-weight: 900; color: var(--brand-blue); }
[data-theme="dark"] .brand-name { color: #cfe0ff; }

.header-actions { display: inline-flex; align-items: center; gap: .5rem; }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.theme-toggle:hover { border-color: var(--brand-cyan); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.main-nav { display: flex; align-items: center; gap: 1.375rem; }
.main-nav > a:not(.btn) {
  font-size: .9375rem; font-weight: 500; color: var(--muted);
  position: relative; padding-block: .25rem;
}
.main-nav > a:not(.btn)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px;
  background: var(--brand-cyan); border-radius: 2px;
  transform: scaleX(0); transition: transform var(--ease);
}
.main-nav > a:not(.btn):hover { color: var(--ink); }
.main-nav > a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: .5rem; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -10%, var(--hero-glow-1), transparent 60%),
    radial-gradient(700px 420px at 8% 110%, var(--hero-glow-2), transparent 60%),
    var(--bg);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  transition: background var(--ease);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.badge {
  display: inline-block; padding: .3rem 1rem; margin-bottom: 1.25rem;
  border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: var(--badge-bg); border: 1px solid var(--badge-border); color: var(--badge-ink);
}
.hero h1 { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.875rem); font-weight: 900; margin-bottom: 1rem; }
.grad {
  background: linear-gradient(120deg, var(--grad-start, var(--brand-blue)), var(--brand-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-text { color: var(--muted); font-size: 1.0625rem; max-width: 56ch; margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .875rem; }
.hero-note { font-size: .875rem; color: var(--muted); }

/* Chat mock */
.chat-window {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; max-width: 380px; margin-inline: auto;
  animation: floaty 6s ease-in-out infinite;
}
.chat-head {
  display: flex; align-items: center; gap: .6rem;
  padding: .75rem 1rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
}
.chat-head img { width: 34px; height: 34px; border-radius: 50%; }
.chat-head div { flex: 1; font-size: .875rem; }
.chat-head small { display: block; font-size: .75rem; opacity: .8; }
.dot { width: 9px; height: 34px; border-radius: 999px; background: var(--brand-cyan); box-shadow: 0 0 12px var(--brand-cyan); }
.chat-body {
  padding: 1rem; display: flex; flex-direction: column; gap: .6rem;
  background: linear-gradient(180deg, var(--chat-a), var(--chat-b));
  min-height: 260px;
}
.msg { max-width: 82%; padding: .55rem .9rem; border-radius: 14px; font-size: .875rem; line-height: 1.8; }
.msg.user { background: var(--bubble-user); color: #fff; align-self: flex-start; border-bottom-right-radius: 4px; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-end; border-bottom-left-radius: 4px; }
.msg.typing { background: transparent; color: var(--muted); font-size: .75rem; align-self: flex-end; animation: pulse 1.6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* =========================================================
   Sections
   ========================================================= */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); transition: background var(--ease); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.75rem; }
.section-head h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.125rem); font-weight: 900; margin-bottom: .5rem; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 1.3rem; }

/* =========================================================
   Cards
   ========================================================= */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease), background var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 1rem;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--icon-bg); border: 1px solid var(--line);
}
.card h3 { font-size: 1.0625rem; font-weight: 800; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .9375rem; }
.card-link .card-cta { display: inline-block; margin-top: 1rem; font-weight: 800; font-size: .9375rem; color: var(--brand-blue); }
.card-link .card-cta:hover { color: var(--brand-cyan); }
[data-theme="dark"] .card-link .card-cta { color: #8fb4ff; }
[data-theme="dark"] .card-link .card-cta:hover { color: var(--brand-cyan); }

/* Steps */
.step { text-align: center; padding: 1.5rem 1.25rem; }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 1rem;
  border-radius: 50%; font-weight: 900; font-size: 1.25rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 8px 20px rgba(0, 21, 172, .25);
}

/* Quotes */
.quote { display: flex; flex-direction: column; gap: 1rem; }
.quote blockquote { font-size: .9375rem; color: var(--ink); }
.quote figcaption strong { display: block; font-size: .9375rem; }
.quote figcaption span { font-size: .8125rem; color: var(--muted); }

/* =========================================================
   Pricing
   ========================================================= */
.plan { position: relative; display: flex; flex-direction: column; gap: 1rem; }
.plan-badge {
  position: absolute; top: -14px; inset-inline-start: 1.5rem;
  background: var(--brand-cyan); color: #00222b;
  font-size: .8125rem; font-weight: 800; padding: .2rem .9rem; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(20, 205, 249, .4);
}
.plan .price { font-size: 2rem; font-weight: 900; color: var(--brand-blue); }
[data-theme="dark"] .plan .price { color: #9db9ff; }
.plan .price span { font-size: .875rem; font-weight: 500; color: var(--muted); }
.plan ul { display: grid; gap: .5rem; margin-bottom: .4rem; }
.plan li { position: relative; padding-inline-start: 1.6rem; font-size: .9375rem; color: var(--muted); }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--brand-cyan); font-weight: 900; }
.plan-featured { border-color: var(--brand-blue); box-shadow: var(--shadow-lg); }
[data-theme="dark"] .plan-featured { border-color: #3d5ae8; }
.plan .btn { margin-top: auto; }
.plan-note { font-size: .8125rem; color: var(--muted); }

/* =========================================================
   FAQ
   ========================================================= */
.faq { display: grid; gap: .75rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 1rem 1.25rem; box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), background var(--ease);
}
.faq details[open] { border-color: var(--brand-cyan); }
.faq summary {
  cursor: pointer; font-weight: 800; font-size: 1rem; list-style: none;
  position: relative; padding-inline-end: 1.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; inset-inline-end: 0; top: 0;
  font-size: 1.25rem; font-weight: 700; color: var(--brand-blue);
  transition: transform var(--ease);
}
[data-theme="dark"] .faq summary::after { color: #8fb4ff; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .6rem; color: var(--muted); font-size: .9375rem; }

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #001c8f 55%, #062e9e 100%);
  color: #fff;
}
.cta-inner { text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.8vw, 2.125rem); font-weight: 900; }
.cta-band p { color: #cdd9f5; margin: .5rem 0 1.5rem; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 3.25rem 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem;
  padding-bottom: 2.25rem; border-bottom: 1px solid var(--footer-line);
}
.footer-about p { font-size: .9375rem; margin-top: 1rem; }
.site-footer .brand-name { color: #fff; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: .875rem; }
.footer-col a { display: block; padding-block: .25rem; font-size: .9375rem; overflow-wrap: anywhere; transition: color var(--ease); }
.footer-col a:hover { color: var(--brand-cyan); }
.footer-col p { font-size: .9375rem; padding-block: .25rem; }
.footer-cta { margin-top: 1rem; }
.footer-social { display: flex; gap: .4rem; flex-wrap: wrap; }
.footer-social a { display: inline-block; padding: .45rem 1rem; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; margin-top: .4rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-block: 1.25rem; font-size: .8125rem; flex-wrap: wrap;
}
.footer-bottom .en { direction: ltr; opacity: .65; }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive — standard breakpoints: 1024 / 640
   ========================================================= */
@media (max-width: 1080px) {
  .main-nav { gap: 1rem; }
  .main-nav > a:not(.btn) { font-size: .875rem; }
}

/* تبلت: هیرو تک‌ستونه، کارت‌ها دوستونه */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* منوی همبرگری از تبلت به پایین تا منوی دسکتاپ هرگز سرریز نکند */
@media (max-width: 920px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open {
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }
  .main-nav a { padding: .8rem 1.4rem; border-top: 1px solid var(--line); }
  .main-nav .btn { margin: .9rem 1.4rem; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-social { justify-content: center; }

  /* دکمه‌ها مثل سایت‌های فروشگاهی: تمام‌عرض، هم‌ارتفاع و لمس‌پذیر */
  .btn { min-height: 46px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 100%; }
  .plan .btn,
  .cta-inner .btn,
  .footer-cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chat-window { animation: none; }
}
