/* ==========================================================================
   Alufoq — visual identity
   Palestinian embroidery carries the brand, always in the same roles:
     Star band   (tatreez-star-band.svg) edges of heroes, footer, quote band, panels
     Thread      real cross-stitch X's: kickers, dividers, list markers
     Stitched    dashed orange outlines: icon diamonds, photo frames, card hover
   Colours: logo teal + orange on warm Jerusalem-stone neutrals,
   tatreez red and olive used sparingly.
   ========================================================================== */

:root {
    --teal-950: #052530;
    --teal-900: #073443;
    --teal-800: #0a4457;
    --teal-700: #0d5872;
    --teal-600: #136b87;
    --teal-400: #4e98ad;
    --teal-100: #e2eff2;
    --teal-50:  #f1f7f8;
    --orange:      #e0681d;
    --orange-600:  #c75812;
    --orange-100:  #fdeee3;
    --tatreez-red: #a8322d;
    --olive:       #6b7f3a;
    --sand:        #f8f3ea;
    --sand-200:    #efe6d6;
    --stone:       #fdfaf4;
    --ink:         #18292f;
    --muted:       #5a6b6f;
    --line:        #e8e0d2;
    --white:       #fff;

    --font-head: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
    --font-body: 'IBM Plex Sans Arabic', Tahoma, 'Segoe UI', sans-serif;
    --font-quote: 'Amiri', 'Times New Roman', serif;
    --font-num: 'Outfit', 'Segoe UI', sans-serif;
    --stitch: url(../img/stitch.svg);
    --stitch-run: url(../img/stitch-run.svg);
    --star-tile: url(../img/star-tile.svg);

    --radius-sm: 10px;
    --radius:    18px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 10px rgba(7, 52, 67, .06);
    --shadow:    0 14px 40px -12px rgba(7, 52, 67, .18);
    --shadow-lg: 0 30px 60px -20px rgba(7, 52, 67, .28);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 84px;
}

.lang-en {
    --font-head: 'Outfit', 'Segoe UI', sans-serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--ink);
    background: var(--sand);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
main, .site-footer { overflow-x: clip; }
.lang-en body, body.lang-en { line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--teal-900); line-height: 1.45; margin: 0 0 .6em; font-weight: 700; }
.lang-en h1, .lang-en h2, .lang-en h3 { line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(860px, 100% - 2.5rem); }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
    position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 1000;
    background: var(--teal-900); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Thread: cross-stitch ornaments ---------- */
.tatreez-strip, .pattern-band {
    height: 24px;
    background: url(../img/tatreez-star-band.svg) repeat-x center / 25.2px 24px, var(--white);
}
.stitch-divider {
    display: block; width: 138px; height: 12px; margin: 1.1rem auto 0;
    background: var(--orange);
    -webkit-mask: var(--stitch-run) repeat-x center / 46px 12px;
            mask: var(--stitch-run) repeat-x center / 46px 12px;
}
.section-head:not(.center) .stitch-divider { margin-inline: 0; }

/* Star-of-Bethlehem tatreez field, tinted with currentColor */
.hero-pattern::before, .page-hero-pattern::before, .stats-pattern::before, .donate-pattern::before,
.media-placeholder::before, .hero-emblem::before, .areas::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: currentColor;
    -webkit-mask: var(--star-tile) repeat center / 128px;
            mask: var(--star-tile) repeat center / 128px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .72rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
    font-family: var(--font-head); font-weight: 600; font-size: .95rem; line-height: 1.3;
    cursor: pointer; white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: .95rem 1.8rem; font-size: 1rem; }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: 0 10px 24px -10px rgba(13, 88, 114, .7); }
