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

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

:root {
  --background: #f5f4ee;
  --surface: #faf9f5;
  --surface-muted: #f0eee6;
  --text: #1f1e1d;
  --muted: #6e6d66;
  --border: #e5e3da;
  --brand: #d97757;
  --brand-hover: #c56a4a;
  --shadow: 0 20px 50px rgb(31 30 29 / 11%);
}

:root[data-theme='dark'] {
  --background: #262624;
  --surface: #30302e;
  --surface-muted: #3d3d3a;
  --text: #f5f4ef;
  --muted: #b8b7b2;
  --border: #4a4a46;
  --shadow: 0 20px 50px rgb(0 0 0 / 25%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-family: Vazirmatn, Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.nav { position: sticky; top: 0; z-index: 2; display: flex; min-height: 4.5rem; align-items: center; justify-content: space-between; padding: .75rem max(1.25rem, calc((100% - 72rem) / 2)); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 94%, transparent); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--brand); font-size: 1.6rem; font-weight: 900; }
.brand img { display: block; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-size: .94rem; font-weight: 700; }
.nav-links a:hover, footer a:hover, .link-button:hover { color: var(--brand); }
.theme-toggle { cursor: pointer; border: 1px solid var(--border); border-radius: .6rem; padding: .45rem .65rem; background: transparent; color: var(--text); font-size: .78rem; }

.hero { display: grid; min-height: calc(100vh - 4.5rem); max-width: 72rem; margin: auto; padding: 5rem 1.25rem; align-items: center; gap: 4rem; grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr); }
.eyebrow { display: inline-block; margin: 0 0 1.5rem; padding: .4rem 1rem; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: .92rem; font-weight: 900; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { max-width: 42rem; font-size: clamp(2.45rem, 5.5vw, 4.6rem); font-weight: 900; }
h1 span { color: var(--brand); }
.lead { max-width: 39rem; margin: 1.6rem 0 0; color: var(--muted); font-size: 1.15rem; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: .8rem; padding: .65rem 1.25rem; font-weight: 900; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-hover); }
.secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.full { width: 100%; }

.login-card { width: 100%; max-width: 26rem; justify-self: center; padding: 2rem; border: 1px solid var(--border); border-radius: 1.25rem; background: var(--surface); box-shadow: var(--shadow); }
.card-logo { display: block; margin: 0 auto 1rem; }
.login-card h2 { text-align: center; font-size: 1.3rem; }
.form { margin-top: 1.35rem; }
.form p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; line-height: 1.8; }
.form input { width: 100%; min-height: 3.1rem; border: 1px solid var(--border); border-radius: .75rem; padding: .5rem .85rem; background: var(--background); color: var(--text); text-align: center; font-size: 1.15rem; letter-spacing: .06em; }
.form input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent); border-color: var(--brand); }
.form .button { margin-top: 1rem; }
.form-error { color: #bf4d43 !important; font-weight: 700; }
.link-button { display: block; width: 100%; margin-top: 1rem; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: .9rem; }

.features { padding: 5rem 1.25rem; background: var(--surface-muted); }
.features > h2, .callout h2 { text-align: center; font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 900; }
.feature-grid { display: grid; max-width: 72rem; margin: 2.5rem auto 0; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
.feature-grid article { padding: 1.4rem; border-radius: 1rem; background: var(--surface); box-shadow: 0 2px 10px rgb(31 30 29 / 4%); }
.feature-grid h3 { color: var(--brand); font-size: 1.05rem; }
.feature-grid p { margin: .75rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.9; }
.download { max-width: 72rem; margin: auto; padding: 5rem 1.25rem; text-align: center; }
.download > h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 900; }
.download-lead { max-width: 34rem; margin: 1rem auto 0; color: var(--muted); line-height: 2; }
.download-grid { display: grid; max-width: 52rem; margin: 2.5rem auto 0; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); text-align: right; }
.download-grid:has(article:only-child) { grid-template-columns: minmax(0, 28rem); justify-content: center; }
.download-grid article { padding: 2rem; border: 1px solid var(--border); border-radius: 1.25rem; background: var(--surface); box-shadow: 0 2px 10px rgb(31 30 29 / 4%); }
.download-grid h3 { color: var(--brand); font-size: 1.1rem; }
.download-grid p { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.9; }
.download-hint { border: 1px dashed var(--border); border-radius: .75rem; padding: .75rem 1rem; font-size: .8rem !important; }
.download-grid .button { margin-top: 1.25rem; }
.download-verify { display: inline-block; margin-top: .75rem; color: var(--muted); font-size: .8rem; text-decoration: underline; }
.callout { max-width: 46rem; margin: auto; padding: 5rem 1.25rem; text-align: center; }
.callout p { margin: 1rem auto 1.8rem; color: var(--muted); line-height: 2; }
footer { padding: 2rem 1.25rem; border-top: 1px solid var(--border); color: var(--muted); text-align: center; font-size: .85rem; }
footer div { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
footer p { margin: 1rem 0 0; }
.enamad-badge { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: 1.5rem; }
.enamad-badge img { width: 80px; height: auto; border: 1px solid var(--border); border-radius: .75rem; padding: .5rem; background: #fff; }
.footer-contact { max-width: 28rem; margin: 1rem auto 0; line-height: 1.9; font-size: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .nav { padding-inline: 1rem; }
  .nav-links { gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
  .hero { min-height: auto; padding-block: 3rem 4rem; grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .hero-actions { justify-content: center; }
  .login-card { max-width: 31rem; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .download-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 430px) {
  .brand { font-size: 1.35rem; }
  .brand img { width: 34px; height: 34px; }
  .feature-grid { grid-template-columns: 1fr; }
  .nav-links { font-size: .84rem; }
}
