/* =========================================================
   Fadoo × Puno — Technical & Financial Proposal
   RTL, self-hosted fonts, no external dependencies
   ========================================================= */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --navy: #071321;
  --navy-2: #0d1f36;
  --ink: #07111f;
  --soft: #405066;
  --muted: #6b7a90;
  --paper: #f6f8fc;
  --card: #ffffff;
  --line: #dce3ec;
  --cyan: #18d1c2;
  --blue: #155eff;
  --violet: #7057ff;
  --cyan-tint: rgba(24, 209, 194, .12);
  --blue-tint: rgba(21, 94, 255, .10);
  --violet-tint: rgba(112, 87, 255, .10);
  --good: #0f9d76;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(7, 17, 31, .04), 0 8px 24px rgba(7, 17, 31, .06);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
code, .ltr { direction: ltr; unicode-bidi: isolate; font-family: ui-monospace, Consolas, monospace; font-size: .86em; }
code { background: var(--blue-tint); color: var(--navy-2); padding: 1px 6px; border-radius: 6px; }
::selection { background: rgba(24, 209, 194, .3); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 19, 33, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .08em; }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-weight: 400; letter-spacing: 0; color: #9fb0c6; font-size: 12px; line-height: 1.2; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #c7d3e3; font-size: 14px; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.nav a.active { color: var(--navy); background: var(--cyan); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
  padding: 10px 20px; border-radius: 999px; text-decoration: none !important;
}
.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { background: #3fe0d3; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; margin-inline-start: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(24, 209, 194, .22), transparent 60%),
              radial-gradient(900px 500px at 0% 110%, rgba(21, 94, 255, .25), transparent 60%),
              var(--navy);
  color: #fff; padding: 88px 0 72px;
}
.hero .eyebrow { color: var(--cyan); font-weight: 700; font-size: 14px; letter-spacing: .02em; margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.35; margin: 0 0 18px; font-weight: 800; max-width: 900px; }
.hero h1 span { color: var(--cyan); }
.hero p.lead { font-size: 18px; color: #c7d3e3; max-width: 760px; margin: 0 0 32px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 44px; color: #9fb0c6; font-size: 14px; }
.hero-meta b { color: #fff; font-weight: 500; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -40px; position: relative; z-index: 2; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.kpi .num { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.3; }
.kpi .num small { font-size: 15px; font-weight: 500; color: var(--soft); }
.kpi .lbl { color: var(--soft); font-size: 14px; }
.kpi.accent { background: var(--navy); color: #fff; border-color: var(--navy); }
.kpi.accent .num { color: var(--cyan); }
.kpi.accent .lbl { color: #c7d3e3; }

/* ---------- Sections ---------- */
section.block { padding: 80px 0 16px; }
.sec-head { margin-bottom: 28px; max-width: 860px; }
.sec-num { display: inline-block; font-weight: 800; color: var(--blue); background: var(--blue-tint); border-radius: 8px; padding: 0 10px; font-size: 14px; margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.45; margin: 0 0 10px; font-weight: 800; }
.sec-head p { color: var(--soft); margin: 0; font-size: 17px; }
h3 { font-size: 20px; margin: 36px 0 14px; font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.note {
  border-inline-start: 4px solid var(--cyan); background: var(--cyan-tint);
  border-radius: 10px; padding: 14px 18px; margin: 20px 0; color: var(--navy-2);
}

/* ---------- Tables ---------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: right; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #eef3fa; color: var(--navy-2); font-weight: 700; font-size: 14px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcff; }
td.num, th.num { text-align: left; direction: ltr; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { background: #eef3fa; font-weight: 800; color: var(--navy); }
tr.grand td { background: var(--navy); color: #fff; font-weight: 800; }
tr.grand td.num { color: var(--cyan); }
.muted { color: var(--muted); }

.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.tag.std { background: #eef1f5; color: #3b4a5e; }
.tag.fadoo { background: var(--violet-tint); color: #4b33d6; }
.tag.dev { background: var(--cyan-tint); color: #0a7c73; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 14px; font-size: 14px; color: var(--soft); align-items: center; }

/* ---------- Compare (mode 1 vs 2) ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare .card h3 { margin-top: 0; }
.compare .card.rec { border: 2px solid var(--cyan); position: relative; }
.compare .card.rec::before {
  content: "پیشنهاد فادو"; position: absolute; top: -13px; inset-inline-start: 20px;
  background: var(--cyan); color: var(--navy); font-weight: 800; font-size: 13px; padding: 2px 12px; border-radius: 999px;
}
.compare dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.compare dt { color: var(--muted); font-size: 14px; }
.compare dd { margin: 0; font-weight: 500; }
.compare .price { font-size: 28px; font-weight: 800; color: var(--navy); margin: 8px 0 2px; }
.compare .price small { font-size: 14px; color: var(--soft); font-weight: 500; }

/* ---------- Diagrams ---------- */
.figure { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 24px 0; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.dg text { font-family: "Vazirmatn", Tahoma, sans-serif; }
.dg .t-title { font-size: 16px; font-weight: 800; fill: var(--ink); }
.dg .t-main { font-size: 13.5px; fill: var(--ink); }
.dg .t-name { font-size: 14px; font-weight: 700; fill: var(--ink); }
.dg .t-sub { font-size: 12px; fill: var(--soft); }
.dg .t-quiet { font-size: 12px; fill: var(--muted); }
.dg .t-strong { font-size: 13px; font-weight: 700; fill: var(--ink); }
.dg .box { fill: #fff; stroke: #c3ccd8; stroke-width: 1.25; }
.dg .box-acc { fill: var(--cyan-tint); stroke: var(--cyan); stroke-width: 2; }
.dg .chip-dev { fill: var(--cyan-tint); stroke: var(--cyan); stroke-width: 1.5; }
.dg .chip-fadoo { fill: var(--violet-tint); stroke: var(--violet); stroke-width: 1.5; }
.dg .chip-std { fill: #fff; stroke: #c3ccd8; stroke-width: 1; }
.dg .frame { fill: none; stroke: #c3ccd8; stroke-width: 1.25; }
.dg .band { fill: #eef3fa; stroke: #c3ccd8; }
.dg .conn { fill: none; stroke: #9aa7b8; stroke-width: 1.4; }
.dg .grid { stroke: #e6ebf2; }
.dg .axis { stroke: #9aa7b8; stroke-width: 1.2; }
.dg .bar { fill: #eef1f5; stroke: #aeb9c7; stroke-width: 1.2; }
.dg .bar-acc { fill: var(--cyan-tint); stroke: var(--cyan); stroke-width: 2; }
.dg .mvp { stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 5 5; }
.dg .fin { stroke: #9aa7b8; stroke-width: 1.2; stroke-dasharray: 5 5; }
.dg .arrow-head { fill: #9aa7b8; }

/* ---------- Lists & misc ---------- */
ul.clean, ol.clean { margin: 0; padding-inline-start: 22px; }
ul.clean li, ol.clean li { margin: 6px 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-inline-start: 34px; margin: 12px 0; }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 5px; width: 20px; height: 20px;
  border: 2px solid var(--cyan); border-radius: 6px;
}
.feature h4 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--soft); font-size: 15px; }
.feature .ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cyan-tint); color: #0a7c73; margin-bottom: 12px; font-weight: 800;
}

/* ---------- Footer ---------- */
footer.site {
  margin-top: 96px; background: var(--navy); color: #c7d3e3; padding: 56px 0 28px;
}
footer.site .row { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
footer.site h3 { color: #fff; margin: 0 0 8px; }
footer.site a { color: var(--cyan); }
footer.site .bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #8193aa; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.to-top {
  position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--navy); color: var(--cyan); font-size: 20px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .topbar .btn-primary { display: none; }
  .nav {
    position: absolute; top: 68px; inset-inline: 0; flex-direction: column; background: var(--navy);
    padding: 10px 16px 16px; display: none; border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .nav.open { display: flex; }
  .compare, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .hero { padding: 60px 0 64px; }
  .kpis, .grid-3 { grid-template-columns: 1fr; }
  th, td { padding: 10px 12px; }
  .figure { padding: 12px; }
}

/* ---------- Print (Save as PDF) ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .topbar, .to-top, .hero .actions, .menu-toggle { display: none !important; }
  .hero { background: #fff; color: var(--ink); padding: 0 0 16px; }
  .hero p.lead, .hero-meta, .hero-meta b { color: var(--ink); }
  .kpis { margin-top: 0; }
  section.block { padding-top: 28px; page-break-inside: auto; }
  .figure, .card, .table-wrap, tr { page-break-inside: avoid; box-shadow: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  footer.site { background: #fff; color: var(--ink); margin-top: 24px; }
  a { color: var(--ink); }
}
