/* =========================================================
   سازه جوش — Design System & Styles
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Steel palette */
  --steel-950: #0b0f14;
  --steel-900: #11161c;
  --steel-800: #1b232c;
  --steel-700: #2b3642;
  --steel-500: #5b6b7a;
  --steel-300: #9aa7b4;
  --steel-200: #c7d0d9;
  --steel-100: #eef3f8;

  /* Spark accent */
  --spark-600: #ea580c;
  --spark-500: #f97316;
  --spark-400: #ffb02e;
  --spark-soft: rgba(249, 115, 22, 0.12);

  /* Semantic */
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1b232c;
  --text-soft: #5b6b7a;
  --heading: #0b0f14;
  --border: #e3e8ee;
  --white: #ffffff;

  /* Shape & motion */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(11, 15, 20, 0.06);
  --shadow: 0 12px 30px rgba(11, 15, 20, 0.1);
  --shadow-lg: 0 24px 60px rgba(11, 15, 20, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1180px;

  --font: "Vazirmatn", system-ui, "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.35; font-weight: 800; }
section { position: relative; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; right: 16px; top: -60px; z-index: 2000;
  background: var(--spark-500); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); transition: top .25s var(--ease);
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--spark-400); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--steel-950); }
.section-dark .section-title { color: var(--white); }

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Section headers ---------- */
.section-head { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .04em;
  color: var(--spark-600); background: var(--spark-soft);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow-light { color: var(--spark-400); background: rgba(255, 176, 46, 0.14); }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.6rem); letter-spacing: -0.01em; }
.section-desc { margin-top: 16px; color: var(--text-soft); font-size: 1.05rem; }
.section-desc-light { color: var(--steel-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .98rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--spark-500), var(--spark-600));
  color: #fff; box-shadow: 0 10px 24px rgba(234, 88, 12, 0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(234, 88, 12, 0.42); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-3px); }
.btn-dark { background: var(--steel-950); color: #fff; }
.btn-dark:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
  padding: 14px 0;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.brand-mark img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: -0.01em; }
.brand-tag { font-size: .72rem; color: var(--steel-200); font-weight: 500; }
.scrolled .brand-name { color: var(--heading); }
.scrolled .brand-tag { color: var(--text-soft); }

/* Nav */
.main-nav ul { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-weight: 600; font-size: .96rem; color: rgba(255,255,255,.9);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; right: 14px; left: 14px; bottom: 2px; height: 2px;
  background: var(--spark-500); transform: scaleX(0); transform-origin: right; transition: transform .25s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.scrolled .nav-link { color: var(--text); }
.nav-link:hover, .nav-link.active { color: var(--spark-600); }

.header-cta { padding: 10px 18px; font-size: .9rem; }
.header-cta span { direction: ltr; }

/* Mobile toggle */
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; position: relative; }
.nav-toggle span {
  position: absolute; right: 11px; left: 11px; height: 2.5px; border-radius: 2px;
  background: #fff; transition: transform .3s var(--ease), opacity .2s var(--ease), background .3s;
}
.scrolled .nav-toggle span { background: var(--heading); }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 29px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 140px 0 90px; overflow: hidden; color: #fff;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../assets/img/hero-welder.jpg") center/cover no-repeat;
  transform: scale(1.05);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,15,20,.92) 0%, rgba(11,15,20,.72) 45%, rgba(11,15,20,.4) 100%),
    linear-gradient(0deg, rgba(11,15,20,.85), rgba(11,15,20,.1));
}
.hero-content { max-width: 720px; }
.hero-title {
  font-size: clamp(2.3rem, 6vw, 4.3rem); font-weight: 900; line-height: 1.2;
  letter-spacing: -0.02em; color: #fff; margin: 10px 0 20px;
}
.hero-title .accent {
  color: var(--spark-400);
  position: relative; white-space: nowrap;
}
.hero-sub { font-size: clamp(1rem, 2vw, 1.22rem); color: var(--steel-200); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 46px;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14);
}
.hero-badges li { font-size: .95rem; color: var(--steel-200); }
.hero-badges span { display: block; font-weight: 800; font-size: 1.15rem; color: #fff; }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 46px; border: 2px solid rgba(255,255,255,.5); border-radius: 20px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px;
  background: #fff; border-radius: 50%; animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 26px; } 100% { opacity: 0; } }

/* ---------- Cards / Services ---------- */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 30px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  height: 100%;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.service-icon {
  display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px;
  background: var(--spark-soft); color: var(--spark-600); margin-bottom: 20px;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.service-icon svg { width: 30px; height: 30px; }
.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--spark-500), var(--spark-600)); color: #fff; transform: rotate(-6deg) scale(1.05);
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.service-card p { color: var(--text-soft); font-size: .98rem; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.about-badge {
  position: absolute; bottom: -24px; left: -24px;
  background: linear-gradient(135deg, var(--spark-500), var(--spark-600)); color: #fff;
  border-radius: var(--radius); padding: 18px 26px; box-shadow: var(--shadow);
  text-align: center;
}
.about-badge strong { display: block; font-size: 2rem; font-weight: 900; line-height: 1; }
.about-badge span { font-size: .9rem; }
.about-text p { color: var(--text-soft); margin-bottom: 18px; }
.about-text .section-title { margin-bottom: 18px; }

.check-list { display: grid; gap: 12px; margin: 22px 0 30px; }
.check-list li { position: relative; padding-right: 34px; font-weight: 500; color: var(--text); }
.check-list li::before {
  content: ""; position: absolute; right: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--spark-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ea580c'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ---------- Stats ---------- */
.stats-section { background: var(--steel-950); color: #fff; padding: clamp(48px, 7vw, 86px) 0; }
.stats-grid { gap: 20px; }
.stat { text-align: center; padding: 20px; }
.stat-num {
  display: block; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--spark-400), var(--spark-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-num::after { content: "+"; -webkit-text-fill-color: var(--spark-500); }
.stat-label { display: block; margin-top: 12px; color: var(--steel-300); font-weight: 500; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 48px 22px 18px; color: #fff; font-weight: 700;
  background: linear-gradient(0deg, rgba(11,15,20,.9), transparent);
  transform: translateY(8px); opacity: 0; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.gallery-item figcaption span {
  display: inline-block; font-size: .72rem; font-weight: 700; color: #0b0f14;
  background: var(--spark-400); padding: 3px 12px; border-radius: 999px; margin-bottom: 8px;
}
.gallery-item:hover figcaption, .gallery-item:focus-within figcaption { opacity: 1; transform: translateY(0); }

/* ---------- Process ---------- */
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process-step {
  position: relative; background: var(--steel-900); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 34px 26px; color: #fff;
  transition: transform .3s var(--ease), border-color .3s;
}
.process-step:hover { transform: translateY(-6px); border-color: var(--spark-500); }
.step-num {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, var(--spark-500), var(--spark-600)); color: #fff;
  font-size: 1.5rem; font-weight: 900; margin-bottom: 18px;
}
.process-step h3 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.process-step p { color: var(--steel-300); font-size: .96rem; }
/* connector line */
.process-list .process-step:not(:last-child)::after {
  content: ""; position: absolute; top: 55px; left: -14px; width: 28px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--spark-500) 0 6px, transparent 6px 12px);
}

/* ---------- Why us ---------- */
.feature {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--steel-950); color: var(--spark-400); margin-bottom: 6px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--text-soft); font-size: .96rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--spark-600), var(--spark-400));
  color: #fff; padding: clamp(44px, 6vw, 72px) 0;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cta-inner p { color: rgba(255,255,255,.92); margin-top: 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 44px; }
