/* ---------- Tokens (sampled from the YACV seal) ---------- */
:root {
  --red: #CF212A;
  --red-deep: #A8171F;
  --navy: #263576;
  --navy-deep: #1A2557;
  --ink: #232323;
  --paper: #F3F4F8;
  --white: #FFFFFF;
  --mute: #5B6079;

  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Readex Pro", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.band--red :focus-visible, .band--navy :focus-visible, .programs :focus-visible, .footer :focus-visible { outline-color: var(--white); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--light { color: var(--white); }

.h2 {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-top: 14px;
  text-wrap: balance;
}
.h2--light { color: var(--white); }

/* Arabic: Archivo has no Arabic glyphs — hand display duty to Readex Pro */
[dir="rtl"] .h2, [dir="rtl"] .hero__title, [dir="rtl"] .eyebrow, [dir="rtl"] .brand__name,
[dir="rtl"] .ledger dt, [dir="rtl"] .board__item h3, [dir="rtl"] .way h3, [dir="rtl"] .ledger__side,
[dir="rtl"] .btn, [dir="rtl"] .tag, [dir="rtl"] .footer__name {
  font-family: var(--body);
  letter-spacing: 0;
  text-transform: none;
}
[dir="rtl"] .eyebrow { font-size: 0.95rem; font-weight: 600; }
[dir="rtl"] .h2 { font-weight: 700; line-height: 1.25; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  text-decoration: none; border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-deep); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(38,53,118,.1);
}
.nav__inner {
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter);
  height: 68px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.brand img { border-radius: 50%; }
.brand__name { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 1.3rem; letter-spacing: 0.04em; color: var(--navy); }
.nav__links { display: flex; gap: 28px; }
.nav__links a { text-decoration: none; font-weight: 450; font-size: 0.95rem; color: var(--ink); position: relative; padding-block: 6px; }
.nav__links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .25s; }
.nav__links a:hover::after { transform: scaleX(1); }

.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1.5px solid var(--navy); border-radius: 999px; background: var(--white); cursor: pointer;
  font: 600 0.8rem/1 var(--body); color: var(--navy);
}
.lang span { padding: 7px 11px; border-radius: 999px; transition: background-color .2s, color .2s; }
html[lang="en"] .lang [data-lang-opt="en"], html[lang="ar"] .lang [data-lang-opt="ar"] { background: var(--navy); color: var(--white); }

