/* ═══════════════════════════════════════════
   پیروز گاز — Design System (Industrial)
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────── */
html { scroll-behavior: smooth; }

:root {
  --orange:       #C8490E;
  --orange-dark:  #A33A09;
  --orange-light: #E86A2E;
  --orange-mute:  rgba(200, 73, 14, 0.10);
  --copper:       #D4784A;
  --gold:         #B8922E;

  --navy:         #0F1724;
  --navy-mid:     #1A2333;
  --navy-light:   #243044;
  --navy-soft:    #2E3D55;

  --gray-900:     #0F172A;
  --gray-700:     #334155;
  --gray-500:     #64748B;
  --gray-300:     #CBD5E1;
  --gray-100:     #F1F5F9;
  --gray-50:      #F8FAFC;
  --white:        #FFFFFF;

  --bg:           var(--gray-50);
  --surface:      var(--white);
  --text:         var(--gray-900);
  --text-muted:   var(--gray-500);
  --border:       #E2E8F0;
  --border-soft:  rgba(15, 23, 36, 0.06);

  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  --shadow-sm:    0 1px 3px rgba(15, 23, 36, 0.04), 0 1px 2px rgba(15, 23, 36, 0.02);
  --shadow:       0 8px 24px rgba(15, 23, 36, 0.06);
  --shadow-lg:    0 20px 48px rgba(15, 23, 36, 0.10);
  --shadow-premium: 0 24px 64px rgba(15, 23, 36, 0.12);

  --nav-h:        72px;
  --font:         'Vazirmatn', system-ui, sans-serif;
  --ease:         cubic-bezier(.4, 0, .2, 1);
  --ease-out:     cubic-bezier(.16, 1, .3, 1);
  --section-y:    clamp(72px, 8vw, 112px);
}

[data-theme="dark"] {
  --bg:         #0A0F18;
  --surface:    #121B28;
  --text:       #E8ECF0;
  --text-muted: #94A3B8;
  --border:     rgba(255,255,255,.08);
  --border-soft: rgba(255,255,255,.04);
  --gray-100:   #1A2333;
  --gray-50:    #121B28;
  --white:      #121B28;
  --orange-mute: rgba(200, 73, 14, 0.18);
  --shadow:     0 8px 32px rgba(0,0,0,.35);
  --shadow-lg:  0 20px 56px rgba(0,0,0,.45);
  --shadow-premium: 0 24px 64px rgba(0,0,0,.55);
}

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
  max-width: 100%;
}
html[dir="rtl"], html:not([dir]) { direction: rtl; }
html[dir="ltr"] { direction: ltr; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
  transition: background .3s, color .3s;
}
/* fallback برای مرورگرهایی که overflow-x: clip ندارند */
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }
address { font-style: normal; }