.contact-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--spark-500); }
.contact-icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--spark-soft); color: var(--spark-600); margin-bottom: 16px;
}
.contact-icon svg { width: 28px; height: 28px; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.contact-card p { color: var(--text-soft); font-size: .96rem; direction: ltr; }

/* ---------- Footer ---------- */
.site-footer { background: var(--steel-950); color: var(--steel-300); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: var(--steel-300); }
.footer-about { margin-top: 18px; font-size: .95rem; max-width: 320px; line-height: 1.9; }
.footer-col h4 { color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 12px; }
.footer-col a { color: var(--steel-300); transition: color .2s var(--ease), padding .2s var(--ease); font-size: .95rem; }
.footer-col a:hover { color: var(--spark-400); padding-left: 4px; }
.footer-contact li { font-size: .95rem; direction: rtl; }
.footer-contact a { direction: ltr; display: inline-block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 26px; left: 26px; z-index: 900;
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--spark-500), var(--spark-600)); color: #fff;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: all .3s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; display: none;
  background: rgba(11,15,20,.92); align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(4px);
}
.lightbox.open { display: flex; animation: fade .25s var(--ease); }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox-close { position: absolute; top: 20px; left: 24px; color: #fff; font-size: 2.6rem; line-height: 1; width: 48px; height: 48px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Mobile nav panel base ---------- */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(11,15,20,.5); z-index: 998;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease);
}
.nav-backdrop.show { opacity: 1; visibility: visible; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .process-list .process-step::after { display: none; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .header-cta { display: none; }
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); z-index: 999;
    background: var(--steel-950); padding: 100px 28px 40px;
    transform: translateX(100%); transition: transform .35s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,.4); overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .main-nav .nav-link { color: #fff; font-size: 1.1rem; padding: 14px 16px; border-radius: 12px; }
  .main-nav .nav-link::after { display: none; }
  .main-nav .nav-link:hover, .main-nav .nav-link.active { background: rgba(255,255,255,.08); color: var(--spark-400); }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .grid-3, .grid-4, .gallery-grid, .process-list, .contact-grid, .footer-grid, .about-inner { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: auto; padding: 130px 0 80px; }
  .hero-overlay { background: linear-gradient(0deg, rgba(11,15,20,.92), rgba(11,15,20,.5)); }
  .about-badge { left: 50%; transform: translateX(-50%); bottom: -22px; }
  .cta-inner { flex-direction: column; text-align: center; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .to-top { bottom: 18px; left: 18px; }
  .section-head { text-align: center; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-badges { gap: 18px; }
  .brand-tag { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
