/* =============================================
   1. CSS VARIABLES & BASIC SETUP
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@700;800&family=Open+Sans:wght@400;600&display=swap');

:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc; /* A slightly more engaging monochrome accent */
    --primary-variant-color: #3700b3;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.15);
    
    --glass-bg: rgba(30, 30, 30, 0.4);
    --glass-blur: 15px;

    --font-family-heading: 'Raleway', sans-serif;
    --font-family-body: 'Open Sans', sans-serif;

    --transition-speed: 0.4s;
    --transition-curve: cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   2. TYPOGRAPHY & UTILITIES
   ============================================= */
h1, h2, h3, h4, h5, h6, .title, .subtitle {
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.2;
}

.title.is-1 { font-size: 3.5rem; }
.title.is-2 { font-size: 2.5rem; margin-bottom: 2rem; }
.title.is-3 { font-size: 2rem; }
.title.is-4 { font-size: 1.5rem; }
.title.is-5 { font-size: 1.25rem; }
.subtitle { color: var(--text-color); opacity: 0.9; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-curve);
}

a:hover {
    color: var(--heading-color);
}

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

.section {
    padding: 4rem 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.is-size-5 {
    font-size: 1.25rem;
}

/* =============================================
   3. LAYOUT (FLEXBOX/GRID)
   ============================================= */
.columns {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.column {
    display: block;
    flex-basis: 0;
    flex-grow: 1;
    flex-shrink: 1;
    padding: 0.75rem;
}

.is-vcentered { align-items: center; }
.is-centered { justify-content: center; }
.is-multiline { flex-wrap: wrap; }
.is-variable.is-8 { margin: -1.5rem; }
.is-variable.is-8 > .column { padding: 1.5rem; }


.column.is-half { flex: none; width: 50%; }
.column.is-one-third { flex: none; width: 33.333%; }
.column.is-two-thirds { flex: none; width: 66.666%; }
.column.is-one-quarter { flex: none; width: 25%; }

/* =============================================
   4. GLASSMORPHISM UTILITY
   ============================================= */
.glass-pane {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform var(--transition-speed) var(--transition-curve), box-shadow var(--transition-speed) var(--transition-curve);
}

.glass-pane:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* =============================================
   5. HEADER & NAVIGATION
   ============================================= */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color var(--transition-speed) ease;
}

.header.is-scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand .logo {
    font-family: var(--font-family-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--heading-color);
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-end {
    display: flex;
    gap: 1.5rem;
}

.navbar-item {
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    transition: width var(--transition-speed) var(--transition-curve);
}

.navbar-item:hover::after, .navbar-item.is-active::after {
    width: 100%;
}

.navbar-burger {
    display: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    position: relative;
}

.navbar-burger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--heading-color);
    left: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-burger span:nth-child(1) { top: 25%; }
.navbar-burger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.navbar-burger span:nth-child(3) { top: 75%; }


/* =============================================
   6. GLOBAL COMPONENTS (Buttons, Cards, Forms)
   ============================================= */
/* --- Buttons --- */
.button, button, input[type="submit"] {
    cursor: pointer;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed) var(--transition-curve);
}

.button.is-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
}
.button.is-primary:hover {
    background-color: var(--heading-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.4);
}
.button.is-link {
    background: none;
    color: var(--primary-color);
}
.button.is-text {
    background: none;
    padding: 0;
    color: var(--primary-color);
    text-transform: none;
    letter-spacing: 0;
}
.button.is-text:hover {
    text-decoration: underline;
}
.button.is-large { font-size: 1.2rem; padding: 1rem 2.5rem; }

/* --- Cards --- */
.card {
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
}

.card-image {
    width: 100%;
    margin-bottom: 1.5rem;
}
.card-image .image {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}
.card-image .image.is-1by1 { padding-top: 100%; }
.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.is-rounded {
    border-radius: 50%;
}

.card-content {
    flex-grow: 1;
    padding: 0; /* padding handled by glass-pane */
}

