/* =================================================================
   American Sephardi Federation – South Florida Chapter
   Stylesheet
   ================================================================= */

:root {
    --navy:        #1b2a5b;
    --navy-deep:   #131f44;
    --navy-soft:   #29396f;
    --gold:        #c2a14d;
    --gold-dark:   #9c7c2f;
    --gold-light:  #e7d9b0;
    --cream:       #faf8f2;
    --cream-deep:  #f1ece0;
    --ink:         #1f2433;
    --muted:       #565d70;
    --line:        #e2ddd0;
    --white:       #ffffff;

    --radius:      14px;
    --radius-sm:   8px;
    --shadow:      0 14px 40px rgba(19, 31, 68, 0.12);
    --shadow-sm:   0 6px 18px rgba(19, 31, 68, 0.10);
    --maxw:        1140px;

    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--white);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold-dark); }

h1, h2, h3 {
    font-family: var(--serif);
    color: var(--navy);
    line-height: 1.15;
    margin: 0 0 0.5em;
    font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin: 0 0 0.8em;
}

.lead { font-size: 1.2rem; color: var(--muted); }
.big-text { font-size: 1.3rem; color: var(--ink); font-family: var(--serif); line-height: 1.5; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 12px 18px;
    z-index: 2000;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
    outline: 3px solid var(--gold-dark);
    outline-offset: 2px;
    border-radius: 3px;
}

/* =================================================================
   Buttons
   ================================================================= */
.btn {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    padding: 14px 26px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 17px 34px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; text-align: center; }

.btn-gold { background: var(--gold); color: var(--navy-deep); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

.link-arrow { font-weight: 600; text-decoration: none; color: var(--gold-dark); }
.link-arrow:hover { color: var(--navy); }

/* =================================================================
   Header / Navigation
   ================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.96);
    backdrop-filter: saturate(160%) blur(6px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand-logo { width: auto; height: 72px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.42rem;
    color: var(--navy);
    letter-spacing: 0.01em;
}
.brand-sub {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold-dark);
    font-weight: 600;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.primary-nav a {
    display: inline-block;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
    white-space: nowrap;
}
.primary-nav a:hover { color: var(--navy); background: var(--cream-deep); }
.primary-nav a.active { color: var(--navy); font-weight: 700; }
.primary-nav .nav-donate {
    background: var(--gold);
    color: var(--navy-deep);
    font-weight: 700;
    margin-left: 6px;
}
.primary-nav .nav-donate:hover { background: var(--gold-dark); color: #fff; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: var(--navy);
    transition: transform .2s ease, opacity .2s ease;
}

/* =================================================================
   Hero
   ================================================================= */
.hero {
    background: radial-gradient(120% 120% at 80% 0%, var(--navy-soft) 0%, var(--navy) 45%, var(--navy-deep) 100%);
    color: #fff;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    padding: 84px 24px;
}
.hero-copy h1 { color: #fff; }
.hero-copy .eyebrow { color: var(--gold-light); }
.hero-copy .lead { color: rgba(255,255,255,0.85); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-media img {
    border-radius: var(--radius);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    border: 4px solid rgba(255,255,255,0.12);
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center 20%;
}

/* =================================================================
   Sections
   ================================================================= */
.section { padding: 80px 0; }
.section-alt { background: var(--cream); }
.section-mission { background: var(--cream-deep); padding: 70px 0; }

.section-head { max-width: 720px; margin-bottom: 46px; }
.section-intro { color: var(--muted); font-size: 1.12rem; }

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { color: var(--navy); margin-bottom: 0.4em; }
.card p { color: var(--muted); margin-bottom: 0.8em; }
.card h3::before {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    background: var(--gold);
    margin-bottom: 16px;
    border-radius: 2px;
}

/* Split image + copy */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.split-media img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    height: 460px;
    object-fit: cover;
}
.split-copy .eyebrow { color: var(--gold-dark); }

/* Mission strip */
.section-mission .link-arrow { display: inline-block; margin-top: 10px; font-size: 1.05rem; }

/* Pillars (numbered list) */
.pillars {
    list-style: none;
    counter-reset: pillar;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
.pillars li {
    counter-increment: pillar;
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 28px 24px 84px;
    box-shadow: var(--shadow-sm);
}
.pillars li::before {
    content: counter(pillar);
    position: absolute;
    left: 24px;
    top: 26px;
    width: 44px;
    height: 44px;
    background: var(--navy);
    color: var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.3rem;
}
.pillars h3 { margin-bottom: 0.3em; }
.pillars p { color: var(--muted); margin-bottom: 0; font-size: 0.98rem; }

/* CTA band */
.cta-band {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: #fff;
    padding: 72px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 620px; margin-left: auto; margin-right: auto; }
.cta-band .btn { margin-top: 14px; }
.cta-band-soft { background: var(--cream); }
.cta-band-soft h2 { color: var(--navy); }
.cta-band-soft p { color: var(--muted); }

/* =================================================================
   Page hero (interior pages)
   ================================================================= */
.page-hero {
    background: radial-gradient(120% 120% at 85% 0%, var(--navy-soft) 0%, var(--navy) 55%, var(--navy-deep) 100%);
    color: #fff;
    padding: 72px 0 64px;
}
.page-hero h1 { color: #fff; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero .lead { color: rgba(255,255,255,0.85); max-width: 720px; }

/* =================================================================
   Donate page
   ================================================================= */
.donate-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 46px;
    align-items: start;
}
.donate-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 5px solid var(--gold);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    text-align: center;
}
.donate-card h2 { margin-bottom: 0.4em; }
.donate-card p { color: var(--muted); }
.donate-card .btn { margin: 18px 0 10px; }
.donate-note { font-size: 0.9rem; }
.tax-note {
    margin-top: 28px;
    background: var(--cream);
    border-radius: var(--radius);
    padding: 26px 28px;
}
.tax-note h3 { color: var(--navy); }
.tax-note p { color: var(--muted); margin-bottom: 0; font-size: 0.95rem; }
.donate-aside {
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    padding: 34px 32px;
}
.donate-aside h2 { color: #fff; font-size: 1.6rem; }
.impact-list { list-style: none; padding: 0; margin: 0 0 22px; }
.impact-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.88);
    font-size: 0.97rem;
}
.impact-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--gold-light);
}
.impact-list strong { color: #fff; }
.aside-cta { color: rgba(255,255,255,0.85); margin-bottom: 14px; }
.donate-aside .btn-outline { color: #fff; border-color: var(--gold-light); }
.donate-aside .btn-outline:hover { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }

/* =================================================================
   Contact page + form
   ================================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: start;
}
.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}
.form-required-note { font-size: 0.88rem; color: var(--muted); margin-bottom: 22px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.req { color: var(--gold-dark); }
.field input,
.field textarea {
    width: 100%;
    font-family: var(--sans);
    font-size: 1rem;
    padding: 13px 14px;
    border: 1px solid #cfd3dd;
    border-radius: var(--radius-sm);
    background: #fcfcfd;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27,42,91,0.12);
    outline: none;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c0392b; }
.field-error { display: block; color: #b02a1c; font-size: 0.88rem; margin-top: 6px; font-weight: 500; }
textarea { resize: vertical; min-height: 140px; }

/* Honeypot: visually hidden but present for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert { border-radius: var(--radius); padding: 22px 24px; margin-bottom: 24px; }
.alert h2 { margin-bottom: 0.3em; }
.alert-success { background: #eaf6ed; border: 1px solid #b6dcc1; color: #1d5b32; }
.alert-success h2 { color: #1d5b32; }
.alert-success p { margin-bottom: 0; }
.alert-error { background: #fbeae8; border: 1px solid #f0c4bd; color: #9a2a1c; }

.contact-aside { padding-top: 6px; }
.contact-aside h2 { font-size: 1.5rem; }
.contact-aside p { color: var(--muted); }
.contact-aside strong { color: var(--ink); }
.privacy-mini {
    margin-top: 26px;
    font-size: 0.82rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

/* =================================================================
   Legal / privacy
   ================================================================= */
.legal h2 { margin-top: 1.6em; font-size: 1.45rem; }
.legal ul { padding-left: 1.2em; margin-bottom: 1.2em; }
.legal li { margin-bottom: 0.5em; }
.legal-updated { color: var(--muted); font-style: italic; margin-bottom: 1.6em; }

/* =================================================================
   Footer
   ================================================================= */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.82); margin-top: 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding: 60px 24px 40px;
}
.footer-logo { width: 200px; max-width: 100%; background: #fff; border-radius: 14px; padding: 18px 22px; }
.footer-tax { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 18px; }
.footer-links h2, .footer-contact h2 {
    color: #fff;
    font-size: 1.05rem;
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.82); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--gold-light); }
.footer-contact p { font-size: 0.95rem; }
.footer-cta { margin-top: 10px; }

