@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f2ec;          /* warm ceramic */
  --surface: #fffdf9;
  --surface-2: #efe9df;
  --ink: #1b1613;
  --ink-2: #4a413a;       /* body text on light, 9:1 */
  --muted: #6b6158;       /* secondary text on light, 5.6:1 */
  --line: #e2d9cb;
  --line-strong: #cfc3b1;
  --coal: #1c1917;        /* dark bands */
  --coal-2: #292524;
  --on-coal: #f5efe6;
  --on-coal-muted: #bdb3a6;
  --accent: #c2410c;      /* terracotta, white text 5.2:1 */
  --accent-deep: #9a3412; /* accent text on light, 7:1 */
  --accent-soft: #fde9dc;
  --glow: #ff8a4c;
  --ok: #166534;
  --err: #b91c1c;
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1200px;
  --bar: 72px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  --shadow: 0 24px 60px -30px rgba(60, 35, 15, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.95;
  color: var(--ink-2); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; line-height: 1.45; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent-soft); }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 14px; font-weight: 700; font-size: 16px;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { color: #fff; background: var(--accent); box-shadow: 0 10px 24px -10px rgba(194, 65, 12, .75); }
.btn--primary:hover { background: #a8380a; transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(194, 65, 12, .8); }
.btn--primary:active { transform: none; }
.btn--ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-2); }
.btn--light { color: var(--ink); background: var(--on-coal); }
.btn--light:hover { background: #fff; transform: translateY(-2px); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--bar);
  background: rgba(246, 242, 236, .82); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s, background .25s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); background: rgba(246, 242, 236, .95); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand__mark { width: 38px; height: 38px; flex: none; border-radius: 11px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__link { padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-size: 15.5px; font-weight: 500; transition: background .2s, color .2s; }
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: 12px; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 12px; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 70% at 85% 10%, rgba(255, 138, 76, .16), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(194, 65, 12, .07), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: 14.5px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: 22px 0 18px; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 900; letter-spacing: -.4px; }
.accent { color: var(--accent); }
.lead { font-size: 1.15rem; max-width: 52ch; color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.assure { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 32px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 15.5px; }
.assure li { display: inline-flex; align-items: center; gap: 8px; }
.assure svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

.kiln { margin: 0; border-radius: 28px; background: var(--coal); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.kiln svg { width: 100%; height: auto; }
.kiln figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 16px 22px; color: var(--on-coal-muted); font-size: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.kiln figcaption strong { color: var(--on-coal); font-weight: 700; }

/* ---------- Sections ---------- */
.block { padding: 96px 0; }
.block--tint { background: var(--surface-2); }
.block--coal { background: var(--coal); color: var(--on-coal-muted); }
.block--coal h2, .block--coal h3 { color: var(--on-coal); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.kicker { color: var(--accent-deep); font-weight: 800; font-size: 14.5px; }
.block--coal .kicker { color: var(--glow); }
.section-head h2 { margin: 8px 0 12px; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.section-head p { color: var(--ink-2); }
.block--coal .section-head p { color: var(--on-coal-muted); }

/* Finder */
.finder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; border: 0; padding: 0; margin: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt__card {
  height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.opt:hover .opt__card { border-color: var(--line-strong); transform: translateY(-3px); }
.opt input:focus-visible + .opt__card { outline: 3px solid var(--accent); outline-offset: 3px; }
.opt input:checked + .opt__card { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(194, 65, 12, .15); }
.opt__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.opt input:checked + .opt__card .opt__icon { background: var(--accent); color: #fff; }
.opt__icon svg { width: 24px; height: 24px; }
.opt__title { font-weight: 800; color: var(--ink); line-height: 1.6; }
.opt__sub { font-size: 14.5px; color: var(--muted); line-height: 1.8; }
.finder__result {
  margin-top: 18px; padding: 20px 24px; border-radius: var(--radius-sm); background: var(--coal); color: var(--on-coal);
  display: none; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}
.finder__result.is-on { display: flex; }
.finder__result span { color: var(--on-coal-muted); }
.finder__result b { color: var(--on-coal); }

/* Products */
.products { display: grid; gap: 20px; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; }
.product { display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); transition: border-color .25s, transform .25s, box-shadow .25s; }
.product:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.product--lead { grid-row: span 2; background: var(--coal); border-color: var(--coal); color: var(--on-coal-muted); }
.product--lead h3 { color: var(--on-coal); }
.product--lead:hover { border-color: var(--glow); }
.product__art { margin-bottom: 22px; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.product--lead .product__art { background: var(--coal-2); }
.product__art svg { width: 100%; height: 150px; }
.product--lead .product__art svg { height: 230px; }
.product h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.product p { font-size: 16px; }
.product__list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.product__list li { display: flex; gap: 10px; align-items: center; }
.product__list svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.product--lead .product__list svg { color: var(--glow); }
.product .btn { margin-top: auto; align-self: flex-start; }
.product p + .btn, .product__list + .btn { margin-top: 24px; }

/* Projects list */
.grid-projects { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.project-card {
  display: flex; flex-direction: column; gap: 10px; padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card__tag { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 13.5px; font-weight: 700; }
.project-card h3 { font-size: 1.3rem; font-weight: 800; }
.project-card p { font-size: 15.5px; }
.project-card__link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--accent-deep); font-weight: 700; }
.project-card__link svg { width: 16px; height: 16px; }
.project-card:hover .project-card__link svg { transform: translateX(-4px); transition: transform .2s; }

/* Industries */
.industries { display: grid; gap: 0; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.industry { padding: 34px; border-inline-start: 1px solid rgba(255,255,255,.12); }
.industry:first-child { border-inline-start: 0; }
.industry svg { width: 34px; height: 34px; color: var(--glow); margin-bottom: 18px; }
.industry h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.industry p { font-size: 15.5px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0; padding: 0; counter-reset: step; position: relative; }
.step { position: relative; padding: 0 22px 0 0; counter-increment: step; }
.step::before { content: counter(step, persian); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.2rem; position: relative; z-index: 1; }
.step::after { content: ""; position: absolute; top: 25px; inset-inline: 52px 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 16px); }
.step:last-child::after { display: none; }
.step h3 { margin: 18px 0 6px; font-size: 1.1rem; font-weight: 800; }
.step p { font-size: 15.5px; color: var(--ink-2); max-width: 24ch; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-inline-end: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { padding: 0 22px 20px; }

/* Quote form */
.quote { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.quote__aside h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; margin: 8px 0 14px; }
.quote__aside > p { margin-bottom: 26px; }
.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.tips li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-coal-muted); }
.tips svg { width: 22px; height: 22px; color: var(--glow); flex: none; margin-top: 5px; }
.tips b { color: var(--on-coal); display: block; }
.form { padding: 32px; border-radius: 26px; background: var(--surface); color: var(--ink-2); box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--ink); font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.9; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(194, 65, 12, .18); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .ltr { direction: ltr; text-align: left; }
.field__error { min-height: 20px; margin-top: 4px; font-size: 14px; color: var(--err); }
.form__submit { width: 100%; margin-top: 4px; }
.form__note { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }
.form-msg { display: none; margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.form-msg.is-ok { display: block; color: var(--ok); background: #dcfce7; border: 1px solid #86efac; }
.form-msg.is-error { display: block; color: var(--err); background: #fee2e2; border: 1px solid #fca5a5; }

/* Footer */
footer { background: var(--coal); color: var(--on-coal-muted); padding: 40px 0; font-size: 15px; border-top: 1px solid rgba(255,255,255,.08); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__nav a:hover { color: var(--on-coal); }

/* Sticky mobile CTA */
.mobile-cta { display: none; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Login ---------- */
.auth { min-height: calc(100vh - var(--bar)); display: grid; grid-template-columns: 1fr 1fr; }
.auth__side {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px; padding: 64px;
  background: radial-gradient(70% 60% at 20% 10%, rgba(255, 138, 76, .28), transparent 70%), var(--coal); color: var(--on-coal-muted);
}
.auth__side .eyebrow { background: rgba(255,255,255,.08); color: var(--on-coal); }
.auth__side .eyebrow::before { background: var(--glow); }
.auth__side h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; max-width: 16ch; color: var(--on-coal); }
.auth__side p { max-width: 40ch; }
.auth__main { display: grid; place-items: center; padding: 48px 20px; }
.auth__card { width: min(100%, 420px); }
.auth__card h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 6px; }
.auth__card > p { margin-bottom: 28px; }
.auth__card .field { margin-bottom: 10px; }
.field__wrap { position: relative; }
.field--password input { padding-left: 56px; }
.reveal-btn { position: absolute; left: 6px; top: 5px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); }
.reveal-btn:hover { color: var(--ink); background: var(--surface-2); }
.reveal-btn svg { width: 20px; height: 20px; }
.auth__submit { width: 100%; margin-top: 8px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; display: none; }
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth__note { margin-top: 26px; font-size: 14.5px; color: var(--muted); }
.auth__note a { color: var(--accent-deep); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero__grid, .quote, .auth { grid-template-columns: 1fr; }
  .auth__side { display: none; }
  .finder { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: 1fr; }
  .product--lead { grid-row: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .grid-projects { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .industries { grid-template-columns: 1fr; }
  .industry { border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .industry:first-child { border-top: 0; }
  .hero { padding: 48px 0 64px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .block { padding: 64px 0; }
  .form { padding: 22px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .cta-row .btn { flex: 1 1 100%; }
  .finder { grid-template-columns: 1fr; }
  .grid-projects { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .js .menu-btn { display: inline-flex; }
  .js .nav {
    position: absolute; inset-inline: 0; top: var(--bar); display: none; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px 22px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(0,0,0,.25);
  }
  .js .nav.is-open { display: flex; }
  .js .nav__link { padding: 14px; font-size: 17px; }
  .js .nav__actions { margin: 10px 0 0; flex-direction: column; align-items: stretch; }
  .js .nav__actions .btn { min-height: 50px; }
  html:not(.js) .nav__link { display: none; }
  .mobile-cta {
    display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: rgba(246, 242, 236, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .mobile-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
