/* Base Styles & Variables */
:root {
    /* Slate Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-900: #0f172a;

    /* Sky Palette */
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-400: #38bdf8;
    --sky-700: #0369a1;
    --sky-800: #075985;

    /* Base Colors */
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--slate-50);
    color: var(--slate-900);
    line-height: 1.5;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utility Classes (mimicking common Tailwind patterns used in the design) */
.container {
    max-width: 72rem;
    /* 6xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.hidden {
    display: none;
}

@media (min-width: 640px) {

    /* sm */
    .sm\:flex {
        display: flex;
    }
}

@media (min-width: 768px) {

    /* md */
    .md\:flex {
        display: flex;
    }

    .md\:inline-block {
        display: inline-block;
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {

    /* lg */
    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:items-center {
        align-items: center;
    }

    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Header Styles */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    height: 4rem;
    /* 16 * 0.25rem = 4rem */
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* 3 * 0.25rem */
    text-decoration: none;
    cursor: pointer;
}

.logo {
    height: 2.5rem;
    /* 10 * 0.25rem */
    width: auto;
}

.logo-text {
    display: none;
    flex-direction: column;
    line-height: 1.25;
}

.logo-text span {
    font-size: 0.75rem;
    /* xs */
    color: var(--slate-500);
}

@media (min-width: 640px) {
    .logo-text {
        display: flex;
    }
}

.main-nav {
    display: none;
    gap: 1.5rem;
    /* space-x-6 */
    font-size: 0.875rem;
    /* sm */
    font-weight: 500;
    color: var(--slate-700);
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to bottom right, var(--sky-50), var(--slate-100));
    border-bottom: 1px solid var(--slate-200);
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* 10 * 0.25rem */
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

@media (min-width: 1024px) {
    .hero-inner {
        flex-direction: row;
        align-items: center;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

.hero-content {
    flex: 1;
}

.hero-media {
    flex: 1;
}

.badge {
    display: inline-flex;
    border-radius: 9999px;
    background-color: var(--sky-100);
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    /* 11px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--sky-800);
}

.hero-title {
    margin-top: 1rem;
    font-size: 1.875rem;
    /* 3xl */
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--slate-900);
    line-height: 1.1;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
        /* 4xl */
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3rem;
        /* 5xl */
    }
}

.hero-description {
    margin-top: 1rem;
    max-width: 36rem;
    /* xl */
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-700);
}

@media (min-width: 640px) {
    .hero-description {
        font-size: 1rem;
        /* base */
    }
}

.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-outline {
    border: 1px solid var(--sky-200);
    color: var(--sky-800);
    background-color: transparent;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--sky-400);
    background-color: var(--white);
}

.hero-note {
    margin-top: 0.75rem;
    max-width: 28rem;
    /* md */
    font-size: 0.6875rem;
    /* 11px */
    color: var(--slate-500);
}

/* Video Card */
.video-card {
    overflow: hidden;
    border-radius: 1rem;
    /* 2xl */
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--slate-100);
}

.video-card-header {
    border-bottom: 1px solid var(--slate-100);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-duration {
    font-size: 0.625rem;
    /* 10px */
    font-weight: 400;
    color: var(--slate-400);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    display: block;
    line-height: 0;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    margin: 0;
    padding: 0;
}

/* Ensure video card has no gap */
.video-card-header + .video-container {
    margin: 0;
}

.video-card-footer {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    /* xs */
    color: var(--slate-500);
}

.nav-link {
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--sky-700);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    /* rounded-full */
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--sky-700);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--sky-800);
}

.btn-sm {
    padding: 0.5rem 1rem;
    /* px-4 py-2 */
    font-size: 0.875rem;
    /* text-sm */
}

/* Three Pillars Section */
.pillars-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .pillars-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .pillars-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.section-title {
    font-size: 1.5rem;
    /* 2xl */
    font-weight: 600;
    color: var(--slate-900);
}

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

.section-subtitle {
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
    /* 2xl */
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-600);
}

.pillars-grid {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .pillars-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pillar-card {
    background-color: var(--white);
    padding: 1.25rem;
    border-radius: 1rem;
    /* 2xl */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-100);
}

