:root {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #2563eb;
    /* Indigo/Blue 600 */
    --accent-hover: #1d4ed8;
    --accent-light: rgba(37, 99, 235, 0.1);
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --font-sans: 'Signika', sans-serif;
    --font-accent: 'Dancing Script', cursive;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 1.1rem;
    font-weight: 400;
    
    /* Sticky footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* Use accent font only for big titles to avoid oversized text in cards */
h1,
.hero-title,
.section-title {
    font-family: var(--font-accent) !important;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:visited {
    color: inherit;
}

ul {
    list-style: none;
}

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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

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

/* Navbar */
.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--bg-secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-secondary);
    position: relative;
    letter-spacing: 0.01em;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    border: none;
    background: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .navbar {
        height: 70px !important;
        background: var(--bg-secondary);
        backdrop-filter: blur(10px);
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        display: none !important;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem !important;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex !important;
        animation: slideDown 0.3s ease forwards;
    }

    .section-padding {
        padding: 6rem 1rem 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-main);
    margin-bottom: -2px;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(6px) brightness(0.92);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 50%, var(--bg-main) 100%);
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 0.2s forwards;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    padding: 2.5rem 0 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    display: block;
    color: var(--text-primary);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Utilities */
.section-padding {
    padding: 6rem 0 2rem;
    border: none;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Modules: Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

/* Gatekeeper */
.gate-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at center, #ffffff 0%, #eef2ff 100%);
}

.gate-card {
    background: var(--bg-secondary);
    padding: 3.5rem;
    border-radius: 2rem;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gate-question {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.4;
}

.answer-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.answer-btn {
    padding: 1.25rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-secondary);
    text-align: left;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

.answer-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-secondary);
    transform: translateX(10px);
}

.answer-btn.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

#gate-msg {
    margin-top: 2rem;
    text-align: center;
    min-height: 1.5rem;
    font-weight: 600;
}

/* Modal System */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95); /* Much darker to cover header */
    backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    z-index: 10;
    background: var(--bg-secondary);
    width: 90%;
    max-width: 600px;
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* Form Styling Refined */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.form-control {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.color-option {
    display: block;
    cursor: pointer;
}

.color-dot {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: var(--transition);
}

.color-option input:checked+.color-dot {
    border-color: var(--accent);
    transform: scale(1.15);
}
