/* ==========================================================================
   APNE website stylesheet  (apn-energy.com)  – 2nd design round
   One file for both languages and both colour schemes. Direction comes from
   <html dir>, so all spacing uses logical properties and mirrors automatically.
   ========================================================================== */

/* IRANSansX – FontIran, proprietary licence. Licence code: (.....) */
@font-face { font-family: "IRANSansX"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/IRANSansX-Regular.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/IRANSansX-Medium.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/IRANSansX-DemiBold.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/IRANSansX-Bold.woff2") format("woff2"); }
@font-face { font-family: "IRANSansX"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/IRANSansX-Black.woff2") format("woff2"); }
/* Montserrat – SIL OFL 1.1 */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Montserrat-700.woff2") format("woff2"); }
/* Noto Nastaliq Urdu – SIL OFL 1.1, subset to the hero tagline */
@font-face { font-family: "Noto Nastaliq Urdu"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/NotoNastaliqUrdu-tagline.woff2") format("woff2"); }
:root { --font-fa: "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif; }

/* ---------- design tokens ------------------------------------------------- */
:root {
  --brand: #0063D3;            /* mark & wordmark */
  --brand-bright: #0071F1;
  --blue-700: #0B3D91;
  --navy: #0A2A5E;
  --navy-900: #061B3F;
  --gold: #C99A2E;
  --gold-600: #A87E1C;
  --gold-200: #F1DDA5;
  --gold-50: #FBF4E1;
  --teal: #0E7C86;
  --teal-50: #E3F3F4;
  --amber: #B7791F;

  --bg: #FFFFFF;
  --bg-2: #F2F5FA;             /* cool panels */
  --bg-3: #FAF7F0;             /* warm cream panels */
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --line: #D9E0EA;
  --line-strong: #C3CDDB;
  --ink: #17233A;
  --ink-2: #566274;
  --ink-3: #7C8798;
  --link: #0757B8;
  --link-hover: #0B3D91;
  --hero-a: #071F4D;
  --hero-b: #0C4CB3;
  --hero-text: #FFFFFF;
  --hero-muted: #C6DAF7;
  --hero-gold: #F1DDA5;        /* fixed: the hero and footer are always dark */
  --on-brand: #FFFFFF;
  --todo-bg: #FFF6D5;
  --todo-line: #D9A400;
  --todo-ink: #5A4300;
  --shadow-sm: 0 1px 2px rgba(10, 42, 94, .06), 0 1px 1px rgba(10, 42, 94, .04);
  --shadow: 0 2px 4px rgba(10, 42, 94, .05), 0 14px 34px -18px rgba(10, 42, 94, .35);
  --shadow-lg: 0 10px 30px -10px rgba(6, 27, 63, .35);
  --radius: 8px;
  --radius-lg: 14px;
  --wrap: 1180px;
  --gutter: 16px;
  --font-fa: "IRANSansX", "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-en: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-nastaliq: "Noto Nastaliq Urdu", "IranNastaliq", serif;
  --fw-heavy: 800;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.10' stroke-width='1'%3E%3Cpath d='M48 6 L58 38 L90 48 L58 58 L48 90 L38 58 L6 48 L38 38 Z'/%3E%3Cpath d='M48 20 L54 42 L76 48 L54 54 L48 76 L42 54 L20 48 L42 42 Z'/%3E%3Ccircle cx='48' cy='48' r='6'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

/* dark scheme: follows the system unless the visitor picked one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6FAEFF; --brand-bright: #8CC0FF; --blue-700: #A9CBFF; --navy: #0F2A57; --navy-900: #071A38;
    --gold: #E3BD5A; --gold-600: #F0CF7C; --gold-200: #5A4A1E; --gold-50: #2A2412;
    --teal: #57C6CE; --teal-50: #12303A; --amber: #E0A54B;
    --bg: #0B1526; --bg-2: #0F1D33; --bg-3: #13203A; --surface: #14233F; --surface-2: #1A2B4A;
    --line: #26385A; --line-strong: #33486F;
    --ink: #E7EEF8; --ink-2: #AEBBD0; --ink-3: #8797B0; --link: #7FB5FF; --link-hover: #A9CBFF;
    --hero-a: #040F27; --hero-b: #0A3D8F; --hero-text: #FFFFFF; --hero-muted: #B7CCEC; --on-brand: #FFFFFF;
    --todo-bg: #3A3012; --todo-line: #C9A227; --todo-ink: #F1DDA5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px -18px rgba(0, 0, 0, .8);
    --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #6FAEFF; --brand-bright: #8CC0FF; --blue-700: #A9CBFF; --navy: #0F2A57; --navy-900: #071A38;
  --gold: #E3BD5A; --gold-600: #F0CF7C; --gold-200: #5A4A1E; --gold-50: #2A2412;
  --teal: #57C6CE; --teal-50: #12303A; --amber: #E0A54B;
  --bg: #0B1526; --bg-2: #0F1D33; --bg-3: #13203A; --surface: #14233F; --surface-2: #1A2B4A;
  --line: #26385A; --line-strong: #33486F;
  --ink: #E7EEF8; --ink-2: #AEBBD0; --ink-3: #8797B0; --link: #7FB5FF; --link-hover: #A9CBFF;
  --hero-a: #040F27; --hero-b: #0A3D8F; --hero-text: #FFFFFF; --hero-muted: #B7CCEC; --on-brand: #FFFFFF;
  --todo-bg: #3A3012; --todo-line: #C9A227; --todo-ink: #F1DDA5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 34px -18px rgba(0, 0, 0, .8);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- reset-ish ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; color: var(--ink); background: var(--bg); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
html[lang="fa"] body { font-family: var(--font-fa); font-size: 16.5px; line-height: 1.95; --fw-heavy: 900; }
html[lang="en"] body { font-family: var(--font-en); font-size: 16px; line-height: 1.7; }
html[lang="en"] [lang="fa"] { font-family: var(--font-fa); }
html[lang="fa"] [lang="en"] { font-family: var(--font-en); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; color: var(--ink); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }
table { border-collapse: collapse; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-2); }
bdi { unicode-bidi: isolate; }
html[lang="fa"] .prose ol { list-style-type: persian; }
.ico { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .ico-arrow { transform: scaleX(-1); }

/* ---------- layout -------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }
main { display: block; }
main:focus { outline: none; }
.skip { position: absolute; inset-inline-start: 0; top: -100px; background: var(--brand); color: #fff; padding: .6em 1em; z-index: 100; border-radius: 0 0 var(--radius) 0; }
.skip:focus { top: 0; }

/* ---------- top bar ------------------------------------------------------- */
.topbar { background: var(--navy-900); color: #DCE6F5; font-size: .86em; border-bottom: 3px solid var(--gold); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-contact a { display: inline-flex; align-items: center; gap: 8px; color: #DCE6F5; }
.topbar-contact a:hover { color: #fff; text-decoration: none; }
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.topbar .lang-switch { color: #fff; border-color: rgba(255,255,255,.35); }
.topbar .lang-switch:hover { border-color: var(--gold); color: var(--hero-gold); }
@media (max-width: 639px) { .topbar-contact a:nth-child(2) { display: none; } }

.lang-switch { display: inline-flex; align-items: center; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 12px; color: var(--ink); line-height: 1.6; }
.lang-switch:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
html[lang="en"] .lang-switch { font-family: var(--font-fa); }
html[lang="fa"] .lang-switch { font-family: var(--font-en); font-size: .92em; letter-spacing: .02em; }

.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 30px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--gold); color: var(--hero-gold); }
.theme-toggle .ico { width: 17px; height: 17px; }
.theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: block; }
}

/* ---------- header -------------------------------------------------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--brand); padding-block: 12px; flex-shrink: 0; }
.brand:hover { color: var(--blue-700); text-decoration: none; }
.brand svg { fill: currentColor; }
.brand .svg-mark { height: 44px; width: auto; }
.brand .svg-wordmark { height: 20px; width: auto; }
@media (min-width: 900px) { .brand .svg-mark { height: 48px; } .brand .svg-wordmark { height: 22px; } }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-call { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--brand); }
.header-call .ico { width: 20px; height: 20px; }
.nav-toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 12px; color: var(--ink); cursor: pointer; min-height: 42px; }
.nav-toggle-bars { position: relative; width: 20px; height: 2px; background: currentColor; display: block; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; width: 20px; height: 2px; background: currentColor; }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
.no-js .nav-toggle { display: none; }
.no-js .site-nav { position: static !important; box-shadow: none !important; }

.site-nav { display: none; }
.no-js .site-nav, .site-nav[data-open] { display: block; position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; box-shadow: var(--shadow-lg); }
.nav-list { list-style: none; display: flex; flex-direction: column; }
.nav-list a { display: block; padding: 12px 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.nav-list a:hover { color: var(--brand); text-decoration: none; }
.nav-list a[aria-current] { color: var(--brand); box-shadow: inset 3px 0 0 var(--gold); padding-inline-start: 12px; }
[dir="rtl"] .nav-list a[aria-current] { box-shadow: inset -3px 0 0 var(--gold); }
.nav-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 16px; }
.nav-extra .theme-toggle { color: var(--ink); border-color: var(--line-strong); }
@media (min-width: 900px) {
  .header-actions { display: none; }
  .site-nav, .no-js .site-nav, .site-nav[data-open] { display: flex; position: static; align-items: center; gap: 24px; background: none; border: 0; padding: 0; box-shadow: none; flex: 1; justify-content: flex-end; }
  .nav-list { flex-direction: row; gap: 2px; }
  .nav-list a { padding: 26px 13px; border: 0; position: relative; }
  .nav-list a[aria-current] { box-shadow: none; padding-inline-start: 13px; }
  .nav-list a[aria-current]::after, .nav-list a:hover::after { content: ""; position: absolute; inset-inline: 13px; bottom: 16px; height: 3px; border-radius: 2px; background: var(--gold); }
  .nav-list a:hover::after { background: var(--brand); }
  [dir="rtl"] .nav-list a[aria-current] { box-shadow: none; }
  .nav-extra { padding: 0; gap: 12px; }
  .lang-switch-mobile, .theme-toggle-mobile { display: none; }
}

/* ---------- buttons & links ---------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .7em 1.35em; border-radius: var(--radius); font-weight: 600; border: 1px solid transparent; min-height: 46px; text-align: center; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { min-height: 38px; padding: .45em 1em; font-size: .92em; }
.btn-lg { min-height: 52px; padding: .8em 1.8em; font-size: 1.05em; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--blue-700); color: var(--on-brand); }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-primary:hover { color: #071A38; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary, :root:not([data-theme="light"]) .btn-primary:hover { color: #071A38; } }
.btn-secondary { background: var(--surface); color: var(--link); border-color: var(--brand); }
.btn-secondary:hover { background: var(--bg-2); color: var(--link-hover); }
.btn-gold { background: var(--gold); color: #1B1400; }
.btn-gold:hover { background: #E0B241; color: #1B1400; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #EEF3FA; color: var(--navy); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.link-arrow { font-weight: 600; }
.link-arrow::after { content: "\2192"; margin-inline-start: .35em; display: inline-block; }
[dir="rtl"] .link-arrow::after { content: "\2190"; }

/* ---------- hero ---------------------------------------------------------- */
.hero { position: relative; overflow: hidden; color: var(--hero-text); background: linear-gradient(120deg, var(--hero-a) 0%, var(--navy) 45%, var(--hero-b) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 96px 96px; opacity: .9; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--gold), transparent 60%); }
[dir="rtl"] .hero::after { background: linear-gradient(270deg, var(--gold), transparent 60%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 24px; padding-block: 44px 64px; }
.hero-callig { width: min(360px, 78%); height: auto; margin-bottom: 8px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.hero-tagline { font-family: var(--font-nastaliq); font-size: clamp(1.75rem, 3.8vw, 2.7rem); line-height: 2; color: var(--hero-gold); margin: 0 0 6px; letter-spacing: 0; }
.hero-kicker { color: var(--hero-muted); font-weight: 600; margin: 8px 0 8px; font-size: .95em; }
.hero-title { font-size: clamp(1.7rem, 4.2vw, 2.8rem); font-weight: var(--fw-heavy); line-height: 1.35; color: #fff; max-width: 20ch; }
html[lang="en"] .hero-title { max-width: 24ch; line-height: 1.2; }
.hero-lead { margin-top: 16px; color: var(--hero-muted); font-size: 1.08em; max-width: 60ch; }
.hero-mark { position: absolute; inset-inline-end: -10%; top: 40%; width: min(52vw, 380px); opacity: .07; color: #fff; pointer-events: none; }
.hero-mark svg { width: 100%; height: auto; fill: currentColor; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); padding-block: 64px 96px; align-items: center; }
  .hero-mark { position: relative; inset: auto; width: 100%; max-width: 340px; justify-self: center; opacity: .95; color: #fff; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
  .hero-mark svg { fill: rgba(255,255,255,.92); }
}

/* facts strip overlapping the hero */
.facts-strip { position: relative; z-index: 2; margin-top: -40px; }
.facts-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 12px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; border-top: 4px solid var(--gold); }
.fact-figure { font-weight: 800; color: var(--brand); font-size: 1.35em; line-height: 1.3; }
html[lang="fa"] .fact-figure { font-weight: 900; }
.fact-title { font-weight: 700; }
.fact-text { color: var(--ink-2); font-size: .92em; line-height: 1.7; }
@media (min-width: 560px) { .facts-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .facts-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } .facts-strip { margin-top: -52px; } }

/* ---------- sections ------------------------------------------------------ */
.section { padding-block: 56px; }
.section-supply { background: var(--bg); padding-top: 60px; }
.section-engineering { background: var(--bg-2); }
.section-industries { background: var(--bg-3); }
.section-partners { background: var(--bg); border-top: 1px solid var(--line); }
.section-head { max-width: 72ch; margin-bottom: 30px; }
.section-head-center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-600); font-weight: 700; font-size: .85em; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: var(--gold); }
.eyebrow-teal { color: var(--teal); } .eyebrow-teal::before { background: var(--teal); }
html[lang="fa"] .eyebrow { text-transform: none; letter-spacing: 0; font-size: .95em; }
.section-title { font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: var(--fw-heavy); }
.section-title-center::after { content: ""; display: block; width: 56px; height: 3px; background: var(--gold); margin: 12px auto 0; border-radius: 2px; }
.section-intro { margin-top: 10px; color: var(--ink-2); }
.section-more { margin-top: 26px; }
@media (min-width: 900px) { .section { padding-block: 76px; } }

/* ---------- product cards & material swatches ----------------------------- */
.product-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 560px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.product-grid-compact { margin-top: 10px; }
.product-card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.product-card a:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--brand); }
.product-card a:hover .product-card-name { color: var(--brand); }
.product-card-body { display: flex; flex-direction: column; padding: 16px 18px 18px; gap: 2px; flex: 1; }
.product-card-name { font-weight: 800; font-size: 1.12em; }
.product-card-alt { color: var(--ink-3); font-size: .85em; }
html[lang="fa"] .product-card-alt { font-family: var(--font-en); }
.product-card-summary { color: var(--ink-2); font-size: .93em; margin-top: 6px; line-height: 1.7; }
.product-card-cta { margin-top: auto; padding-top: 12px; color: var(--link); font-weight: 600; font-size: .92em; display: inline-flex; align-items: center; gap: 6px; }