.pillar-title {
    font-size: 0.875rem;
    /* sm */
    font-weight: 600;
    color: var(--sky-800);
}

.pillar-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-600);
}

/* About Section */
.about-section {
    background-color: var(--white);
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.about-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.about-text {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-700);
}

.mt-4 {
    margin-top: 1rem;
}

.nfp-card {
    background-color: var(--slate-50);
    padding: 1.5rem;
    border-radius: 1rem;
    /* 2xl */
    border: 1px solid var(--slate-100);
}

.nfp-title {
    font-size: 0.875rem;
    /* sm */
    font-weight: 600;
    color: var(--slate-900);
}

.nfp-text {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    /* xs */
    color: var(--slate-700);
}

.nfp-list {
    margin-top: 0.5rem;
    list-style: none;
    font-size: 0.75rem;
    /* xs */
    color: var(--slate-700);
}

.nfp-list li {
    margin-bottom: 0.25rem;
}

/* Certification & Grants Section */
.cert-grants-section {
    background-color: var(--slate-900);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.cert-grants-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .cert-grants-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.text-white {
    color: var(--white);
}

.cert-text {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-200);
}

.cert-list {
    margin-top: 0.75rem;
    list-style: none;
    font-size: 0.75rem;
    /* xs */
    color: var(--slate-200);
}

.cert-list li {
    margin-bottom: 0.25rem;
}

.btn-outline-white {
    border: 1px solid var(--slate-500);
    color: var(--white);
    background-color: transparent;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    /* xs */
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline-white:hover {
    border-color: var(--white);
}

/* Available Grants Section */
.available-grants-section {
    background-color: var(--slate-50);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.grants-grid {
    margin-top: 2.5rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grants-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.grant-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    /* 2xl */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-100);
    display: flex;
    flex-direction: column;
}

.grant-title {
    font-size: 1.125rem;
    /* lg */
    font-weight: 600;
    color: var(--sky-800);
}

.grant-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-700);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.mt-auto {
    margin-top: auto;
}

/* Contact Section */
.contact-section {
    background-color: var(--white);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.contact-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.contact-text {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    /* sm */
    color: var(--slate-700);
}

.contact-details {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    /* xs */
    color: var(--slate-600);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.font-semibold {
    font-weight: 600;
}

.contact-form-card {
    background-color: var(--slate-50);
    padding: 1.5rem;
    border-radius: 1rem;
    /* 2xl */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-100);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    /* xs */
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    border-radius: 0.5rem;
    /* lg */
    border: 1px solid var(--slate-200);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    /* sm */
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--sky-700);
}

.form-field {
    position: relative;
}

.form-error {
    display: none;
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Only show validation errors after form submission attempt */
form.submitted .form-input:invalid {
    border-color: #ef4444;
}

form.submitted .form-input:invalid:focus {
    border-color: #dc2626;
}

form.submitted .form-input:invalid + .form-error {
    display: block;
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.w-full {
    width: 100%;
}

.form-note {
    margin-top: 0.75rem;
    font-size: 0.6875rem;
    /* 11px */
    color: var(--slate-500);
}

/* Application Section */
.application-section {
    background-color: var(--slate-50);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.application-form-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--slate-100);
    margin-top: 2rem;
}

.application-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--slate-100);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sky-800);
    margin-bottom: 0.5rem;
}

.form-subsection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--slate-50);
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
}

.form-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.form-helper-text {
    font-size: 0.8125rem;
    color: var(--slate-600);
    margin-bottom: 0.5rem;
}

.form-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-700);
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.form-certification-text {
    background-color: var(--slate-50);
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
}

.form-certification-text p {
    font-size: 0.8125rem;
    color: var(--slate-700);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.form-certification-text p:last-child {
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--slate-200);
    background-color: var(--white);
}

.footer-inner {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.6875rem;
    /* 11px */
    color: var(--slate-500);
}

@media (min-width: 640px) {
    .footer-inner {
        flex-direction: row;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .footer-inner {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}