/* =============================================
   BROTHERSCODE – ADEMIA SCHOLARSHIP FOUNDATION
   Design System & Global Styles
   ============================================= */

:root {
    --accent: #c8e44a;
    --accent-dark: #a8c232;
    --dark: #111111;
    --dark-mid: #1a1a1a;
    --dark-card: #222222;
    --light-bg: #f7f7f4;
    --impact-bg: #d6e87a;
    --white: #ffffff;
    --text-muted: #999999;
    --text-body: #333333;
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --nav-h: 64px;
    --section-pad: clamp(60px, 8vw, 100px);
    --container: min(1200px, 90vw);
    --radius: 2px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--dark);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Loading Screen ─────────────────────────── */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 9999;
}

.loading-logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--accent);
}

.loading-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    animation: loadProgress 1.2s ease-out forwards;
}

@keyframes loadProgress {
    to { width: 100%; }
}

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(48px, 8vw, 86px); }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: 0.08em; }
h3 { font-size: clamp(16px, 2vw, 20px); }

p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.75);
}

/* ── Container ──────────────────────────────── */
.container {
    width: var(--container);
    margin-inline: auto;
}

/* ── Buttons ────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius);
}

.btn-accent {
    background: var(--accent);
    color: var(--dark);
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateX(3px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

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

.btn-arrow::after {
    content: '→';
    font-size: 16px;
    transition: transform var(--transition);
}

.btn-arrow:hover::after {
    transform: translateX(4px);
}

/* ── Navigation ─────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 5vw;
    transition: background var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled {
    background: rgba(17,17,17,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar { justify-content: space-between; }

.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar-link {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}

.navbar-link:hover,
.navbar-link.active {
    color: var(--accent);
}

.navbar-logo {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.35em;
    color: var(--accent);
    text-transform: uppercase;
    text-decoration: none;
}

/* ── Hero Section ───────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    background: var(--dark);
    display: grid;
    grid-template-rows: 1fr;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?w=1400&q=80') center/cover no-repeat;
    opacity: 0.35;
    filter: grayscale(20%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(17,17,17,0.85) 0%,
        rgba(17,17,17,0.5) 60%,
        rgba(17,17,17,0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: var(--container);
    margin-inline: auto;
    padding: calc(var(--nav-h) + 80px) 0 80px;
}

.hero-headline {
    animation: fadeUp 0.8s ease both 0.2s;
}

.hero-headline h1 {
    color: var(--white);
    line-height: 0.95;
}

.hero-right {
    animation: fadeUp 0.8s ease both 0.4s;
}

.hero-right p {
    font-size: 16px;
    margin-bottom: 36px;
    color: rgba(255,255,255,0.8);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── About Section ──────────────────────────── */
.about {
    background: var(--dark);
    padding: var(--section-pad) 0;
}

.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.section-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 32px;
    display: block;
}

.about-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(15%);
    transition: transform 0.6s ease;
}

.about-image:hover img {
    transform: scale(1.04);
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(200,228,74,0.2);
    pointer-events: none;
}

.about-text p {
    font-size: 15px;
    line-height: 1.8;
}

/* ── Events Section ─────────────────────────── */
.events {
    background: var(--white);
    padding: var(--section-pad) 0;
}

.events .section-label {
    color: var(--dark);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.event-card {
    color: var(--dark);
}

.event-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: var(--radius);
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(10%);
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-card h3 {
    font-size: 17px;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    color: var(--dark);
}

.event-card p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-body);
}

/* ── Impact Section ─────────────────────────── */
.impact {
    background: var(--impact-bg);
    padding: var(--section-pad) 0;
}

.impact .section-label {
    color: var(--dark);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 40px;
}

.impact-row {
    display: contents;
}

.impact-stat {
    padding: 32px 0;
}

.impact-stat-number {
    font-family: var(--font-display);
    font-size: clamp(52px, 6vw, 72px);
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
    display: block;
}

.impact-stat-dash {
    display: block;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 4px;
}

.impact-stat-label {
    font-size: 13px;
    color: rgba(0,0,0,0.65);
    margin-top: 6px;
    font-weight: 500;
}

/* Extra items in second row */
.impact-grid-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid rgba(0,0,0,0.12);
    margin-top: 0;
    padding-top: 16px;
}

/* ── Partner Section ────────────────────────── */
.partner {
    position: relative;
    background: var(--dark-mid);
    padding: var(--section-pad) 0;
    overflow: hidden;
}

.partner-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?w=1200&q=70') center/cover no-repeat;
    opacity: 0.25;
    filter: grayscale(30%);
}

.partner-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.partner-left h2 {
    margin-bottom: 32px;
    color: var(--white);
}

.partner-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.partner-list li {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color var(--transition);
    cursor: default;
}

.partner-list li:hover {
    color: var(--accent);
}

/* ── Contact Section ────────────────────────── */
.contact {
    background: var(--dark);
    padding: var(--section-pad) 0;
}

.contact .section-label {
    color: var(--white);
}

.contact-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 56px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-block span {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}

.contact-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 60px;
}

/* ── Footer ─────────────────────────────────── */
.footer {
    background: var(--dark);
    padding: 0 0 48px;
}

.footer-inner {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--accent);
}

.footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

