:root {
  --rose-900: #5c2430;
  --rose-800: #7a3140;
  --rose-700: #9a3d4e;
  --rose-600: #b84f62;
  --rose-500: #c96b7c;
  --blush: #f7e8eb;
  --blush-2: #f3d4da;
  --sand: #faf6f3;
  --ink: #2a1f22;
  --ink-soft: #5c4a4f;
  --line: rgba(90, 40, 52, 0.12);
  --ok: #1f7a4d;
  --warn: #9a6b12;
  --err: #a12828;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(92, 36, 48, 0.12);
  --font: "Vazirmatn", Tahoma, sans-serif;
  --display: "Cormorant Garamond", "Vazirmatn", serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(201, 107, 124, 0.18), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(243, 212, 218, 0.7), transparent 50%),
    linear-gradient(180deg, #fff8f7 0%, var(--sand) 45%, #fff 100%);
  min-height: 100vh;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--rose-700); text-decoration: none; }
a:hover { color: var(--rose-900); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--rose-800); color: #fff;
  padding: .6rem 1rem; border-radius: 999px; z-index: 100;
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 248, 247, 0.86);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .75rem; color: inherit;
}
.brand__mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--rose-700), var(--rose-900));
  color: #fff; font-weight: 800; letter-spacing: .04em; font-size: .85rem;
  box-shadow: 0 10px 24px rgba(154, 61, 78, 0.35);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 1.05rem; }
.brand__text small {
  font-family: var(--display); font-size: .85rem; color: var(--ink-soft); letter-spacing: .04em;
}
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer;
}
.nav-toggle span:not(.sr-only) {
  display: block; height: 2px; width: 18px; margin-inline: auto;
  background: var(--rose-800); transition: .2s ease;
}
.nav {
  display: none; position: absolute; inset-inline: 0; top: 68px;
  background: rgba(255,252,251,.98); border-bottom: 1px solid var(--line);
  padding: 1rem; flex-direction: column; gap: .35rem;
}
.nav.is-open { display: flex; }
.nav a {
  padding: .75rem 1rem; border-radius: 12px; color: var(--ink); font-weight: 500;
}
.nav a:hover { background: var(--blush); }
.nav__cta {
  background: var(--rose-700) !important; color: #fff !important; text-align: center;
  margin-top: .35rem;
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav {
    display: flex; position: static; flex-direction: row; align-items: center;
    background: transparent; border: 0; padding: 0; gap: .15rem; flex-wrap: wrap; justify-content: flex-end;
  }
  .nav a { padding: .45rem .7rem; font-size: .92rem; }
  .nav__cta { margin-top: 0; padding-inline: 1rem !important; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 2rem;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(255,248,247,.92) 0%, rgba(255,248,247,.55) 42%, rgba(154,61,78,.28) 100%),
    url("../img/hero.svg") center/cover no-repeat;
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.06) translateY(-1.5%); }
}
.hero__content {
  position: relative; z-index: 1;
  width: min(640px, 100%);
  animation: rise .8s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero__brand {
  font-family: var(--display);
  font-size: clamp(2.8rem, 10vw, 4.6rem);
  font-weight: 700; line-height: 1; color: var(--rose-900);
  margin: 0 0 .75rem;
  letter-spacing: .02em;
}
.hero h1 {
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  font-weight: 700; margin: 0 0 .75rem; color: var(--ink);
}
.hero p {
  margin: 0 0 1.5rem; color: var(--ink-soft); font-size: 1.02rem;
  max-width: 34rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .75rem 1.25rem; border-radius: 999px;
  border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  background: linear-gradient(135deg, var(--rose-600), var(--rose-800));
  color: #fff; box-shadow: 0 12px 28px rgba(154, 61, 78, .28);
}
.btn--primary:hover { color: #fff; }
.btn--ghost {
  background: rgba(255,255,255,.75); border-color: var(--line); color: var(--ink);
}
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: .4rem .9rem; font-size: .9rem; }

.section { padding: 2.5rem 0; }
.section__head { margin-bottom: 1.25rem; }
.section__head h2 { margin: 0 0 .35rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.section__head p { margin: 0; color: var(--ink-soft); }

.feature-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--blush); color: var(--rose-800); font-weight: 800; margin-bottom: .75rem;
}
.feature h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.panel {
  background: rgba(255,255,255,.84);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(92,36,48,.06);
}
.panel + .panel { margin-top: 1rem; }
.panel__title { margin: 0 0 1rem; font-size: 1.15rem; }