/* --- Forms --- */
.field { margin-bottom: 1.5rem; }
.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}
.input, .textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--heading-color);
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.input:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.25);
}


/* =============================================
   7. SECTION STYLES
   ============================================= */

/* --- Hero Section --- */
.hero.is-fullheight { min-height: 100vh; }
.hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-body { width: 100%; }
.hero-content-wrapper .glass-pane {
    max-width: 800px;
    margin: 0 auto;
}
.hero-title {
    color: #FFFFFF;
    margin-bottom: 1rem;
}
.hero-subtitle {
    color: #FFFFFF;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* --- Statistics Section --- */
#stats .stat-card { text-align: center; }
#stats .stat-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
}
#stats .stat-label { margin-bottom: 1rem; }

/* --- About & Behind the scenes --- */
#about .image-container, #behind-the-scenes .image-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- Methodology Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-marker {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color);
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
}
.timeline-content .heading {
    color: var(--primary-color);
    font-weight: bold;
    font-family: var(--font-family-heading);
}

/* --- Insights Section --- */
.insight-card .image-container {
    border-radius: 12px;
    overflow: hidden;
}
.insight-card:not(:last-child) {
    margin-bottom: 2rem;
}

/* --- Community Section --- */
.testimonial-card {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.8;
}
.testimonial-card:not(:last-child) {
    margin-bottom: 2rem;
}
.testimonial-card cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- External Resources --- */
.resource-card h3 a {
    color: var(--heading-color);
}

/* --- FAQ Accordion --- */
.faq-item:not(:last-child) { margin-bottom: 1rem; }
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.25rem;
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    cursor: pointer;
    padding: 1.5rem; /* Make the whole area clickable */
    position: relative;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--primary-color);
    transition: transform var(--transition-speed) var(--transition-curve);
}
.faq-item.is-active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 1.5rem;
}
.faq-item.is-active .faq-answer {
    max-height: 300px; /* Adjust as needed */
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* =============================================
   8. FOOTER
   ============================================= */
.footer {
    background-color: var(--surface-color);
    padding: 4rem 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}
.footer .title {
    color: var(--primary-color);
}
.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer li {
    margin-bottom: 0.5rem;
}
.footer a {
    color: var(--text-color);
    opacity: 0.8;
}
.footer a:hover {
    opacity: 1;
    color: var(--primary-color);
}
.footer .content {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* =============================================
   9. ANIMATIONS
   ============================================= */
.animated-element {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--transition-curve), transform 0.8s var(--transition-curve);
}
.animated-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   10. SPECIFIC PAGE STYLES
   ============================================= */
/* --- Success Page --- */
body.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

/* --- Privacy & Terms Pages --- */
body.legal-page .main-content {
    padding-top: 120px;
}
.legal-page .section {
    padding-top: 0;
}


/* =============================================
   11. RESPONSIVENESS (Media Queries)
   ============================================= */
@media screen and (max-width: 1024px) {
    .column.is-half, .column.is-one-third, .column.is-two-thirds {
        width: 50%;
    }
}

@media screen and (max-width: 768px) {
    .title.is-1 { font-size: 2.5rem; }
    .title.is-2 { font-size: 2rem; }
    .section { padding: 3rem 1rem; }

    /* --- Responsive Columns --- */
    .column.is-half, .column.is-one-third, .column.is-two-thirds {
        width: 100%;
    }
    
    /* --- Navbar Burger --- */
    .navbar-burger { display: block; }
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface-color);
        box-shadow: 0 8px 16px rgba(0,0,0,0.3);
        padding: 1rem 0;
    }
    .navbar-menu.is-active { display: block; }
    .navbar-end {
        flex-direction: column;
        align-items: center;
    }
    .navbar-item {
        width: 100%;
        text-align: center;
    }

    /* --- Timeline --- */
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-marker, .timeline-item:nth-child(even) .timeline-marker {
        left: 21px;
    }

    /* --- Footer --- */
    .footer .column {
        text-align: center;
        margin-bottom: 2rem;
    }
}