/* image / image slot */
.media { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-card { border-bottom: 1px solid var(--line); }
/* on a card the product name sits right below the picture, so the caption would only repeat it */
.media-card .media-caption { display: none; }
.media-hero, .gallery .media { border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.media-caption { position: absolute; inset-inline: 0; bottom: 0; color: #fff; font-size: .85em; line-height: 1.6; padding: 22px 12px 8px;
  background: linear-gradient(to top, rgba(4,15,39,.88), rgba(4,15,39,.62) 55%, rgba(4,15,39,0)); }
.media-slot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,.15) 60%, rgba(6,27,63,.28)); }
:root[data-theme="dark"] .media-slot::before { background: linear-gradient(160deg, rgba(11,21,38,.35), rgba(11,21,38,.25) 60%, rgba(6,27,63,.7)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .media-slot::before { background: linear-gradient(160deg, rgba(11,21,38,.35), rgba(11,21,38,.25) 60%, rgba(6,27,63,.7)); } }
.media-slot-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px; gap: 4px; }
.media-slot-name { font-weight: 800; font-size: 1.3em; color: var(--navy); background: rgba(255,255,255,.88); padding: 6px 16px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.media-slot-kind { font-size: .8em; color: var(--navy); background: rgba(255,255,255,.72); padding: 2px 10px; border-radius: 999px; }
.media-card .media-slot-name { font-size: 1.1em; }

.swatch { flex: none; width: 56px; height: 56px; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); }
.swatch-sm { width: 22px; height: 22px; border-radius: 5px; margin-inline-end: 10px; vertical-align: middle; display: inline-block; }
.swatch-sulfur { background: radial-gradient(circle at 35% 35%, #FFF0A6 0 2px, transparent 2.6px) 0 0 / 9px 9px, radial-gradient(circle at 65% 70%, #E0B531 0 1.6px, transparent 2.2px) 4px 5px / 9px 9px, linear-gradient(150deg, #F6D25A, #E9B92E); }
.swatch-urea { background: radial-gradient(circle, #FFFFFF 0 2.6px, transparent 3.2px) 0 0 / 11px 11px, radial-gradient(circle, #F4F0E6 0 2.4px, transparent 3px) 5.5px 5.5px / 11px 11px, #DCD5C6; }
.swatch-fertilizer { background: radial-gradient(circle, #8B6A44 0 2.4px, transparent 3px) 0 0 / 11px 11px, radial-gradient(circle, #C9AE86 0 2px, transparent 2.6px) 5px 6px / 11px 11px, radial-gradient(circle, #6E7F5A 0 1.6px, transparent 2.2px) 8px 2px / 13px 13px, #D6C7AE; }
.swatch-petroleum { background: radial-gradient(ellipse at 28% 22%, rgba(255,255,255,.25), transparent 45%), linear-gradient(135deg, #2E2013 0%, #7E4F22 55%, #C58A3E 100%); }
.swatch-gasoline { background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%), linear-gradient(160deg, #F8EBC4, #E3CB84); }
.swatch-gasoil { background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%), linear-gradient(160deg, #DDAA4E, #A66C1F); }
.swatch-bitumen { background: radial-gradient(ellipse at 25% 20%, rgba(255,255,255,.2), transparent 50%), linear-gradient(145deg, #3D3D3D, #101010 55%, #262626); }
.swatch-nanofiber { background: repeating-linear-gradient(48deg, rgba(0,99,211,.28) 0 1px, transparent 1px 6px), repeating-linear-gradient(-42deg, rgba(0,99,211,.2) 0 1px, transparent 1px 7px), #EEF4FC; }
.swatch-concrete { background: radial-gradient(circle, #6B6B6B 0 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(circle, #CFCFCF 0 1.4px, transparent 2px) 3px 4px / 9px 9px, #A8A8A8; }
.media-slot.swatch-bitumen .media-slot-name, .media-slot.swatch-petroleum .media-slot-name { color: #1B1400; }

/* ---------- service cards ------------------------------------------------- */
.service-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .service-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.service-card a { display: flex; flex-direction: column; height: 100%; padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 5px solid var(--teal); border-radius: var(--radius-lg); color: var(--ink); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.service-card a:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card a:hover .service-name { color: var(--teal); }
.service-num { font-family: var(--font-en); font-weight: 700; color: var(--teal); font-size: .85em; letter-spacing: .08em; margin-bottom: 6px; }
.service-name { font-weight: 800; font-size: 1.12em; }
.service-summary { color: var(--ink-2); font-size: .94em; margin-top: 6px; line-height: 1.7; }
.service-cta { margin-top: auto; padding-top: 14px; color: var(--link); font-weight: 600; font-size: .92em; display: inline-flex; align-items: center; gap: 6px; }
.service-card-child a { border-inline-start-color: var(--line-strong); background: var(--surface-2); }
.eng-group { margin-top: 44px; }
.eng-group:last-of-type { margin-bottom: 64px; }
.eng-group .section-title { margin-bottom: 18px; font-size: 1.35rem; padding-inline-start: 14px; border-inline-start: 4px solid var(--teal); }

/* ---------- industries ---------------------------------------------------- */
.industry-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .industry-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .industry-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.industry a { display: block; height: 100%; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); position: relative; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.industry a::before { content: ""; position: absolute; inset-inline-start: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 2px; background: var(--gold); }
.industry a:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.industry a:hover .industry-title { color: var(--brand); }
.industry-title { display: block; font-weight: 700; font-size: 1.05em; }
.industry-text { display: block; color: var(--ink-2); font-size: .93em; margin-top: 4px; line-height: 1.7; }

/* ---------- partners ------------------------------------------------------ */
.partners-row { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
@media (min-width: 640px) { .partners-row { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .partners-row { grid-template-columns: repeat(6, 1fr); } }
.partner { display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.partner img { max-height: 56px; width: auto; max-width: 100%; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.partner:hover img { filter: none; opacity: 1; }
:root[data-theme="dark"] .partner img { filter: grayscale(1) invert(1) brightness(1.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .partner img { filter: grayscale(1) invert(1) brightness(1.6); } }
.partner-slot { border-style: dashed; border-color: var(--line-strong); color: var(--ink-3); font-size: .9em; background: var(--surface-2); }
/* a partner whose logo file has not arrived yet: set the name instead */
.partner-name { background: var(--surface-2); }
.partner-name span { font-weight: 700; font-size: 1.05em; color: var(--ink-2); letter-spacing: .02em; text-align: center; }
.partner-name a { color: inherit; }
.partners-note { margin: 16px 0 0; text-align: center; font-size: .9em; }
.partners-row:has(.partner-slot) { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .partners-row:has(.partner-slot) { grid-template-columns: repeat(4, 1fr); } }

/* ---------- contact strip ------------------------------------------------- */
.contact-strip { position: relative; overflow: hidden; background: linear-gradient(110deg, var(--hero-a), var(--navy) 55%, var(--hero-b)); color: #fff; padding-block: 48px; border-top: 4px solid var(--gold); }
.contact-strip::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 96px 96px; opacity: .6; pointer-events: none; }
.contact-strip-inner { position: relative; display: grid; gap: 24px; align-items: center; }
.contact-strip-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 8px; color: #fff; }
.contact-strip p { color: var(--hero-muted); margin: 0; }
.contact-actions { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .contact-strip-inner { grid-template-columns: 1.2fr 1fr; } .contact-actions { justify-content: flex-end; } }

/* ---------- page hero (inner pages) --------------------------------------- */
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line); padding-block: 8px 34px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset-inline-end: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(0,99,211,.14), transparent 65%); pointer-events: none; }
.page-hero-engineering { background: linear-gradient(180deg, var(--teal-50), var(--bg-2)); }
.page-hero-engineering::after { background: radial-gradient(circle, rgba(14,124,134,.18), transparent 65%); }
.page-hero-products { background: linear-gradient(180deg, var(--gold-50), var(--bg-2)); }
.page-hero-products::after { background: radial-gradient(circle, rgba(201,154,46,.18), transparent 65%); }
.page-hero .wrap { position: relative; }
.page-hero .lead { max-width: 70ch; }
.breadcrumb { padding: 14px 0 18px; font-size: .86em; color: var(--ink-2); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand); }
.page-title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: var(--fw-heavy); line-height: 1.3; }
.page-alt { color: var(--ink-2); margin: 6px 0 0; }
html[lang="fa"] .page-alt { font-family: var(--font-en); font-size: .95em; }
html[lang="en"] .page-alt { font-family: var(--font-fa); font-size: 1.05em; }
.lead { font-size: 1.1em; color: var(--ink); max-width: 64ch; margin-top: 12px; }
.product-hero { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; }
@media (min-width: 900px) { .product-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; } }
.qf { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 28px 0 0; }
@media (min-width: 640px) { .qf { grid-template-columns: repeat(3, 1fr); } }
.qf-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--gold); }
.qf dt { font-size: .82em; color: var(--ink-2); font-weight: 600; }
.qf dd { margin: 2px 0 0; font-weight: 700; }

/* ---------- page grid, sidebar, prose ------------------------------------ */
.page-grid { display: grid; grid-template-columns: 1fr; gap: 40px; padding-block: 36px 64px; }
.page-body { min-width: 0; }
.page-side { border-top: 1px solid var(--line); padding-top: 22px; }
@media (min-width: 900px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 44px; }
  .page-side { border-top: 0; padding-top: 0; border-inline-start: 1px solid var(--line); padding-inline-start: 28px; position: sticky; top: 96px; align-self: start; }
}
.side-title { font-size: .95em; color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
html[lang="fa"] .side-title { text-transform: none; letter-spacing: 0; }
.side-list { list-style: none; }
.side-list li { border-bottom: 1px solid var(--line); }
.side-list a { display: flex; align-items: center; padding: 10px 0; color: var(--ink); font-weight: 600; }
.side-list a:hover { color: var(--brand); text-decoration: none; }
.side-more { margin-top: 16px; }
.side-card { margin-top: 28px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.side-card p { margin: 4px 0; font-weight: 600; }
.side-card-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0 0 24px; background: var(--bg-2); }
.about-mark { color: var(--brand); width: 100px; }
.about-mark svg { fill: currentColor; }
.about-callig { width: 220px; max-width: 100%; }
.h3 { font-size: 1.32em; font-weight: 800; margin-bottom: 10px; }
.h4 { font-size: 1.08em; font-weight: 700; margin-bottom: 6px; }
.body-section, .family, .deliver, .gallery { margin-top: 36px; }
.body-section .h3 { padding-bottom: 8px; border-bottom: 2px solid var(--line); margin-bottom: 16px; position: relative; }
.body-section .h3::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -2px; width: 64px; height: 2px; background: var(--gold); }
.body-section-ours .h3::after { background: var(--brand); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-bottom: 1em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
html[lang="fa"] .prose em { font-style: normal; font-family: var(--font-en); }
.table-wrap { overflow-x: auto; margin-bottom: 1.2em; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; font-size: .94em; min-width: 460px; }
.prose th, .prose td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--bg-2); font-weight: 700; color: var(--navy); }
:root[data-theme="dark"] .prose th { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose th { color: var(--ink); } }
.prose tbody tr:nth-child(even) td { background: var(--surface-2); }
.check-list { list-style: none; }
.check-list li { position: relative; padding-inline-start: 28px; margin-bottom: 9px; }
.check-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-50); }

.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.gallery-note { margin: 12px 0 0; font-size: .92em; }

/* placeholders that must be completed before launch */
.todo { display: inline; background: var(--todo-bg); border: 1px dashed var(--todo-line); border-radius: 4px; padding: 2px 6px; color: var(--todo-ink); }
.todo-label { font-weight: 700; margin-inline-end: 6px; font-size: .85em; }
p > .todo:only-child { display: block; padding: 10px 14px; }

/* dl, notes, panels */
.facts-dl { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 26px; }
.facts-dl > div { background: var(--bg-2); border-radius: var(--radius); padding: 12px 16px; border-inline-start: 4px solid var(--gold); }
.facts-dl dt { font-size: .85em; color: var(--ink-2); font-weight: 600; }
.facts-dl dd { margin: 4px 0 0; font-weight: 600; }
.facts-dl-stack { margin-top: 0; }
.facts-dl-stack > div { background: none; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.note { margin-top: 30px; border-inline-start: 4px solid var(--teal); background: var(--teal-50); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
[dir="rtl"] .note { border-radius: var(--radius) 0 0 var(--radius); }
.note p { margin: 0; }
.panel-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 44px 0 64px; }
@media (min-width: 900px) { .panel-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; box-shadow: var(--shadow-sm); border-top: 4px solid var(--brand); }
.panel-title { font-size: 1.2em; margin-bottom: 12px; }
.panel .prose > :last-child { margin-bottom: 0; }
.product-grid-page { margin-top: 36px; }

/* inquiry box */
.inquiry { margin-top: 44px; background: linear-gradient(135deg, var(--bg-2), var(--surface)); border: 1px solid var(--line); border-inline-start: 5px solid var(--gold); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.inquiry-inner { padding: 24px 24px 22px; }
.inquiry-title { font-size: 1.3em; margin-bottom: 8px; }
.inquiry-lead { color: var(--ink-2); margin-bottom: 0; }
.inquiry .cta-row { margin-top: 16px; }
.inquiry-email { margin: 14px 0 0; color: var(--ink-2); }

/* ---------- contact page -------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; padding-block: 40px 64px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 56px; } }
.contact-dl > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-dl dt { font-size: .85em; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.contact-dl dt .ico { color: var(--gold-600); }
.contact-dl dd { margin: 6px 0 0; }
.big-link { font-size: 1.2em; font-weight: 700; }
.map-links { margin: 8px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; box-shadow: var(--shadow); border-top: 4px solid var(--brand); }
.form { margin-top: 8px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.req { color: #C0263C; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; min-height: 46px; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid rgba(0,99,211,.2); outline-offset: 0; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #C0263C; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #FDECEC; border: 1px solid #E0A0A0; color: #7A1010; padding: 12px 14px; border-radius: var(--radius); margin: 12px 0; }
.form-privacy { font-size: .9em; }

/* ---------- simple pages (404, sent) -------------------------------------- */
.simple-page { max-width: 640px; padding-block: 40px 56px; }
.simple-mark { width: 90px; color: var(--brand); margin-bottom: 20px; }
.simple-mark svg { fill: currentColor; }
.link-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 20px; }
.link-grid a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.link-grid a:hover { border-color: var(--brand); text-decoration: none; }

/* ---------- footer -------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: #DCE6F5; padding-block: 52px 24px; border-top: 4px solid var(--gold); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--hero-gold); }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 36px; }
.footer-callig { width: 280px; max-width: 100%; height: auto; margin-bottom: 14px; }
.footer-legal { color: #fff; margin: 0 0 14px; }
.footer-reg { color: #A9BEDF; }
.footer-address p { margin: 0 0 6px; display: flex; gap: 10px; align-items: flex-start; color: #DCE6F5; }
.footer-address .ico { color: var(--gold); margin-top: .35em; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 26px; }
.footer-h { font-size: .88em; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); margin-bottom: 12px; font-weight: 700; }
html[lang="fa"] .footer-h { text-transform: none; letter-spacing: 0; font-size: 1em; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding-top: 18px; font-size: .9em; color: #A9BEDF; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-bottom p { margin: 0; }
.footer-mark { width: 30px; color: rgba(255,255,255,.55); }
.footer-mark svg { fill: currentColor; }
@media (min-width: 480px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 900px) { .footer-top { grid-template-columns: 340px 1fr; gap: 72px; } }

/* ---------- print --------------------------------------------------------- */
@media print {
  .topbar, .site-header, .site-footer, .contact-strip, .inquiry .cta-row, .page-side, .breadcrumb, .hero-mark { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
