/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Raleway:wght@200;300;400;500;600;700&display=swap');

/* Components */
@import url('components/header.css?v=55');
@import url('components/footer.css?v=55');
@import url('components/hero.css?v=55');
@import url('components/background.css?v=55');
@import url('components/hover-grid.css?v=55');
@import url('components/kinetic-gallery.css?v=55');
@import url('components/buttons.css?v=55');
@import url('components/sections.css?v=55');
@import url('components/forms.css?v=55');
@import url('components/editorial.css?v=55');
@import url('components/impact.css?v=55');
@import url('components/iraq-map.css?v=55');
@import url('components/team.css?v=55');
@import url('components/news.css?v=55');
@import url('components/events.css?v=55');
@import url('components/partners.css?v=55');

/* Base */
body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    color: var(--color-white);
    background: #050b1d;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-white);
}

p {
    color: var(--color-text);
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.container--wide {
    max-width: 1480px;
}

.container--narrow {
    max-width: 880px;
}

/* Page */
.page {
    /* Reserve room for the fixed header, plus the iOS safe-area inset so
       content clears the notch even on inner pages without a hero. */
    padding-top: calc(88px + env(safe-area-inset-top));
}

.page--no-pad {
    padding-top: 0;
}

/* Reveal helper */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Lazy-image fade-in. Applies to <img> tags and to background-image holders
   marked with data-bg (swapped in by JS when they enter the viewport). */
img[loading="lazy"],
[data-bg] {
    opacity: 0;
    transition: opacity 0.7s var(--ease-out, ease-out), transform 0.7s var(--ease-out, ease-out);
}

img[loading="lazy"]:not(.is-loaded) {
    transform: scale(1.02);
    filter: blur(6px);
}

img[loading="lazy"].is-loaded,
[data-bg].is-loaded {
    opacity: 1;
    transform: none;
    filter: none;
}

/* If JS hasn't run yet (no-script / early paint), don't keep images hidden. */
.no-js img[loading="lazy"],
.no-js [data-bg] {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Coming-soon toast — shown when a Donate link is clicked. */
.coming-soon-toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(120%);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    max-width: calc(100vw - 32px);
    background: rgba(15, 20, 30, 0.92);
    color: var(--color-white);
    border: 1px solid rgba(126, 219, 81, 0.35);
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s var(--ease-out, ease-out), opacity 0.4s var(--ease-out, ease-out);
}

.coming-soon-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.coming-soon-toast__icon {
    display: inline-flex;
    align-items: center;
    color: var(--color-green);
    flex-shrink: 0;
}

.coming-soon-toast__text {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.coming-soon-toast__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s var(--ease-out, ease-out), border-color 0.2s var(--ease-out, ease-out);
}

.coming-soon-toast__close:hover {
    background: rgba(126, 219, 81, 0.16);
    border-color: var(--color-green);
}

@media (max-width: 540px) {
    .coming-soon-toast {
        gap: 10px;
        padding: 12px 14px;
    }
    .coming-soon-toast__text {
        font-size: 0.85rem;
    }
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--color-blue);
    margin-bottom: var(--space-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================
   Mobile polish (≤ 768px / ≤ 540px / ≤ 380px)
   Tightens padding, scales typography, ensures tap targets,
   prevents iOS input-zoom, makes every page feel native on phone.
   ============================ */

@media (max-width: 768px) {
    .container,
    .container--wide,
    .container--narrow {
        padding-inline: 20px;
    }

    /* Section rhythm on mobile */
    .section {
        padding-block: 56px;
    }
    .page-stage > section {
        padding-block: 44px;
    }
    .page-stage > section:first-of-type {
        padding-top: 80px;
    }
    .page-stage > section:last-of-type {
        padding-bottom: 80px;
    }

    /* Page-hero on mobile */
    .page-hero {
        padding: clamp(80px, 18vw, 120px) 0 clamp(24px, 6vw, 40px);
    }
    .page-hero__title {
        font-size: clamp(2.4rem, 11vw, 3.4rem);
    }
    .page-hero__lead {
        font-size: 1rem;
    }

    /* Section titles */
    .section__title {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }
    .section__lead {
        font-size: 1rem;
    }

    /* Mission lead reads more like a normal paragraph on mobile */
    .mission__lead {
        font-size: 1.1rem;
        line-height: 1.55;
    }
    .mission__stat {
        padding: 28px;
    }

    /* Story media + text — stacked already */
    .story__title {
        font-size: clamp(1.4rem, 7vw, 2rem);
    }

    /* Footer CTA — give some breathing room on small viewports */
    .site-footer__cta {
        padding-block: 56px;
    }
    .site-footer__cta-title {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }
    .site-footer__cta-sub {
        font-size: 1rem;
    }

    /* Buttons — guarantee tap target */
    .btn {
        min-height: 44px;
        padding-inline: 22px;
    }
    .btn--lg {
        min-height: 52px;
        padding-inline: 28px;
    }

    /* Form inputs — 16px minimum to prevent iOS zoom-on-focus */
    input[type="email"],
    input[type="text"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px;
    }
}

@media (max-width: 540px) {
    .container,
    .container--wide,
    .container--narrow {
        padding-inline: 16px;
    }

    /* Hero on small phones */
    .hero-section {
        min-height: 100vh;
    }
    .hero-content {
        padding-inline: 20px;
        gap: 14px;
    }
    .hero-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 0.18em;
    }
    .hero-title {
        font-size: clamp(2.6rem, 13vw, 4rem);
    }
    .hero-sub {
        font-size: 1rem;
    }
    .hero-cta {
        gap: 12px;
        width: 100%;
    }
    .hero-cta .btn {
        flex: 1 1 auto;
        text-align: center;
    }

    /* Inner-page hero (what-we-do video hero) */
    .hero-section--inner .hero-title {
        font-size: clamp(2.6rem, 13vw, 4rem);
    }

    /* Pillars and locations: full-width cards with comfortable padding */
    .pillar,
    .location {
        padding: 24px;
    }
    .pillar__title,
    .location__city {
        font-size: 1.3rem;
    }

    /* Kinetic gallery frame on small phones */
    .gallery-kinetic__frame {
        max-width: none;
        padding-right: 24px;
    }
    .gallery-kinetic__title {
        font-size: clamp(2.2rem, 11vw, 3rem);
    }
    .gallery-kinetic__tagline {
        font-size: 0.9rem;
    }

    /* Footer brand block stacked + tightened */
    .site-footer__main {
        padding: 56px 0 24px;
    }
    .site-footer__heading {
        margin-bottom: 14px;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: clamp(2.2rem, 12vw, 3rem);
    }
    .page-hero__title {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }
    /* CTAs stack vertically on the tiniest phones */
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
}

/* No horizontal scroll on any device */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
