@font-face { font-family: 'Inter'; src: url('fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Vazirmatn'; src: url('fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #060b16; --line: rgba(148, 197, 255, 0.16);
  --text: #e6edf7; --muted: #93a3bd; --accent: #22d3ee; --accent2: #a3e635;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[dir="rtl"] { --font: 'Vazirmatn', 'Inter', Tahoma, sans-serif; }
body[data-branch="anti-drone"] { --accent: #38bdf8; --accent2: #f43f5e; }
body[data-branch="iot"] { --accent: #a3e635; --accent2: #22d3ee; }
body[data-branch="hw"] { --accent: #fbbf24; --accent2: #fb923c; }
body[data-branch="plc"] { --accent: #a78bfa; --accent2: #f472b6; }
body[data-branch="med"] { --accent: #2dd4bf; --accent2: #f87171; }
body[data-branch="agri"] { --accent: #4ade80; --accent2: #facc15; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
body::after { /* keep text readable over the art */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 11, 22, .82) 0%, rgba(6, 11, 22, .45) 55%, rgba(6, 11, 22, .05) 100%);
}
[dir="rtl"] body::after { background: linear-gradient(270deg, rgba(6, 11, 22, .82) 0%, rgba(6, 11, 22, .45) 55%, rgba(6, 11, 22, .05) 100%); }

header.top, main, footer { position: relative; z-index: 1; }
header.top {
  position: fixed; top: 0; inset-inline: 0; z-index: 10; display: flex; align-items: center; gap: 1.2rem;
  padding: .8rem clamp(16px, 4vw, 48px); background: rgba(6, 11, 22, .55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; text-decoration: none; font-family: 'Inter', sans-serif; direction: ltr; }
.brand svg { width: 30px; height: 30px; }
.brand b { color: var(--accent); transition: color .6s; }
nav.branches { display: flex; gap: .2rem; margin-inline-start: auto; }
nav.branches a, .contact-link {
  font-size: .86rem; color: var(--muted); text-decoration: none; padding: .45rem .7rem; border-radius: 8px; white-space: nowrap;
  max-width: 15rem; overflow: hidden; text-overflow: ellipsis; transition: color .2s, background .2s;
}
nav.branches a:hover, .contact-link:hover { color: var(--text); background: rgba(148, 197, 255, .08); }
nav.branches a.active { color: var(--accent); background: rgba(148, 197, 255, .08); }

.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; font-size: .86rem;
  padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 999px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang .menu { position: absolute; inset-inline-end: 0; top: calc(100% + .5rem); min-width: 10rem; padding: .35rem; display: grid;
  background: rgba(12, 20, 38, .96); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); }
.lang .menu a { padding: .45rem .7rem; border-radius: 8px; text-decoration: none; font-size: .92rem; }
.lang .menu a[lang="fa"], .lang .menu a[lang="ar"] { font-family: 'Vazirmatn', sans-serif; text-align: end; }
.lang .menu a:hover { background: rgba(148, 197, 255, .1); }
.lang .menu a[aria-current] { color: var(--accent); }

main { padding-inline: clamp(16px, 6vw, 96px); }
section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 6rem 3rem; max-width: 640px; }
.hero { max-width: 760px; }
.tag { align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; color: var(--accent2);
  letter-spacing: .08em; text-transform: uppercase; padding: .35rem .8rem; border: 1px solid color-mix(in srgb, var(--accent2) 40%, transparent); border-radius: 999px; }
[dir="rtl"] .tag { letter-spacing: 0; }
.tag i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 10px var(--accent2); }
h1 { margin-top: 1.3rem; font-size: clamp(2.1rem, 5.4vw, 3.9rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.35; }
.lead { margin-top: 1.1rem; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.branch .num { font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .12em; }
.branch .icon { width: 44px; height: 44px; margin-top: .6rem; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.branch h2, .contact h2 { margin-top: .6rem; font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.2; letter-spacing: -0.02em; }
[dir="rtl"] .branch h2, [dir="rtl"] .contact h2 { letter-spacing: 0; line-height: 1.45; }
.branch ul { list-style: none; margin-top: 1.2rem; display: grid; gap: .55rem; }
.branch li { position: relative; padding-inline-start: 1.4rem; }
.branch li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: .55rem; height: .55rem; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: rotate(45deg); }
.branch .btn { margin-top: 1.6rem; }

.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.3rem; border-radius: 12px; font-weight: 600; font-size: .97rem;
  text-decoration: none; color: #04131a; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, white));
  box-shadow: 0 10px 30px -12px var(--accent); border: 1px solid transparent; transition: transform .15s, box-shadow .15s; align-self: flex-start; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { color: var(--text); background: transparent; border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.contact dl { margin-top: 1.4rem; display: grid; gap: .8rem; }
.contact dt { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
[dir="rtl"] .contact dt { letter-spacing: 0; }
.contact dd a { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 700; text-decoration: none; }
.contact dd a:hover { color: var(--accent); }
[dir="rtl"] .contact dd { text-align: right; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.4rem clamp(16px, 6vw, 96px) 1.8rem;
  color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); background: rgba(6, 11, 22, .7); }

@media (max-width: 1360px) { nav.branches a { max-width: 10rem; padding-inline: .45rem; font-size: .8rem; } .contact-link { display: none; } }
@media (max-width: 1180px) { nav.branches a { max-width: 6.8rem; } }
@media (max-width: 1020px) {
  nav.branches { display: none; }
  .contact-link { margin-inline-start: auto; }
  body::after { background: rgba(6, 11, 22, .55); }
  [dir="rtl"] body::after { background: rgba(6, 11, 22, .55); }
}
@media (max-width: 420px) { .contact-link { display: none; } .lang { margin-inline-start: auto; } header.top { gap: .6rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