.btn-primary:hover { background: var(--teal-800); color: #fff; }
.btn-accent { background: var(--orange); color: #fff; box-shadow: 0 10px 24px -10px rgba(224, 104, 29, .8); }
.btn-accent:hover { background: var(--orange-600); color: #fff; }
.btn-outline { border-color: var(--teal-700); color: var(--teal-700); background: transparent; }
.btn-outline:hover { background: var(--teal-700); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--teal-900); }

.link-arrow {
    display: inline-flex; align-items: center; gap: .4rem;
    font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--orange);
}
.link-arrow .icon { transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(-4px); }
.lang-en .link-arrow:hover .icon { transform: translateX(4px); }

.kicker {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-head); font-weight: 600; font-size: .9rem;
    color: var(--orange); margin-bottom: .6rem;
}
.kicker::before, .center > .kicker::after, .kicker.center::after {
    content: ""; width: 26px; height: 10px; flex-shrink: 0;
    background: currentColor;
    -webkit-mask: var(--stitch) repeat-x center / 10px 10px;
            mask: var(--stitch) repeat-x center / 10px 10px;
}
.kicker.center { display: flex; justify-content: center; }
.kicker-light { color: #ffc49b; }

.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-tinted { background: var(--white); }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: 0; }
.lang-ar .section-title, .lang-ar .hero-title, .lang-ar .page-hero h1, .lang-ar .post-hero h1 { font-weight: 700; }
.section-head { margin-bottom: 2.75rem; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.section-head.split .section-title { margin-bottom: 0; }
.sub-title { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    transition: box-shadow .3s;
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile drawer inside it */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.main-nav .nav-brand { display: none; }
.site-header.scrolled { box-shadow: 0 6px 30px -12px rgba(7, 52, 67, .25); }
/* Centred brand: the logo hangs from the embroidered strip on a stitched plaque */
.header-inner {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    align-items: center; gap: 1.5rem;
    height: var(--header-h); transition: height .3s;
}
.site-header.scrolled .header-inner { height: 70px; }
.header-side { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.header-start .desk-nav { margin-inline-start: auto; }
.header-end .btn-donate { margin-inline-start: auto; }

.brand { position: relative; z-index: 2; align-self: start; display: block; }
.brand-plaque {
    position: relative; display: grid; place-items: center;
    width: 210px; height: calc(var(--header-h) + 30px); padding: 6px 22px 18px;
    background: var(--white);
    border-radius: 0 0 50% 50% / 0 0 34% 34%;
    box-shadow: 0 22px 34px -22px rgba(7, 52, 67, .45);
    transition: height .3s var(--ease), width .3s var(--ease);
    animation: plaqueDrop .9s .1s var(--ease) both;
}
.brand-plaque::before {
    content: ""; position: absolute; inset: 0 7px 7px; pointer-events: none;
    border: 1.5px dashed rgba(224, 104, 29, .55); border-top: 0;
    border-radius: 0 0 50% 50% / 0 0 36% 36%;
}
.brand-plaque::after {
    content: ""; position: absolute; left: 50%; bottom: -15px; width: 30px; height: 30px; margin-left: -15px;
    border-radius: 50%; background: url(../img/tatreez-star-single.svg) center / 20px no-repeat, var(--white);
    box-shadow: 0 6px 14px -6px rgba(7, 52, 67, .45);
    transition: transform .6s var(--ease);
}
.brand img { height: 66px; width: auto; transition: height .3s var(--ease), transform .4s var(--ease); }
.brand:hover img { transform: scale(1.04); }
.brand:hover .brand-plaque::after { transform: rotate(90deg); }
.site-header.scrolled .brand-plaque { height: calc(70px + 16px); width: 180px; padding-bottom: 12px; }
.site-header.scrolled .brand img { height: 50px; }
@keyframes plaqueDrop { from { transform: translateY(-110%); } to { transform: none; } }

.desk-nav { display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a, .desk-nav a {
    position: relative; display: block; padding: .5rem .75rem;
    font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--ink); white-space: nowrap;
    border-radius: 999px;
}
.main-nav a::after, .desk-nav a::after {
    content: ""; position: absolute; inset-inline: .75rem; bottom: .2rem; height: 2px;
    background: var(--orange); transform: scaleX(0); transition: transform .3s var(--ease);
}
.main-nav a:hover, .desk-nav a:hover { color: var(--teal-700); }
.main-nav a:hover::after, .main-nav a.active::after, .desk-nav a:hover::after, .desk-nav a.active::after { transform: scaleX(1); }
.main-nav a.active, .desk-nav a.active { color: var(--teal-700); font-weight: 600; }
.nav-mobile-extra { display: none; }
@media (min-width: 961px) { .main-nav { display: none; } }
.lang-switch {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line);
    font-weight: 600; font-size: .9rem; color: var(--teal-800);
}
.lang-switch:hover { border-color: var(--teal-700); }
.lang-en .lang-switch span { font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif; }
.lang-ar .lang-switch span { font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif; }
.btn-donate { padding: .6rem 1.15rem; }

.nav-toggle {
    display: none; width: 46px; height: 46px; border: 0; border-radius: 12px;
    background: var(--teal-50); cursor: pointer; padding: 0;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--teal-900); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6.5rem);
    background:
        radial-gradient(60% 70% at 85% 20%, rgba(78, 152, 173, .14), transparent 70%),
        radial-gradient(40% 45% at 15% 45%, rgba(224, 104, 29, .07), transparent 70%),
        linear-gradient(to bottom, var(--stone), var(--sand) 85%);
}
.hero-pattern, .page-hero-pattern, .stats-pattern, .donate-pattern {
    position: absolute; inset: 0; pointer-events: none;
}
.hero-pattern {
    color: var(--teal-700); opacity: .06;
    -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 75%);
            mask-image: linear-gradient(to bottom, #000 25%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-title { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; color: var(--teal-900); margin-bottom: 1.25rem; }
.lang-ar .hero-title { line-height: 1.5; }
.hero-text { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 36em; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero-social { display: flex; align-items: center; gap: .6rem; margin-top: 2.5rem; color: var(--muted); font-size: .9rem; }
.hero-social span { margin-inline-end: .4rem; }
.hero-social a {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: var(--white); color: var(--teal-700); box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), background .2s, color .2s;
}
.hero-social a:hover { background: var(--teal-700); color: #fff; transform: translateY(-3px); }
.hero-social .icon { width: 18px; height: 18px; }

.hero-visual { position: relative; justify-self: center; width: min(460px, 100%); }
/* Arched window — a nod to traditional Palestinian architecture */
.hero-frame {
    position: relative; aspect-ratio: 4 / 5; overflow: hidden;
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border: 10px solid var(--white);
    outline: 2px dashed rgba(224, 104, 29, .5); outline-offset: 10px;
}
.hero-frame > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hero-emblem {
    position: relative; width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit;
    background: linear-gradient(160deg, var(--teal-50), var(--white) 55%, var(--orange-100));
}
.hero-emblem { color: var(--teal-700); }
.hero-emblem::before { opacity: .07; }
.hero-emblem img { position: relative; width: 82%; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(7, 52, 67, .18)); }
.hero-olive { position: absolute; width: 190px; bottom: -14px; inset-inline-start: -70px; transform: scaleX(-1); }
.lang-en .hero-olive { transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Intro ---------- */
.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.intro-media { position: relative; isolation: isolate; }
/* Image style: arched window + an embroidered offset frame */
.intro-media::before {
    content: ""; position: absolute; inset: -12px; z-index: -1;
    border: 2px dashed rgba(224, 104, 29, .55);
    border-radius: 999px 999px calc(var(--radius-lg) + 12px) calc(var(--radius-lg) + 12px);
}
.intro-img {
    width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow);
}
.intro-img, .about-img, .card-media > img, .mosaic-item img, .post-cover img, .hero-frame > img {
    filter: saturate(.94) contrast(1.03) sepia(.05);
}
.intro-badge {
    position: absolute; bottom: -26px; inset-inline-end: -18px;
    width: 120px; height: 120px; border-radius: 50%; background: var(--white);
    display: grid; place-items: center; box-shadow: var(--shadow);
    border: 6px solid var(--sand);
}
.intro-badge { outline: 1.5px dashed rgba(224, 104, 29, .6); outline-offset: -14px; }
.intro-badge img { width: 54%; animation: spin 60s linear infinite; }
.intro-text .prose { color: var(--muted); }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
.vm-card {
    --vm-accent: var(--teal-700);
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .85rem; align-content: start;
    background: var(--white); border-radius: var(--radius); padding: 1.6rem 1.5rem 1.5rem;
    border: 1px solid var(--line); box-shadow: var(--shadow);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.vm-card:nth-child(2) { --vm-accent: var(--orange); }
.vm-card::before {
    content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px;
    background: var(--vm-accent);
}
.vm-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.vm-card h3 { font-size: 1.2rem; font-weight: 800; margin: 0; color: var(--teal-900); }
.vm-card p {
    grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1rem;
    border-top: 1.5px dashed var(--line);
    font-size: .95rem; line-height: 1.85; color: var(--muted);
}
/* Icon system: one "stitched diamond" tile for every icon container */
.vm-icon, .area-icon, .info-icon, .goal-num {
    position: relative; isolation: isolate; display: inline-grid; place-items: center;
    width: 54px; height: 54px; margin: 6px; background: none; border-radius: 0;
    color: var(--tile-fg, #fff);
}
.vm-icon::before, .area-icon::before, .info-icon::before, .goal-num::before,
.vm-icon::after, .area-icon::after, .info-icon::after, .goal-num::after {
    content: ""; position: absolute; z-index: -1; transform: rotate(45deg);
    transition: transform .6s var(--ease);
}
.vm-icon::before, .area-icon::before, .info-icon::before, .goal-num::before {
    inset: 12%; border-radius: 26%; background: var(--tile-bg, var(--teal-700));
    box-shadow: 0 10px 22px -10px var(--tile-glow, rgba(13, 88, 114, .7));
}
.vm-icon::after, .area-icon::after, .info-icon::after, .goal-num::after {
    inset: -1px; border-radius: 28%; border: 1.5px dashed var(--tile-thread, rgba(224, 104, 29, .7));
}
.vm-icon .icon { width: 22px; height: 22px; }
.vm-icon { margin: 0; --tile-bg: var(--teal-700); --tile-fg: #fff; --tile-glow: rgba(13, 88, 114, .6); }
.vm-icon-accent { --tile-bg: var(--orange); --tile-fg: #fff; --tile-glow: rgba(224, 104, 29, .6); --tile-thread: rgba(13, 88, 114, .45); }
.vm-card:hover .vm-icon::after, .area-card:hover .area-icon::after, .info-list li:hover .info-icon::after, .goals-list li:hover .goal-num::after { transform: rotate(135deg); }

/* ---------- Areas / values ---------- */
.areas { background: var(--white); position: relative; isolation: isolate; }
.areas::before {
    z-index: -1; color: var(--teal-700); opacity: .05;
    -webkit-mask-image: var(--star-tile), radial-gradient(circle at 100% 0, #000, transparent 45%);
            mask-image: var(--star-tile), radial-gradient(circle at 100% 0, #000, transparent 45%);
    -webkit-mask-composite: source-in; mask-composite: intersect;
    -webkit-mask-size: 128px, 100% 100%; mask-size: 128px, 100% 100%;
}
.lang-en .areas::before {
    -webkit-mask-image: var(--star-tile), radial-gradient(circle at 0 0, #000, transparent 45%);
            mask-image: var(--star-tile), radial-gradient(circle at 0 0, #000, transparent 45%);
}
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.area-card {
    position: relative; overflow: hidden;
    background: var(--sand); border-radius: var(--radius); padding: 2rem 1.6rem;
    border: 1px solid var(--line);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
}
.section-tinted .area-card { background: var(--sand); }
.area-card::after {
    content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px;
    background: var(--orange);
    transform: scaleX(0); transform-origin: center; transition: transform .4s var(--ease);
}
.area-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); background: var(--white); }
.area-card:hover::after { transform: scaleX(1); }
.area-icon { width: 66px; height: 66px; margin: 0 0 1.3rem; }
.area-card:nth-child(even) .area-icon { --tile-bg: var(--orange); --tile-glow: rgba(224, 104, 29, .8); --tile-thread: rgba(13, 88, 114, .5); }
.area-icon .icon { width: 26px; height: 26px; }
.area-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.area-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Stats ---------- */
.stats-band {
    position: relative; overflow: hidden; color: #fff;
    padding: clamp(3.5rem, 7vw, 5rem) 0;
    background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
}
.stats-pattern { color: #fff; opacity: .06; }
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.stat { text-align: center; padding: 1rem; position: relative; }
.stat + .stat::before {
    content: ""; position: absolute; inset-inline-start: -.75rem; top: 20%; height: 60%; width: 1px;
    background: linear-gradient(transparent, rgba(255, 255, 255, .25), transparent);
}
.stat-number {
    display: block; font-family: var(--font-num); font-weight: 700;
    font-size: clamp(2.2rem, 4.5vw, 3.2rem); line-height: 1.2; color: #fff; direction: ltr;
}
.stat-label { display: block; margin-top: .35rem; color: rgba(255, 255, 255, .78); font-size: 1rem; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.75rem; }
.card {
    position: relative;
    display: flex; flex-direction: column; background: var(--white);
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card::after {
    content: ""; position: absolute; inset: 7px; z-index: 3; pointer-events: none;
    border: 1.5px dashed rgba(224, 104, 29, .6); border-radius: calc(var(--radius) - 5px);
    opacity: 0; transform: scale(1.02); transition: opacity .35s, transform .35s var(--ease);
}
.card:hover::after, .card:focus-within::after { opacity: 1; transform: none; }
.card-media { position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: var(--teal-50); }
.card-media > img, .card-media > .media-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media > img { transform: scale(1.06); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.card-meta { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.card-meta .icon { width: 16px; height: 16px; color: var(--orange); }
.card-title { font-size: 1.15rem; margin-bottom: .6rem; }
.card-title a { color: var(--teal-900); }
.card-title a:hover { color: var(--orange); }
.card-text { color: var(--muted); font-size: .95rem; flex: 1; }

.badge {
    display: inline-block; padding: .25rem .8rem; border-radius: 999px;
    font-family: var(--font-head); font-size: .78rem; font-weight: 600;
    background: var(--teal-700); color: #fff;
}
.card-media .badge { position: absolute; top: 1rem; inset-inline-start: 1rem; box-shadow: var(--shadow-sm); }
.badge-activity { background: var(--orange); }
.badge-news { background: var(--olive); }

.media-placeholder {
    position: relative; display: grid; place-items: center;
    background: linear-gradient(150deg, var(--teal-50), var(--orange-100));
}
.media-placeholder { color: var(--teal-700); }
.media-placeholder::before { opacity: .08; }
.media-placeholder img { position: relative; width: 46%; max-width: 220px; opacity: .9; }

/* ---------- Gallery ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 1rem; }
.mosaic-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaic-item:nth-child(4) { grid-column: span 2; }
.mosaic-small { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; margin-bottom: 2rem; }
.mosaic-small .mosaic-item:nth-child(n) { grid-column: auto; grid-row: auto; }
.mosaic-item, .masonry-item {
    position: relative; display: block; overflow: hidden; border-radius: var(--radius);
    background: var(--teal-50);
}
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mosaic-item:hover img, .masonry-item:hover img { transform: scale(1.06); }
.mosaic-zoom {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: linear-gradient(to top, rgba(5, 37, 48, .55), transparent 60%);
    color: #fff; opacity: 0; transition: opacity .3s;
}
.mosaic-zoom .icon { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, .2); backdrop-filter: blur(4px); }
.mosaic-item:hover .mosaic-zoom, .masonry-item:hover .mosaic-zoom, .mosaic-item:focus-visible .mosaic-zoom { opacity: 1; }

.masonry { columns: 3 280px; column-gap: 1rem; }
.masonry-item { margin-bottom: 1rem; break-inside: avoid; }
.masonry-item img { width: 100%; transition: transform .6s var(--ease); }
.masonry-caption {
    position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding: 2.5rem 1rem .9rem;
    color: #fff; font-size: .9rem; font-weight: 500;
    background: linear-gradient(to top, rgba(5, 37, 48, .85), transparent);
    transform: translateY(100%); transition: transform .35s var(--ease);
}
.masonry-item:hover .masonry-caption { transform: none; }

.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2.5rem; }
.filter-tabs a {
    padding: .55rem 1.25rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line);
    font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: var(--ink);
    transition: background .2s, color .2s, border-color .2s;
}
.filter-tabs a small { opacity: .6; margin-inline-start: .2rem; }
.filter-tabs a:hover { border-color: var(--teal-700); color: var(--teal-700); }
.filter-tabs a.active { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    background: rgba(3, 22, 29, .94); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; max-width: min(1200px, 92vw); text-align: center; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: rgba(255, 255, 255, .85); margin-top: 1rem; font-size: .95rem; min-height: 1.5em; }
.lightbox button {
    position: absolute; display: grid; place-items: center; width: 52px; height: 52px;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
    transition: background .2s;
}
.lightbox button:hover { background: var(--orange); }
.lightbox button .icon { width: 26px; height: 26px; }
.lb-close { top: 1.25rem; inset-inline-end: 1.25rem; }
.lb-prev { inset-inline-start: 1.25rem; top: 50%; translate: 0 -50%; }
.lb-next { inset-inline-end: 1.25rem; top: 50%; translate: 0 -50%; }
.lb-counter { position: absolute; top: 1.6rem; inset-inline-start: 1.5rem; color: rgba(255, 255, 255, .7); font-size: .9rem; direction: ltr; }

/* ---------- Statement (quote band) ---------- */
.statement { background: var(--stone); }
.statement .container { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.statement-box {
    position: relative; margin: 0; padding: clamp(2.25rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
    text-align: center;
}
.statement-box::before {
    content: "\201D"; display: block; height: .55em; margin-bottom: .2rem;
    font-family: var(--font-quote); font-size: 5rem; line-height: 1; color: var(--orange); opacity: .85;
}
.lang-en .statement-box::before { content: "\201C"; }
.statement blockquote { margin: 0; }
.statement blockquote p {
    margin: 0 0 1.5rem; font-family: var(--font-quote); font-weight: 700;
    font-size: clamp(1.45rem, 3.2vw, 2.25rem); line-height: 1.75; color: var(--teal-900);
}
.lang-en .statement blockquote p { font-style: italic; font-weight: 400; line-height: 1.5; }
.statement figcaption {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-head); font-size: .95rem; color: var(--muted);
}
.statement figcaption img { width: 34px; height: auto; }
/* ---------- Donate CTA ---------- */
.donate-cta { padding: 0 0 clamp(4rem, 8vw, 6rem); }
.section + .donate-cta, .gallery-preview + .donate-cta { padding-top: 0; }
.donate-box {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem;
    padding: clamp(2rem, 4vw, 3.25rem);
    border-radius: var(--radius-lg); color: #fff;
    background: linear-gradient(120deg, var(--teal-900), var(--teal-700) 70%, var(--teal-600));
    box-shadow: var(--shadow-lg);
}
.donate-box::before {
    content: ""; position: absolute; inset-block: 12px; inset-inline-end: 14px; width: 10px;
    background: linear-gradient(var(--orange), var(--tatreez-red), var(--orange));
    -webkit-mask: var(--stitch) repeat-y center / 10px 14px;
            mask: var(--stitch) repeat-y center / 10px 14px;
}
.donate-pattern { color: #fff; opacity: .07; }
.donate-icon {
    position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
    background: var(--orange); color: #fff; box-shadow: 0 0 0 10px rgba(224, 104, 29, .2);
    animation: pulse 2.8s ease-in-out infinite;
}
.donate-icon .icon { width: 38px; height: 38px; }
.donate-content { position: relative; }
.donate-content h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: .4rem; }
.donate-content p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 40em; }
.donate-actions { position: relative; display: flex; flex-direction: column; gap: .75rem; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 10px rgba(224, 104, 29, .2); } 50% { box-shadow: 0 0 0 18px rgba(224, 104, 29, .06); } }

/* ---------- Inner page hero ---------- */
.page-hero, .post-hero {
    position: relative; overflow: hidden; color: #fff;
    padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.25rem, 6vw, 4.75rem);
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
}
.page-hero-pattern { color: #fff; opacity: .07; }
.page-hero .container, .post-hero .container { position: relative; }
.page-hero h1, .post-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: .5rem; }
.page-hero-text { color: rgba(255, 255, 255, .8); max-width: 40em; margin: 0; }
.breadcrumb { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .88rem; margin-bottom: 1.2rem; color: rgba(255, 255, 255, .6); }
.breadcrumb a { color: rgba(255, 255, 255, .85); }
.breadcrumb a:hover { color: #ffc49b; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-media { position: relative; }
.about-img {
    width: 100%; aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow);
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
    border: 8px solid var(--white);
    outline: 2px dashed rgba(224, 104, 29, .5); outline-offset: 8px;
}
.about-olive { position: absolute; width: 170px; bottom: -10px; inset-inline-end: -40px; }
.lang-ar .about-olive { transform: scaleX(-1); }
.vm-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.vm-panel {
    position: relative; overflow: hidden; padding: 2.5rem; border-radius: var(--radius-lg);
    background: var(--sand); border: 1px solid var(--line);
}
.vm-panel::before {
    content: ""; position: absolute; top: 0; inset-inline: 0; height: 5px;
    background: var(--teal-700);
}
.vm-panel-accent::before { background: var(--orange); }.vm-panel h2 { font-size: 1.5rem; margin: 1rem 0 .6rem; }
.vm-panel p { color: var(--muted); font-size: 1.08rem; margin: 0; }

.goals-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; }
.goals-list li {
    display: flex; gap: 1.1rem; align-items: flex-start;
    background: var(--white); padding: 1.4rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line);
}
.goals-list p { margin: 0; color: var(--ink); }
.goal-num {
    flex-shrink: 0; width: 46px; height: 46px; margin: 2px 4px;
    font-family: var(--font-num); font-weight: 700;
    --tile-bg: var(--orange-100); --tile-fg: var(--orange-600); --tile-glow: transparent; --tile-thread: rgba(13, 88, 114, .4);
}
.info-box { background: var(--white); border-radius: var(--radius); padding: 2rem; border-inline-start: 5px solid var(--orange); }

/* ---------- Prose ---------- */
.prose { font-size: 1.07rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.prose ul { padding: 0; list-style: none; margin: 0 0 1.25em; }
.prose li { position: relative; padding-inline-start: 1.6rem; margin-bottom: .55rem; }
.prose li::before {
    content: ""; position: absolute; inset-inline-start: .15rem; top: .62em; width: 11px; height: 11px;
    background: var(--orange);
    -webkit-mask: var(--stitch) center / contain no-repeat;
            mask: var(--stitch) center / contain no-repeat;
}
.prose blockquote {
    margin: 1.75rem 0; padding: 1.25rem 1.5rem; border-inline-start: 3px dashed var(--orange);
    font-family: var(--font-quote); font-size: 1.3rem; line-height: 1.8; color: var(--teal-800); background: var(--stone);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.lead { font-size: 1.22rem; color: var(--teal-800); font-weight: 500; border-inline-start: 4px solid var(--orange); padding-inline-start: 1.1rem; margin-bottom: 1.75rem; }

/* ---------- Post detail ---------- */
.post-hero .badge { background: var(--orange); margin-bottom: 1rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; color: rgba(255, 255, 255, .82); font-size: .95rem; }
.post-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.post-body { padding: 3rem 0 4rem; }
.post-cover { margin: 0 0 2rem; }
.post-cover img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.post-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2rem; align-items: start; }
.contact-info, .contact-form-wrap {
    background: var(--white); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.contact-info { background: linear-gradient(160deg, var(--white), var(--teal-50)); }
.info-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.25rem; }
.info-list li { display: flex; gap: 1rem; align-items: center; }
.info-list small { display: block; color: var(--muted); font-size: .82rem; }
.info-list a, .info-list span { font-weight: 500; color: var(--ink); word-break: break-word; }
.info-list a:hover { color: var(--orange); }
.info-icon { flex-shrink: 0; width: 50px; height: 50px; margin: 2px; }
.info-icon .icon { width: 20px; height: 20px; }
.info-list li:nth-child(even) .info-icon { --tile-bg: var(--orange); --tile-glow: rgba(224, 104, 29, .7); --tile-thread: rgba(13, 88, 114, .45); }
.info-social-title { font-size: 1rem; margin-bottom: .8rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: block; margin-bottom: 1.1rem; }
.field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--teal-900); }
.field input, .field textarea, .field select {
    width: 100%; padding: .85rem 1rem; border-radius: 12px; border: 1.5px solid var(--line);
    background: var(--sand); font: inherit; font-size: 1rem; color: var(--ink);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal-700); background: var(--white); box-shadow: 0 0 0 4px rgba(13, 88, 114, .1); }
.hp-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.25rem; font-weight: 500; }
.alert-success { background: #e8f5ec; color: #1f6b3a; border: 1px solid #bfe3cb; }
.alert-error { background: #fdecea; color: #a12a22; border: 1px solid #f6c8c3; }

.map-section { line-height: 0; }
.map-section iframe { width: 100%; height: 420px; border: 0; filter: saturate(.85); }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-state .icon { width: 56px; height: 56px; color: var(--teal-400); margin: 0 auto 1rem; }
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 44px; height: 44px; padding: 0 .9rem; display: grid; place-items: center;
    border-radius: 12px; background: var(--white); border: 1px solid var(--line); font-weight: 600;
}
.pagination .current { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.not-found-code {
    font-family: var(--font-num); font-weight: 800; font-size: clamp(5rem, 15vw, 9rem); line-height: 1;
    background: linear-gradient(135deg, var(--teal-700), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 1rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-950); color: rgba(255, 255, 255, .75); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr; gap: 2.5rem; padding: 4rem 0 3rem; }
.footer-brand img { width: 190px; margin-bottom: 1.25rem; }
.footer-brand p { font-size: .95rem; }
.footer-title { color: #fff; font-size: 1.05rem; margin-bottom: 1.1rem; position: relative; padding-bottom: .7rem; }
.footer-title::after {
    content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 46px; height: 10px;
    background: var(--orange);
    -webkit-mask: var(--stitch-run) no-repeat center / 46px 10px;
            mask: var(--stitch-run) no-repeat center / 46px 10px;
}
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .95rem; }
.footer-links a, .footer-contact a { color: rgba(255, 255, 255, .75); }
.footer-links a:hover, .footer-contact a:hover { color: #ffc49b; }
.footer-contact li { display: flex; gap: .6rem; align-items: center; }
.footer-contact .icon { color: var(--orange); width: 18px; height: 18px; }
.footer-donate p { font-size: .95rem; }
.social-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.social-links a {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, transform .25s var(--ease);
}
.social-links a:hover { background: var(--orange); color: #fff; transform: translateY(-3px); }
.social-links .icon { width: 18px; height: 18px; }
.social-links-dark a { background: var(--teal-700); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1.25rem 0; font-size: .88rem; }
.footer-bottom p { margin: 0; text-align: center; }
.footer-bottom .footer-credit { margin-top: .35rem; font-size: .8rem; opacity: .75; }
.footer-credit a { color: inherit; font-weight: 600; text-decoration: none; border-bottom: 1px dashed currentColor; }
.footer-credit a:hover { color: var(--orange); opacity: 1; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: absolute; inset-inline: 0; bottom: 0; height: 3px; pointer-events: none;
    background: linear-gradient(90deg, var(--orange), #f2a35e, var(--orange));
    transform: scaleX(var(--progress, 0)); transform-origin: right;
}
.lang-en .scroll-progress { transform-origin: left; }
.nav-icon { display: none; }
.mobile-bar { display: none; }

/* ---------- Hero touches ---------- */
.hero-title { position: relative; z-index: 0; }
.hero-title .hl { position: relative; color: var(--teal-700); white-space: nowrap; }
.hero-title .hl::after {
    content: ""; position: absolute; z-index: -1; inset-inline: -.08em; bottom: .02em; height: .3em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 9C45 3 125 2 197 5l-2 6C125 8 52 10 5 14z' fill='%23e0681d'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    opacity: .32; transform-origin: right; animation: brush 1s .5s var(--ease) both;
}
.lang-en .hero-title .hl::after { transform-origin: left; }
@keyframes brush { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Hero: Palestinian identity ---------- */
.hero-title .w { display: inline-block; animation: wordUp .9s calc(.15s + var(--i) * .09s) var(--ease) both; }
.hero-content > .kicker { animation: fadeUp .8s .05s var(--ease) both; }
.hero-text { animation: fadeUp .9s .55s var(--ease) both; }
.hero-actions { animation: fadeUp .9s .7s var(--ease) both; }
.hero-social { animation: fadeUp .9s .85s var(--ease) both; }
@keyframes wordUp { from { opacity: 0; transform: translateY(.55em); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* living embroidery field */
.hero-pattern::before { animation: drift 120s linear infinite; }
@keyframes drift { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 256px 128px; mask-position: 256px 128px; } }

/* arched window unveils, then breathes */
.hero-frame > img {
    transform-origin: 60% 30%;
    animation: unveil 1.4s .2s var(--ease) both, breathe 20s 1.6s ease-in-out infinite alternate both;
}
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes breathe { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-frame, .hero-panel, .hero-medallion { transition: translate .6s var(--ease); }
.hero-frame { translate: calc(var(--px, 0) * 6px) calc(var(--py, 0) * 6px); }

/* thobe side panel (بنيقة) stitched in, stitch by stitch */
.hero-panel {
    position: absolute; z-index: 1; top: calc(4% + 88px); inset-inline-end: -52px; width: 26px; height: 62%;
    background: url(../img/tatreez-star-band-v.svg) repeat-y center top / 25px 26.25px;
    border-inline: 1px solid rgba(168, 50, 45, .35);
    animation: stitchDown 2.4s .9s steps(16, end) both;
    translate: calc(var(--px, 0) * -10px) calc(var(--py, 0) * -10px);
}
@keyframes stitchDown { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* Bethlehem-star medallion */
.hero-medallion {
    position: absolute; z-index: 3; top: 4%; inset-inline-end: -84px;
    display: grid; place-items: center; width: 90px; height: 90px; border-radius: 50%;
    background: var(--white); box-shadow: var(--shadow);
    outline: 1.5px dashed rgba(224, 104, 29, .6); outline-offset: 5px;
    animation: pop .8s 1.3s var(--ease) both;
    translate: calc(var(--px, 0) * 14px) calc(var(--py, 0) * 14px);
}
.hero-medallion span {
    width: 64%; height: 64%;
    background: url(../img/tatreez-star-single.svg) center / contain no-repeat;
    animation: spin 60s linear infinite;
}
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-45deg); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* olive branch & drifting leaves */
.hero-olive { transform-origin: 85% 60%; animation: sway 7s ease-in-out infinite; }
@keyframes sway { 0%, 100% { rotate: -3deg; } 50% { rotate: 4deg; } }
.hero-leaves { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-leaves i {
    position: absolute; top: 4%; width: 26px; height: 11px; opacity: 0;
    background: url(../img/olive-leaf.svg) center / contain no-repeat;
    animation: leafFall 13s linear infinite;
}
.hero-leaves i:nth-child(1) { inset-inline-start: 62%; animation-delay: 2s; }
.hero-leaves i:nth-child(2) { inset-inline-start: 80%; width: 20px; height: 9px; animation-delay: 6.5s; animation-duration: 15s; }
.hero-leaves i:nth-child(3) { inset-inline-start: 45%; width: 22px; height: 10px; animation-delay: 10s; animation-duration: 12s; }
@keyframes leafFall {
    0% { opacity: 0; transform: translate(0, 0) rotate(0); }
    8% { opacity: .9; }
    50% { transform: translate(-40px, 220px) rotate(150deg); }
    85% { opacity: .8; }
    100% { opacity: 0; transform: translate(10px, 470px) rotate(300deg); }
}
.hero-badge {
    position: absolute; z-index: 2; bottom: 11%; inset-inline-end: -42px;
    display: flex; align-items: center; gap: .75rem; max-width: 300px;
    padding: .7rem 1.1rem .7rem .75rem; border-radius: 18px;
    background: rgba(255, 255, 255, .94); border: 1px solid rgba(13, 88, 114, .08);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
}
.hero-badge-icon { flex-shrink: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--teal-50); }
.hero-badge-icon img { width: 34px; }
.hero-badge-text strong { display: block; font-family: var(--font-head); font-size: .88rem; line-height: 1.45; color: var(--teal-900); }
.hero-badge-text small { display: block; font-size: .76rem; line-height: 1.5; color: var(--muted); }

/* ---------- Back to top ---------- */
.to-top {
    position: fixed; z-index: 90; bottom: 1.5rem; inset-inline-end: 1.5rem;
    display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
    background: var(--white); color: var(--teal-700); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(14px);
    transition: opacity .3s, visibility .3s, transform .3s var(--ease), background .2s, color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--teal-700); color: #fff; }
.to-top .icon { position: relative; width: 20px; height: 20px; }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle {
    fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 138.2; stroke-dashoffset: calc(138.2 * (1 - var(--progress, 0)));
}

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .desk-nav a { padding: .5rem .5rem; font-size: .88rem; }
    .desk-nav a::after { inset-inline: .5rem; }
    .header-inner { gap: .75rem; }
    .brand-plaque { width: 180px; }
    .brand img { height: 56px; }
    .btn-donate span { display: none; }
    .btn-donate { padding: .6rem; width: 44px; height: 44px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    :root { --header-h: 72px; }
    .desk-nav { display: none; }
    .header-end { justify-content: flex-end; position: relative; z-index: 101; }
    .brand-plaque { width: 150px; height: calc(var(--header-h) + 18px); padding: 4px 16px 12px; }
    .brand img { height: 46px; }
    .site-header.scrolled .brand-plaque { width: 140px; height: calc(70px + 12px); padding-bottom: 10px; }
    .site-header.scrolled .brand img { height: 42px; }
    .brand-plaque::after { width: 24px; height: 24px; margin-left: -12px; bottom: -12px; background-size: 16px; }
    .nav-toggle { display: inline-flex; }
    .btn-donate { display: none; }
    .main-nav {
        position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 99;
        width: min(340px, 86vw); padding: 1.1rem 1.5rem 2rem;
        background: url(../img/tatreez-star-band.svg) repeat-x bottom / 21px 20px, var(--white);
        padding-bottom: 3rem;
        box-shadow: var(--shadow-lg);
        border-start-end-radius: 26px; border-end-end-radius: 26px;
        visibility: hidden; transform: translateX(100%);
        transition: transform .4s var(--ease), visibility .4s;
        overflow-y: auto; overscroll-behavior: contain;
    }
    .lang-en .main-nav { transform: translateX(-100%); }
    .nav-open .main-nav { transform: none; visibility: visible; }
    .main-nav .nav-brand { display: block; margin-bottom: 1.25rem; padding: 0 0 1rem; border-radius: 0; border-bottom: 1px dashed var(--line); }
    .main-nav .nav-brand img { height: 52px; width: auto; }
    .main-nav ul { flex-direction: column; gap: .3rem; }
    .main-nav li { opacity: 0; transform: translateX(18px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
    .lang-en .main-nav li { transform: translateX(-18px); }
    .nav-open .main-nav li { opacity: 1; transform: none; }
    .nav-open .main-nav li:nth-child(2) { transition-delay: 40ms; }
    .nav-open .main-nav li:nth-child(3) { transition-delay: 80ms; }
    .nav-open .main-nav li:nth-child(4) { transition-delay: 120ms; }
    .nav-open .main-nav li:nth-child(5) { transition-delay: 160ms; }
    .nav-open .main-nav li:nth-child(n+6) { transition-delay: 200ms; }
    .main-nav a { display: flex; align-items: center; gap: .85rem; padding: .55rem .7rem; font-size: 1.05rem; border-radius: 14px; }
    .main-nav a::after { display: none; }
    .main-nav a.active { background: var(--teal-50); }
    .nav-icon {
        display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
        background: var(--teal-50); color: var(--teal-700); transition: background .2s, color .2s;
    }
    .nav-icon .icon { width: 20px; height: 20px; }
    .main-nav a.active .nav-icon { background: var(--teal-700); color: #fff; }
    .nav-mobile-extra { display: block; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); }
    .nav-mobile-extra .btn { width: 100%; }
    .nav-mobile-extra .nav-lang { margin-top: .75rem; }
    .main-nav .nav-mobile-extra .btn { justify-content: center; padding: .8rem 1.2rem; border-radius: 999px; font-weight: 600; }
    .main-nav .nav-mobile-extra .btn-accent { color: #fff; }
    .main-nav .nav-mobile-extra .btn-outline { color: var(--teal-700); }
    .main-nav .nav-mobile-extra .btn-outline:hover { color: #fff; }
    .lang-switch { transition: opacity .25s, visibility .25s; }
    .nav-open .header-start .lang-switch { opacity: 0; visibility: hidden; }
    .nav-backdrop { position: fixed; inset: 0; z-index: 98; background: rgba(5, 37, 48, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
    .nav-open .nav-backdrop { opacity: 1; visibility: visible; }

    .hero-inner, .intro-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-content { text-align: center; }
    .hero-text { margin-inline: auto; }
    .hero-actions, .hero-social { justify-content: center; }
    .hero-visual { width: min(380px, 85%); order: -1; }
    .hero-olive { width: 140px; inset-inline-start: -40px; }
    .intro-media { max-width: 520px; margin-inline: auto; width: 100%; }
    .about-media { max-width: 460px; margin-inline: auto; width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(3)::before { display: none; }
    .donate-box { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .donate-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
    .mosaic-item:nth-child(4) { grid-column: auto; }
    .hero-badge { inset-inline-end: -18px; }
}

/* Tablet: keep side-by-side layouts instead of tall stacked blocks */
@media (min-width: 700px) and (max-width: 960px) {
    .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 2.5rem; }
    .hero-content { text-align: start; }
    .hero-text { margin-inline: 0; }
    .hero-actions, .hero-social { justify-content: flex-start; }
    .hero-visual { order: 0; width: calc(100% - 56px); justify-self: start; }
    .hero-panel { width: 18px; inset-inline-end: -30px; top: calc(4% + 58px); background-size: 17px 17.85px; }
    .hero-medallion { width: 56px; height: 56px; inset-inline-end: -49px; outline-offset: 3px; }
    .hero-olive { width: 120px; inset-inline-start: -30px; }
    .hero-badge { inset-inline-end: -12px; bottom: 6%; max-width: 220px; }
    .intro-grid { grid-template-columns: .85fr 1.15fr; gap: 2.5rem; }
    .intro-media { max-width: none; }
    .about-grid { grid-template-columns: 1.15fr .85fr; gap: 2.5rem; }
    .about-media { max-width: none; }
    .about-olive { width: 120px; inset-inline-end: -20px; }
    .intro-badge { width: 96px; height: 96px; inset-inline-end: -10px; }
    .vm-grid { grid-template-columns: 1fr; }
    .areas-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .goals-list { grid-template-columns: repeat(2, 1fr); }
    .donate-box { grid-template-columns: auto 1fr; text-align: start; justify-items: start; }
    .donate-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }
    .container, .container.narrow { width: calc(100% - 2rem); }
    .lang-switch span { display: none; }
    .lang-switch { padding: .55rem; }
    .vm-grid, .vm-wide, .form-row { grid-template-columns: 1fr; }
    .vm-panel { padding: 1.75rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .section-head.split { align-items: flex-start; }
    .mosaic { grid-auto-rows: 140px; gap: .6rem; }
    .mosaic-small { grid-template-columns: repeat(2, 1fr); }
    .masonry { columns: 2 140px; column-gap: .6rem; }
    .masonry-item { margin-bottom: .6rem; border-radius: 12px; }
    .intro-badge { width: 90px; height: 90px; inset-inline-end: 0; }
    .lb-prev, .lb-next { top: auto; bottom: 1.25rem; translate: none; }
    .map-section iframe { height: 320px; }

    .section { padding: 3.5rem 0; }
    .section-head { margin-bottom: 2rem; }
    .hero { padding: 2rem 0 3.5rem; }
    .tatreez-strip, .pattern-band { height: 18px; background-size: 18.9px 18px; }
    .statement-box::before { font-size: 4rem; }
    .hero-visual { width: min(300px, 78%); margin-bottom: 1.5rem; }
    .hero-panel { width: 18px; inset-inline-end: -30px; top: calc(4% + 58px); background-size: 17px 17.85px; }
    .hero-medallion { width: 56px; height: 56px; inset-inline-end: -49px; outline-offset: 3px; }
    .hero-frame { border-width: 7px; outline-offset: 7px; }
    .hero-olive { width: 110px; inset-inline-start: -34px; bottom: 18px; }
    .hero-badge { inset-inline: -22px; bottom: -26px; max-width: none; padding: .55rem .8rem; gap: .6rem; }
    .hero-badge-icon { width: 38px; height: 38px; border-radius: 11px; }
    .hero-badge-icon img { width: 28px; }
    .hero-badge-text strong { font-size: .82rem; }
    .hero-badge-text small { font-size: .7rem; }
    .hero-title { font-size: 1.95rem; margin-bottom: 1rem; }
    .hero-text { font-size: 1rem; margin-bottom: 1.5rem; }
    .hero-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 1rem; }
    .hero-social { margin-top: 1.75rem; }

    .intro-img { aspect-ratio: 4 / 3; }
    .about-img { border-width: 6px; }
    .about-olive { width: 110px; inset-inline-end: -14px; }

    .areas-grid { gap: .9rem; }
    .area-card { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: start; padding: 1.25rem; }
    .area-icon { grid-row: span 2; width: 52px; height: 52px; margin: 0; }
    .area-icon .icon { width: 22px; height: 22px; }
    .area-card h3 { font-size: 1.05rem; margin: .1rem 0 .3rem; }
    .area-card p { font-size: .9rem; }

    .goals-list li { padding: 1.1rem; gap: .9rem; }
    .goal-num { width: 42px; height: 42px; }
    .intro-img { border-radius: 220px 220px var(--radius-lg) var(--radius-lg); }
    .intro-media::before { inset: -9px; border-radius: 229px 229px calc(var(--radius-lg) + 9px) calc(var(--radius-lg) + 9px); }
    .vm-card { padding: 1.15rem; }
    .card-body { padding: 1.2rem 1.25rem 1.35rem; }

    .page-hero, .post-hero { padding: 2.25rem 0 2.75rem; }
    .breadcrumb { margin-bottom: .8rem; }
    .post-body { padding: 2rem 0 3rem; }

    .filter-tabs {
        flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
        margin-inline: -1rem; padding: .25rem 1rem .5rem; margin-bottom: 1.75rem;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .filter-tabs::-webkit-scrollbar { display: none; }
    .filter-tabs a { flex-shrink: 0; }

    .donate-box { gap: 1.25rem; border-radius: var(--radius); }
    .donate-icon { width: 66px; height: 66px; }
    .donate-icon .icon { width: 30px; height: 30px; }
    .donate-actions .btn { flex: 1 1 auto; }
    .footer-grid { padding: 3rem 0 2rem; text-align: center; }
    .footer-brand img { margin-inline: auto; }
    .footer-title::after { inset-inline-start: 50%; translate: 50% 0; }
    .lang-en .footer-title::after { translate: -50% 0; }
    .footer-contact li, .social-links { justify-content: center; }
}

/* Phones: app-style bottom bar */
@media (max-width: 760px) {
    .mobile-bar {
        position: fixed; z-index: 95; inset-inline: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom));
        display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
        padding: .4rem .3rem; border-radius: 22px;
        background: rgba(255, 255, 255, .96); border: 1px solid rgba(13, 88, 114, .08);
        -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
        box-shadow: 0 14px 34px -10px rgba(7, 52, 67, .35);
        transition: transform .4s var(--ease);
    }
    .mobile-bar.hide { transform: translateY(calc(100% + 2rem)); }
    .nav-open .mobile-bar { transform: translateY(calc(100% + 2rem)); }
    .mobile-bar a {
        display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 0;
        padding: .3rem .1rem; border-radius: 14px;
        font-family: var(--font-head); font-size: .66rem; font-weight: 600; line-height: 1.35;
        color: var(--muted); text-align: center;
    }
    .mobile-bar a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-bar a .icon { width: 22px; height: 22px; }
    .mobile-bar a.active { color: var(--teal-700); background: var(--teal-50); }
    .mobile-bar .mobile-bar-donate { color: var(--orange); }
    .mobile-bar-heart {
        display: grid; place-items: center; width: 52px; height: 52px; margin-top: -28px; border-radius: 50%;
        background: linear-gradient(140deg, #f08a3e, var(--orange-600)); color: #fff;
        box-shadow: 0 10px 22px -8px rgba(224, 104, 29, .9), 0 0 0 5px var(--sand);
    }
    .mobile-bar-heart .icon { width: 24px; height: 24px; animation: beat 2.4s ease-in-out infinite; }
    .footer-bottom { padding-bottom: calc(1.25rem + 92px + env(safe-area-inset-bottom)); }
    .to-top { width: 44px; height: 44px; inset-inline-end: 1rem; bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } 36% { transform: scale(1.12); } 48% { transform: scale(1); } }

/* Short landscape phones: no floating bar */
@media (max-height: 480px) and (orientation: landscape) {
    .mobile-bar { display: none; }
    .footer-bottom { padding-bottom: 1.25rem; }
}