.form-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
}
label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; align-content: start; }
.form-grid > label > input:not([type="checkbox"]):not([type="radio"]),
.form-grid > label > select,
.form-grid > label > textarea { align-self: stretch; }
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%; height: 48px; min-height: 48px; max-height: 48px; padding: .7rem .9rem;
  border: 1px solid var(--line); border-radius: 14px;
  background: #fff; font: inherit; color: var(--ink);
  box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
}
textarea { height: auto; max-height: none; min-height: 110px; resize: vertical; }
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(154,61,78,.25); border-color: var(--rose-500);
}

/* Radio / checkbox — قابل تیک‌زدن و دیده شدن */
input[type="radio"],
input[type="checkbox"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0;
  padding: 0 !important;
  flex-shrink: 0;
  accent-color: var(--rose-700);
  cursor: pointer;
  border: none;
  border-radius: 0;
  background: transparent;
  vertical-align: middle;
}
.consent-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-weight: 500;
  cursor: pointer;
}
.consent-row input { margin-top: .2rem; }
.session-card input[type="radio"] {
  margin-top: .2rem;
  margin-inline-end: .55rem;
}
.help { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }

.session-list { display: grid; gap: .75rem; }
.session-card {
  display: grid; gap: .75rem;
  padding: 1rem; border-radius: 16px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: .2s ease;
}
.session-card:has(input:checked) {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 3px rgba(201,107,124,.2);
  background: linear-gradient(180deg, #fff, var(--blush));
}
.session-card__top {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start;
}
.session-card strong { display: block; }
.session-card small { color: var(--ink-soft); }
.badge {
  display: inline-flex; align-items: center; min-height: 28px;
  padding: .15rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: var(--blush); color: var(--rose-800);
}
.badge--ok { background: #e4f6ec; color: var(--ok); }
.badge--warn { background: #fff3d6; color: var(--warn); }
.badge--err { background: #fde8e8; color: var(--err); }
.badge--muted { background: #f1ecee; color: var(--ink-soft); }

.steps {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1rem;
}
.step {
  flex: 0 0 auto; padding: .45rem .85rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft);
}
.step.is-active { background: var(--rose-700); color: #fff; border-color: transparent; }
.step.is-done { background: var(--blush); color: var(--rose-800); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; min-width: 560px; font-size: .92rem;
}
th, td {
  text-align: right; padding: .75rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle;
}
th { color: var(--ink-soft); font-weight: 700; font-size: .82rem; }
.kpi-grid {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 800px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem;
}
.kpi span { display: block; color: var(--ink-soft); font-size: .85rem; }
.kpi strong { font-size: 1.4rem; color: var(--rose-800); }

.flashes { padding-top: 1rem; display: grid; gap: .5rem; }
.flash {
  padding: .85rem 1rem; border-radius: 14px; font-weight: 600;
  animation: rise .35s ease both;
}
.flash--success { background: #e4f6ec; color: var(--ok); }
.flash--error { background: #fde8e8; color: var(--err); }
.flash--info { background: var(--blush); color: var(--rose-800); }

.site-footer {
  margin-top: 3rem; padding: 2rem 0 calc(2rem + var(--safe-b));
  border-top: 1px solid var(--line); background: rgba(255,255,255,.55);
}
.site-footer__inner {
  display: flex; flex-direction: column; gap: 1rem;
}
.site-footer p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .92rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer__credit {
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line);
  text-align: center; color: var(--ink-soft); font-size: .92rem;
}
.site-footer__credit a { color: var(--rose-800); font-weight: 700; }
@media (min-width: 720px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: end; }
}

.is-admin .topbar { background: rgba(255,255,255,.92); }
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.empty {
  text-align: center; padding: 2rem 1rem; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: 16px; background: rgba(255,255,255,.5);
}

.stat-note { font-size: .9rem; color: var(--ink-soft); margin-top: .5rem; }
.mobile-sticky-cta {
  position: sticky; bottom: 0; padding: .75rem 0 calc(.75rem + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(255,248,247,.95) 30%);
  margin-top: 1rem;
}
@media (min-width: 960px) {
  .mobile-sticky-cta { position: static; background: none; padding: 0; margin-top: 1.25rem; }
}

.receipt {
  text-align: center; padding: 1.5rem 1rem;
}
.receipt__icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; background: #e4f6ec; color: var(--ok); font-size: 1.6rem;
}

.page-title {
  padding: 1.5rem 0 .5rem;
}
.page-title h1 { margin: 0; font-size: clamp(1.4rem, 4vw, 1.9rem); }
.page-title p { margin: .35rem 0 0; color: var(--ink-soft); }
