/* ===== Variables ===== */
:root {
  --color-bg: #0a0e14;
  --color-bg-light: #111820;
  --color-bg-card: #161d27;
  --color-surface: #1c2533;
  --color-border: #2a3544;
  --color-text: #e8ecf1;
  --color-text-muted: #8b9aab;
  --color-accent: #676527;
  --color-accent-light: #8a8838;
  --color-accent-dark: #4f4d1e;
  --color-text-accent: #C2A49B;
  --color-steel: #4a6fa5;
  --font: 'Vazirmatn', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 90px;
  --hero-overlay-start: 96%;
  --hero-overlay-mid: 85%;
  --hero-overlay-end: 92%;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(10, 14, 20, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.header .logo-img {
  height: auto;
  max-height: calc(var(--header-height) - 20px);
  width: auto;
  max-width: min(300px, calc(100vw - 8rem));
  object-fit: contain;
  object-position: right center;
}

.footer .logo-img {
  height: 96px;
  max-width: 360px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--color-text);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--color-accent) !important;
  color: var(--color-bg) !important;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600 !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--color-accent-light) !important;
  color: var(--color-bg) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(103, 101, 39, 0.3);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-text-accent);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 14, 20, var(--hero-overlay-start)) 0%,
    rgba(10, 14, 20, var(--hero-overlay-mid)) 50%,
    rgba(10, 14, 20, var(--hero-overlay-end)) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--header-height);
  padding-bottom: 4rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(103, 101, 39, 0.15);
  border: 1px solid rgba(103, 101, 39, 0.4);
  border-radius: 50px;
  color: var(--color-text-accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease forwards;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s 0.1s ease forwards;
  opacity: 0;
}

.hero h1 .highlight {
  color: var(--color-text-accent);
}

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s 0.2s ease forwards;
  opacity: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
  animation: fadeUp 0.8s 0.3s ease forwards;
  opacity: 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  animation: fadeUp 0.8s 0.4s ease forwards;
  opacity: 0;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-accent);
  line-height: 1;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  z-index: 2;
  animation: fadeUp 1s 0.6s ease forwards;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s infinite;
}

/* ===== Sections ===== */
.section {
  padding: 6rem 0;
}

.section-dark {
  background: var(--color-bg-light);
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-desc {
  margin-inline: auto;
}

.section-tag {
  display: inline-block;
  color: var(--color-text-accent);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--color-text-muted);
  max-width: 500px;
  font-size: 1.05rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-images {
  position: relative;
}

.about-img-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img-main img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-img-secondary {
  position: absolute;
  bottom: -2rem;
  left: -2rem;
  width: 55%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 4px solid var(--color-bg);
  box-shadow: var(--shadow);
}

.about-img-secondary img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.about-experience {
  position: absolute;
  top: 2rem;
  left: -1.5rem;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.exp-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.exp-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.about-content strong {
  color: var(--color-text);
}

.about-features {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.about-features li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(103, 101, 39, 0.15);
  color: var(--color-text-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.about-features strong {
  display: block;
  margin-bottom: 0.2rem;
}

.about-features span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 101, 39, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.service-img {
  height: 180px;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
  transform: scale(1.08);
}

.service-body {
  padding: 1.5rem;
}

.service-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
}

.service-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== CTA Banner ===== */
.cta-banner {
  position: relative;
  padding: 6rem 0;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
}

.cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.85);
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-content p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 1rem;
  width: 100%;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item:not(.gallery-item--large):not(.gallery-item--wide) {
  aspect-ratio: 1;
}

.gallery-item--large {
  grid-row: span 2;
}

.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(to top, rgba(10, 14, 20, 0.9), transparent);
  font-weight: 600;
  font-size: 0.95rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-list strong {
  display: block;
  margin-bottom: 0.2rem;
}

.contact-list span {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.contact-list a {
  color: var(--color-text-muted);
  transition: var(--transition);
}

.contact-list a:hover {
  color: var(--color-text-accent);
}

.contact-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(103, 101, 39, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}

.footer-brand p {
  color: var(--color-text-muted);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-brand h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--color-text);
}

.footer-about {
  line-height: 1.8;
  max-width: 100% !important;
}

.footer-about strong {
  color: var(--color-text);
}

.footer-about-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-accent);
  transition: var(--transition);
}

.footer-about-link:hover {
  color: var(--color-text);
}

.footer-social {
  margin-top: 1.8rem;
}

.footer-links .footer-social h4 {
  margin-top: 0;
}

.footer-social h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: var(--transition);
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-link:hover {
  color: var(--color-text-accent);
  border-color: var(--color-accent);
  background: rgba(103, 101, 39, 0.15);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-text-accent);
}

.footer-map h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.footer-map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 10;
}

.footer-map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(20%) contrast(1.05);
}

.footer-map-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-map-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-accent);
  transition: var(--transition);
}

.footer-map-link:hover {
  color: var(--color-text);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-img-secondary {
    left: auto;
    right: -1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-map {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 84px;
  }

  .header {
    width: 100%;
    max-width: 100vw;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    isolation: isolate;
    transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  }

  .header.scrolled {
    background: rgba(10, 14, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(42, 53, 68, 0.4);
  }

  .nav.container {
    width: 100%;
    max-width: 100%;
    padding-inline: 1rem;
  }

  .header .logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 56px);
  }

  .header .logo-img {
    max-height: 60px;
    max-width: 100%;
  }

  .nav {
    gap: 0.5rem;
    position: relative;
  }

  .nav-toggle {
    display: flex;
    margin-inline-start: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 1003;
  }

  .nav-menu {
    display: flex;
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    z-index: 1001;
    background: rgba(10, 14, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(42, 53, 68, 0.4);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-18px);
    transition:
      opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.4s;
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-menu a {
    opacity: 0;
    transform: translateY(-10px);
    transition:
      opacity 0.35s ease,
      transform 0.35s ease,
      color 0.3s ease;
  }

  .nav-menu.open a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-menu.open li:nth-child(1) a { transition-delay: 0.05s; }
  .nav-menu.open li:nth-child(2) a { transition-delay: 0.1s; }
  .nav-menu.open li:nth-child(3) a { transition-delay: 0.15s; }
  .nav-menu.open li:nth-child(4) a { transition-delay: 0.2s; }
  .nav-menu.open li:nth-child(5) a { transition-delay: 0.25s; }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .gallery-item,
  .gallery-item--large,
  .gallery-item--wide {
    width: 100%;
    min-height: unset;
    aspect-ratio: 16 / 10;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
