*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --navy: #132a45;
  --navy-deep: #0c1b2e;
  --brick: #b85a2a;
  --brick-hover: #9a4520;
  --sand: #f4efe6;
  --paper: #fbf8f3;
  --ink: #1c1917;
  --muted: #5c564e;
  --line: #e4d9c8;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(19, 42, 69, 0.12);
  --radius: 18px;
  --header: 84px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  inset-inline-start: -999px;
  top: 8px;
  background: var(--brick);
  color: #fff;
  padding: 8px 14px;
  z-index: 100;
}

.skip-link:focus {
  inset-inline-start: 8px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand img {
  height: 30px;
  width: auto;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: color 200ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--navy);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--brick);
  color: #fff;
}

.btn-accent:hover {
  background: var(--brick-hover);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header));
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 27, 46, 0.18) 0%, rgba(12, 27, 46, 0.78) 72%),
    linear-gradient(90deg, rgba(12, 27, 46, 0.55), transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 72px 0 88px;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #efd8c4;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.15;
  font-weight: 800;
}

.hero p {
  margin: 0 0 28px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats {
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat {
  padding: 28px 22px;
  border-inline-start: 1px solid var(--line);
}

.stat:first-child {
  border-inline-start: 0;
}

.stat b {
  display: block;
  font-size: 1.8rem;
  color: var(--navy);
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 88px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 36px;
}

.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--navy);
  line-height: 1.3;
}

.lede {
  color: var(--muted);
  max-width: 52ch;
  margin: 8px 0 0;
}

.page-hero {
  padding: 64px 0 24px;
}

.cards-3,
.cards-2 {
  display: grid;
  gap: 22px;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cards-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card,
.service,
.board-card,
.cert-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.service svg,
.contact-item svg,
.footer-contact svg {
  width: 28px;
  height: 28px;
}

.service h3,
.board-card h3,
.cert-card h3 {
  margin: 16px 0 8px;
  color: var(--navy);
}

.service p,
.muted {
  color: var(--muted);
  margin: 0;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 360px;
  color: #fff;
  isolation: isolate;
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.project-card:hover img {
  transform: scale(1.06);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(12, 27, 46, 0.88));
}

.project-meta {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  width: max-content;
}

.project-meta h3 {
  margin: 12px 0 6px;
  font-size: 1.2rem;
}

.band {
  background: var(--navy-deep);
  color: #fff;
}

.band h2 {
  color: #fff;
}

.band .lede {
  color: rgba(255, 255, 255, 0.72);
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.list-check li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.list-check svg {
  width: 20px;
  height: 20px;
  color: var(--brick);
  flex: none;
  margin-top: 6px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.split img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
}

.cta-band {
  background:
    linear-gradient(120deg, rgba(12, 27, 46, 0.88), rgba(184, 90, 42, 0.72)),
    url("../img/hero.jpg") center/cover;
  color: #fff;
  border-radius: 28px;
  padding: 56px;
}

.cta-band h2 {
  margin-top: 0;
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: right;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--sand);
  color: var(--navy);
  font-weight: 700;
}

.status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--sand);
}

.status.live {
  background: #efe3d4;
  color: var(--brick);
}

.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.gallery img:first-child {
  grid-row: span 2;
  height: 452px;
}

.project-block {
  margin-bottom: 72px;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
textarea,
select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.alert {
  padding: 14px 16px;
  border-radius: 12px;
  background: #e9f6ee;
  color: #14532d;
}

.alert.error {
  background: #fde8e8;
  color: #9f1239;
}

.map {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--radius);
}

.contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.contact-item svg {
  color: var(--brick);
}

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.86);
  padding-top: 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.1fr;
  gap: 32px;
  padding-bottom: 36px;
}

.footer-logo {
  height: 32px;
  width: auto;
  margin-bottom: 14px;
  filter: brightness(0) invert(1) contrast(1.1);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #fff;
}

.footer-links,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  background: var(--sand);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

@media (max-width: 980px) {
  .stats-grid,
  .cards-3,
  .cards-2,
  .split,
  .footer-grid,
  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery img:first-child {
    grid-row: auto;
    height: 240px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 20px;
    top: calc(var(--header) + 8px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .stats-grid,
  .cards-3,
  .cards-2,
  .split,
  .footer-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 78vh;
  }

  .cta-band {
    padding: 28px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
