/* ==========================================================================
   American Made Freedom — Global Stylesheet
   Design: High-tech defense agency aesthetic with Apple-like simplicity
   ========================================================================== */

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

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Colors */
    --navy-primary: #002037;
    --navy-deep: #001c47;
    --red-accent: #9a1419;
    --red-light: #c4282e;
    --white: #ffffff;
    --white-muted: rgba(255,255,255,0.6);
    --gray-line: rgba(255,255,255,0.08);
    --glass-bg: rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.08);
    --glass-border-hover: rgba(255,255,255,0.15);
    --glow-blue: rgba(0,120,255,0.15);
    --glow-red: rgba(154,20,25,0.3);
    --overlay-dark: rgba(0,32,55,0.85);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --max-width: 1200px;
    --section-pad-y: 100px;
    --section-pad-y-mobile: 60px;
    --side-pad: 40px;
    --side-pad-mobile: 20px;
    --card-gap: 24px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-btn: 6px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: 0.2s;
    --t-base: 0.3s;
    --t-slow: 0.6s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--white-muted);
    background: var(--navy-primary);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--white);
    font-weight: 600;
    line-height: 1.2;
}
h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }
p + p { margin-top: 1rem; }

.eyebrow {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red-accent);
    margin-bottom: 12px;
    display: block;
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-pad);
}

section {
    padding: var(--section-pad-y) 0;
    position: relative;
}

.section-alt {
    background: var(--navy-deep);
}

.text-center { text-align: center; }

.grid {
    display: grid;
    gap: var(--card-gap);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 16px 36px;
    border-radius: var(--radius-btn);
    border: none;
    transition: all var(--t-base) var(--ease);
    white-space: nowrap;
}

.btn-primary {
    background: var(--red-accent);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--red-light);
    box-shadow: 0 0 30px var(--glow-red);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-secondary:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    padding: 12px 0;
    border-radius: 0;
}
.btn-ghost::after {
    content: '→';
    transition: transform var(--t-base) var(--ease);
}
.btn-ghost:hover::after {
    transform: translateX(4px);
}

/* ---------- Glass Card ---------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--t-base) var(--ease);
}
.glass-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ---------- Header ---------- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--t-base) var(--ease);
}
#site-header.scrolled {
    background: rgba(0,32,55,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 1px 0 var(--gray-line);
}
.site-header {
    /* inner header resets */
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--side-pad);
}
.site-logo img {
    height: 88px;
    width: auto;
}
.site-logo:hover { opacity: 0.85; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.8);
    transition: color var(--t-fast) ease;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red-accent);
    transition: width var(--t-base) var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    margin-left: 12px;
}
.nav-cta .btn {
    padding: 12px 24px;
    font-size: 0.875rem;
}

/* ---------- Mobile Nav ---------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all var(--t-base) var(--ease);
    border-radius: 2px;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translateY(5px) translateX(5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translateY(-5px) translateX(5px); }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background: var(--navy-deep);
    z-index: 999;
    padding: 100px 40px 40px;
    transition: right 0.4s var(--ease);
    overflow-y: auto;
}
.mobile-drawer.open { right: 0; }
.mobile-drawer a {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--white);
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-line);
    transition: color var(--t-fast) ease;
}
.mobile-drawer a:hover { color: var(--red-accent); }
.mobile-drawer .btn { margin-top: 24px; width: 100%; text-align: center; }

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    transition: all var(--t-base) ease;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--navy-primary);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg svg {
    width: 100%;
    height: 100%;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,32,55,0.55) 0%, rgba(0,28,71,0.30) 50%, rgba(0,32,55,0.20) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}
.hero-content h1 { margin-bottom: 20px; }
.hero-content p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--white-muted);
    margin-bottom: 32px;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Interior hero (compact) */
.hero-interior {
    min-height: 50vh;
    padding-top: 120px;
}
.hero-interior .hero-content { max-width: 700px; }
.hero-interior h1 { font-size: 2.75rem; }
.hero-interior p { font-size: 1rem; }

/* ---------- Section Intro ---------- */
.section-intro {
    max-width: 640px;
    margin-bottom: 48px;
}
.section-intro.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.section-intro h2 { margin-bottom: 16px; }

/* ---------- Stat Cards ---------- */
.stat-card {
    text-align: center;
    padding: 40px 24px;
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    opacity: 0.6;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}
.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--white-muted);
}