.nav__menu { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; place-items: center; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: var(--navy); position: relative; transition: transform .25s, background-color .25s; }
.burger::before, .burger::after { content: ""; position: absolute; inset-inline-start: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.nav__menu[aria-expanded="true"] .burger { background: transparent; }
.nav__menu[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.nav__menu[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

.mobile { display: grid; padding: 8px var(--gutter) 20px; border-top: 1px solid rgba(38,53,118,.1); }
.mobile[hidden] { display: none; }
.mobile a { padding: 14px 0; text-decoration: none; font-size: 1.1rem; border-bottom: 1px solid rgba(38,53,118,.08); }

/* ---------- Hero: Yemen's stripes run down into the Australian sky ---------- */
.hero { position: relative; overflow: hidden; }
.band { position: relative; }
.band--red { background: var(--red); padding-block: clamp(36px, 6vw, 72px) clamp(20px, 3vw, 32px); }
.band--white { background: var(--white); padding-block: clamp(28px, 4vw, 48px); }
.band--black { background: var(--ink); height: clamp(14px, 1.6vw, 22px); }
.band--navy { background: var(--navy); padding-block: clamp(44px, 6vw, 80px) clamp(64px, 8vw, 104px); overflow: hidden; }

.hero__title {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(2.6rem, 8.4vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 11ch;
}
.hero__line { display: block; }
.hero__line--a { color: var(--red); }
.hero__line--b { color: var(--navy); }
[dir="rtl"] .hero__title { font-weight: 700; line-height: 1.15; max-width: none; font-size: clamp(2.4rem, 7vw, 6rem); }

.hero__body { position: relative; z-index: 1; }
.hero__lede { color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 300; max-width: 52ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.cross {
  position: absolute; inset-inline-end: clamp(-60px, 2vw, 40px); bottom: -30px;
  width: clamp(220px, 32vw, 420px); height: auto; opacity: .9;
}
[dir="rtl"] .cross { transform: scaleX(-1); }

/* The seal straddles the red/white seam, like it's pinning the two flags together */
.seal {
  position: absolute; z-index: 2;
  inset-inline-end: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  top: clamp(40px, 5vw, 70px);
  width: clamp(150px, 24vw, 330px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  padding: clamp(6px, .8vw, 10px);
  box-shadow: 0 30px 60px -20px rgba(26,37,87,.45);
}
.seal img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* Load sequence: stripes unfurl top-to-bottom, then the seal lands */
@media (prefers-reduced-motion: no-preference) {
  .band--red, .band--white, .band--black, .band--navy { animation: unfurl .8s cubic-bezier(.2,.7,.1,1) both; transform-origin: top; }
  .band--white { animation-delay: .12s; }
  .band--black { animation-delay: .22s; }
  .band--navy  { animation-delay: .3s; }
  .hero__line { animation: rise .9s cubic-bezier(.2,.7,.1,1) both; }
  .hero__line--a { animation-delay: .35s; }
  .hero__line--b { animation-delay: .48s; }
  .seal { animation: land 1.1s cubic-bezier(.2,.8,.2,1) .55s both; }
  .cross use { animation: twinkle 4s ease-in-out infinite; }
  .cross use:nth-child(2) { animation-delay: 1.1s; }
  .cross use:nth-child(3) { animation-delay: 2.3s; }
  .cross use:nth-child(4) { animation-delay: .6s; }
  .cross use:nth-child(5) { animation-delay: 1.8s; }
}
@keyframes unfurl { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(0.4em); } to { opacity: 1; transform: none; } }
@keyframes land { from { opacity: 0; transform: rotate(-30deg) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- Recent events (Instagram) ---------- */
.recent { padding-block: var(--section) 0; }
.recent__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.ig-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px;
  border: 1.5px solid rgba(38,53,118,.25); border-radius: 999px;
  color: var(--navy); font-weight: 500; text-decoration: none; transition: border-color .2s, background-color .2s;
}
.ig-link:hover { border-color: var(--navy); background: var(--paper); }

.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 32px); margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; }
.event { display: flex; flex-direction: column; background: var(--white); border-radius: 14px; overflow: hidden; border: 1px solid rgba(38,53,118,.12); transition: transform .25s, box-shadow .25s; }
.event:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(26,37,87,.45); }
.event__media { aspect-ratio: 1; overflow: hidden; background: var(--paper); }
.event__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.event:hover .event__media img { transform: scale(1.03); }
.event__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 24px; flex: 1; }
.event__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: .88rem; color: var(--mute); }
.event__title { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 1.3rem; line-height: 1.15; color: var(--navy); margin-top: 6px; }
.event__place { font-size: .9rem; font-weight: 500; color: var(--red); }
.event__text { color: var(--mute); font-size: .97rem; }
.event__link { margin-top: auto; padding-top: 10px; align-self: flex-start; font-weight: 600; font-size: .92rem; color: var(--navy); text-underline-offset: 4px; text-decoration-color: rgba(38,53,118,.35); }
.event__link:hover { text-decoration-color: currentColor; }

.tag--community { background: var(--navy); color: var(--white); }
.tag--celebration { background: var(--red); color: var(--white); }
.tag--national { background: var(--ink); color: var(--white); }
.tag--charity { border: 1.5px solid var(--navy); color: var(--navy); }

/* Newest post leads, full width, set in type on the flag red */
.event--lead { grid-column: 1 / -1; background: var(--red); border: 0; color: var(--white); }
.event--lead .event__body { display: grid; grid-template-columns: 7fr 5fr; column-gap: clamp(32px, 6vw, 96px); padding: clamp(32px, 5vw, 64px); }
.event--lead .event__meta { grid-column: 1 / -1; color: rgba(255,255,255,.85); }
.event--lead .event__title { grid-column: 1; grid-row: 2 / span 2; font-stretch: 125%; font-weight: 900; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: .98; letter-spacing: -.01em; color: var(--white); margin-top: 18px; text-wrap: pretty; }
.event--lead .event__place { grid-column: 2; margin-top: 22px; color: var(--white); font-size: 1rem; }
.event--lead .event__text { grid-column: 2; color: rgba(255,255,255,.88); font-size: 1.08rem; }
.event--lead .event__link { grid-column: 2; color: var(--white); text-decoration-color: rgba(255,255,255,.5); }
.event--lead .tag--community { background: var(--white); color: var(--red); }
.event--lead :focus-visible { outline-color: var(--white); }
[dir="rtl"] .event__title { font-family: var(--body); letter-spacing: 0; }
[dir="rtl"] .event--lead .event__title { font-weight: 700; line-height: 1.25; }

/* ---------- About ---------- */
.about { padding-block: var(--section); }
.about__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.about__mission { font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 300; line-height: 1.55; color: var(--ink); }

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); margin-top: clamp(48px, 7vw, 88px); }
.ledger__side {
  font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 0.85rem; letter-spacing: .18em; text-transform: uppercase;
  padding-bottom: 14px; border-bottom: 4px solid;
}
.ledger__col:first-child .ledger__side { color: var(--red); border-color: var(--red); }
.ledger__col:last-child .ledger__side { color: var(--navy); border-color: var(--navy); }
.ledger__row { display: grid; grid-template-columns: 11rem 1fr; gap: 20px; padding-block: 22px; border-bottom: 1px solid rgba(38,53,118,.14); }
.ledger dt { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.ledger dd { color: var(--mute); font-size: 1rem; }

/* ---------- Programs ---------- */
.programs { background: var(--navy); color: var(--white); padding-block: var(--section); position: relative; }
.programs::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 8px; background: linear-gradient(to bottom, var(--red) 0 33.3%, var(--white) 33.3% 66.6%, var(--ink) 66.6%); }
.section-head { max-width: 760px; }
.board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-top: clamp(40px, 6vw, 72px); background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.14); border-radius: 14px; overflow: hidden; }
.board__item { background: var(--navy); padding: clamp(28px, 3.5vw, 44px); transition: background-color .25s; }
.board__item:hover { background: var(--navy-deep); }
.board__item h3 { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.1; margin-top: 20px; }
.board__item p { color: rgba(255,255,255,.75); margin-top: 10px; max-width: 40ch; }
.tag { display: inline-block; font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.tag--red { background: var(--red); color: var(--white); }
.tag--white { background: var(--white); color: var(--navy); }
.tag--outline { border: 1.5px solid rgba(255,255,255,.6); color: var(--white); }
.board__note { margin-top: 28px; color: rgba(255,255,255,.7); font-size: .95rem; }
.board__note a { color: var(--white); font-weight: 500; text-underline-offset: 4px; }

/* ---------- Get involved ---------- */
.involved { padding-block: var(--section); }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(40px, 6vw, 72px); }
.way {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(28px, 3vw, 40px); min-height: 280px;
  text-decoration: none; color: var(--ink);
  background: var(--paper); border-radius: 14px; border-top: 6px solid var(--red);
  transition: transform .25s, box-shadow .25s, background-color .25s;
}
.way:nth-child(2) { border-top-color: var(--ink); }
.way:nth-child(3) { border-top-color: var(--navy); }
.way:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(26,37,87,.4); background: var(--white); }
.way h3 { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 1.6rem; line-height: 1.1; color: var(--navy); }
.way p { color: var(--mute); }
.way__go { margin-top: auto; font-weight: 600; color: var(--red); display: inline-flex; gap: 8px; align-items: center; }
.way__go::after { content: "→"; transition: transform .25s; }
[dir="rtl"] .way__go::after { content: "←"; }
.way:hover .way__go::after { transform: translateX(4px); }
[dir="rtl"] .way:hover .way__go::after { transform: translateX(-4px); }

