/* APM Robotics — styled after apmtech.co.kr (red header band, deep navy sections, bold uppercase type) */
:root {
  --red: #c0171f;
  --red-deep: #9e1219;
  --red-glow: #ff3b44;
  --navy: #000526;
  --navy-2: #070c33;
  --navy-3: #10173f;
  --ink: #1c1f29;
  --gray: #847e7c;
  --line: rgba(255, 255, 255, 0.12);
  --paper: #f6f6f6;
  --white: #fff;
  --radius: 14px;
  --max: 1240px;
  --font-head: "Helvetica Neue", Arial, "Pretendard Variable", Pretendard, sans-serif;
  --font-body: Arial, "Helvetica Neue", "Pretendard Variable", Pretendard, sans-serif;
  --font-meta: "League Gothic", "Arial Narrow", Impact, sans-serif;
}
:lang(ko) {
  --font-head: "Pretendard Variable", Pretendard, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Pretendard Variable", Pretendard, Arial, sans-serif;
  --font-meta: "League Gothic", "Pretendard Variable", Pretendard, sans-serif;
}
:lang(ar) {
  --font-head: "Noto Kufi Arabic", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Noto Kufi Arabic", Arial, sans-serif;
  --font-meta: "Noto Kufi Arabic", "League Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--navy);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; }
:lang(en) h1, :lang(en) h2 { text-transform: uppercase; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { line-height: 1.45; letter-spacing: 0; }
:lang(ko) h1, :lang(ko) h2 { letter-spacing: -0.03em; word-break: keep-all; }
:lang(ko) p, :lang(ko) li { word-break: keep-all; }

.kicker {
  font-family: var(--font-meta);
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-glow);
  display: inline-flex; align-items: center; gap: 10px;
}
:lang(ar) .kicker, :lang(ko) .kicker { font-size: 15px; letter-spacing: 0.02em; font-weight: 700; }
.kicker::before { content: ""; width: 26px; height: 3px; background: currentColor; }
.section-head { max-width: 820px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 56px); margin: 14px 0 18px; }
.section-head p { font-size: 18px; color: rgba(255, 255, 255, 0.72); }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .kicker { justify-content: center; }

section { position: relative; padding: 120px 0; }
.on-white { background: var(--white); color: var(--ink); }
.on-white .section-head p { color: #555b66; }
.on-white .kicker { color: var(--red); }
.on-red { background: var(--red); }
.on-navy2 { background: var(--navy-2); }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--red);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled { background: rgba(0, 5, 38, 0.92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.header-inner {
  direction: ltr; /* keep logo left and language switch top-right in every language */
  display: flex; align-items: center; gap: 28px;
  height: 72px; max-width: 1400px; margin: 0 auto; padding: 0 28px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo svg { width: 38px; height: 38px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-family: Arial, sans-serif; font-weight: 900; font-size: 22px; letter-spacing: 0.02em; }
.logo-text span { font-family: "League Gothic", sans-serif; font-size: 13px; letter-spacing: 0.32em; opacity: 0.9; margin-top: 2px; }
.main-nav { margin-left: auto; display: flex; gap: 26px; }
.main-nav a {
  font-family: var(--font-meta); font-size: 19px; letter-spacing: 0.05em;
  text-decoration: none; text-transform: uppercase; opacity: 0.92; position: relative; padding: 4px 0;
}
:lang(ko) .main-nav a, :lang(ar) .main-nav a { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #fff; transform: scaleX(0); transition: transform 0.25s; }
.main-nav a:hover::after { transform: scaleX(1); }

.lang-switch {
  display: flex; align-items: center; background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 3px; flex-shrink: 0;
}
.lang-switch button {
  border: 0; background: transparent; color: #fff; cursor: pointer;
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; line-height: 1;
  font-family: Arial, "Pretendard Variable", "Noto Kufi Arabic", sans-serif;
  transition: background 0.2s, color 0.2s;
}
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--red); }
.site-header.scrolled .lang-switch button[aria-pressed="true"] { color: var(--navy); }
.lang-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; width: 40px; height: 40px; cursor: pointer; }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: 0; background: var(--red); }
.hero-band { padding: 150px 0 70px; }
.hero-band .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(44px, 6.6vw, 96px); line-height: 0.98; }
:lang(ar) .hero h1 { font-size: clamp(38px, 5.4vw, 76px); line-height: 1.3; }
:lang(ko) .hero h1 { font-size: clamp(40px, 5.8vw, 84px); line-height: 1.1; }
.hero .kicker { color: #fff; opacity: 0.9; margin-bottom: 20px; }
.hero-lead { font-size: 19px; color: rgba(255, 255, 255, 0.92); margin-bottom: 30px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 15px 30px; border-radius: 999px; font-weight: 700; font-size: 16px;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--red); }
.btn-ghost { border: 2px solid rgba(255, 255, 255, 0.75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--red); }
.btn-red { background: var(--red); color: #fff; }
.btn svg { width: 18px; height: 18px; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; height: min(78vh, 760px); object-fit: cover; object-position: 30% 60%; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--red) 0, rgba(192, 23, 31, 0) 14%, rgba(0, 5, 38, 0) 70%, var(--navy) 100%); pointer-events: none; }
.hero-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hud-chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: rgba(0, 5, 38, 0.72); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.3;
}
.hud-chip b { display: block; font-size: 15px; }
.hud-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: #23d18b; box-shadow: 0 0 0 0 rgba(35, 209, 139, 0.6); animation: ping 2s infinite; flex-shrink: 0; }
.hud-chip .dot.red { background: var(--red-glow); box-shadow: 0 0 0 0 rgba(255, 59, 68, 0.6); animation-name: ping-red; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(35, 209, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(35, 209, 139, 0); } }
@keyframes ping-red { 70% { box-shadow: 0 0 0 10px rgba(255, 59, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 68, 0); } }

