/* --- RESET & VARIABLES --- */
:root {
    --brand-blue: #2563EB;
    /* Royal Tech Blue */
    --brand-red: #E11D48;
    /* Rose/Crimson */
    --brand-yellow: #F59E0B;
    /* Warm Amber */
    --brand-green: #10B981;
    /* Emerald Green */

    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --bg-white: #ffffff;
    --bg-light: #F3F4F6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Default font for readability (Body Text) */
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- TYPOGRAPHY SETTINGS --- */
/* Applying Audiowide ONLY to Headlines and Logo */
h1,
.fluid-logo {
    font-family: 'Audiowide', cursive;
}


/* --- YOUR CUSTOM LOGO STYLE --- */
.fluid-logo {
    font-family: 'Audiowide', cursive;
    font-weight: bold;
    font-size: 28px;
    letter-spacing: 2px;
    text-decoration: none;
    display: inline-block;
}

/* Target the first word (TICTACLAP) -> BLUE */
.fluid-logo span:nth-child(1) {
    color: #1A73E8;
}

/* Target the second word (FOUNDATION) -> YELLOW */
.fluid-logo span:nth-child(2) {
    color: #FBBC05;
}

/* --- NAVIGATION --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(255, 255, 255, 0.95);
    /* Slightly transparent */
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    -webkit-backdrop-filter: blur(10px);
    /* Safari support */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Nav links stay readable sans-serif */
    font-family: 'Segoe UI', Roboto, sans-serif;
}

nav a:hover {
    color: var(--brand-green);
}

/* DONATE BUTTON - NOW RED */
.btn-donate-nav {
    background-color: var(--brand-red) !important;
    /* Changed to Red */
    color: white !important;
    padding: 12px 28px;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(225, 29, 72, 0.2);
}

.btn-donate-nav:hover {
    background-color: #be123c !important;
    /* Darker red on hover */
    transform: translateY(-1px);
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 100px 20px 60px;
    max-width: 900px;
    margin: 0 auto;
    /* Tech Grid Pattern */
    background-image: linear-gradient(#e5e7eb 1px, transparent 1px),
        linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    /* Fade out the grid at the bottom */
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
}

.hero h1 {
    font-size: 3.8rem;
    /* Big Headline */
    margin-bottom: 25px;
    line-height: 1.2;
    color: var(--brand-blue);
    text-transform: uppercase;
}

.hero h1 span {
    color: var(--brand-blue);
}

.mission-summary {
    font-size: 1.35rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    font-weight: 400;
    /* Body text remains readable font */
}

/* --- GRID SECTIONS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-bottom: 80px;
}

.card {
    background: var(--bg-white);
    padding: 45px 35px;
    border-radius: 20px;
    border: 1px solid rgba(243, 244, 246, 0.8);
    /* More subtle border */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy spring transition */
    position: relative;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    /* Softer initial shadow */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    /* Deep premium shadow */
    border-color: rgba(37, 99, 235, 0.1);
    /* Subtle blue tint on borders */
}

/* Color accents */
.card.kit {
    border-top: 5px solid var(--brand-blue);
}

.card.grant {
    border-top: 5px solid var(--text-gray);
}

.card.donate {
    border-top: 5px solid var(--brand-red);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    /* Audiowide applied via generic h3 rule */
}

.card p {
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.btn-link {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

.card.kit .btn-link {
    color: var(--brand-blue);
}

.card.kit .btn-link:hover {
    border-bottom-color: var(--brand-blue);
}

.card.grant .btn-link {
    color: var(--text-gray);
}

.card.grant .btn-link:hover {
    border-bottom-color: var(--text-gray);
}

.card.donate .btn-link {
    color: var(--brand-red);
}

.card.donate .btn-link:hover {
    border-bottom-color: var(--brand-red);
}

/* --- NEWSLETTER --- */
.newsletter {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    text-align: center;
    padding: 40px 20px;
    border-radius: 24px;
    margin: 20px 20px;
    border: 1px solid #dbeafe;
}

.newsletter h2 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 2rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    max-width: 550px;
    margin: 30px auto 0;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 15px 25px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    flex: 1;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-form input:focus {
    border-color: var(--brand-blue);
}

.newsletter-form button {
    background-color: var(--brand-blue);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    font-family: 'Audiowide', cursive;
    /* Applied font to button for style */
    letter-spacing: 1px;
}

.newsletter-form button:hover {
    background-color: #2563EB !important;
    /* Darker red on hover */
    transform: translateY(-1px);
}

/* --- FOOTER --- */
footer {
    background-color: #F9FAFB;
    padding: 80px 20px 40px;
    margin-top: 80px;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 50px;
}

.footer-left h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-left p {
    color: var(--text-gray);
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-links {
    display: flex;
    gap: 40px;
}

.footer-links a {
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--brand-green);
    text-decoration: underline;
}

.legal-row {
    max-width: 1200px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.85rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        padding: 15px 5%;
    }

    nav ul {
        gap: 15px;
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        /* Ensure it takes full width */
    }

    nav a {
        display: inline-block;
        /* Better touch target validation */
        padding: 5px;
    }

    .hero {
        padding: 60px 20px 40px;
    }

    .hero h1 {
        font-size: 2.2rem;
        /* prevent overflow */
        line-height: 1.1;
    }

    .fluid-logo {
        font-size: 22px;
    }

    /* Grid becomes 1 column naturally via flex-wrap in card-grid, 
       but let's ensure containers satisfy mobile width */
    .container {
        padding: 20px;
    }

    /* Footer updates */
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        /* Stack links vertically */
        gap: 20px;
        width: 100%;
        /* Full width for easier tapping */
    }

    .footer-links a {
        font-size: 1.1rem;
        /* Larger font for tapping */
        padding: 10px;
        /* Larger touch target */
        display: block;
        /* Full width block */
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        margin-bottom: 10px;
    }
}