/* ==========================================================================
   سایت‌ساز — marketing site (landing, pricing, templates, blog, auth)
   Loaded in addition to app.css.
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--c-surface) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.site-header .inner {
  display: flex; align-items: center; gap: 1rem;
  height: 68px;
}
.site-logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.08rem; color: var(--c-text); }
.site-logo:hover { color: var(--c-text); }
.site-logo .mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, var(--c-primary), #a855f7);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.site-logo .mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.site-nav { display: flex; gap: .3rem; margin-inline-start: auto; align-items: center; }
.site-nav a {
  padding: .5rem .85rem; border-radius: var(--radius-sm);
  color: var(--c-text-soft); font-size: .9rem; font-weight: 500;
  transition: all var(--t-fast);
}
.site-nav a:hover { background: var(--c-surface-2); color: var(--c-text); }
.site-nav a.is-active { color: var(--c-primary); font-weight: 600; }

.nav-toggle { display: none; }

.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.6fr repeat(3, 1fr); }
.footer-col h4 { font-size: .92rem; margin-bottom: .9rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: var(--c-text-soft); font-size: .87rem; }
.footer-col a:hover { color: var(--c-primary); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--c-muted);
}
.social-row { display: flex; gap: .5rem; }
.social-row a {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--c-surface-2); color: var(--c-text-soft);
  border: 1px solid var(--c-border);
  transition: all var(--t-fast);
}
.social-row a:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.social-row .icon { width: 18px; height: 18px; }

/* ----------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 420px at 78% -8%, color-mix(in srgb, var(--c-primary) 16%, transparent), transparent 65%),
    radial-gradient(700px 380px at 12% 8%, color-mix(in srgb, #a855f7 13%, transparent), transparent 60%);
}
.hero-inner { display: grid; gap: 2.5rem; grid-template-columns: 1.05fr .95fr; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .85rem;
  background: var(--c-primary-soft); color: var(--c-primary);
  border: 1px solid var(--c-primary-border);
  border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 600;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(1.85rem, 4.6vw, 3.05rem);
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--c-primary), #a855f7 55%, #ec4899);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.lead { font-size: 1.06rem; color: var(--c-text-soft); max-width: 46ch; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 1.75rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-meta .num { font-size: 1.45rem; font-weight: 800; color: var(--c-text); }
.hero-meta .lbl { font-size: .8rem; color: var(--c-muted); }

/* Phone mockup used to preview a template on the hero. */
.hero-visual { display: grid; place-items: center; }
.device {
  width: 270px; max-width: 100%;
  border-radius: 34px;
  background: var(--c-surface);
  border: 9px solid #1e2333;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 18.5;
}
.device::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 20px; background: #1e2333; border-radius: 0 0 12px 12px; z-index: 3;
}
.device-screen { width: 100%; height: 100%; overflow: hidden; background: var(--c-surface); }
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* -------------------------------------------------------------- sections */
.section { padding: 3.75rem 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.35rem, 3vw, 1.95rem); margin-bottom: .65rem; }
.section-head p { color: var(--c-text-soft); font-size: .97rem; margin: 0; }

.feature {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-primary-border); }
.feature .fi {
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--c-primary-soft); color: var(--c-primary);
  display: grid; place-items: center; margin-bottom: 1rem;
}
.feature .fi .icon { width: 23px; height: 23px; }
.feature h3 { font-size: 1.02rem; margin-bottom: .45rem; }
.feature p { color: var(--c-text-soft); font-size: .89rem; margin: 0; line-height: 1.9; }

/* steps */
.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step { position: relative; padding-top: 3.2rem; text-align: center; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), #a855f7);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.step h3 { font-size: 1rem; margin-bottom: .4rem; }
.step p { font-size: .87rem; color: var(--c-text-soft); margin: 0; }

/* -------------------------------------------------------- template cards */
.template-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  display: flex; flex-direction: column;
}
.template-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-primary-border); }
.template-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--c-surface-2), var(--c-border));
  position: relative; overflow: hidden;
}
.template-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.template-thumb .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  color: #fff; font-weight: 800; font-size: 1.1rem; padding: 1rem;
}
.template-card .body { padding: .95rem 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.template-card .body h3 { font-size: .97rem; margin: 0; }
.template-card .body p { font-size: .82rem; color: var(--c-muted); margin: 0; }
.template-card .foot {
  padding: .75rem 1.1rem; border-top: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.ribbon {
  position: absolute; top: .7rem; inset-inline-start: .7rem; z-index: 2;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; font-size: .7rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: var(--radius-full);
}

.filter-chips { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; }
.chip {
  padding: .42rem .95rem; border-radius: var(--radius-full);
  border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-text-soft); font-size: .85rem; transition: all var(--t-fast);
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); font-weight: 600; }