/* ── Container ──────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px)  { .wrap { padding-inline: 32px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 48px; } }

.section { padding-block: var(--section-y); }

/* ── Typography ─────────────────────────── */
.t-hero   { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.t-title  { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.25; }
.t-h3     { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.t-body   { font-size: 1rem; line-height: 1.8; }
.t-small  { font-size: .875rem; line-height: 1.6; }
.t-label  { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.t-muted  { color: var(--text-muted); }

/* ── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  height: 48px;
  font-size: .9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all .2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 55%, var(--orange-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(200,73,14,.28);
  border: 1px solid rgba(255,255,255,.08);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  box-shadow: 0 8px 24px rgba(200,73,14,.38);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-white {
  background: #fff;
  color: var(--orange);
  font-weight: 700;
}
.btn-white:hover { background: #f5f5f5; }

.btn-sm { height: 38px; padding: 0 18px; font-size: .875rem; border-radius: var(--radius-sm); }
.btn-lg { height: 54px; padding: 0 36px; font-size: 1rem; }

/* ── Navbar ─────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; inset-inline: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(15, 23, 36, .78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.navbar.scrolled {
  background: rgba(15, 23, 36, .96);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  border-bottom-color: rgba(255,255,255,.04);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  min-width: 0;
  flex-shrink: 1;
}
.navbar__logo-mark {
  width: 34px; height: 34px;
  background: var(--orange);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.navbar__logo-mark svg { width: 18px; height: 18px; }
.navbar__logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  padding: 6px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px; right: 14px; left: 14px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.lang-switcher button {
  border: none;
  background: transparent;
  color: rgba(255,255,255,.65);
  font-family: inherit;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 5px 7px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}
.lang-switcher button:hover { color: #fff; }
.lang-switcher button.is-active {
  background: var(--orange);
  color: #fff;
}
.mobile-nav .lang-switcher {
  margin: 12px 16px 4px;
  width: fit-content;
  border-color: rgba(255,255,255,.2);
}
html[dir="ltr"] .side-nav { direction: ltr; }
html[dir="rtl"] .side-nav { direction: rtl; }
html[dir="ltr"] .nav-links { direction: ltr; }
html[dir="rtl"] .nav-links { direction: rtl; }

.theme-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  font-size: .95rem;
}
.theme-btn:hover { border-color: var(--orange); color: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.hamburger__bar {
  width: 20px; height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.hamburger.open .hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger__bar:nth-child(2) { opacity: 0; }
.hamburger.open .hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: var(--nav-h); right: 0; left: 0; bottom: 0;
  z-index: 199;
  background: rgba(15, 21, 32, .97);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.mobile-nav.open { opacity: 1; pointer-events: all; }

.mobile-nav__link {
  font-size: 1.3rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  padding: 12px 32px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  width: 240px;
  text-align: center;
}
.mobile-nav__link:hover { color: #fff; background: rgba(255,255,255,.06); }

@media (max-width: 1023px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }
  /* دکمه CTA در موبایل جایش در منوی همبرگری / هیرو است — باعث اسکرول افقی می‌شد */
  .nav-actions > .btn { display: none; }
}

@media (max-width: 400px) {
  /* زبان در منوی موبایل هم هست؛ در عرض خیلی کم فقط همبرگر + تم بماند */
  .navbar .lang-switcher { display: none; }
  .navbar__logo-text { max-width: 36vw; font-size: 1rem; }
  .nav-actions { gap: 6px; }
}

/* ── Skip link ──────────────────────────── */
.skip-link {
  position: absolute; top: -100%; right: 0;
  background: var(--orange); color: #fff;
  padding: 8px 20px; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; z-index: 999;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ── Scroll progress ────────────────────── */
.scroll-bar {
  position: fixed; top: 0; right: 0; left: 0;
  height: 2px; z-index: 201;
  background: var(--orange);
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 50ms linear;
}

/* ── Back to top ────────────────────────── */
.back-top {
  position: fixed; bottom: 24px; left: 24px;
  width: 40px; height: 40px;
  background: var(--navy); color: #fff;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all .25s var(--ease);
  z-index: 100;
  font-size: .9rem;
}
.back-top.show { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-top:hover { background: var(--orange); }

/* ── Section label ──────────────────────── */
.s-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--orange);
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.s-label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

/* ── Cards ──────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow .25s, border-color .25s, transform .25s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(200,73,14,.2);
  transform: translateY(-3px);
}
.card-flat { background: var(--gray-100); border: none; }
.card-flat:hover { background: var(--surface); box-shadow: var(--shadow); }

/* ── Icon box ───────────────────────────── */
.icon-box {
  width: 48px; height: 48px;
  background: var(--orange-mute);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
  transition: background .2s;
}
.card:hover .icon-box { background: var(--orange); color: #fff; }

/* ── Divider ────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); }

/* ── Forms ──────────────────────────────── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .875rem; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field-ctrl {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: .9375rem;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.field-ctrl::placeholder { color: var(--gray-300); }
.field-ctrl:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-mute);
}
textarea.field-ctrl { height: auto; padding-block: 14px; resize: vertical; min-height: 110px; }
select.field-ctrl {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}
.field-error { font-size: .8rem; color: #d63031; margin-top: 4px; display: none; }
.field-ctrl.is-err { border-color: #d63031; }
.field-ctrl.is-err ~ .field-error { display: block; }

/* ── Toast ──────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 600; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 260px; max-width: 340px;
  font-size: .9rem; font-weight: 500;
  animation: toast-in .3s var(--ease) forwards;
}
.toast.out { animation: toast-out .25s var(--ease) forwards; }
.toast-ok  { border-right: 3px solid #27ae60; }
.toast-err { border-right: 3px solid #e74c3c; }

/* ── Slider ─────────────────────────────── */
.slider { position: relative; overflow: hidden; }
.slider__track {
  display: flex;
  transition: transform .5s var(--ease);
  cursor: grab; user-select: none;
}
.slider__track:active { cursor: grabbing; }
.slider__item { min-width: 100%; padding: 4px 16px; }
.slider__nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; }
.slider__arrow {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all .2s;
  cursor: pointer;
}
.slider__arrow:hover { border-color: var(--orange); color: var(--orange); }
.slider__dots { display: flex; gap: 5px; align-items: center; }
.slider__dot {
  width: 6px; height: 6px; border-radius: 3px;
  background: var(--gray-300); border: none; cursor: pointer;
  transition: all .25s;
}
.slider__dot.on { background: var(--orange); width: 20px; }

/* ── Accordion ──────────────────────────── */
.acc-item { border-bottom: 1px solid var(--border); }
.acc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; cursor: pointer;
  font-size: 1rem; font-weight: 600;
  gap: 16px;
}
.acc-head:hover { color: var(--orange); }
.acc-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  color: var(--orange); font-size: 1.2rem; line-height: 1;
  transition: transform .3s;
}
.acc-item.open .acc-icon { transform: rotate(45deg); }
.acc-body {
  overflow: hidden; max-height: 0;
  transition: max-height .35s var(--ease), padding .25s;
  color: var(--text-muted);
}
.acc-body.open { max-height: 400px; padding-bottom: 18px; }

/* ── Footer ─────────────────────────────── */
.footer { background: var(--navy); color: rgba(255,255,255,.6); padding-block: 64px 32px; }
.footer h4 { color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer a { color: rgba(255,255,255,.55); font-size: .875rem; transition: color .15s; display: block; margin-bottom: 10px; }
.footer a:hover { color: var(--orange); }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: rgba(255,255,255,.3); }
.footer__bottom-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer__credit { display: inline-flex; gap: 6px; align-items: center; }
.footer__credit-link {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .2s;
}
.footer__credit-link:hover { color: var(--orange, #c8490e); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
}
.footer-brand__text { font-size: .875rem; line-height: 1.8; max-width: 240px; }
.footer-brand__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-social { display: flex; gap: 8px; margin-top: 20px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 6px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); transition: all .2s;
  margin-bottom: 0;
}
.footer-social a:hover { color: #fff; background: rgba(255,255,255,.14); }
.footer-newsletter {
  display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap;
}
.footer-newsletter input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  border-radius: 6px; border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07); color: #fff;
  font-family: var(--font); font-size: .85rem; outline: none;
}
.footer-newsletter input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--orange-mute);
}
.footer-contact p { font-size: .875rem; margin-bottom: 10px; }
.footer-contact .hours { font-size: .875rem; color: rgba(255,255,255,.35); margin-top: 4px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-brand__text { max-width: none; }
}
@media (max-width: 560px) {
  .footer { padding-block: 48px 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { margin-top: 32px; flex-direction: column; align-items: flex-start; }
  .footer-newsletter { flex-direction: column; }
  .footer-newsletter .btn { width: 100%; justify-content: center; }
}

/* ── Accessibility ──────────────────────── */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Reveal ─────────────────────────────── */
.reveal,
.reveal-l,
.reveal-r {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
/* فقط وقتی JS فعال است مخفی می‌شوند تا اگر انیمیشن گیر کرد صفحه خالی نماند */
html.js-anim .reveal:not(.in) {
  opacity: 0;
  transform: translateY(24px);
}
html.js-anim .reveal-l:not(.in) {
  opacity: 0;
  transform: translateY(20px);
}
html.js-anim .reveal-r:not(.in) {
  opacity: 0;
  transform: translateY(20px);
}
html.js-anim .reveal.in,
html.js-anim .reveal-l.in,
html.js-anim .reveal-r.in {
  opacity: 1;
  transform: none;
}
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* ── Keyframes ──────────────────────────── */
@keyframes toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateX(20px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ── Selection ──────────────────────────── */
::selection { background: var(--orange-mute); color: var(--orange); }
