/* Al Anwar Welfare Association — website prototype.
   Palette comes from the logo: its gold (#f8d828) and flag red, on a deep green that lets the gold read. */

:root {
  --ink: #0f342d;          /* deep green: header, hero, footer */
  --ink-2: #17493f;
  --ivory: #fbf7ec;        /* page background */
  --paper: #ffffff;
  --gold: #f4c92e;         /* the logo's gold: only ever on dark, or as a thin accent */
  --gold-deep: #8a6508;    /* gold dark enough to read as text on ivory (7:1) */
  --crimson: #b8322a;
  --text: #1d2b27;
  --muted: #55645f;
  --line: #e4dcc6;
  --radius: 14px;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --arabic: 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--text); font: 400 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(244, 201, 46, .25); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand img { height: 3.1rem; width: auto; }
.nav { display: none; gap: .25rem; align-items: center; }
.nav a { text-decoration: none; padding: .6rem .9rem; border-radius: 999px; font-size: .95rem; color: #e9efe9; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .7rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ffd84a; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.menu-toggle { background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 10px; min-height: 2.75rem; padding: 0 .9rem; font: inherit; cursor: pointer; }
.mobile-nav { display: none; background: var(--ink-2); border-top: 1px solid rgba(255,255,255,.12); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 1rem 1.25rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); min-height: 3rem; }
.mobile-nav a[aria-current="page"] { color: var(--gold); }
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* ---------- hero ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23f4c92e' stroke-opacity='.12' stroke-width='1.2'%3E%3Cpath d='M60 6l12 22 24-10-6 26 26 6-18 20 18 20-26 6 6 26-24-10-12 22-12-22-24 10 6-26-26-6 18-20-18-20 26-6-6-26 24 10z'/%3E%3Ccircle cx='60' cy='60' r='16'/%3E%3C/g%3E%3C/svg%3E"); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: -1; background: linear-gradient(to top, rgba(15,52,45,.95), transparent); }
.hero .wrap { padding-block: clamp(3rem, 8vw, 6.5rem); display: grid; gap: 2.5rem; }
.eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; font-weight: 600; color: var(--gold); margin: 0 0 1rem; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.04; margin: 0 0 1.25rem; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--gold); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 38rem; color: #dfe9e3; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.verse { background: rgba(255,255,255,.06); border: 1px solid rgba(244,201,46,.35); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.verse p { margin: 0; font-family: var(--arabic); direction: rtl; text-align: center; line-height: 2.1; color: #fff; }
.verse .big { font-size: clamp(1.35rem, 3.4vw, 1.9rem); color: var(--gold); }
.verse .mid { font-size: clamp(1.15rem, 2.6vw, 1.45rem); }
.verse hr { border: 0; border-top: 1px solid rgba(244,201,46,.3); margin: 1.1rem auto; width: 40%; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; align-items: center; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section.dark { background: var(--ink); color: #fff; }
h2.title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.1; margin: 0 0 1rem; color: var(--ink); }
.section.dark h2.title { color: #fff; }
.kicker { color: var(--gold-deep); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .6rem; }
.section.dark .kicker { color: var(--gold); }
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1.1rem; }
.two-col { display: grid; gap: 2rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }

/* steps */
.steps { list-style: none; counter-reset: step; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.25rem 4.4rem; }
.steps li::before { content: counter(step); position: absolute; left: 1.1rem; top: 1.1rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }
.steps h3 { margin: 0 0 .25rem; font-size: 1.05rem; color: var(--ink); }
.steps p { margin: 0; color: var(--muted); font-size: .98rem; }
@media (min-width: 900px) { .steps.four { grid-template-columns: repeat(4, 1fr); } .steps.four li { padding: 4.4rem 1.25rem 1.25rem; } .steps.four li::before { left: 1.25rem; top: 1.1rem; } }

/* numbers */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-top: 2rem; }
.stat { border: 1px solid rgba(244,201,46,.35); border-radius: var(--radius); padding: 1.4rem 1rem; text-align: center; background: rgba(255,255,255,.04); }
.stat b { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; color: var(--gold); }
.stat span { display: block; margin-top: .5rem; font-size: .92rem; color: #dfe9e3; }
.stat.todo { border-style: dashed; }
.stat.todo b { color: rgba(244,201,46,.6); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* criteria */
.criteria { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; }
.criteria li { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: .9rem 1.1rem; }
.note { color: var(--muted); font-size: .95rem; margin-top: 1.25rem; }
@media (min-width: 760px) { .criteria { grid-template-columns: 1fr 1fr; } }

/* call to action */
.cta { background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff; border-radius: 22px; padding: clamp(1.75rem, 5vw, 3.2rem); display: grid; gap: 1.5rem; align-items: center; }
.cta h2 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .4rem; line-height: 1.1; }
.cta p { margin: 0; color: #dfe9e3; }
@media (min-width: 800px) { .cta { grid-template-columns: 1fr auto; } }

/* quotes (Kalemat Nooraniyah) */
.quote { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); margin: 0 0 1.25rem; }
.quote p { margin: 0 0 .9rem; font-family: var(--arabic); font-size: clamp(1.3rem, 3vw, 1.65rem); line-height: 2.2; direction: rtl; text-align: right; color: var(--ink); }
.quote .intro { font-size: 1.15rem; color: var(--gold-deep); }

/* contact */
.form { display: grid; gap: 1rem; max-width: 36rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; color: var(--ink); }
.form input, .form textarea { font: inherit; padding: .8rem 1rem; border: 1px solid #bdb394; border-radius: 10px; background: #fff; min-height: 3rem; }
.form textarea { min-height: 9rem; }

/* legal text */
.legal h2 { font-family: var(--serif); font-size: 1.6rem; margin: 2rem 0 .5rem; color: var(--ink); }
.legal p { max-width: 46rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cfdcd4; padding-block: 3rem 2rem; margin-top: 0; }
.site-footer .wrap { display: grid; gap: 2rem; }
.site-footer img { height: 3.4rem; width: auto; margin-bottom: 1rem; }
.site-footer h3 { color: #fff; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.site-footer a { text-decoration: none; display: inline-block; padding: .35rem 0; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.fine { border-top: 1px solid rgba(255,255,255,.14); margin-top: 1rem; padding-top: 1.25rem; font-size: .88rem; color: #9fb3aa; }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: 1.6fr 1fr 1fr; } .fine { grid-column: 1 / -1; } }

/* page heading band for inner pages */
.page-head { background: var(--ink); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); position: relative; isolation: isolate; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; background: inherit; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23f4c92e' stroke-opacity='.14' stroke-width='1.2'%3E%3Cpath d='M60 6l12 22 24-10-6 26 26 6-18 20 18 20-26 6 6 26-24-10-12 22-12-22-24 10 6-26-26-6 18-20-18-20 26-6-6-26 24 10z'/%3E%3C/g%3E%3C/svg%3E"); }
.page-head h1 { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0; line-height: 1.05; }
.page-head p { margin: .75rem 0 0; color: #dfe9e3; max-width: 40rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- shrine skyline (Karbala) ---------- */
.skyline { display: block; width: 100%; height: clamp(110px, 18vw, 230px); margin-top: -1px; }
.hero { padding-bottom: 0; }
.hero::after { display: none; }
.hero .wrap { padding-bottom: clamp(2rem, 5vw, 3rem); }
.page-head { position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: 4%; bottom: 0; width: 150px; height: 90px; opacity: .13; pointer-events: none;
  background: url("assets/dome.svg") no-repeat right bottom / contain; }
@media (min-width: 800px) { .page-head::after { width: 260px; height: 155px; opacity: .16; } }

.stats { grid-template-columns: repeat(2, 1fr); max-width: 44rem; }
.stat b { font-variant-numeric: lining-nums tabular-nums; min-height: 1em; }

/* ---------- community band at the very top ---------- */
.impact-top { background: var(--ink-2); color: #fff; border-bottom: 1px solid rgba(244,201,46,.25); padding: 1.6rem 0 1.5rem; }
.impact-top .wrap { display: grid; gap: 1rem; }
.impact-top .kicker { margin: 0 0 .15rem; }
.impact-top .title { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0; color: #fff; }
.impact-top .stats { margin-top: 0; max-width: none; gap: .75rem; }
.impact-top .stat { padding: .9rem .6rem; }
.impact-top .stat b { font-size: clamp(2rem, 5vw, 2.8rem); }
.impact-top .stat span { margin-top: .3rem; font-size: .85rem; }
.impact-top p.countries { margin: 0; color: #cfdcd4; font-size: .92rem; max-width: 52rem; }
@media (min-width: 900px) { .impact-top .wrap { grid-template-columns: auto minmax(0, 28rem) 1fr; align-items: center; gap: 2rem; } .impact-top .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- photographs ---------- */
.hero::before { opacity: .22; }
.hero .wrap { padding-bottom: clamp(3rem, 8vw, 6.5rem); }
.ph-photo { background: linear-gradient(90deg, rgba(10,38,32,.93), rgba(10,38,32,.72)), url("assets/hero-karbala.jpg") 70% 28% / cover no-repeat; }
.ph-photo.ph-right { background-position: center, 85% 70%; }
.photo-pair { display: flex; gap: 1rem; margin-top: 1.75rem; max-width: 30rem; }
.photo-pair figure { margin: 0; flex: 1; border-radius: 18px; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 14px 32px rgba(15,52,45,.28); aspect-ratio: 9 / 16; }
.photo-pair figure:nth-child(2) { margin-top: 2rem; transform: rotate(1.5deg); }
.photo-pair figure:nth-child(1) { transform: rotate(-1.5deg); }
.photo-pair img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .verse { background: rgba(10,38,32,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ---------- hero photo with a gently waving flag ---------- */
.hero { background: var(--ink); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.hero::after { display: block; content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; height: auto; top: 0;
  background: linear-gradient(90deg, rgba(10,38,32,.86) 0%, rgba(10,38,32,.52) 45%, rgba(10,38,32,.12) 75%, rgba(10,38,32,.05) 100%); }
@media (max-width: 799px) { .hero::after { background: linear-gradient(180deg, rgba(10,38,32,.78) 0%, rgba(10,38,32,.5) 45%, rgba(10,38,32,.72) 100%); } }
.fl { animation: flag-wave 5.5s ease-in-out infinite; will-change: transform; }
@keyframes flag-wave { 0%, 100% { transform: translateY(calc(var(--a) * -1px)); } 50% { transform: translateY(calc(var(--a) * 1px)); } }
@media (prefers-reduced-motion: reduce) { .fl { animation: none; } }

/* ---------- hero video (slow push-in on the flag, cross-dissolving loop) ---------- */
.hero-video { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; opacity: 0; transition: opacity 1.6s ease-in-out; }
.hero.has-video .hero-art { visibility: hidden; }
@media (max-width: 799px) { .hero-video video { object-position: 36% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
.hero h1, .hero .lead, .hero .eyebrow { text-shadow: 0 2px 18px rgba(8,30,25,.65); }

.fine .powered { white-space: nowrap; }
.fine .powered::before { content: "·"; margin: 0 .5rem; color: #6f877d; }
.fine a { color: var(--gold); text-decoration: none; font-weight: 600; }
.fine a:hover { text-decoration: underline; }