/* --------------------------------------------------------------- pricing */
.plan-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); align-items: stretch; }
.plan {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.is-featured {
  border-color: var(--c-primary);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--c-primary) 18%, transparent);
}
.plan.is-featured::after {
  content: "پیشنهاد ویژه";
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--c-primary), #a855f7);
  color: #fff; font-size: .74rem; font-weight: 700;
  padding: .25rem .95rem; border-radius: var(--radius-full);
  white-space: nowrap;
}
.plan h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.plan .desc { font-size: .85rem; color: var(--c-muted); min-height: 2.4em; margin-bottom: 1rem; }
.plan .price { display: flex; align-items: baseline; gap: .35rem; margin-bottom: .25rem; flex-wrap: wrap; }
.plan .price .amount { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.plan .price .unit { font-size: .85rem; color: var(--c-muted); }
.plan .price .was { font-size: .9rem; color: var(--c-muted); text-decoration: line-through; }
.plan .period { font-size: .8rem; color: var(--c-muted); margin-bottom: 1.25rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.plan li { display: flex; align-items: flex-start; gap: .5rem; padding: .32rem 0; font-size: .87rem; }
.plan li .icon { width: 17px; height: 17px; color: var(--c-success); flex-shrink: 0; margin-top: .3rem; }
.plan li.off { color: var(--c-muted); }
.plan li.off .icon { color: var(--c-muted); }

/* ------------------------------------------------------------ testimonials */
.testimonial {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.testimonial .quote { font-size: .92rem; color: var(--c-text-soft); line-height: 2; margin-bottom: 1.1rem; }
.testimonial .who { display: flex; align-items: center; gap: .7rem; }
.testimonial .who .name { font-weight: 700; font-size: .88rem; }
.testimonial .who .role { font-size: .78rem; color: var(--c-muted); }

/* -------------------------------------------------------------- accordion */
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem .25rem; text-align: start;
  font-weight: 600; font-size: .95rem; color: var(--c-text);
}
.faq-q .icon { width: 19px; height: 19px; color: var(--c-muted); transition: transform var(--t); flex-shrink: 0; }
.faq-item[open] .faq-q .icon { transform: rotate(180deg); }
.faq-a { padding: 0 .25rem 1.15rem; color: var(--c-text-soft); font-size: .89rem; line-height: 2; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary { list-style: none; }

/* --------------------------------------------------------------------- CTA */
.cta {
  background: linear-gradient(135deg, var(--c-primary), #7c3aed 55%, #a855f7);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 240px at 50% 0%, rgba(255, 255, 255, .16), transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(1.35rem, 3vw, 1.9rem); margin-bottom: .6rem; }
.cta p { color: rgba(255, 255, 255, .9); margin-bottom: 1.6rem; }
.cta .btn { background: #fff; color: var(--c-primary); }
.cta .btn:hover { background: #f1f5f9; color: var(--c-primary-hover); }
.cta .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* ------------------------------------------------------------- auth pages */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  background: linear-gradient(150deg, var(--c-primary), #7c3aed 60%, #a855f7);
  color: #fff;
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 340px at 80% 12%, rgba(255, 255, 255, .16), transparent 62%);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { color: #fff; font-size: 1.75rem; margin-bottom: .9rem; }
.auth-side p { color: rgba(255, 255, 255, .88); max-width: 40ch; }
.auth-side .points { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-side .points li { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; font-size: .92rem; }
.auth-side .points .icon { width: 20px; height: 20px; flex-shrink: 0; }

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--c-bg);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: .4rem; }
.auth-card .sub { color: var(--c-muted); font-size: .9rem; margin-bottom: 1.75rem; }

/* OTP code boxes */
.otp-inputs { display: flex; gap: .5rem; direction: ltr; justify-content: center; margin-bottom: 1rem; }
.otp-inputs input {
  width: 46px; height: 54px;
  text-align: center; font-size: 1.35rem; font-weight: 700;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -moz-appearance: textfield;
}
.otp-inputs input::-webkit-outer-spin-button,
.otp-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otp-inputs input:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 18%, transparent);
}
.otp-inputs input.is-filled { border-color: var(--c-primary); background: var(--c-primary-soft); }

.otp-timer { text-align: center; font-size: .85rem; color: var(--c-muted); margin-bottom: 1.25rem; }
.otp-timer strong { color: var(--c-primary); font-variant-numeric: tabular-nums; }

.auth-steps { display: flex; gap: .4rem; margin-bottom: 1.75rem; }
.auth-steps .s { flex: 1; height: 4px; border-radius: var(--radius-full); background: var(--c-border); transition: background var(--t); }
.auth-steps .s.is-done { background: var(--c-primary); }

.divider-text {
  display: flex; align-items: center; gap: .8rem;
  color: var(--c-muted); font-size: .82rem;
  margin: 1.4rem 0;
}
.divider-text::before, .divider-text::after {
  content: ""; flex: 1; height: 1px; background: var(--c-border);
}

/* ------------------------------------------------------------ error pages */
.error-page {
  min-height: 100vh;
  display: grid; place-items: center;
  text-align: center; padding: 2rem;
}
.error-code {
  font-size: clamp(4.5rem, 16vw, 8.5rem);
  font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--c-primary), #a855f7);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: .5rem;
}
.error-page h1 { font-size: 1.3rem; margin-bottom: .6rem; }
.error-page p { color: var(--c-text-soft); max-width: 44ch; margin: 0 auto 1.75rem; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-visual { order: -1; }
  .device { width: 220px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; margin-inline-start: auto;
    background: none; border: 1px solid var(--c-border);
    border-radius: var(--radius-sm); padding: .45rem; cursor: pointer; color: var(--c-text);
  }
  .site-nav {
    position: fixed; inset-block: 68px 0; inset-inline-end: 0;
    width: min(280px, 82vw);
    background: var(--c-surface);
    border-inline-start: 1px solid var(--c-border);
    flex-direction: column; align-items: stretch;
    padding: 1rem; gap: .2rem;
    transform: translateX(100%);
    transition: transform var(--t);
    z-index: 120;
    overflow-y: auto;
    margin: 0;
  }
  .site-nav.is-open { transform: none; }
  .site-nav a { padding: .7rem .9rem; }
  .site-nav .btn { width: 100%; margin-top: .5rem; }
  .section { padding: 2.5rem 0; }
  .hero { padding: 2.75rem 0 2.25rem; }
  .cta { padding: 2.25rem 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .otp-inputs input { width: 42px; height: 50px; font-size: 1.2rem; }
}

@media (max-width: 380px) {
  .otp-inputs { gap: .35rem; }
  .otp-inputs input { width: 38px; height: 46px; font-size: 1.05rem; }
}
