/* SHIFA-BIRY FOUNDATION unified 2026 design */
:root{color-scheme:light;--sf-bg:#fff;--sf-fg:#111;--sf-muted:#555;--sf-line:#e5e5e5;--sf-card:#fff;--sf-accent:#111}
html[data-sf-theme="dark"]{color-scheme:dark;--sf-bg:#000;--sf-fg:#fff;--sf-muted:#c9c9c9;--sf-line:#333;--sf-card:#0d0d0d;--sf-accent:#fff}
html,body{background:var(--sf-bg)!important;color:var(--sf-fg)!important}
body{font-family:"DM Sans",Inter,system-ui,sans-serif!important;line-height:1.7}
body :is(h1,h2,h3,h4,p,li,label,small,strong){color:inherit}
body :is(.hero,.cta,.intro,.pillars,.card,.pillar,.get-involved,.section,.content,.main,.topbar,.feature,.feature-card,.stat,.stat-card,.project-card,.program-card){background-color:var(--sf-bg)!important;color:var(--sf-fg)!important;background-image:none!important}
body :is(.card,.pillar,.feature-card,.stat-card,.project-card,.program-card){background:var(--sf-card)!important;border:1px solid var(--sf-line)!important;box-shadow:none!important;border-radius:18px!important}
body :is(.hero p,.card p,.intro p,.pillar p,.section p){color:var(--sf-muted)!important}
body :is(.hero h1,.hero h2,.eyebrow){color:var(--sf-fg)!important}
body :is(.btn,.btn-gold,.btn-outline,.btn.secondary){background:var(--sf-accent)!important;color:var(--sf-bg)!important;border:1px solid var(--sf-accent)!important}
body :is(input,textarea,select){background:var(--sf-card)!important;color:var(--sf-fg)!important;border:1px solid var(--sf-line)!important}
body :is(footer,.footer){background:var(--sf-card)!important;color:var(--sf-fg)!important;border-top:1px solid var(--sf-line)!important}
body :is(footer a,.footer a){color:var(--sf-fg)!important}
body .hero{border-bottom:1px solid var(--sf-line)!important}
body .hero:before{display:none!important}
body .hero-visual{border-color:var(--sf-fg)!important}
body .founder-label{background:var(--sf-card)!important;color:var(--sf-fg)!important}
body .pillars{margin-top:0!important}
body .shifa-reveal,body .reveal{opacity:1!important;visibility:visible!important;transform:none!important}
#sf-header{position:sticky;top:0;z-index:9999;background:var(--sf-bg);border-bottom:1px solid var(--sf-line);color:var(--sf-fg);font-family:inherit}
#sf-header *{box-sizing:border-box}
.sf-bar{max-width:1240px;margin:auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.sf-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--sf-fg);font-weight:850;font-size:1rem;letter-spacing:-.03em;line-height:1.15}
.sf-mark{display:grid;place-items:center;width:42px;height:42px;background:var(--sf-fg);color:var(--sf-bg);border-radius:12px;font-size:24px}
.sf-links{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.sf-links a,.sf-menu a{color:var(--sf-fg)!important;text-decoration:none!important;font-size:.84rem;font-weight:700}
.sf-links a:hover,.sf-menu a:hover{opacity:.65}
.sf-tools{display:flex;align-items:center;gap:8px}
.sf-control{cursor:pointer;border:1px solid var(--sf-line);border-radius:10px;background:var(--sf-card);color:var(--sf-fg);padding:9px 12px;font:700 .9rem system-ui}
.sf-donate{background:var(--sf-fg)!important;color:var(--sf-bg)!important;border-radius:10px;padding:10px 15px}
.sf-menu{display:none;border-top:1px solid var(--sf-line);padding:18px 24px;max-height:75vh;overflow:auto;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;max-width:1240px;margin:auto}
.sf-menu.sf-open{display:grid}
.sf-menu h3{font-size:.8rem!important;text-transform:uppercase;letter-spacing:.12em;margin:0 0 12px;color:var(--sf-muted)!important}
.sf-menu a{display:block;padding:7px 0}
.sf-current{text-decoration:underline!important;text-underline-offset:5px!important}
body>header:not(#sf-header),body>.topbar,body>.header{display:none!important}
@media(max-width:1050px){.sf-links{display:none}.sf-menu{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.sf-bar{padding:12px 16px}.sf-brand{font-size:.88rem}.sf-menu{grid-template-columns:1fr}.sf-mark{width:36px;height:36px}.sf-bar{gap:8px}}

/* Responsive polish — preserve desktop visual language on phones */
html{scroll-behavior:smooth}body{overflow-x:hidden}
img,video,iframe{max-width:100%}img{height:auto}
#sf-header{box-shadow:0 4px 24px rgba(0,0,0,.045)}
.sf-control:focus-visible,.sf-links a:focus-visible,.sf-menu a:focus-visible{outline:3px solid var(--sf-fg);outline-offset:3px}
.sf-control{min-height:44px;transition:transform .2s,background .2s}
.sf-control:hover{transform:translateY(-2px)}
.sf-brand{min-width:0}
.sf-menu{box-shadow:0 16px 24px rgba(0,0,0,.08)}
body main{min-width:0}
body :is(.card,.pillar,.feature-card,.project-card,.program-card){transition:transform .2s ease,border-color .2s ease}
@media(hover:hover){body :is(.card,.pillar,.feature-card,.project-card,.program-card):hover{transform:translateY(-4px)}}
@media(max-width:800px){
 body :is(.wrap,.container){max-width:100%;width:calc(100% - 32px);margin-inline:auto}
 body :is(.hero-inner,.intro,.split,.two-column,.two-col){grid-template-columns:1fr!important}
 body :is(.pillars,.cards,.program-grid,.project-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body :is(.hero-copy){padding:40px 0!important}
 body :is(.hero-visual){min-height:280px!important;border-radius:18px!important;border-left:0!important}
 body :is(.hero h1,h1){font-size:clamp(2rem,7vw,3.5rem)!important;overflow-wrap:break-word}
 body :is(.hero h2,h2){font-size:clamp(1.55rem,5vw,2.5rem)!important}
 body :is(.main,.intro){padding-block:42px!important}
}
@media(max-width:520px){
 #sf-header .sf-bar{gap:6px}
 .sf-brand{font-size:.8rem}
 .sf-mark{width:34px;height:34px;flex-shrink:0}
 .sf-control{font-size:.78rem;padding:8px 9px}
 .sf-tools{gap:5px}
 .sf-donate{padding:9px 11px}
 body :is(.pillars,.cards,.program-grid,.project-grid){grid-template-columns:1fr!important}
 body :is(.card,.pillar,.feature-card,.project-card,.program-card){padding:20px!important}
 body :is(.hero,.hero-home){padding-block:32px!important}
 body :is(.actions,.links){gap:10px}
 body :is(.btn,.button){max-width:100%;text-align:center}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Consistent dark mode for older page layouts */
html[data-sf-theme="dark"] body :is(main,section,article,aside,.wrap,.container,.main,.content,.section,.cta,.intro,.hero,.cards,.grid,.panel,.box,.tile,.stat,.stats,.feature,.feature-card,.project,.program,.program-card,.project-card,.card,.pillar,.pillars,.form-wrap,.shifa-form-wrap,.shifa-form-section){background-color:var(--sf-bg)!important;color:var(--sf-fg)!important;border-color:var(--sf-line)!important}
html[data-sf-theme="dark"] body :is(h1,h2,h3,h4,h5,h6,p,span,li,label,dt,dd,blockquote){color:var(--sf-fg)!important}
html[data-sf-theme="dark"] body :is(.eyebrow,.muted,.subtitle,.lead,.meta,.caption,.section-intro){color:var(--sf-muted)!important}
html[data-sf-theme="dark"] body :is(a:not(.btn):not(.premium-button):not(.sf-donate)){color:var(--sf-fg)}
html[data-sf-theme="dark"] body :is(input,textarea,select,option,button:not(.sf-control)){background-color:var(--sf-card)!important;color:var(--sf-fg)!important;border-color:var(--sf-line)!important}
html[data-sf-theme="dark"] body :is(.card,.tile,.panel,.stat-card,.feature-card,.project-card,.program-card,.shifa-form-wrap){background:var(--sf-card)!important;color:var(--sf-fg)!important;border:1px solid var(--sf-line)!important}
html[data-sf-theme="dark"] body :is(footer,.footer){background:#090909!important;color:#fff!important}
html[data-sf-theme="dark"] body :is(header:not(#sf-header),.topbar){background:#080808!important;color:#fff!important}
html[data-sf-theme="dark"] body .premium-hero{background:#151515!important;color:#fff!important}
html[data-sf-theme="dark"] body .premium-hero :is(h1,p,span){color:#fff!important}
html[data-sf-theme="dark"] body .premium-hero h1 em{color:#f5bb51!important}
html[data-sf-theme="dark"] body .premium-program :is(h3,p,span){color:#fff!important}
html[data-sf-theme="dark"] body .premium-story-panel :is(h3,p,span){color:#fff!important}
html[data-sf-theme="dark"] body .premium-involved{background:#101010!important}
html[data-sf-theme="dark"] body .premium-involved :is(h2,p){color:#fff!important}
#sf-header{background:var(--sf-bg)!important;color:var(--sf-fg)!important;border-top:0!important}
#sf-header .sf-brand,#sf-header .sf-brand span{color:var(--sf-fg)!important}
#sf-header .sf-mark{color:var(--sf-bg)!important}
#sf-header .sf-menu{background:var(--sf-bg)!important}
#sf-header .sf-menu a{color:var(--sf-fg)!important}
#sf-header .sf-control:not(.sf-donate){background:var(--sf-card)!important;color:var(--sf-fg)!important}

/* Accessibility and responsive polish */
.sf-skip{position:fixed;left:12px;top:-90px;z-index:999999;background:#fff;color:#111;padding:12px 18px;border:2px solid #111;border-radius:8px;font-weight:800}
.sf-skip:focus{top:12px}
#sf-header a:focus-visible,#sf-header button:focus-visible,main a:focus-visible,main button:focus-visible{outline:3px solid #c28c20!important;outline-offset:3px}
img{max-width:100%;height:auto}
@media(max-width:700px){#sf-header .sf-bar{gap:10px}#sf-header .sf-tools{gap:6px}#sf-header .sf-brand{min-width:0}#sf-header .sf-menu{max-height:calc(100dvh - 80px);overflow-y:auto}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Foundation identity belongs in the shared navigation, not a second banner. */
#sf-header .sf-brand-logo{display:block;width:clamp(150px,18vw,230px);height:auto;max-height:62px;object-fit:contain;flex-shrink:0}
#sf-header .sf-brand{flex-shrink:0}
@media(max-width:650px){#sf-header .sf-brand-logo{width:clamp(132px,39vw,190px);max-height:52px}}
@media(max-width:380px){#sf-header .sf-brand-logo{width:125px}#sf-header .sf-donate{display:none}}

/* Mobile-first navigation refinements */
@media(max-width:760px){
 #sf-header .sf-bar{padding:10px 14px;gap:8px;min-height:68px;flex-wrap:nowrap}
 #sf-header .sf-brand{flex:1 1 auto;min-width:0;overflow:hidden}
 #sf-header .sf-brand-logo{width:clamp(122px,35vw,190px);max-width:100%;height:auto;max-height:56px}
 #sf-header .sf-links{display:none!important}
 #sf-header .sf-tools{flex:0 0 auto;gap:6px}
 #sf-header .sf-control{min-height:40px;padding:8px 10px;font-size:13px;white-space:nowrap}
 #sf-header .sf-menu{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:16px;max-height:calc(100dvh - 70px);overflow-y:auto}
 #sf-header .sf-menu a{padding:10px 4px;min-height:42px}
}
@media(max-width:480px){
 #sf-header .sf-bar{padding:9px 10px;gap:5px}
 #sf-header .sf-brand-logo{width:clamp(112px,33vw,150px)}
 #sf-header .sf-tools{gap:4px}
 #sf-header .sf-control{font-size:12px;padding:8px 9px}
 #sf-header .sf-donate{display:none!important}
 #sf-header .sf-menu{grid-template-columns:1fr}
 .premium-hero-inner{width:calc(100% - 32px)!important}
 .premium-hero h1{font-size:clamp(2.1rem,9vw,3rem)!important;overflow-wrap:normal;line-height:1.12!important}
 .premium-actions{gap:10px}
 .premium-actions .premium-button{max-width:100%;min-height:44px;padding:12px 14px;font-size:.83rem}
 .premium-program-grid{grid-template-columns:1fr 1fr;gap:10px}
 .premium-program{min-width:0}
 .premium-ribbon{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .premium-ribbon-note{grid-column:1/-1}
 .premium-story{grid-template-columns:minmax(0,1fr)!important}
 .premium-explore-links{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:350px){#sf-header .sf-brand-logo{width:105px}#sf-header .sf-control{padding:7px;font-size:11px}.premium-program-grid{grid-template-columns:1fr}}
