/* =============================================================================
   Veyra ID — Digital MVP
   base.css — المتغيرات، التهيئة، الطباعة، الهيكل العام، الشريط العلوي والتذييل
   ============================================================================= */

:root {
  /* الخلفيات */
  --bg: #06171b;
  --bg-2: #02090b;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.10);
  --stroke: rgba(255, 255, 255, 0.13);
  --stroke-strong: rgba(56, 240, 224, 0.30);

  /* النصوص */
  --text: #eafdfb;
  --muted: #a4c7c7;

  /* ألوان الذكاء والحالة */
  --cyan: #38f0e0;
  --teal: #1fb89c;
  --amber: #ffb24d;
  --red: #ff5d6c;
  --green: #57e08a;
  --blue: #5aa2ff;
  --purple: #9b7bff;

  /* قياسات */
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.24);
  --maxw: 1480px;

  --fs-base: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Segoe UI", "Tahoma", "Noto Kufi Arabic", Arial, sans-serif;
  font-size: var(--fs-base);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(56, 240, 224, 0.18), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(90, 162, 255, 0.15), transparent 32%),
    linear-gradient(155deg, var(--bg), var(--bg-2) 75%);
  background-attachment: fixed;
  line-height: 1.6;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.3px; line-height: 1.18; }
h1 { font-size: clamp(30px, 4vw, 54px); letter-spacing: -1.2px; }
h2 { font-size: clamp(24px, 2.4vw, 34px); }
h3 { font-size: clamp(18px, 1.5vw, 22px); }
p { margin: 10px 0 0; line-height: 1.85; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }

/* ---------- لوح زجاجي عام ---------- */
.glass {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- الهيكل العام ---------- */
.page {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0 40px;
}

.section { margin: 0 0 54px; scroll-margin-top: 84px; }

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 { margin-bottom: 8px; }
.section-head p { margin-top: 4px; color: var(--muted); max-width: 880px; font-size: 15px; }

/* ---------- الشريط العلوي ---------- */
.topbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  background: rgba(4, 16, 19, 0.72);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.topbar-inner {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 0 18px rgba(56, 240, 224, 0.55);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px;
  border-radius: 50%; border: 2px solid rgba(4, 16, 19, 0.85);
}
.brand-name { font-weight: 900; font-size: 19px; letter-spacing: 0.3px; }
.brand-tag {
  font-size: 11px; font-weight: 800; color: var(--cyan);
  border: 1px solid var(--stroke-strong); border-radius: 999px;
  padding: 3px 9px; letter-spacing: 0.5px;
}
.topnav { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
.topnav a {
  color: var(--muted); font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 10px; transition: all 0.15s ease;
}
.topnav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- التذييل ---------- */
.footer {
  border-top: 1px solid var(--stroke);
  background: rgba(3, 12, 14, 0.55);
  margin-top: 30px;
}
.footer-inner {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 34px;
  text-align: center;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { font-size: 18px; }
.footer-note {
  max-width: 880px; margin: 0 auto 12px; color: var(--muted);
  font-size: 14px; line-height: 1.9;
}

/* ---------- إشعار عابر ---------- */
.toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 30px;
  transform: translateX(50%) translateY(20px);
  background: rgba(4, 20, 22, 0.95);
  border: 1px solid var(--stroke-strong);
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 700;
  box-shadow: var(--shadow);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

/* ---------- وضع العرض أمام اللجنة ---------- */
body.presentation { --fs-base: 18.5px; }
body.presentation .topnav { display: none; }
body.presentation .hero-note,
body.presentation .chip-note,
body.presentation .sim-explain,
body.presentation .arch-step small,
body.presentation .df-step small { font-size: 0.95em; }
body.presentation #liveInterpretation { font-size: 1.25em; font-weight: 700; }
body.presentation .state-chip { font-size: 1.05em; }
body.presentation #btnPresentation { background: linear-gradient(135deg, var(--teal), #0f6a60); color: #00201c; }

/* ---------- الاستجابة ---------- */
@media (max-width: 1080px) {
  .page { padding-top: 84px; }
  .topnav { display: none; }
}
@media print {
  .topbar, .footer, .sim-controls, .alerts-toggles, .report-actions, #toast { display: none !important; }
  body { background: #fff; color: #000; }
}
