/* صنایع پرتو برق آسیا — Asia Ray Power Industries
   Layout concept: dark, cinematic engineering site; live current animation as the signature; glowing yellow-amber energy on near-black; rounded media cards. */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #07080A;
  --bg-2: #0D0F13;
  --card: #121419;
  --card-2: #181B21;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #F3F4F6;
  --text-2: #C7CBD2;
  --muted: #959CA6;
  --signal: #F5C000;
  --amber: #FF9A1F;
  --glow: rgba(245, 192, 0, .35);
  --wrap: 1240px;
  --gutter: 24px;
  --radius: 4px;
  --font: "Vazirmatn", Tahoma, sans-serif;
  --tech: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html[lang="en"] { --font: "IBM Plex Sans", "Segoe UI", Arial, sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.95; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
html[lang="en"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--text); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.tech { font-family: var(--tech); direction: ltr; unicode-bidi: isolate; font-feature-settings: "tnum"; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--signal); color: #000; padding: 8px 14px; z-index: 100; border-radius: 3px; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- announcement + header ---------- */
.announce { position: relative; z-index: 60; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 13.5px; text-align: center; }
.announce a { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--text-2); text-decoration: none; min-height: 40px; }
.announce a:hover { color: var(--text); }
.announce .dot { width: 6px; height: 6px; background: var(--signal); flex: none; }

