/* مورفوپرس — Design tokens
   Palette:
     --ink      #1B2A4A  deep academic navy — primary text & structure
     --ink-2    #2B2B2B  body text
     --paper    #F7F5F0  warm paper background
     --paper-2  #FFFFFF  card / surface white
     --line     #E4DFD4  hairline rule on paper
     --gold     #B8862E  Persian manuscript gold — premium accent, used sparingly
     --sage     #5F7A63  success / correctness
     --rose     #A23B3B  alert / exam stamp red
   Type: Vazirmatn (single family), weight does the work of hierarchy.
*/

@import url("https://cdn.jsdelivr.net/npm/vazirmatn@33.003/Vazirmatn-font-face.css");

:root {
  --ink: #1b2a4a;
  --ink-2: #2b2b2b;
  --paper: #f7f5f0;
  --paper-2: #ffffff;
  --line: #e4dfd4;
  --gold: #b8862e;
  --sage: #5f7a63;
  --rose: #a23b3b;
  --radius: 10px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  direction: rtl;
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand { font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 14px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links .btn { padding: 12px 4px; }
  .site-header .bar { position: relative; }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #14213a; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a67826; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Hero: exam-sheet letterhead motif ---------- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero .grid { grid-template-columns: 1fr; }
}
.eyebrow {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
h1.hero-title {
  font-size: 44px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
@media (max-width: 640px) { h1.hero-title { font-size: 32px; } }
.hero-sub {
  font-size: 18px;
  color: #4a4a4a;
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.sheet {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  transform: rotate(-1.2deg);
  box-shadow: 0 1px 0 var(--line);
  position: relative;
}
.sheet::before {
  content: "نمونه آزمون";
  position: absolute;
  top: 18px;
  left: -14px;
  background: var(--rose);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  transform: rotate(-6deg);
}
.sheet h3 { margin: 0 0 6px; font-size: 15px; color: #8a8a8a; font-weight: 500; }
.sheet .q { border-top: 1px dashed var(--line); padding: 14px 0; }
.sheet .q:first-of-type { border-top: none; }
.sheet .q p { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.sheet .opt { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; color: #555; }
.sheet .opt .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.sheet .opt.correct .dot { border-color: var(--sage); background: var(--sage); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; font-weight: 800; color: var(--ink); margin: 0 0 12px; }
.section-head p { color: #555; margin: 0; font-size: 16.5px; }

/* Reasons list — hairline-divided rows, not shadow cards */
.reasons { border-top: 1px solid var(--line); }
.reason-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.reason-row .ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex: none;
}
.reason-row h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.reason-row p { margin: 0; color: #555; }

/* Feature rows — alternating */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.feature-row:nth-child(even) .feature-visual { order: 2; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-visual { order: 0; }
}
.feature-text .tag { color: var(--gold); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.feature-text h3 { font-size: 24px; color: var(--ink); margin: 0 0 12px; }
.feature-text p { color: #555; margin: 0; }
.feature-visual {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  min-height: 160px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-2);
}
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }
.plan {
  padding: 32px 26px;
  border-right: 1px solid var(--line);
}
.plan:last-child { border-right: none; }
.plan.featured { border-top: 3px solid var(--gold); position: relative; }
.plan .badge {
  position: absolute; top: -1px; right: 26px;
  background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 0 0 6px 6px;
}
.plan h3 { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.plan .price { font-size: 30px; font-weight: 800; color: var(--ink); margin: 14px 0 4px; }
.plan .price small { font-size: 14px; font-weight: 500; color: #888; }
.plan ul { list-style: none; margin: 22px 0; padding: 0; }
.plan li { padding: 9px 0; border-top: 1px dashed var(--line); font-size: 14.5px; color: #444; }
.plan li:first-child { border-top: none; }

/* Forms (auth, builder inputs) */
.form-card {
  max-width: 420px;
  margin: 64px auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
}
.form-card h1 { font-size: 24px; color: var(--ink); margin: 0 0 6px; }
.form-card .lead { color: #666; margin: 0 0 26px; font-size: 14.5px; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink-2);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.msg { font-size: 14px; margin-top: 12px; }
.msg.err { color: var(--rose); }
.msg.ok { color: var(--sage); }

/* Dashboard */
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 0 20px;
}
.dash-header h1 { font-size: 26px; color: var(--ink); margin: 0; }
.form-list { border-top: 1px solid var(--line); }
.form-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
}
.form-item .title { font-weight: 700; color: var(--ink); }
.form-item .meta { color: #888; font-size: 13.5px; margin-top: 4px; }
.status-pill {
  font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.status-pill.draft { background: #ece8dd; color: #7a7256; }
.status-pill.published { background: #e4ede5; color: var(--sage); }
.status-pill.closed { background: #f0e2e2; color: var(--rose); }
.empty-state {
  text-align: center; padding: 80px 20px; color: #888;
}
.empty-state h2 { color: var(--ink); font-size: 20px; }

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: #888;
  font-size: 14px;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--ink); font-weight: 600; }
