/* حقك تعرف: الأنماط العامة */
:root {
  --gold: #C9A54C;
  --gold-hover: #E2C67A;
  --gold-ink: #7A5C14;
  --ink: #121212;
  --ink-2: #171716;
  --ink-3: #1B1B1A;
  --ink-4: #0C0C0C;
  --stone: #F4F1EA;
  --stone-2: #EAE5D9;
  --text-dark: #1A1A1A;
  --text-dark-2: #3D3A34;
  --text-dark-3: #5A554C;
  --text-light: #F4F1EA;
  --text-light-2: #CFC9BC;
  --text-light-3: #B8B2A6;
  --red: #CE1126;
  --line-gold: rgba(201, 165, 76, 0.3);
  --radius: 14px;
  --max: 1240px;
  --font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.4; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.skip-link {
  position: absolute; top: -60px; right: 16px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* شريط النسخة التجريبية: يحذف عند الإطلاق */
.preview-band {
  background: var(--gold); color: var(--ink);
  text-align: center; font-size: 13px; font-weight: 600; padding: 7px 16px;
}

/* خط المعالم من غلاف الوزارة، يلون بأي لون عبر القناع */
.skyline {
  position: absolute; inset-inline: 0; bottom: 0; height: 200px;
  background-color: var(--gold);
  -webkit-mask: url("../img/landmarks-mask.webp") no-repeat center bottom / contain;
          mask: url("../img/landmarks-mask.webp") no-repeat center bottom / contain;
  opacity: .32; pointer-events: none;
}
.skyline--white { background-color: #fff; opacity: .1; height: 150px; }
.skyline--ink { background-color: var(--text-dark); opacity: .08; height: 160px; }

/* الترويسة */
.site-header { background: var(--ink); border-bottom: 1px solid rgba(201,165,76,.25); position: relative; z-index: 20; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text-light); }
.brand-mark { width: 54px; color: var(--gold); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 24px; color: var(--text-light); }
.brand-sub { font-size: 12px; color: var(--text-light-3); }
.ministry { display: flex; align-items: center; gap: 10px; padding-inline-start: 18px; border-inline-start: 1px solid rgba(201,165,76,.35); }
.ministry img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav a { color: #E8E3D8; text-decoration: none; }
.nav a:hover { color: var(--gold); }
.nav .lang {
  border: 1px solid rgba(201,165,76,.6); color: var(--gold); padding: 5px 14px;
  border-radius: 999px; font-size: 13px; font-family: system-ui, sans-serif;
}
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid rgba(201,165,76,.5); background: transparent; color: var(--gold);
  align-items: center; justify-content: center; cursor: pointer;
}

/* الواجهة */
.hero { position: relative; overflow: hidden; padding: 76px 0 210px; background: var(--ink); }
.hero-grid { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.eyebrow {
  align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--gold);
  border: 1px solid rgba(201,165,76,.5); padding: 3px 14px; border-radius: 999px;
}
.hero h1 { font-weight: 800; font-size: clamp(34px, 5vw, 60px); line-height: 1.35; }
.hero h1 span { color: var(--gold); }
.hero-lead { font-size: 19px; color: var(--text-light-2); max-width: 580px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 26px; border-radius: 10px; font-weight: 700; font-size: 16px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-hover); color: var(--ink); }
.btn--ghost { border-color: rgba(244,241,234,.4); color: var(--text-light); background: transparent; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--dark { background: var(--ink); color: var(--gold); }
.btn--dark:hover { color: var(--gold-hover); }
.hero-feature { flex: 0 1 340px; min-width: 0; display: flex; justify-content: center; }
.hero-feature .work { width: 100%; max-width: 320px; }

/* بطاقة العمل */
.work {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text-light);
  background: var(--ink-3); border: 1px solid var(--line-gold); border-radius: var(--radius);
  padding: 10px; transition: border-color .2s, transform .2s;
}
.work:hover { border-color: var(--gold); transform: translateY(-4px); color: var(--text-light); }
.work-media {
  position: relative; aspect-ratio: 9 / 14; border-radius: 8px; overflow: hidden;
  background: #0E0E0D; border: 1px solid rgba(201,165,76,.2);
}
.work-media::before {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 34%;
  background-color: var(--gold); opacity: .28;
  -webkit-mask: url("../img/landmarks-mask.webp") no-repeat center bottom / contain;
          mask: url("../img/landmarks-mask.webp") no-repeat center bottom / contain;
}
.work-media img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.work-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,12,12,.85), rgba(12,12,12,0) 45%);
}
.work-num {
  position: absolute; top: 8px; right: 10px; z-index: 1;
  font-family: var(--font-head); font-weight: 800; font-size: 26px; color: var(--gold);
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.work-play {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--gold);
  background: rgba(18,18,18,.7); display: flex; align-items: center; justify-content: center; color: var(--gold);
}
.work-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 4px 4px; flex-grow: 1; }
.work-tag { font-size: 12px; font-weight: 600; color: var(--gold); }
.work-title { font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.6; flex-grow: 1; }
.ai-label {
  align-self: flex-start; font-size: 11px; color: var(--text-light-3);
  border: 1px dashed rgba(184,178,166,.6); padding: 1px 8px; border-radius: 6px;
}