/* ── Scroll Reveal Animations ───────────────── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero children are never hidden — they use keyframe animations instead */
.hero-headline,
.hero-right {
    opacity: 1 !important;
    transform: none !important;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Utility ────────────────────────────────── */
.accent { color: var(--accent); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
    .hero-content,
    .about .container,
    .partner-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .impact-grid,
    .impact-grid-bottom {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .impact-grid,
    .impact-grid-bottom {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 52px; }
}

/* ── Navbar Dropdown ────────────────────────── */
.navbar-dropdown {
    position: relative;
}

.navbar-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font-family: var(--font-body);
}

.navbar-chevron {
    font-size: 11px;
    transition: transform var(--transition);
    display: inline-block;
}

.navbar-chevron.open {
    transform: rotate(180deg);
}

.navbar-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17,17,17,0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    min-width: 210px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 200;
    animation: dropdownIn 0.18s ease both;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.navbar-dropdown-item {
    display: block;
    padding: 13px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color var(--transition), background var(--transition), padding-left var(--transition);
}

.navbar-dropdown-item:last-child { border-bottom: none; }

.navbar-dropdown-item:hover,
.navbar-dropdown-item.active {
    color: var(--accent);
    background: rgba(200,228,74,0.05);
    padding-left: 26px;
}

/* ── Event card title links ─────────────────── */
.event-image-link {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.event-image-link .event-image {
    margin-bottom: 0;
}

.event-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 10px;
}

.event-title-link h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}

.event-title-link:hover h3 {
    color: var(--accent);
}

.event-arrow {
    font-size: 14px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--transition), transform var(--transition);
    display: inline-block;
}

.event-title-link:hover .event-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Quick Links Section ────────────────────── */
.home-quicklinks {
    background: var(--dark);
    padding: var(--section-pad) 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 40px;
}

.quicklink-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 36px 32px;
    background: var(--dark-card);
    text-decoration: none;
    border-top: 3px solid transparent;
    transition: background var(--transition), border-top-color var(--transition), padding-left var(--transition);
}

.quicklink-card:hover {
    background: #222;
    border-top-color: var(--accent);
    padding-left: 38px;
}

.quicklink-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.quicklink-body {
    flex: 1;
}

.quicklink-body h3 {
    font-size: 18px;
    letter-spacing: 0.06em;
    color: var(--white);
    margin-bottom: 10px;
    transition: color var(--transition);
}

.quicklink-card:hover .quicklink-body h3 {
    color: var(--accent);
}

.quicklink-body p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
}

.quicklink-arrow {
    font-size: 20px;
    color: rgba(255,255,255,0.2);
    align-self: center;
    flex-shrink: 0;
    transition: color var(--transition), transform var(--transition);
}

.quicklink-card:hover .quicklink-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .quicklinks-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Home Impact Section (About Us style) ───── */
.home-impact {
    background: var(--impact-bg);
    padding: var(--section-pad) 0;
}

.home-impact-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--dark);
    display: block;
    margin-bottom: 0;
}

.home-impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-top: 40px;
}

.home-impact-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 40px 32px;
    background: rgba(0,0,0,0.06);
}

.home-impact-number {
    font-family: var(--font-display);
    font-size: clamp(48px, 5vw, 64px);
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
}

.home-impact-label-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(0,0,0,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 900px) {
    .home-impact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .home-impact-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE NAVBAR
   ══════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ───── */
.navbar-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
    flex-shrink: 0;
}

.navbar-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

/* Animate to X when open */
.navbar-burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.navbar-burger.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.navbar-burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile backdrop ────────────────────────── */
.navbar-backdrop {
    display: none;
}

/* ── Mobile breakpoint ──────────────────────── */
@media (max-width: 860px) {

    .navbar {
        flex-wrap: wrap;
        align-items: center;
        padding: 0 5vw;
        height: var(--nav-h);
        position: fixed;
        z-index: 100;
    }

    /* Show hamburger */
    .navbar-burger {
        display: flex;
        margin-left: auto;
    }

    /* Full-screen slide-down drawer */
    .navbar-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(17,17,17,0.98);
        backdrop-filter: blur(16px);
        padding: 32px 6vw 48px;
        gap: 0;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 105;
    }

    .navbar-links.open {
        transform: translateX(0);
    }

    /* Each top-level link in drawer */
    .navbar-links > .navbar-link,
    .navbar-links > .navbar-dropdown > .navbar-dropdown-toggle {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 18px 0;
        font-size: 18px;
        letter-spacing: 0.12em;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        color: rgba(255,255,255,0.75);
    }

    .navbar-links > .navbar-link:first-child {
        border-top: 1px solid rgba(255,255,255,0.07);
    }

    .navbar-links > .navbar-link.active,
    .navbar-links > .navbar-link:hover {
        color: var(--accent);
    }

    /* Dropdown in mobile drawer */
    .navbar-dropdown {
        width: 100%;
    }

    .navbar-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    /* Mobile dropdown items — inline expand (not absolute) */
    .navbar-dropdown-menu {
        position: static;
        transform: none;
        min-width: unset;
        width: 100%;
        background: rgba(255,255,255,0.03);
        border: none;
        border-radius: 0;
        border-left: 3px solid var(--accent);
        margin: 0 0 4px 0;
        animation: none;
    }

    .navbar-dropdown-item {
        padding: 14px 20px;
        font-size: 15px;
        letter-spacing: 0.08em;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    .navbar-dropdown-item:hover,
    .navbar-dropdown-item.active {
        padding-left: 26px;
    }

    /* Backdrop fills rest of screen */
    .navbar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 104;
        background: transparent;
    }
}
