:root {
  --red: #a51f24;
  --red-dark: #74161a;
  --ink: #1e252d;
  --ink-soft: #303944;
  --muted: #69717b;
  --paper: #f7f1e5;
  --paper-2: #efe5d3;
  --white: #ffffff;
  --gold: #c7942d;
  --gold-soft: #ecd59b;
  --green: #326b5d;
  --blue: #1f6f8b;
  --line: rgba(30, 37, 45, 0.12);
  --line-strong: rgba(30, 37, 45, 0.2);
  --shadow: 0 24px 70px rgba(18, 24, 32, 0.16);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.notice {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  padding: 0.5rem clamp(1rem, 4vw, 4.5rem);
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem clamp(1rem, 4vw, 4.5rem);
  background: rgba(247, 241, 229, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 3.35rem;
  height: 3.35rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.primary-nav a {
  border-radius: 999px;
  padding: 0.52rem 0.82rem;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a[aria-current="page"] {
  background: rgba(165, 31, 36, 0.09);
  color: var(--red-dark);
  outline: none;
}

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0.68rem;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 0.3rem 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 82svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/hero-yemen-vision.png");
  background-position: center;
  background-size: cover;
  z-index: -2;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(30, 37, 45, 0.08), rgba(30, 37, 45, 0.42) 44%, rgba(30, 37, 45, 0.86)),
    linear-gradient(0deg, rgba(12, 16, 20, 0.72), rgba(12, 16, 20, 0.1) 55%, rgba(12, 16, 20, 0.18));
  z-index: -1;
}

.hero-content,
.history-hero,
.section-heading,
.state-layout,
.leaders-grid,
.cabinet-board,
.rebuild-dashboard,
.rebuild-tracks,
.service-grid,
.identity-layout,
.history-timeline,
.lessons-grid,
.source-list {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero-content {
  padding: clamp(5rem, 10vw, 8.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  color: var(--white);
}

.eyebrow,
.section-heading p {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero h1,
.history-hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  line-height: 1.03;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy,
.history-hero p {
  width: min(800px, 100%);
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  border-radius: var(--radius);
  padding: 0.75rem 1.15rem;
  font-weight: 800;
}

.button.primary {
  background: var(--gold);
  color: #21170b;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: var(--white);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(960px, 100%);
  margin: clamp(2.2rem, 5vw, 4rem) 0 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.hero-facts div {
  padding: 1rem 1.15rem;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-facts div:last-child {
  border-inline-start: 0;
}

.hero-facts dt {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.hero-facts dd {
  margin: 0.12rem 0 0;
  font-size: 1.08rem;
  font-weight: 800;
}

section,
.platform-strip {
  padding: clamp(3.75rem, 7vw, 6.2rem) clamp(1rem, 4vw, 4.5rem);
}

.platform-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink);
  color: var(--white);
  padding-block: 0;
}

.platform-strip article {
  min-height: 15rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.platform-strip span,
.cabinet-board span,
.leader-card span,
.service-code,
.track-code {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.platform-strip h2 {
  margin: 1.4rem 0 0.55rem;
  font-size: 1.45rem;
}

.platform-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.section-heading {
  margin-bottom: clamp(1.35rem, 3vw, 2.4rem);
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 3.15rem);
  line-height: 1.25;
  text-wrap: balance;
}

.text-link {
  color: var(--red-dark);
  font-weight: 800;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.1rem;
}

.state-section,
.services-section,
.lessons-section {
  background: var(--paper);
}

.state-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 1.25rem;
}

.state-lead {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem);
  background: var(--white);
  box-shadow: 0 18px 50px rgba(30, 37, 45, 0.07);
}

.state-lead h3,
.rebuild-main h3,
.identity-copy h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.3;
}

.state-lead p,
.identity-copy p,
.rebuild-main p {
  margin: 0;
  color: var(--muted);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.principles-grid article,
.cabinet-board article,
.service-grid article,
.rebuild-tracks article,
.lessons-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  padding: 1.2rem;
}

.principles-grid strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

.principles-grid span {
  color: var(--muted);
}

.government-section,
.identity-section,
.sources-section {
  background: var(--white);
}

.leaders-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.leader-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf6;
  box-shadow: 0 16px 42px rgba(30, 37, 45, 0.08);
}

.leader-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper-2);
}

.leader-card div {
  padding: 1rem;
}

.leader-card h3,
.cabinet-board h3,
.service-grid h3,
.rebuild-tracks h3,
.lessons-grid h3 {
  margin: 0.25rem 0 0.45rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.leader-card p,
.cabinet-board p,
.service-grid p,
.rebuild-tracks p,
.lessons-grid p {
  margin: 0;
  color: var(--muted);
}

.cabinet-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.cabinet-board article {
  background: var(--white);
  min-height: 12rem;
}

.rebuild-section {
  background:
    linear-gradient(135deg, rgba(30, 37, 45, 0.96), rgba(31, 111, 139, 0.9)),
    var(--ink);
  color: var(--white);
}

.rebuild-section .section-heading p,
.rebuild-section .section-heading h2 {
  color: var(--white);
}

.rebuild-section .section-heading p {
  color: var(--gold-soft);
}

.rebuild-dashboard {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.25rem;
}

.rebuild-main,
.metric-panel {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.rebuild-main p {
  color: rgba(255, 255, 255, 0.74);
  width: min(720px, 100%);
}

.milestone-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.milestone-row span {
  min-height: 3rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  text-align: center;
}

.metric-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.metric-panel div {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.9rem;
}

.metric-panel dt {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.metric-panel dd {
  margin: 0.18rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
}

.rebuild-tracks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rebuild-tracks article {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.rebuild-tracks strong {
  display: block;
  margin-top: 0.8rem;
  color: var(--green);
  font-size: 0.92rem;
}

.service-toolbar label {
  display: grid;
  gap: 0.35rem;
  width: min(390px, 100%);
}

.service-toolbar span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.service-toolbar input {
  min-height: 3rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 0.65rem 0.9rem;
}

.service-toolbar input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 111, 139, 0.16);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.service-grid article {
  display: grid;
  align-content: start;
  min-height: 20rem;
  background: var(--white);
}

.service-grid article.is-hidden {
  display: none;
}

.service-grid ul {
  margin: 0.85rem 0 0;
  padding: 0 1.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.service-grid a {
  justify-self: start;
  align-self: end;
  margin-top: 1rem;
  color: var(--red-dark);
  font-weight: 800;
  border-bottom: 2px solid var(--gold);
}

.identity-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.1fr 0.7fr;
  gap: 1.25rem;
  align-items: stretch;
}

.emblem-showcase {
  display: grid;
  place-items: center;
  min-height: 20rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffaf0, var(--paper-2));
}

.emblem-showcase img {
  width: min(17rem, 76%);
  filter: drop-shadow(0 20px 32px rgba(30, 37, 45, 0.18));
}

.identity-copy {
  display: grid;
  align-content: center;
  border-block: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.motto-panel {
  margin-top: 1.25rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  padding: 1.1rem;
}

.motto-panel span {
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 800;
}

.motto-panel strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.35rem;
  line-height: 1.35;
}

.color-system {
  display: grid;
  gap: 0.6rem;
  align-content: center;
}

.color-system span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 0.55rem 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.color-system span::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.history-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.25rem;
  align-items: end;
  padding-block: clamp(5rem, 10vw, 7.5rem);
}

.history-hero h1 {
  color: var(--ink);
  font-size: clamp(2.6rem, 6vw, 5.6rem);
}

.history-hero p {
  color: var(--muted);
}

.history-hero aside {
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(165, 31, 36, 0.92), rgba(31, 111, 139, 0.86)),
    var(--ink);
  color: var(--white);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
}

.history-hero aside strong {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
}

.history-hero aside span {
  display: block;
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.history-section {
  background: var(--white);
}

.history-timeline {
  display: grid;
  gap: 0.85rem;
}

.history-timeline article {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf6;
  padding: 1.15rem;
}

.history-timeline time {
  color: var(--red-dark);
  font-weight: 800;
}

.history-timeline h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

.history-timeline p {
  margin: 0;
  color: var(--muted);
}

.history-timeline .future-node {
  background: var(--ink);
  color: var(--white);
  border-color: transparent;
}

.history-timeline .future-node time {
  color: var(--gold-soft);
}

.history-timeline .future-node p {
  color: rgba(255, 255, 255, 0.78);
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.source-list a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem;
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 2rem clamp(1rem, 4vw, 4.5rem);
  background: #151b21;
  color: var(--paper);
}

.site-footer p {
  margin: 0.25rem 0 0;
  color: rgba(247, 241, 229, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--gold-soft);
  font-weight: 800;
}

@media (max-width: 1080px) {
  .leaders-grid,
  .platform-strip,
  .service-grid,
  .lessons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rebuild-tracks,
  .cabinet-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .primary-nav {
    position: absolute;
    inset: calc(100% + 1px) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    border-radius: var(--radius);
  }

  .menu-toggle {
    display: block;
  }

  .hero-facts,
  .state-layout,
  .rebuild-dashboard,
  .identity-layout,
  .history-hero {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    display: grid;
    align-items: start;
  }

  .milestone-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .notice {
    text-align: start;
  }

  .brand small {
    max-width: 13.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3rem, 19vw, 5rem);
  }

  .hero-content {
    padding-top: 4.5rem;
  }

  .hero-actions .button,
  .service-toolbar label {
    width: 100%;
  }

  .hero-facts div {
    border-inline-start: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .hero-facts div:last-child {
    border-bottom: 0;
  }

  .platform-strip,
  .leaders-grid,
  .principles-grid,
  .cabinet-board,
  .rebuild-tracks,
  .service-grid,
  .metric-panel,
  .lessons-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

  .history-timeline article {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
