:root {
  --navy-950: #041526;
  --navy-900: #06233f;
  --navy-800: #0b3a6a;
  --blue-600: #1565c0;
  --blue-500: #1e88e5;
  --cyan: #00b4d8;
  --cyan-2: #48cae4;
  --ice: #eef6fc;
  --card: #ffffff;
  --text: #0d2137;
  --muted: #5b7089;
  --line: rgba(11, 58, 106, 0.12);
  --shadow: 0 18px 50px rgba(6, 35, 63, 0.12);
  --radius: 22px;
  --header: 72px;
  --dock: 76px;
  --font: "Vazirmatn", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--ice);
  line-height: 1.8;
  overflow-x: hidden;
  padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.skip-link {
  position: absolute; right: 12px; top: -40px; background: var(--blue-500); color: #fff;
  padding: 8px 12px; border-radius: 10px; z-index: 80;
}
.skip-link:focus { top: 12px; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(820px, calc(100% - 32px)); }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(4, 21, 38, 0.88);
  backdrop-filter: blur(16px);
  color: #fff;
  min-height: var(--header);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: var(--header);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.brand strong { display: block; font-size: 1.02rem; }
.brand small { display: none; color: rgba(255,255,255,.72); font-size: .72rem; }
.desktop-nav, .header-phone, .header-cta { display: none; }
.menu-toggle {
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.1); display: grid; place-items: center; gap: 5px; padding: 12px 11px;
}
.menu-toggle span { width: 20px; height: 2px; background: #fff; display: block; transition: .2s; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(-45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(45deg); }
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(4,21,38,.45); z-index: 50;
}
.mobile-nav {
  position: fixed; top: 0; bottom: 0; right: 0; width: min(86vw, 360px);
  background: #fff; z-index: 60; transform: translateX(110%);
  transition: transform .28s ease; padding: 18px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow);
}
.mobile-nav.is-open { transform: none; }
.mobile-nav a {
  padding: 14px 12px; border-radius: 14px; font-weight: 600;
}
.mobile-nav a:hover, .mobile-nav a:focus { background: var(--ice); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--ice); font-size: 26px;
}
.mobile-nav-cta { margin-top: auto; display: grid; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: 14px; font-weight: 700;
  border: 1px solid transparent; transition: .2s transform, .2s background;
}
.btn:active { transform: scale(.98); }
.btn-lg { min-height: 52px; padding: 12px 22px; }
.btn-primary { background: linear-gradient(135deg, var(--blue-500), var(--cyan)); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.btn-light { background: #fff; color: var(--navy-800); }
.section .btn-ghost, .contact-form .btn, .project-side .btn-ghost {
  background: #fff; color: var(--navy-800); border-color: var(--line);
}

.hero {
  position: relative; color: #fff;
  background: radial-gradient(1200px 500px at 80% -10%, rgba(0,180,216,.35), transparent 50%),
              linear-gradient(160deg, var(--navy-950), var(--navy-800) 55%, #0a4f86);
  padding: 36px 0 28px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(72,202,228,.28), transparent 68%);
}
.hero-grid { display: grid; gap: 28px; position: relative; }
.kicker {
  display: inline-flex; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: var(--cyan-2); font-size: .82rem; font-weight: 700; margin: 0 0 12px;
}
.section .kicker, .page-hero .kicker { background: rgba(30,136,229,.12); color: var(--blue-600); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 12px; }
h1 { font-size: clamp(1.7rem, 6vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3.4vw, 2.1rem); }
.lede, .body-text { color: rgba(255,255,255,.86); font-size: 1.02rem; }
.section .lede, .section .body-text, .page-hero .lede { color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-panel, .media-fallback {
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.16); border-radius: 28px; padding: 28px;
  min-height: 240px; box-shadow: var(--shadow);
}
.hero-chip {
  display: inline-block; background: rgba(0,180,216,.2); border-radius: 999px; padding: 4px 10px; margin-bottom: 16px;
}
.hero-dots { display: flex; gap: 8px; margin-top: 28px; }
.hero-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan-2); opacity: .5; }
.feature-row, .stats-grid, .cards-3, .cards-4, .team-grid, .portfolio-grid, .contact-grid, .contact-cards {
  display: grid; gap: 14px;
}
.feature-card, .stat-card, .value-card, .service-card, .team-card, .work-card, .quote-card, .contact-card, .contact-form {
  background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature-card { display: flex; gap: 12px; padding: 18px; align-items: flex-start; }
.feature-icon, .service-icon { font-size: 1.4rem; color: var(--blue-500); }
.feature-card h2, .service-card h3, .value-card h3, .team-card h3, .work-meta h3 { font-size: 1.05rem; }
.feature-card p, .service-card p, .value-card p, .team-card p, .work-meta p { margin: 0; color: var(--muted); }

.section { padding: 56px 0; }
.section.alt { background: #fff; }
.section-head { margin-bottom: 28px; max-width: 640px; }
.section-head p { color: var(--muted); }
.stats-section { padding-top: 8px; }
.stat-card { padding: 22px; text-align: center; }
.stat-card strong { display: block; font-size: 2rem; color: var(--navy-800); }
.split { display: grid; gap: 24px; align-items: center; }
.split-media img, .media-fallback, .project-cover img, .work-cover img, .team-photo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 24px;
}
.media-fallback {
  min-height: 240px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--navy-800), var(--cyan));
}
.mission-grid { display: grid; gap: 12px; margin: 18px 0 22px; }
.mission-grid article { background: #fff; border-radius: 18px; padding: 16px; border: 1px solid var(--line); }
.value-card, .service-card, .quote-card { padding: 22px; }
.value-card span { color: var(--blue-500); font-weight: 800; }
.center-cta { text-align: center; margin-top: 28px; }

.work-card { overflow: hidden; color: var(--text); }
.work-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--navy-800), var(--blue-500)); }
.work-meta { padding: 16px; }
.work-meta small { color: var(--blue-500); font-weight: 700; }
.team-photo {
  aspect-ratio: 1; border-radius: 22px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--navy-800), var(--cyan));
  display: grid; place-items: center; color: #fff; font-size: 1.8rem; font-weight: 800;
}
.team-card { padding: 16px; }
.team-card .role { color: var(--blue-500); font-weight: 700; margin-bottom: 8px; }
.quote-card p { font-size: 1.02rem; }
.quote-card footer { display: flex; flex-direction: column; margin-top: 16px; color: var(--muted); }
.partners-row { display: flex; flex-wrap: wrap; gap: 10px; }
.partner-chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 700;
}
.faq-item { background: #fff; border-radius: 18px; padding: 4px 16px; box-shadow: var(--shadow); margin-bottom: 10px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.filter-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 16px;
  white-space: nowrap; font-weight: 700;
}
.chip.is-active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.work-card.is-hidden { display: none; }