/* ── Statement / stats ──────────────────────────────── */
.statement h2 { font-size: clamp(34px, 5vw, 64px); text-align: center; margin-bottom: 64px; }
.statement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.statement-grid p { font-size: 18px; color: rgba(255, 255, 255, 0.82); margin-bottom: 18px; }
.statement-grid p strong { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 80px; }
.stat { background: var(--navy); padding: 34px 28px; }
.stat b { display: block; font-family: Arial, sans-serif; font-weight: 900; font-size: clamp(36px, 4vw, 54px); line-height: 1; color: #fff; margin-bottom: 12px; letter-spacing: -0.02em; }
.stat b em { font-style: normal; color: var(--red-glow); }
.stat span { color: rgba(255, 255, 255, 0.68); font-size: 15px; }

/* ── Challenges ─────────────────────────────────────── */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pain { border-top: 4px solid var(--red); background: var(--paper); padding: 30px 26px 34px; border-radius: 0 0 var(--radius) var(--radius); }
.pain svg { width: 44px; height: 44px; color: var(--red); margin-bottom: 22px; }
.pain h3 { font-size: 22px; margin-bottom: 12px; color: var(--navy); }
.pain p { color: #4b505b; font-size: 15.5px; }
.src-note { font-size: 12.5px; color: #8a8f99; margin-top: 26px; }
.on-navy2 .src-note, .dark .src-note { color: rgba(255, 255, 255, 0.45); }

/* ── Solution layers ────────────────────────────────── */
.layers { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.layer { background: linear-gradient(180deg, var(--navy-3), var(--navy-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; position: relative; overflow: hidden; }
.layer.featured { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 30px 60px -30px rgba(192, 23, 31, 0.6); }
.layer .tag { font-family: var(--font-meta); font-size: 15px; letter-spacing: 0.1em; color: var(--red-glow); text-transform: uppercase; }
:lang(ar) .layer .tag, :lang(ko) .layer .tag { font-size: 13px; letter-spacing: 0; font-weight: 700; }
.layer h3 { font-size: 26px; margin: 8px 0 6px; }
.layer > p { color: rgba(255, 255, 255, 0.65); margin-bottom: 22px; font-size: 15px; }
.layer svg.layer-icon { width: 64px; height: 64px; margin-bottom: 18px; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; font-size: 15px; align-items: flex-start; }
.ticks li::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.on-white .ticks li { color: var(--ink); }
.connector { width: 56px; display: flex; align-items: center; justify-content: center; }
.connector svg { width: 56px; height: 24px; }
[dir="rtl"] .connector svg { transform: scaleX(-1); }

/* ── System composition diagram ─────────────────────── */
.system { margin-top: 80px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 20px; padding: 40px; }
.system h3 { font-size: 22px; margin-bottom: 6px; }
.system > p { color: rgba(255, 255, 255, 0.6); margin-bottom: 26px; font-size: 15px; }
.system svg { width: 100%; height: auto; direction: ltr; }
.system svg text { font-family: var(--font-body); fill: #fff; }
.system svg .sub { fill: rgba(255, 255, 255, 0.6); font-size: 13px; }
.flow { stroke-dasharray: 6 8; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }

/* ── Product ────────────────────────────────────────── */
.product-stage { display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: center; }
.product-figure { position: relative; border-radius: 20px; overflow: hidden; background: #01041f; direction: ltr; }
.product-figure img { width: 100%; }
.pins { position: absolute; inset: 0; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; border: 2px solid #fff;
  font: 700 13px/26px Arial, sans-serif; text-align: center; cursor: pointer; transition: transform 0.2s;
}
.pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(255, 59, 68, 0.7); animation: pulse 2.2s infinite; }
.pin.active, .pin:hover { transform: translate(-50%, -50%) scale(1.25); background: #fff; color: var(--red); }
@keyframes pulse { 0% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.part-list { list-style: none; counter-reset: part; display: grid; gap: 4px; }
.part-list li { counter-increment: part; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 13px 14px; border-radius: 10px; cursor: default; transition: background 0.2s; }
.part-list li::before { content: counter(part); width: 30px; height: 30px; border-radius: 50%; background: var(--red); font: 700 13px/30px Arial, sans-serif; text-align: center; }
.part-list li.active, .part-list li:hover { background: rgba(255, 255, 255, 0.07); }
.part-list b { display: block; font-size: 16px; }
.part-list span { color: rgba(255, 255, 255, 0.62); font-size: 14px; }

.payload { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; margin-top: 110px; }
.payload-img { border-radius: 20px; overflow: hidden; }
.sensors { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sensor { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: rgba(255, 255, 255, 0.025); }
.sensor svg { width: 36px; height: 36px; color: var(--red-glow); margin-bottom: 12px; }
.sensor h4 { font-size: 17px; margin-bottom: 6px; font-family: var(--font-head); }
.sensor p { font-size: 14px; color: rgba(255, 255, 255, 0.62); }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 80px; font-size: 15px; }
.spec-table caption { text-align: start; font-family: var(--font-head); font-weight: 800; font-size: 22px; padding-bottom: 16px; }
.spec-table th, .spec-table td { text-align: start; padding: 16px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 26%; color: var(--red-glow); font-weight: 700; }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: 1px solid var(--line); }

/* ── Operation (substation map) ─────────────────────── */
.op-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: center; }
.map-card { background: #f2f3f5; border-radius: 20px; padding: 18px; direction: ltr; }
.map-card svg { width: 100%; height: auto; }
.map-card svg text { font-family: var(--font-body); }
.steps { list-style: none; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid #e3e5ea; }
.steps li:last-child { border-bottom: 0; }
.steps .n { font-family: Arial, sans-serif; font-weight: 900; font-size: 30px; color: var(--red); line-height: 1; }
.steps h4 { font-size: 19px; margin-bottom: 4px; color: var(--navy); font-family: var(--font-head); }
.steps p { color: #555b66; font-size: 15px; }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 240px; gap: 14px; margin-top: 70px; }
.gallery figure { position: relative; border-radius: 16px; overflow: hidden; background: #000; }
.gallery figure:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.gallery figure:nth-child(2) { grid-column: span 2; grid-row: span 2; }
.gallery figure:nth-child(n+3) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 20px 16px; background: linear-gradient(transparent, rgba(0, 5, 38, 0.9)); color: #fff; font-weight: 700; font-size: 15px; }
.gallery figcaption small { display: block; font-weight: 400; opacity: 0.75; font-size: 13px; }

/* ── Platform / dashboard ───────────────────────────── */
.dash {
  direction: ltr; background: #050a2c; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px;
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(192, 23, 31, 0.15);
  overflow: hidden; font-size: 13px;
}
[dir="rtl"] .dash .t { direction: rtl; }
.dash-top { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); background: #070e38; }
.dash-top .dots { display: flex; gap: 6px; }
.dash-top .dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3f5c; }
.dash-top .brand { font-weight: 800; letter-spacing: 0.02em; }
.dash-top .brand em { font-style: normal; color: var(--red-glow); }
.dash-top .site { margin-left: auto; color: rgba(255, 255, 255, 0.6); display: flex; gap: 14px; align-items: center; }
.live { color: #23d18b; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.dash-body { display: grid; grid-template-columns: 60px 1fr; }
.dash-side { border-right: 1px solid rgba(255, 255, 255, 0.08); padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dash-side span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.5); }
.dash-side span.on { background: var(--red); color: #fff; }
.dash-side svg { width: 20px; height: 20px; }
.dash-main { display: grid; grid-template-columns: 1.25fr 1fr 0.9fr; grid-template-rows: auto auto; gap: 12px; padding: 14px; }
.panel { background: #0a1240; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.panel h5 { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.7); margin-bottom: 10px; display: flex; justify-content: space-between; gap: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
:lang(ar) .panel h5, :lang(ko) .panel h5 { text-transform: none; letter-spacing: 0; }
.panel h5 small { color: rgba(255, 255, 255, 0.45); font-weight: 400; text-transform: none; }
.panel.map { grid-row: span 2; }
.panel.map svg { width: 100%; height: auto; }
.feed { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.feed img { width: 100%; height: 100%; object-fit: cover; }
.feed .box { position: absolute; left: 50%; top: 4%; width: 34%; height: 26%; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.feed .lbl { position: absolute; left: 50%; top: 31%; background: var(--red); color: #fff; font-weight: 700; font-size: 11.5px; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.feed .scale { position: absolute; right: 6px; top: 8px; bottom: 8px; width: 8px; border-radius: 4px; background: linear-gradient(#fff6c2, #ffb000, #f0430f, #b1137a, #2a0b5a); }
.prpd svg { width: 100%; height: auto; display: block; }
.prpd .verdict { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 11.5px; }
.badge.crit { background: rgba(255, 59, 68, 0.18); color: #ff6b72; }
.badge.warn { background: rgba(255, 176, 0, 0.16); color: #ffc34d; }
.badge.ok { background: rgba(35, 209, 139, 0.15); color: #4be3a4; }
.alarms { list-style: none; display: grid; gap: 8px; }
.alarms li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.alarms li:last-child { border-bottom: 0; padding-bottom: 0; }
.alarms .t { line-height: 1.35; }
.alarms time { grid-column: 2; color: rgba(255, 255, 255, 0.4); font-size: 11.5px; }
.robot-stat { display: grid; gap: 10px; }
.bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-glow)); border-radius: 4px; }
.bar.green i { background: linear-gradient(90deg, #12a46b, #23d18b); }
.kv { display: flex; justify-content: space-between; color: rgba(255, 255, 255, 0.7); margin-bottom: 4px; gap: 8px; }
.kv b { color: #fff; }
.trend svg { width: 100%; height: 70px; display: block; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 60px; }
.feat { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.feat svg { width: 30px; height: 30px; color: var(--red-glow); margin-bottom: 14px; }
.feat h4 { font-size: 18px; margin-bottom: 6px; font-family: var(--font-head); }
.feat p { font-size: 14.5px; color: rgba(255, 255, 255, 0.62); }
.control-room { margin-top: 60px; border-radius: 20px; overflow: hidden; position: relative; }
.control-room img { width: 100%; max-height: 560px; object-fit: cover; }
.control-room figcaption { position: absolute; inset: auto 0 0 0; padding: 60px 32px 26px; background: linear-gradient(transparent, rgba(0, 5, 38, 0.92)); font-size: 18px; font-weight: 700; }

/* ── Why APM (compare) ──────────────────────────────── */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.compare th, .compare td { padding: 20px 22px; text-align: start; border-bottom: 1px solid #e3e5ea; vertical-align: top; }
.compare thead th { font-size: 14px; color: #6b7280; font-weight: 700; border-bottom: 2px solid var(--ink); }
.compare thead th.apm { background: var(--red); color: #fff; border-radius: 12px 12px 0 0; border-bottom-color: var(--red); font-size: 16px; }
.compare td.apm { background: #fdf2f2; color: var(--navy); font-weight: 700; }
.compare tbody th { color: var(--navy); width: 22%; }
.compare td.gen { color: #6b7280; }
.quote { margin-top: 56px; display: flex; gap: 22px; align-items: center; background: var(--navy); color: #fff; border-radius: 18px; padding: 34px 40px; }
.quote svg { width: 48px; height: 48px; flex-shrink: 0; color: var(--red-glow); }
.quote p { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; font-family: var(--font-head); line-height: 1.3; }

/* ── Market ─────────────────────────────────────────── */
.market-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mstat { border-left: 3px solid var(--red-glow); padding: 6px 0 6px 22px; }
[dir="rtl"] .mstat { border-left: 0; border-right: 3px solid var(--red-glow); padding: 6px 22px 6px 0; }
.mstat b { font-family: Arial, sans-serif; font-weight: 900; font-size: clamp(40px, 4.6vw, 62px); line-height: 1; display: block; margin-bottom: 10px; }
.mstat span { color: rgba(255, 255, 255, 0.72); font-size: 15px; }
.inspired { margin-top: 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.insp { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.insp .who { font-family: var(--font-meta); font-size: 16px; letter-spacing: 0.06em; color: var(--red-glow); text-transform: uppercase; }
:lang(ar) .insp .who, :lang(ko) .insp .who { font-size: 13px; letter-spacing: 0; font-weight: 700; }
.insp h4 { font-size: 18px; margin: 6px 0; font-family: var(--font-head); }
.insp p { font-size: 14.5px; color: rgba(255, 255, 255, 0.62); }

/* ── Applications ───────────────────────────────────── */
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.app { background: var(--paper); border-radius: var(--radius); padding: 28px 24px; transition: background 0.25s, color 0.25s, transform 0.25s; }
.app:hover { background: var(--red); color: #fff; transform: translateY(-4px); }
.app:hover p { color: rgba(255, 255, 255, 0.85); }
.app:hover svg { color: #fff; }
.app svg { width: 40px; height: 40px; color: var(--red); margin-bottom: 18px; transition: color 0.25s; }
.app h4 { font-size: 18px; margin-bottom: 6px; color: inherit; font-family: var(--font-head); }
.app p { font-size: 14.5px; color: #555b66; }

.model { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 90px; }
.model > div { border-radius: var(--radius); padding: 30px; background: var(--navy); color: #fff; }
.model .k { font-family: var(--font-meta); color: var(--red-glow); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
:lang(ar) .model .k, :lang(ko) .model .k { font-size: 13px; letter-spacing: 0; font-weight: 700; }
.model h4 { font-size: 22px; margin: 6px 0 8px; font-family: var(--font-head); }
.model p { color: rgba(255, 255, 255, 0.66); font-size: 15px; }

/* ── Global ─────────────────────────────────────────── */
.global-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
.global-img { border-radius: 20px; overflow: hidden; position: relative; }
.global-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.offices { display: grid; gap: 16px; margin-top: 30px; }
.office { display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.office .flag { width: 54px; height: 54px; border-radius: 12px; background: var(--red); display: grid; place-items: center; font: 900 15px Arial, sans-serif; }
.office b { display: block; font-size: 17px; }
.office span { color: rgba(255, 255, 255, 0.62); font-size: 14px; }
.logos { margin-top: 70px; text-align: center; }
.logos p { color: rgba(255, 255, 255, 0.55); font-size: 14px; margin-bottom: 18px; }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.logo-row span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: rgba(255, 255, 255, 0.8); }

/* ── Roadmap ────────────────────────────────────────── */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.roadmap svg.rail { position: absolute; left: 0; right: 0; top: 18px; width: 100%; height: 12px; direction: ltr; }
[dir="rtl"] .roadmap svg.rail { transform: scaleX(-1); }
.phase { position: relative; padding-top: 56px; }
.phase .node { position: absolute; top: 8px; inset-inline-start: 0; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 8px solid var(--red); }
.phase .when { font-family: var(--font-meta); font-size: 18px; color: var(--red); letter-spacing: 0.04em; }
:lang(ar) .phase .when { font-size: 15px; font-weight: 700; }
.phase h4 { font-size: 22px; color: var(--navy); margin: 4px 0 10px; font-family: var(--font-head); }
.phase ul { list-style: none; color: #555b66; font-size: 15px; display: grid; gap: 4px; }
.phase ul li::before { content: "— "; color: var(--red); }

/* ── CTA / Footer ───────────────────────────────────── */
.cta { background: var(--red); padding: 110px 0; overflow: hidden; }
.cta .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; position: relative; z-index: 1; }
.cta h2 { font-size: clamp(36px, 5vw, 64px); margin-bottom: 18px; }
.cta p { font-size: 18px; opacity: 0.92; margin-bottom: 28px; }
.cta-hex { position: absolute; inset-inline-end: -120px; top: -80px; width: 560px; opacity: 0.12; pointer-events: none; }
.contact-card { background: rgba(0, 5, 38, 0.35); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 18px; padding: 30px; display: grid; gap: 16px; }
.contact-card div { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 15px; }
.contact-card svg { width: 22px; height: 22px; margin-top: 2px; }
.contact-card a { text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
.contact-card bdi { unicode-bidi: isolate; direction: ltr; }
footer { background: var(--navy); padding: 50px 0 40px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
footer p { color: rgba(255, 255, 255, 0.5); font-size: 13.5px; }
.tagline-apm { font-family: "League Gothic", sans-serif; letter-spacing: 0.12em; font-size: 18px; color: rgba(255, 255, 255, 0.8); direction: ltr; }
.tagline-apm b { color: var(--red-glow); font-weight: 400; }

/* ── Reveal ─────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 17px; }
  .dash-main { grid-template-columns: 1fr 1fr; }
  .panel.map { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 960px) {
  section { padding: 88px 0; }
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav { position: fixed; inset: 72px 0 auto 0; background: var(--navy); flex-direction: column; gap: 0; padding: 10px 28px 24px; display: none; margin: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 20px; }
  [dir="rtl"] .main-nav { direction: rtl; }
  .hero-band .wrap, .statement-grid, .product-stage, .payload, .op-grid, .global-grid, .cta .wrap { grid-template-columns: 1fr; }
  .cards4, .apps, .market-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .layers { grid-template-columns: 1fr; }
  .connector { width: auto; height: 44px; }
  .connector svg { transform: rotate(90deg); }
  [dir="rtl"] .connector svg { transform: rotate(90deg); }
  .feat-grid, .inspired, .model { grid-template-columns: 1fr 1fr; }
  .roadmap { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .roadmap svg.rail { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .gallery figure:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .hero-hud .hud-chip:nth-child(3) { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .logo-text span { display: none; }
  .lang-switch button { padding: 6px 9px; font-size: 12px; }
  .cards4, .apps, .market-grid, .stats, .sensors, .feat-grid, .inspired, .model, .roadmap { grid-template-columns: 1fr; }
  .dash-main { grid-template-columns: 1fr; }
  .panel.map { grid-column: auto; }
  .dash-body { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .dash-top .site span:not(.live) { display: none; }
  .hero-band { padding-top: 120px; }
  .hero-visual img { height: 56vh; }
  .hud-chip { font-size: 11.5px; padding: 8px 10px; }
  .hero-hud .hud-chip { display: none; }
  .hero-hud .hud-chip:nth-child(2) { display: flex; left: auto !important; right: 14px; top: auto !important; bottom: 22%; max-width: 70%; }
  .compare th, .compare td { padding: 14px 10px; font-size: 14px; }
  .system { padding: 22px; }
  .quote { flex-direction: column; align-items: flex-start; padding: 28px; }
}

/* Keep numeric figures (4-in-1, 1,200+, 78.4 °C) in LTR order inside RTL text */
.stat b, .mstat b, .when, .kv b, .alarms time, .feed .lbl { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .stat b, [dir="rtl"] .mstat b { text-align: right; }
