/* fc5.ir — self-hosted, no CDN */
@font-face {
  font-family: 'Sahel';
  src: url('./fonts/Sahel.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sahel';
  src: url('./fonts/Sahel-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sahel';
  src: url('./fonts/Sahel-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sahel';
  src: url('./fonts/Sahel-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #22252a;
  --muted: #5b6470;
  --line: #e6e4df;
  --brand: #0f766e;      /* teal-green, calm self-host */
  --brand-ink: #0b5b54;
  --accent: #0f766e;
  --danger: #b3261e;
  --ok: #18794e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,26,36,.04), 0 6px 20px rgba(20,26,36,.05);
  --maxw: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Sahel', 'Vazirmatn', 'Segoe UI', system-ui, Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Header ---------- */
.site-head {
  background: var(--ink);
  color: #fdfcf9;
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-weight: 700; letter-spacing: .5px;
  background: var(--accent); color: #fff;
  border-radius: 10px; padding: 6px 12px; font-size: 1.05rem;
}
.brand-text h1 { font-size: 1.35rem; margin: 0; }
.brand-text p { margin: 0; font-size: .85rem; color: #c9cfda; }

/* ---------- Intro ---------- */
.intro { padding: 34px 0 6px; }
.intro h2 { font-size: 1.5rem; margin-bottom: 8px; }
.lead { color: var(--muted); max-width: 720px; }
.lead strong { color: var(--brand-ink); }

/* ---------- Section titles ---------- */
.section-title {
  font-size: 1.3rem; margin: 30px 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--line);
}

/* ---------- Services grid ---------- */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20,26,36,.08); border-color: #cfd8d4; }
.card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card h3 { font-size: 1.05rem; margin: 0; }
.card .tag {
  flex: none; font-size: .7rem; font-weight: 600;
  color: var(--brand-ink); background: #e6f2ef;
  border-radius: 999px; padding: 2px 9px;
}
.card p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.card .go {
  font-size: .82rem; color: var(--brand-ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.card .go::after { content: "←"; }

/* ---------- Contact ---------- */
.contact-note { color: var(--muted); margin-bottom: 16px; max-width: 720px; }

.contact-channels { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.channel {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 18px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  min-width: 220px; transition: border-color .12s ease, box-shadow .12s ease;
}
.channel:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.ch-name { font-size: .82rem; color: var(--muted); }
.ch-val { font-weight: 600; color: var(--brand-ink); }

/* form */
.cform {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  display: grid; gap: 16px; max-width: 640px;
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .93rem; }
.req { color: var(--danger); }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  border: 1px solid #cfd6da; border-radius: 10px;
  padding: 11px 13px; background: #fff; width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}
.field .hint { color: var(--muted); font-size: .8rem; }
.err { color: var(--danger); font-size: .8rem; display: none; }
.err.show { display: block; }

.btn-primary {
  font: inherit; font-weight: 700;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .12s ease;
}
.btn-primary:hover { background: var(--brand-ink); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; }
.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
.btn-spinner[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-result { font-size: .92rem; min-height: 1.2em; }
.form-result.ok { color: var(--ok); }
.form-result.err { color: var(--danger); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 44px; }
.foot-inner { padding-top: 18px; padding-bottom: 26px; color: var(--muted); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .head-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cform { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .btn-spinner { animation: none; }
}