.page-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
  color: #fff; padding: 42px 0 36px;
}
.contact-form { padding: 22px; display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-weight: 700; }
.field-input {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  min-height: 48px; background: var(--ice); font-size: 1rem;
}
textarea.field-input { min-height: 140px; resize: vertical; }
.error { color: #c62828; font-weight: 500; }
.contact-card { padding: 18px; display: grid; gap: 4px; }
.contact-card span { color: var(--blue-500); font-weight: 700; font-size: .85rem; }
.project-layout { display: grid; gap: 18px; margin-bottom: 28px; }
.project-side { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 12px; }

.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--blue-500) 70%, var(--cyan));
  color: #fff; padding: 42px 0;
}
.cta-inner { display: grid; gap: 18px; }
.site-footer { background: var(--navy-950); color: rgba(255,255,255,.86); padding: 42px 0 28px; }
.footer-grid { display: grid; gap: 28px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1);
}
.socials { display: flex; gap: 14px; }
.footer-brand { margin-bottom: 12px; color: #fff; }

.mobile-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.96); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.mobile-dock a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; border-radius: 14px; font-weight: 800; font-size: .92rem; color: var(--navy-800);
}
.mobile-dock small { font-size: .68rem; color: var(--muted); font-weight: 500; }
.mobile-dock a:nth-child(2) { color: #0a7d4f; }

.toast-stack { position: sticky; top: calc(var(--header) + 8px); z-index: 35; width: min(1160px, calc(100% - 32px)); margin: 12px auto 0; }
.toast { background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); border-right: 4px solid var(--blue-500); }
.toast-error { border-color: #c62828; }
.toast-success { border-color: #2e7d32; }

.reveal { animation: rise .6s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 720px) {
  .brand small { display: block; }
  .feature-row { grid-template-columns: repeat(3, 1fr); }
  .stats-grid, .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .cards-4, .team-grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .split, .contact-grid, .project-layout, .cta-inner { grid-template-columns: 1.15fr .85fr; align-items: center; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 980px) {
  body { padding-bottom: 0; }
  .mobile-dock, .menu-toggle { display: none; }
  .desktop-nav { display: flex; gap: 18px; font-weight: 600; }
  .desktop-nav a { opacity: .86; }
  .desktop-nav a:hover { opacity: 1; }
  .header-phone, .header-cta { display: inline-flex; }
  .header-actions { display: flex; gap: 8px; align-items: center; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-4, .team-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 72px 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
}