.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(7, 8, 10, .72); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; min-height: 48px; }
.brand img { height: 42px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.35; }
.brand-name b { font-size: 16px; font-weight: 700; }
.brand-name span { font-family: var(--tech); font-size: 11px; color: var(--muted); letter-spacing: .2px; direction: ltr; text-align: end; }
html[lang="en"] .brand-name span { font-family: "Vazirmatn", sans-serif; direction: rtl; text-align: start; letter-spacing: 0; }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a { position: relative; display: block; color: var(--text-2); text-decoration: none; padding: 8px 14px; font-size: 14.5px; transition: color .2s; }
.nav a::after { content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 1px; background: var(--signal); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .lang { font-family: var(--tech); font-size: 12.5px; color: var(--muted); }
html[lang="en"] .nav .lang { font-family: "Vazirmatn", sans-serif; }
.nav .nav-cta { margin-inline-start: 12px; background: var(--signal); color: #000; font-weight: 700; padding: 9px 20px; border-radius: 3px; }
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: #FFD43A; color: #000; }
.nav-toggle { display: none; margin-inline-start: auto; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 14px; padding: 8px 18px; min-height: 44px; border-radius: 3px; cursor: pointer; }
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { position: absolute; top: 100%; inset-inline: 0; background: rgba(7, 8, 10, .97); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gutter) 22px; }
  .nav a { padding: 13px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--signal); }
  .nav .nav-cta { margin: 12px 0 0; text-align: center; padding: 13px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero canvas.current { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(44% 46% at 50% 50%, rgba(7, 8, 10, .88) 0%, rgba(7, 8, 10, .4) 70%, rgba(7, 8, 10, 0) 100%), linear-gradient(180deg, rgba(7,8,10,0) 70%, var(--bg) 100%); }
.hero .wrap { position: relative; text-align: center; padding: 120px 0 104px; display: flex; flex-direction: column; align-items: center; }
.hero-meta { display: inline-flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--text-2); margin-bottom: 28px; letter-spacing: .2px; }
.hero-meta::before, .hero-meta::after { content: ""; width: 28px; height: 1px; background: var(--line-2); }
.hero-meta .dot { display: none; }
.hero h1 { font-size: clamp(34px, 5.2vw, 68px); line-height: 1.28; font-weight: 700; letter-spacing: -.8px; margin: 0 0 22px; max-width: 20ch; }
html[lang="en"] .hero h1 { line-height: 1.06; letter-spacing: -2px; }
.hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); max-width: 56ch; margin: 0 0 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 30px; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; border: 1px solid transparent; border-radius: 3px; cursor: pointer; transition: background .25s var(--ease), box-shadow .25s var(--ease), color .25s, border-color .25s; }
.btn-signal { background: var(--signal); color: #000; }
.btn-signal:hover { background: #FFD43A; color: #000; }
.btn-ghost { color: var(--text); border-color: rgba(255, 255, 255, .38); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.btn-primary { background: var(--signal); color: #000; }
.btn-primary:hover { background: #FFD43A; color: #000; }

/* client marquee */
.clients { border-bottom: 1px solid var(--line); background: var(--bg); }
.clients .wrap { display: flex; align-items: center; gap: 32px; padding: 22px 0; }
.clients h2 { flex: none; margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.marquee { position: relative; overflow: hidden; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 56px; width: max-content; animation: marquee 48s linear infinite; }
html[lang="en"] .marquee ul { animation-name: marquee-ltr; }
.marquee li { font-size: 17px; font-weight: 600; color: var(--text-2); white-space: nowrap; opacity: .85; }
.marquee:hover ul { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes marquee-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 700px) { .clients .wrap { flex-direction: column; align-items: stretch; gap: 10px; } }

/* ---------- sections ---------- */
.section { padding: 120px 0; position: relative; }
.section.tight { padding-top: 40px; }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head.start { margin-inline: 0; text-align: start; }
.section-head h2 { margin: 0 0 16px; font-size: clamp(28px, 3.6vw, 48px); font-weight: 700; line-height: 1.3; letter-spacing: -.6px; }
html[lang="en"] .section-head h2 { line-height: 1.1; letter-spacing: -1.4px; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }
.textlink { display: inline-flex; align-items: center; gap: 10px; color: var(--signal); font-weight: 700; font-size: 15px; text-decoration: none; min-height: 44px; }
.textlink::after { content: ""; width: 16px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.textlink:hover::after { width: 28px; }
.center { text-align: center; margin-top: 40px; }
@media (max-width: 800px) { .section { padding: 80px 0; } .section-head { margin-bottom: 40px; } }

/* engineering panel: diagram + status log */
.panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%); overflow: hidden; }
.panel > * { min-width: 0; }
.panel-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.panel-bar .lights { display: flex; gap: 7px; }
.panel-bar .lights i { width: 8px; height: 8px; background: var(--line-2); display: block; }
.panel-bar .lights i:first-child { background: var(--signal); }
.panel .sld { padding: 26px; border-inline-end: 1px solid var(--line); }
@media (max-width: 900px) { .panel { grid-template-columns: minmax(0, 1fr); } .panel .sld { border-inline-end: 0; border-bottom: 1px solid var(--line); } }

.log { padding: 22px 24px; display: flex; flex-direction: column; }
.log h3 { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
.log h3 .live { width: 7px; height: 7px; background: var(--signal); }
.log ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 2px; background: none; border-bottom: 1px solid var(--line); font-size: 14px; }
.log li .ok { width: 20px; height: 20px; border-radius: 2px; display: grid; place-items: center; background: rgba(245, 192, 0, .12); color: var(--signal); font-size: 12px; }
.log li .ok svg { width: 11px; height: 11px; }
.log li b { font-weight: 600; color: var(--text); }
.log li span.res { grid-column: 2; color: var(--muted); font-size: 13px; }
.log li time { grid-row: 1; grid-column: 3; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .log.animate li { animation: logIn .6s var(--ease) both; }
  .log.animate li:nth-child(2) { animation-delay: .5s; } .log.animate li:nth-child(3) { animation-delay: 1s; }
  .log.animate li:nth-child(4) { animation-delay: 1.5s; } .log.animate li:nth-child(5) { animation-delay: 2s; }
}
@keyframes logIn { from { opacity: .15; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* single-line diagram, dark */
.sld { margin: 0; }
.sld svg { width: 100%; height: auto; display: block; overflow: visible; }
.sld figcaption { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.sld .grid line { stroke: rgba(255, 255, 255, .045); stroke-width: 1; }
.sld .frame { fill: none; stroke: var(--line-2); stroke-width: 1; }
.sld .tick { fill: none; stroke: var(--text-2); stroke-width: 1.2; }
.sld .w { fill: none; stroke: var(--text-2); stroke-width: 1.4; stroke-linecap: square; }
.sld .bus { fill: none; stroke: var(--signal); stroke-width: 4; }
.sld .bus-hi { fill: none; stroke: #FFF3C4; stroke-width: 1; }
.sld .cb { fill: var(--bg); stroke: var(--text-2); stroke-width: 1.4; }
.sld .cb-on { fill: var(--signal); }
.sld .lbl { fill: var(--text-2); font-family: var(--font); font-size: 11px; }
.sld .lbl-t { fill: var(--muted); font-family: var(--tech); font-size: 10.5px; letter-spacing: .4px; }
.sld .tb { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; }
.sld .tb-l { stroke: var(--line-2); stroke-width: .6; }
.sld .tb-t { fill: var(--text-2); font-family: var(--font); font-size: 10px; }
.sld .tb-s { fill: var(--muted); font-family: var(--tech); font-size: 8.5px; letter-spacing: .5px; }
.sld .arrow { fill: var(--text-2); }
.sld .draw { stroke-dasharray: var(--len, 100); stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .sld.animate .draw { animation: draw 1.6s var(--ease) both; animation-delay: var(--d, 0s); }
  .sld.animate .fade { animation: fade .6s ease both; animation-delay: var(--d, 1.2s); }
}
@keyframes draw { from { stroke-dashoffset: var(--len, 100); } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* facts */
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.facts dl > div { padding: 26px 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-size: 36px; font-weight: 300; letter-spacing: -.5px; line-height: 1.3; }
.facts dd small { font-size: 15px; color: var(--muted); font-weight: 400; margin-inline-start: 6px; letter-spacing: 0; }
@media (max-width: 860px) { .facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts dd { font-size: 28px; } }

/* sector cards */
.sector-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sector { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); min-height: 300px; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; transition: border-color .35s var(--ease), transform .35s var(--ease); }
.sector::before { content: ""; position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(90% 70% at 50% 0%, var(--g1, rgba(245, 192, 0, .12)) 0%, transparent 60%),
  linear-gradient(transparent 0 calc(100% - 1px), rgba(255,255,255,.05) 0) 0 0 / 100% 28px,
  linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(255,255,255,.05) 0) 0 0 / 28px 100%; transition: opacity .4s; opacity: .8; }
.sector::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(7, 8, 10, .92) 85%); }
.sector:hover { border-color: rgba(245, 192, 0, .45); }
.sector:hover::before { opacity: 1; }
.sector .icon { position: absolute; top: 26px; inset-inline-start: 26px; width: 48px; height: 48px; color: var(--signal); }
.sector .count { font-size: 13px; color: var(--signal); margin-bottom: 4px; }
.sector h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.sector p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.85; }
.sector.wide { grid-column: span 2; }
.sector:nth-child(2) { --g1: rgba(255, 154, 31, .1); } .sector:nth-child(3) { --g1: rgba(255, 210, 90, .1); }
.sector:nth-child(5) { --g1: rgba(255, 154, 31, .1); } .sector:nth-child(6) { --g1: rgba(245, 192, 0, .1); }
@media (max-width: 1050px) { .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sector.wide { grid-column: span 2; } }
@media (max-width: 600px) { .sector-grid { grid-template-columns: minmax(0, 1fr); } .sector.wide { grid-column: auto; } .sector { min-height: 250px; } }

/* services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.services.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service { padding: 28px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); transition: border-color .3s; }
.service:hover { border-color: var(--line-2); }
.service .tag { display: inline-block; font-family: var(--tech); font-size: 11.5px; color: var(--signal); letter-spacing: .6px; border: 1px solid rgba(245, 192, 0, .35); border-radius: 2px; padding: 1px 8px; margin-bottom: 18px; direction: ltr; }
.service h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.service p { margin: 0; color: var(--text-2); font-size: 15px; }
.service ul { list-style: none; margin: 18px 0 0; padding: 0; font-size: 14.5px; color: var(--text-2); }
.service li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.service li::before { content: ""; width: 5px; height: 5px; background: var(--signal); flex: none; transform: translateY(-2px); }
@media (max-width: 1050px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .services, .services.two { grid-template-columns: minmax(0, 1fr); } }

/* tables */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.data th { font-weight: 500; font-size: 12.5px; color: var(--muted); text-align: start; padding: 16px 24px; border-bottom: 1px solid var(--line); }
table.data td { padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: baseline; transition: background .2s; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: rgba(255, 255, 255, .03); }
table.data td:first-child { font-weight: 600; }
table.data td:nth-child(2) { color: var(--text-2); }
table.data .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 640px) {
  table.data { min-width: 0; }
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data tbody tr { display: block; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  table.data tbody tr:last-child { border-bottom: 0; }
  table.data td { display: inline; padding: 0; border: 0; background: none !important; }
  table.data td:first-child { display: block; margin-bottom: 2px; }
  table.data td:not(:first-child) { font-size: 14px; color: var(--muted); }
  table.data td.num { margin-inline-start: 12px; }
  table.data td:first-child + td.num { margin-inline-start: 0; }
}

/* FAQ */
.faq { max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 0 4px; }

.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-size: 16.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(var(--signal), var(--signal)) center / 12px 1.5px no-repeat, linear-gradient(var(--signal), var(--signal)) center / 1.5px 12px no-repeat; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--text-2); }

/* CTA band */
.cta { position: relative; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: -20% -10% auto; height: 140%; z-index: -1; background: radial-gradient(45% 55% at 50% 100%, rgba(245, 192, 0, .12), transparent 70%); }
.cta .wrap { text-align: center; padding: 140px 0 130px; display: flex; flex-direction: column; align-items: center; }
.cta h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 54px); font-weight: 700; line-height: 1.25; letter-spacing: -.6px; }
.cta p { margin: 0 0 36px; color: var(--text-2); max-width: 54ch; font-size: 17px; }

/* inner page title */
.page-title { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-title::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 120% at 50% -30%, rgba(245, 192, 0, .08), transparent 70%); }
.page-title .wrap { padding: 96px 0 80px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.page-title h1 { margin: 0 0 14px; font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; line-height: 1.25; letter-spacing: -.6px; }
.page-title p { margin: 0; color: var(--text-2); font-size: 17px; max-width: 56ch; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { width: 12px; height: 1px; background: var(--muted); }

/* about */
.prose { max-width: 66ch; }
.prose p { margin: 0 0 20px; font-size: 16.5px; color: var(--text-2); }
.prose p:first-child { font-size: 21px; color: var(--text); line-height: 1.8; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 72px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.keyfacts { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 6px 22px; }
.keyfacts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.keyfacts div:last-child { border-bottom: 0; }
.keyfacts dt { color: var(--muted); }
.keyfacts dd { margin: 0; font-weight: 600; text-align: end; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 5px; inset-inline: 0; height: 1px; background: linear-gradient(90deg, rgba(245,192,0,.6), rgba(245,192,0,.1)); }
html[lang="fa"] .timeline::before { background: linear-gradient(270deg, rgba(245,192,0,.6), rgba(245,192,0,.1)); }
.timeline li { position: relative; padding: 32px 18px 0 0; }
html[lang="fa"] .timeline li { padding: 32px 0 0 18px; }
.timeline li::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 10px; height: 10px; background: var(--bg); border: 1.5px solid var(--signal); }
.timeline li:last-child::before { background: var(--signal); }
.timeline time { display: block; font-size: 24px; font-weight: 300; margin-bottom: 6px; }
.timeline p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.85; }
@media (max-width: 1000px) { .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; } .timeline::before { display: none; } }
@media (max-width: 560px) { .timeline { grid-template-columns: minmax(0, 1fr); row-gap: 0; border-inline-start: 1px solid rgba(245,192,0,.4); } .timeline li, html[lang="fa"] .timeline li { padding: 0 24px 28px; } .timeline li::before { top: 9px; inset-inline-start: -6px; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 26px; }
.steps li::before { content: counter(step, persian); display: block; color: var(--signal); font-size: 14px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
html[lang="en"] .steps li::before { content: counter(step); font-family: var(--tech); }
.steps h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 700; }
.steps p { margin: 0; font-size: 14.5px; color: var(--text-2); }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* projects page */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; justify-content: center; }
.filters button { font: inherit; font-size: 14px; min-height: 44px; padding: 8px 18px; background: rgba(255, 255, 255, .04); color: var(--text-2); border: 1px solid rgba(255, 255, 255, .38); border-radius: 3px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.filters button:hover { color: var(--text); border-color: var(--line-2); }
.filters button[aria-pressed="true"] { background: var(--signal); color: #000; border-color: var(--signal); font-weight: 700; }
.result-note { color: var(--muted); font-size: 13.5px; margin: 0 0 48px; text-align: center; }
.group { margin-bottom: 56px; }
.group h2 { font-size: 22px; font-weight: 700; margin: 0 0 16px; display: flex; gap: 12px; align-items: baseline; }
.group h2 span { font-size: 13px; font-weight: 500; color: var(--signal); }
.group[hidden] { display: none; }

/* contact */
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 30px; }
.contact-list { margin: 0; }
.contact-list div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { font-size: 13px; color: var(--muted); }
.contact-list dd { margin: 4px 0 0; font-weight: 600; font-size: 17px; }
.placeholder { background: rgba(245, 192, 0, .16); color: #FFE48A; padding: 0 6px; border-radius: 2px; font-weight: 500; }
form.request { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select { font: inherit; font-size: 16px; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .03); color: var(--text); width: 100%; min-height: 50px; border-radius: 3px; }
.field select option { background: var(--card); color: var(--text); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.field [aria-invalid="true"] { border-color: #FF6B5E; }
.error { color: #FF8A80; font-size: 13.5px; margin: 0; }
.error:empty { display: none; }
.form-note { margin: 0; color: var(--muted); font-size: 13.5px; }
.form-status { padding: 14px 16px; border-radius: 3px; border: 1px solid rgba(245, 192, 0, .35); background: rgba(245, 192, 0, .06); margin: 0; }
.form-status:empty { display: none; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 640px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
form.request .actions { justify-content: flex-start; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); font-size: 14px; color: var(--text-2); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 56px; padding: 72px 0 52px; }
.site-footer h2 { color: var(--text); font-size: 13.5px; font-weight: 600; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--signal); }
.site-footer .about-short { max-width: 40ch; margin: 18px 0 0; color: var(--muted); }
.copyright { border-top: 1px solid var(--line); }
.copyright .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 700px) { .hero .wrap { padding: 80px 0 72px; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ===================== v5: photographic layer ===================== */
.hero.photo { min-height: clamp(640px, 92vh, 880px); display: flex; align-items: flex-end; }
.hero.photo::before { background:
  linear-gradient(0deg, var(--bg) 0%, rgba(7,8,10,.86) 26%, rgba(7,8,10,.35) 62%, rgba(7,8,10,.55) 100%),
  linear-gradient(270deg, rgba(7,8,10,.85) 0%, rgba(7,8,10,.25) 60%, rgba(7,8,10,0) 100%); }
html[lang="en"] .hero.photo::before { background:
  linear-gradient(0deg, var(--bg) 0%, rgba(7,8,10,.86) 26%, rgba(7,8,10,.35) 62%, rgba(7,8,10,.55) 100%),
  linear-gradient(90deg, rgba(7,8,10,.85) 0%, rgba(7,8,10,.25) 60%, rgba(7,8,10,0) 100%); }
.hero-media { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
@media (prefers-reduced-motion: no-preference) { .hero-media img { animation: drift 24s ease-in-out infinite alternate; } }
@keyframes drift { from { transform: scale(1.06) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.hero.photo canvas.current { mix-blend-mode: screen; opacity: .55; }
.hero.photo .wrap { text-align: start; align-items: flex-start; padding: 140px 0 0; }
.hero.photo h1 { max-width: 17ch; font-size: clamp(36px, 5.4vw, 74px); line-height: 1.22; letter-spacing: -1px; }
.hero.photo .lead { max-width: 52ch; margin-bottom: 36px; }
.hero.photo .actions { justify-content: flex-start; }
.hero.photo .hero-meta::after { display: none; }
.hero.photo .hero-meta::before { width: 36px; background: var(--signal); }
.hero-facts { width: 100%; margin-top: 72px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.hero-facts div { padding: 22px 0 30px; border-inline-start: 1px solid var(--line); padding-inline-start: 22px; }
.hero-facts div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.hero-facts dt { font-size: 12.5px; color: var(--muted); }
.hero-facts dd { margin: 2px 0 0; font-size: 26px; font-weight: 300; }
.hero-facts dd small { font-size: 13.5px; color: var(--muted); margin-inline-start: 6px; }
@media (max-width: 760px) { .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; } .hero-facts div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; } .hero-facts div { padding: 16px 0 18px; padding-inline-start: 16px; } .hero.photo .wrap { padding-top: 110px; } }

.img-note { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; font-size: 11px; color: rgba(255,255,255,.72); background: rgba(7,8,10,.55); padding: 1px 8px; border-radius: 2px; backdrop-filter: blur(4px); }

/* statement */
.statement { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.statement p { margin: 0; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.8; font-weight: 500; color: var(--muted); letter-spacing: -.2px; }
html[lang="en"] .statement p { line-height: 1.45; }
.statement p span { color: var(--text); }
.statement .sign { margin-top: 32px; display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--text-2); }
.statement .sign::before { content: ""; width: 36px; height: 1px; background: var(--signal); }
@media (max-width: 900px) { .statement { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.media { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media.tall { aspect-ratio: 4 / 5; }
.media.wide { aspect-ratio: 16 / 9; }

/* key domains with imagery */
.domains { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.domain { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); min-height: 520px; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; isolation: isolate; text-decoration: none; color: var(--text); }
.domain img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.domain::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,8,10,0) 25%, rgba(7,8,10,.65) 58%, rgba(7,8,10,.96) 100%); }
.domain:hover img { transform: scale(1.04); }
.domain .num { font-size: 13px; color: var(--signal); margin-bottom: 6px; }
.domain h3 { margin: 0 0 10px; font-size: 24px; font-weight: 700; line-height: 1.45; }
.domain p { margin: 0; color: var(--text-2); font-size: 14.5px; max-width: 40ch; }
.domain .more-line { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-2); }
.domain .img-note { top: 14px; bottom: auto; }
@media (max-width: 1000px) { .domains { grid-template-columns: minmax(0, 1fr); } .domain { min-height: 420px; } }

.sector-grid.compact .sector { min-height: 210px; padding: 22px; }
.sector-grid.compact .sector .icon { width: 36px; height: 36px; top: 22px; inset-inline-start: 22px; }
.sector-grid.compact .sector h3 { font-size: 17px; }

/* services split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.split .media { position: sticky; top: 110px; }
.svc-list { border-top: 1px solid var(--line-2); }
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.svc-row h3 { margin: 0; font-size: 21px; font-weight: 700; }
.svc-row .tag { grid-row: 1; grid-column: 2; align-self: center; font-family: var(--tech); font-size: 11.5px; color: var(--signal); border: 1px solid rgba(245, 192, 0, .35); border-radius: 2px; padding: 1px 8px; direction: ltr; white-space: nowrap; }
.svc-row p { grid-column: 1 / -1; margin: 0; color: var(--text-2); font-size: 15.5px; max-width: 52ch; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 36px; } .split .media { position: relative; top: 0; } }

/* CTA with photograph */
.cta.photo::before { display: none; }
.cta.photo .cta-media { position: absolute; inset: 0; z-index: -2; }
.cta.photo .cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta.photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(7,8,10,.72) 35%, rgba(7,8,10,.72) 70%, var(--bg) 100%); }

/* scroll reveal: images wipe in once; content is fully visible without JS */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { clip-path: inset(0 0 14% 0); transition: clip-path 1.1s var(--ease); }
  html.js .reveal img { transform: scale(1.1); transition: transform 1.6s var(--ease); }
  html.js .reveal.in { clip-path: inset(0 0 0 0); }
  html.js .reveal.in img { transform: scale(1); }
  html.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  html.js .rise.in { opacity: 1; transform: none; }
}

/* inner page title with photograph */
.page-title.photo { min-height: 420px; display: flex; align-items: flex-end; }
.page-title.photo::before { background: linear-gradient(0deg, var(--bg) 0%, rgba(7,8,10,.78) 45%, rgba(7,8,10,.55) 100%); z-index: -1; }
.page-title.photo .pt-media { position: absolute; inset: 0; z-index: -2; }
.page-title.photo .pt-media img { width: 100%; height: 100%; object-fit: cover; }
.page-title.photo .wrap { align-items: flex-start; text-align: start; padding: 120px 0 64px; }