/* الالتزامات */
.commitments { background: var(--ink-2); border-block: 1px solid var(--line-gold); }
.commitments .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; padding-top: 38px; padding-bottom: 38px; }
.commit { display: flex; gap: 16px; align-items: flex-start; }
.commit svg { width: 40px; height: 40px; flex-shrink: 0; color: var(--gold); }
.commit h3 { font-size: 18px; font-weight: 700; }
.commit p { font-size: 14px; color: var(--text-light-3); }

/* الأقسام */
.section { position: relative; padding: 88px 0; overflow: hidden; }
.section--dark { background: var(--ink); color: var(--text-light); }
.section--light { background: var(--stone); color: var(--text-dark); }
.section--stone { background: var(--stone-2); color: var(--text-dark); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 40px; max-width: 760px; }
.section-head .kicker { font-size: 13px; font-weight: 700; color: var(--gold); }
.section--light .kicker, .section--stone .kicker { color: var(--gold-ink); }
.section-head h2 { font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { font-size: 17px; color: var(--text-light-3); }
.section--light .section-head p, .section--stone .section-head p { color: var(--text-dark-2); }

.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px; position: relative; }

/* المساران */
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.track {
  background: #fff; border: 1px solid #E3DED2; border-top: 4px solid var(--gold);
  border-radius: 16px; padding: 36px; display: flex; flex-direction: column; gap: 16px;
}
.track--intl { border-top-color: var(--text-dark); }
.track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.track h2 { font-size: 30px; font-weight: 800; }
.track .en { font-family: system-ui, sans-serif; font-size: 14px; color: var(--text-dark-3); }
.chip { font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.chip--dark { background: var(--ink); color: var(--gold); }
.chip--outline { border: 1px solid var(--text-dark); }
.track p { font-size: 16px; color: var(--text-dark-2); }
.track dl { margin: 0; display: grid; gap: 8px; font-size: 15px; color: var(--text-dark-2); }
.track dt { display: inline; font-weight: 700; color: var(--text-dark); }
.track dd { display: inline; margin: 0; }
.track a { color: var(--gold-ink); font-weight: 700; align-self: flex-start; }

/* الشركاء */
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.format { background: var(--ink); color: var(--text-light); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.format svg { width: 36px; height: 36px; color: var(--gold); }
.format h3 { font-size: 22px; font-weight: 700; }
.format p { font-size: 15px; color: var(--text-light-3); flex-grow: 1; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.steps li { border: 1px solid #CFC8B8; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; }
.steps li span { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--gold-ink); }
.partner-cta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 16px; }
.partner-cta a { color: var(--gold-ink); font-weight: 700; }

/* الميثاق */
.charter { display: flex; flex-wrap: wrap; gap: 56px; position: relative; }
.charter-aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.charter-aside .window { width: 120px; color: var(--gold-ink); opacity: .55; margin-bottom: 6px; }
.labels { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.labels .title { font-size: 14px; font-weight: 700; }
.label { align-self: flex-start; font-size: 13px; padding: 4px 12px; border-radius: 6px; }
.label--ai { border: 1px dashed var(--text-dark-3); }
.label--reenact { background: var(--text-dark); color: #fff; }
.label--persona { background: #E8D9AE; }
.redlines { flex: 2 1 520px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.redlines li { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid #DDD6C6; font-size: 18px; }
.redlines li:last-child { border-bottom: 0; }
.redlines .n { font-family: var(--font-head); font-weight: 800; font-size: 30px; color: var(--gold-ink); min-width: 36px; line-height: 1.2; }

/* الحسابات والأمان */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 48px; align-items: start; }
.accounts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.accounts li {
  border: 1px solid var(--line-gold); border-radius: 12px; padding: 14px 16px; background: var(--ink-3);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 15px;
}
.accounts li span { font-size: 13px; color: var(--gold); font-weight: 500; }
.safety {
  position: relative; overflow: hidden; background: var(--ink-3); border: 1px solid var(--line-gold);
  border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.safety .audience {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--gold);
  padding: 3px 12px; border-radius: 999px;
}
.safety h2 { font-size: 26px; font-weight: 800; }
.safety > p { color: var(--text-light-3); font-size: 15px; }
.safety ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 16px; color: #E8E3D8; }
.safety li { display: flex; gap: 12px; }
.safety li b { color: var(--gold); font-weight: 800; }
.safety .window { position: absolute; left: 22px; top: 22px; width: 64px; color: var(--gold); opacity: .25; }

/* التذييل */
.site-footer { position: relative; overflow: hidden; background: var(--ink-4); padding: 60px 32px 170px; border-top: 1px solid rgba(201,165,76,.25); text-align: center; }
.site-footer .inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.site-footer .footer-brand { display: flex; align-items: center; gap: 12px; }
.site-footer .footer-brand svg { width: 48px; color: var(--gold); }
.site-footer .footer-brand span { font-family: var(--font-head); font-weight: 800; font-size: 26px; }
.site-footer img { width: 120px; height: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; font-size: 14px; }
.site-footer nav a { color: var(--text-light-2); text-decoration: none; }
.site-footer small { font-size: 13px; color: #8F897D; }

/* نافذة عرض الفيديو */
.player { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.player::backdrop { background: rgba(8,8,8,.88); }
.player-box { position: relative; width: min(380px, 92vw); display: flex; flex-direction: column; gap: 12px; }
.player-frame { aspect-ratio: 9 / 16; max-height: 78vh; width: 100%; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-gold); }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-light); }
.player-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.player-close {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-gold); background: var(--ink-3);
  color: var(--text-light); font-size: 22px; cursor: pointer; flex-shrink: 0;
}
.player-note { font-size: 12px; color: var(--text-light-3); }

/* صفحات داخلية */
.page-hero { position: relative; overflow: hidden; padding: 64px 0 150px; background: var(--ink); }
.page-hero h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
.page-hero p { margin-top: 14px; font-size: 18px; color: var(--text-light-2); max-width: 680px; }
.prose { max-width: 860px; }
.prose h2 { font-size: 28px; font-weight: 800; margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 17px; color: var(--text-dark-2); }
.prose ul, .prose ol { padding-inline-start: 22px; display: grid; gap: 8px; }
.table-wrap { overflow-x: auto; border: 1px solid #E3DED2; border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; padding: 14px 18px; border-bottom: 1px solid #EEE9DE; vertical-align: top; }
th { background: var(--stone-2); font-weight: 700; color: var(--text-dark); }
tr:last-child td { border-bottom: 0; }

/* الشاشات الصغيرة */
@media (max-width: 980px) {
  .ministry { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--ink); border-bottom: 1px solid var(--line-gold); padding: 8px 20px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid rgba(201,165,76,.12); }
  .nav .lang { align-self: flex-start; margin-top: 12px; border-bottom: 1px solid rgba(201,165,76,.6); }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 44px 0 150px; }
  .skyline { height: 130px; }
  .section { padding: 60px 0; }
  .works-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 200px; overflow-x: auto; padding-bottom: 8px; margin-inline: -20px; padding-inline: 20px; scroll-snap-type: x mandatory; }
  .works-grid .work { scroll-snap-align: start; }
  .tracks, .accounts-grid { grid-template-columns: 1fr; }
  .track { padding: 24px; }
  .track h2 { font-size: 24px; }
  .accounts { grid-template-columns: 1fr; }
  .brand-name { font-size: 21px; }
  .brand-mark { width: 46px; }
  .redlines li { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work { transition: none; }
}
@media (max-width: 640px) {
  .hero-feature .work { max-width: 250px; }
}
.site-footer .credit { color: #A39D90; border-top: 1px solid rgba(201,165,76,.2); padding-top: 12px; margin-top: 4px; }

/* معالم اليمن من غلاف الوزارة: الرسم كما هو دون تكرار */
.skyline { height: min(30vw, 470px); opacity: .38; }
.hero { padding-bottom: min(25vw, 390px); }
.skyline--white { height: min(22vw, 300px); opacity: .13; }
.site-footer { padding-bottom: min(22vw, 300px); }
.skyline--ink { height: min(24vw, 340px); opacity: .07; }
.page-hero { padding-bottom: min(20vw, 290px); }
.page-hero .skyline { height: min(22vw, 320px); }
.login { padding-bottom: min(26vw, 380px); }
@media (max-width: 640px) {
  .skyline { height: 30vw; }
  .hero { padding-bottom: 34vw; }
  .site-footer { padding-bottom: 30vw; }
}