.footer-bar { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bar .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.footer-bar p { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.footer-bar a { color: rgba(255,255,255,0.75); }
.footer-bar a:hover { color: var(--gold-light); }

/* =================================================================
   Cookie banner
   ================================================================= */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1500;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .3s ease, transform .3s ease;
}
.cookie-banner.is-visible { opacity: 1; transform: translateY(0); }
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    max-width: var(--maxw);
    margin: 0 auto;
    flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.92rem; color: var(--muted); flex: 1 1 420px; }
.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 11px 20px; font-size: 0.92rem; }

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }
    .primary-nav.is-open { max-height: 460px; }
    .primary-nav ul { flex-direction: column; align-items: stretch; padding: 12px; gap: 2px; }
    .primary-nav a { padding: 14px 16px; }
    .primary-nav .nav-donate { margin-left: 0; text-align: center; margin-top: 6px; }

    .hero-grid { grid-template-columns: 1fr; padding: 56px 24px; gap: 36px; }
    .hero-media { order: -1; }
    .hero-media img { height: 360px; }

    .cards { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .split-media { order: -1; }
    .pillars { grid-template-columns: 1fr; }
    .donate-grid, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .section { padding: 56px 0; }
    .cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .brand-name { font-size: 1.12rem; }
    .brand-logo { height: 58px; width: auto; }
    .hero-actions .btn, .cta-band .btn { width: 100%; text-align: center; }
    .cookie-inner { flex-direction: column; align-items: stretch; }
    .cookie-actions .btn { flex: 1; text-align: center; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .btn:hover { transform: none; }
}