/* ---------- Team Grid ---------- */
.team-card {
    text-align: center;
    overflow: hidden;
}
.team-card .team-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    margin: -32px -32px 24px;
    width: calc(100% + 64px);
    filter: grayscale(20%);
    transition: filter var(--t-base) ease;
}
.team-card:hover .team-photo {
    filter: grayscale(0%);
}
.team-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.team-card .team-role {
    font-size: 0.8125rem;
    color: var(--red-accent);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Bio Section ---------- */
.bio-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.bio-block + .bio-block { margin-top: 80px; }
.bio-block h3 { margin-bottom: 16px; }
.bio-block p { color: var(--white-muted); }

/* ---------- FAQ Accordion ---------- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid var(--gray-line);
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    text-align: left;
    color: var(--white);
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--t-fast) ease;
}
.faq-question:hover { color: var(--red-accent); }
.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform var(--t-base) var(--ease);
}
.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--t-base) var(--ease);
}
.faq-icon::before {
    width: 16px; height: 2px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq-icon::after {
    width: 2px; height: 16px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq-item.open .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
}
.faq-answer-inner {
    padding: 0 0 24px;
    color: var(--white-muted);
    line-height: 1.8;
}
.faq-answer-inner ol {
    list-style: decimal;
    padding-left: 20px;
    margin-top: 12px;
}
.faq-answer-inner ol li {
    margin-bottom: 8px;
}

/* ---------- Contact Form ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1rem;
    transition: border-color var(--t-fast) ease;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red-accent);
}
.form-group textarea {
    resize: vertical;
    min-height: 140px;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.office-card {
    padding: 28px;
}
.office-card + .office-card { margin-top: 20px; }
.office-card h4 { margin-bottom: 12px; }
.office-card .office-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.9375rem;
    color: var(--white-muted);
}
.office-card .office-detail svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

/* ---------- Donate / Tier Cards ---------- */
.donate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}
.donate-card {
    text-align: center;
    padding: 36px 24px;
    cursor: pointer;
    position: relative;
}
.donate-card.selected {
    border-color: var(--red-accent);
    background: rgba(154,20,25,0.1);
}
.donate-card .donate-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}
.donate-card .donate-label {
    font-size: 0.8125rem;
    color: var(--white-muted);
}

.custom-amount-group {
    max-width: 400px;
    margin: 32px auto 0;
    text-align: center;
}
.custom-amount-group input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--white);
    width: 100%;
}
.custom-amount-group input:focus {
    outline: none;
    border-color: var(--red-accent);
}

/* ---------- Video Section ---------- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ---------- CTA Band ---------- */
.cta-band {
    text-align: center;
    padding: 80px 0;
    background: var(--navy-deep);
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p {
    max-width: 560px;
    margin: 0 auto 32px;
    color: var(--white-muted);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-deep);
    border-top: 1px solid var(--gray-line);
    padding: 60px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer-brand img {
    height: 40px;
    margin-bottom: 16px;
}
.footer-brand p {
    font-size: 0.875rem;
    color: var(--white-muted);
    max-width: 300px;
    line-height: 1.7;
}
.footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 20px;
}
.footer-col a {
    display: block;
    font-size: 0.9375rem;
    color: var(--white-muted);
    padding: 6px 0;
    transition: color var(--t-fast) ease;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid var(--gray-line);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}
.footer-legal {
    display: flex;
    gap: 24px;
}
.footer-legal a { color: rgba(255,255,255,0.4); }
.footer-legal a:hover { color: var(--white-muted); }

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Ambient Glow (Background Effect) ---------- */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.glow-blue {
    width: 600px;
    height: 600px;
    background: var(--glow-blue);
}
.glow-red {
    width: 400px;
    height: 400px;
    background: var(--glow-red);
}

/* ---------- Map: now rendered via Canvas in index.html ---------- */

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.875rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .bio-block { grid-template-columns: 1fr; gap: 32px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .donate-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    #site-header {
        background: rgba(0,32,55,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 12px 0;
    }
    .hero { padding-top: 80px; }
    .hero-interior { padding-top: 100px; }
}

@media (max-width: 768px) {
    :root {
        --section-pad-y: 60px;
        --side-pad: 20px;
    }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.5rem; }
    .hero { min-height: 90vh; }
    .hero-interior { min-height: 45vh; padding-top: 100px; }
    .hero-interior h1 { font-size: 2rem; }
    .hero-content { text-align: center; }
    .hero-actions { justify-content: center; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .donate-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .stat-card { padding: 24px 16px; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.875rem; }
    .donate-grid { grid-template-columns: 1fr 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}
