/* ==========================================================================
   Nikan — کارگزاری فنی، مهندسی و حقوقی نیکان
   Brand palette (official style guide): navy #0F2D52 · steel #4F8BC9 ·
   gray #4A4A4A · white. RTL, mobile-first. Self-hosted Vazirmatn, inline icons.
   ========================================================================== */

/* ── Fonts: Vazirmatn (self-hosted variable subsets — no CDN) ────────────── */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/vazirmatn-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC, U+1EE00-1EEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --navy: #0F2D52;
  --navy-600: #17406f;      /* lighter navy for hover */
  --steel: #4F8BC9;
  --steel-700: #3d72aa;
  --gray: #4A4A4A;
  --heading: #10233d;
  --muted: #6b7684;
  --border: #d7e0ea;
  --tint: #eef3f8;          /* quote strip */
  --surface: #f5f8fb;       /* gallery band */
  --footer-bg: #0a2239;
  --copyright-bg: #06162a;
  --white: #ffffff;

  --maxw: 1200px;
  --pad: 40px;
  --focus: 0 0 0 3px rgba(79, 139, 201, 0.55);
}

/* ── Reset / base ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { color: var(--heading); margin: 0; line-height: 1.5; }
p { margin: 0; }
a { color: var(--steel-700); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.icon { display: inline-block; vertical-align: middle; flex: 0 0 auto; }

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

/* visible focus for keyboard users */
:where(a, button, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 1100;
  background: var(--navy); color: #fff; padding: 10px 16px; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; font-size: 14px; font-weight: 700;
  line-height: 1; border: 1px solid transparent; border-radius: 4px;
  cursor: pointer; transition: background-color .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap; background: none; color: inherit;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-600); }