/* ---------- Contact ---------- */
.contact { background: var(--paper); padding-block: var(--section); }
.contact__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__intro { margin-top: 18px; color: var(--mute); max-width: 42ch; }
.contact__details { margin-top: 32px; display: grid; gap: 14px; }
.contact__details li { display: grid; gap: 2px; }
.contact__details span { font-size: .8rem; color: var(--mute); }
.contact__details a { font-weight: 500; color: var(--navy); text-decoration-color: rgba(38,53,118,.3); text-underline-offset: 4px; }

.form { background: var(--white); border-radius: 18px; padding: clamp(24px, 3.5vw, 44px); display: grid; gap: 20px; box-shadow: 0 30px 60px -40px rgba(26,37,87,.35); }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: .92rem; color: var(--navy); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); width: 100%;
  padding: 13px 15px; border: 1.5px solid rgba(38,53,118,.22); border-radius: 10px; background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(38,53,118,.14); }
.field [aria-invalid="true"] { border-color: var(--red); }
.form .btn { justify-self: start; }
.form__status { font-size: .95rem; min-height: 1.5em; }
.form__status.is-error { color: var(--red-deep); }
.form__status.is-ok { color: var(--navy); font-weight: 500; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.8); }
.footer__stripes { display: grid; grid-template-columns: repeat(4, 1fr); height: 10px; }
.footer__stripes i:nth-child(1) { background: var(--red); }
.footer__stripes i:nth-child(2) { background: var(--white); }
.footer__stripes i:nth-child(3) { background: var(--ink); }
.footer__stripes i:nth-child(4) { background: var(--navy); }
.footer__inner { padding-block: 48px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.footer__brand { display: flex; gap: 16px; align-items: center; }
.footer__brand img { border-radius: 50%; }
.footer__name { font-family: var(--display); font-stretch: 112%; font-weight: 700; color: var(--white); }
.footer__musnad { font-size: .85rem; color: rgba(255,255,255,.6); margin-top: 4px; }
.musnad { font-family: "Noto Sans Old South Arabian", serif; font-size: 1.25rem; color: var(--white); vertical-align: -2px; margin-inline-end: 6px; }
.footer__social { display: flex; gap: 16px; }
.footer__social:empty { display: none; }
.footer__social a { text-decoration: none; font-weight: 500; }
.footer__social a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer__copy { grid-column: 1 / -1; font-size: .85rem; color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__menu { display: grid; }
  .nav__inner { gap: 12px; }
  .about__grid, .contact__grid, .ledger { grid-template-columns: 1fr; }
  .ways { grid-template-columns: 1fr; }
  .feed { grid-template-columns: 1fr 1fr; }
  .event--lead .event__body { grid-template-columns: 1fr; }
  .event--lead .event__title, .event--lead .event__place, .event--lead .event__text, .event--lead .event__link { grid-column: 1; grid-row: auto; }
  .way { min-height: 0; }
  .seal { width: 120px; top: 22px; padding: 5px; }
  .band--red { padding-bottom: 56px; }
}
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .feed { grid-template-columns: 1fr; }
  .ledger__row { grid-template-columns: 1fr; gap: 6px; }
  .seal { width: 92px; }
  .cross { width: 170px; opacity: .35; bottom: -50px; }
  .hero__eyebrow-row .eyebrow { max-width: calc(100% - 110px); }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