.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { background: #e9f0f8; }
.btn--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn--outline:hover { background: rgba(255, 255, 255, .14); }
.btn--pill {
  min-height: 0; padding: 7px 14px; font-size: 12px; font-weight: 600;
  color: var(--steel-700); border: 1px solid var(--steel); border-radius: 4px;
}
.btn--pill:hover { background: var(--steel); color: #fff; }

.linklike {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--steel-700); font-weight: 600; font-size: inherit;
}
.linklike:hover { color: var(--navy); text-decoration: underline; }

.soon-badge {
  font-size: 10px; font-weight: 700; line-height: 1.6; padding: 1px 7px;
  border-radius: 20px; background: rgba(255, 255, 255, .22); color: #fff;
}
.soon-badge--dark { background: var(--steel); color: #fff; }

/* ── Header: utility bar + nav ───────────────────────────────────────────── */
.topbar { background: var(--navy); color: #cfe0f2; font-size: 12px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.topbar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__meta { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.topbar__phone { display: inline-flex; align-items: center; gap: 6px; color: #cfe0f2; }
.topbar__phone:hover { color: #fff; }
.topbar .linklike { color: #cfe0f2; font-size: 12px; }
.topbar .linklike:hover { color: #fff; }
.topbar :focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }

.nav { background: #fff; border-bottom: 1px solid #e3e8ee; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__logo { height: 52px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.5; }
.brand__name { font-weight: 800; font-size: 16px; color: var(--heading); }
.brand__sub { font-size: 11px; color: var(--muted); }

.nav__menu { display: flex; align-items: center; gap: 34px; }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__link { font-size: 15px; font-weight: 600; color: #2a3648; padding: 6px 2px; }
.nav__link:hover { color: var(--steel-700); }
.nav__link.is-active { color: var(--navy); }
.nav__cta { position: relative; }

.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; color: var(--navy); cursor: pointer;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--steel));
  padding: 76px 0;
}
.hero__watermark {
  position: absolute; left: -40px; top: -34px; color: rgba(255, 255, 255, .08);
  stroke-width: 1; pointer-events: none;
}
.hero__inner { position: relative; max-width: 640px; }
.eyebrow {
  display: inline-block; border: 1px solid rgba(255, 255, 255, .4); color: #fff;
  font-size: 12px; padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.hero__title { font-size: 42px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.hero__sub { font-size: 17px; color: rgba(255, 255, 255, .88); line-height: 1.9; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── Quote strip ─────────────────────────────────────────────────────────── */
.quote {
  background: var(--tint); color: var(--steel-700);
  text-align: center; font-style: italic; font-size: 15px; padding: 18px var(--pad);
}

/* ── Services ────────────────────────────────────────────────────────────── */
.services { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head__title { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.section-head__sub { color: var(--muted); font-size: 15px; }

.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--border);
  padding: 26px; display: flex; flex-direction: column;
}
.card__mark { position: absolute; color: var(--steel); font-size: 13px; line-height: 1; }
.card__mark--tr { top: 6px; inset-inline-end: 6px; }
.card__mark--tl { top: 6px; inset-inline-start: 6px; }
.card__mark--br { bottom: 6px; inset-inline-end: 6px; }
.card__mark--bl { bottom: 6px; inset-inline-start: 6px; }
.card__icon {
  width: 44px; height: 44px; border: 1px solid var(--steel); color: var(--steel);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card__title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.card__desc { font-size: 13.5px; color: var(--muted); line-height: 1.85; margin-bottom: 18px; flex: 1 1 auto; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__link { font-size: 12px; }

/* ── Trust stats ─────────────────────────────────────────────────────────── */
.stats { background: var(--navy); padding: 46px 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; color: #fff; }
.stat__badge {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .1);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.stat__value { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.stat__label { font-size: 12px; opacity: .78; }

/* ── Office photos ───────────────────────────────────────────────────────── */
.gallery { background: var(--surface); padding: 64px 0; }
.gallery__title { text-align: center; margin-bottom: 32px; font-size: 24px; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery__tile {
  height: 210px; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .55); background: linear-gradient(160deg, var(--steel), var(--navy));
}

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact { padding: 56px 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.info { border: 1px solid var(--border); padding: 30px; }
.info__title { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.info__row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: #2a3648; margin-bottom: 14px; }
.info__row:last-child { margin-bottom: 0; }
.info__row .icon { color: var(--steel); }
.info__row a { color: #2a3648; }
.map {
  border: 1px solid var(--border); background: var(--tint);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--steel-700); font-size: 13px; min-height: 220px; text-align: center;
}
.map .icon { color: var(--steel); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { background: var(--footer-bg); color: #cfd8e3; padding: 44px 0; font-size: 13px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer__brand { font-weight: 800; color: #fff; font-size: 15px; margin-bottom: 10px; }
.footer__blurb { line-height: 1.9; opacity: .82; }
.footer__head { font-weight: 700; color: #fff; font-size: 13px; margin-bottom: 10px; }
.footer__list { line-height: 2.2; opacity: .85; }
.footer__list a { color: #cfd8e3; }
.footer__list a:hover { color: #fff; }
.copyright { background: var(--copyright-bg); color: #8ea0b8; text-align: center; font-size: 12px; padding: 14px 20px; }
.footer :focus-visible, .copyright :focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }

/* ── Coming-soon modal ───────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 22, 42, .55); animation: fadeIn .2s ease; }
.modal__dialog {
  position: relative; width: 100%; max-width: 420px; background: #fff;
  border-top: 4px solid var(--steel); padding: 34px 28px 30px; text-align: center;
  box-shadow: 0 24px 60px rgba(10, 32, 57, .35); animation: modalIn .22s ease;
}
.modal__close {
  position: absolute; top: 12px; left: 12px; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 4px;
}
.modal__close:hover { background: var(--tint); color: var(--navy); }
.modal__icon {
  width: 60px; height: 60px; border-radius: 50%; background: var(--tint); color: var(--steel-700);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.modal__title { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.modal__body { color: var(--muted); font-size: 14.5px; line-height: 1.9; margin-bottom: 22px; }
.modal__action { width: 100%; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --pad: 20px; }
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(10, 32, 57, .12);
    padding: 8px 20px 20px; display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav { position: relative; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: 13px 4px; border-bottom: 1px solid var(--tint); }
  .nav__cta { margin-top: 14px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 32px; }
  .hero__sub { font-size: 16px; }
}

@media (max-width: 700px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
  .gallery__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .topbar__name { display: none; }
  .topbar__inner { justify-content: center; }
}

@media (max-width: 560px) {
  .hero { padding: 56px 0; }
  .hero__title { font-size: 26px; }
  .services { padding: 48px 0; }
  .services__grid { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
