

:root {
    --bg: #ffffff;
    --panel: #fefefe;
    --bitcoin-orange: #f7931a;
    --bitcoin-gold: #ffb347;
    --bitcoin-dark: #ff8c00;
    --ink: #2d3748;
    --muted: #718096;
    --accent: #ed8936;
    --warm-glow: 0 4px 20px rgba(247, 147, 26, .15), 0 1px 4px rgba(247, 147, 26, .1);
    --soft-glow: 0 2px 10px rgba(247, 147, 26, .2), 0 1px 3px rgba(247, 147, 26, .1);
    --gradient-warm: linear-gradient(135deg, rgba(247, 147, 26, .1) 0%, rgba(255, 179, 71, .05) 100%);
}


/* --- Base & Reset Styles --- */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    /* Prevents horizontal scroll from body content overflow */
    overflow-x: hidden;
}

body {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(ellipse at top, rgba(247, 147, 26, .03) 0%, transparent 50%), radial-gradient(ellipse at bottom right, rgba(255, 179, 71, .04) 0%, transparent 50%), #ffffff;
    line-height: 1.6;
}


/* --- Decorative Background Elements --- */

.grid-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(247, 147, 26, .03) 0%, transparent 25%), radial-gradient(circle at 75% 75%, rgba(255, 179, 71, .02) 0%, transparent 25%);
    background-size: 300px 300px, 200px 200px;
    opacity: .6;
}


/* --- Bitcoin-themed helpers --- */

.bitcoin-text {
    color: var(--bitcoin-orange);
    font-weight: 600;
}

.warm-glow {
    box-shadow: var(--warm-glow);
}

.chip {
    border: 1px solid rgba(247, 147, 26, .3);
    padding: .4rem .8rem;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--bitcoin-dark);
    background: rgba(247, 147, 26, .08);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.chip:hover {
    background: rgba(247, 147, 26, .12);
    transform: translateY(-1px);
}

.muted {
    color: var(--muted);
}


/* --- Navigation --- */


/* --- Navigation --- */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid rgba(247, 147, 26, .15);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(247, 147, 26, .08);
}

.nav-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: "Orbitron", monospace;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ink);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    padding: .5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--bitcoin-orange);
    border-bottom-color: var(--bitcoin-orange);
}


/* NEW: Menu toggle (hamburger) */

.menu-toggle {
    display: none;
    /* hidden on desktop */
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
}


/* --- Responsive Layouts (Media Queries) --- */

@media (max-width: 768px) {
    .nav-wrap {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    .menu-toggle {
        display: block;
        /* visible on mobile */
        margin-left: auto;
    }
    .nav-links {
        display: none;
        /* hidden by default */
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
    }
    .nav-links.show {
        display: flex;
        /* show when toggled */
    }
    .stats {
        grid-template-columns: 1fr;
    }
    .hero {
        padding: 4rem 1rem 3rem;
    }
    section {
        padding: 3rem 1rem;
    }
    .panel {
        padding: 1.5rem;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}


/* --- Hero Section --- */

.hero {
    position: relative;
    padding: 5rem 1.5rem 4rem;
    background-image: url('b2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    z-index: 1;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, rgba(247, 147, 26, 0.08) 50%, rgba(255, 255, 255, 0.2) 100%);
    z-index: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.title {
    font-family: "Orbitron", monospace;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 600;
    margin: 0 0 1rem;
    line-height: 1.1;
    color: #000000;
    /* Directly set color for better compatibility */
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
}

.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #000000;
    max-width: 900px;
    font-weight: 500;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.37);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--bitcoin-orange);
    background: linear-gradient(135deg, var(--bitcoin-orange) 0%, var(--bitcoin-dark) 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    transition: all 0.3s ease;
    box-shadow: var(--warm-glow);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 147, 26, .25), 0 3px 10px rgba(247, 147, 26, .15);
}

.btn.ghost {
    background: transparent;
    color: var(--bitcoin-orange);
    border: 2px solid var(--bitcoin-orange);
}

.btn.ghost:hover {
    background: var(--bitcoin-orange);
    color: white;
}


/* --- Sections & Components --- */

section {
    padding: 4rem 1.5rem;
    position: relative;
}

h2 {
    font-family: "Orbitron", monospace;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: var(--bitcoin-orange);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--bitcoin-orange), var(--bitcoin-gold));
    border-radius: 2px;
}

h3 {
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

ul li {
    margin-bottom: .5rem;
    position: relative;
    padding-left: 1rem;
}

.panel {
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(247, 147, 26, .12);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .02);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bitcoin-orange), var(--bitcoin-gold));
}

.panel:hover {
    box-shadow: 0 8px 30px rgba(247, 147, 26, .12), 0 2px 8px rgba(247, 147, 26, .08);
    transform: translateY(-2px);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

.card {
    position: relative;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(247, 147, 26, .15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(247, 147, 26, .15);
    transform: translateY(-2px);
}

.card h3 {
    margin: 0 0 .8rem;
    font-size: 1.1rem;
    color: var(--ink);
}

.card .small {
    font-size: .9rem;
    color: var(--muted);
}


/* --- Statistics Section --- */

.stats {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    padding: 1.5rem 1rem;
    border: 1px solid rgba(247, 147, 26, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .9);
    text-align: center;
    box-shadow: 0 4px 15px rgba(247, 147, 26, .08);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(247, 147, 26, .15);
}

.stat .value {
    font-family: "Orbitron", monospace;
    font-size: 2rem;
    font-weight: 600;
    color: var(--bitcoin-orange);
    display: block;
    margin-bottom: .5rem;
}

.stat .label {
    font-size: .85rem;
    color: var(--muted);
    font-weight: 500;
}


/* --- Steps/Timeline --- */

.steps {
    counter-reset: step;
    display: grid;
    gap: 2rem;
}

.step {
    position: relative;
    padding-left: 4rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--bitcoin-orange) 0%, var(--bitcoin-gold) 100%);
    color: white;
    font-family: "Orbitron", monospace;
    font-weight: 700;
    box-shadow: var(--warm-glow);
}


/* --- SVG background --- */

.mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .15;
}


/* --- Footer --- */

footer {
    border-top: 1px solid rgba(247, 147, 26, .15);
    background: linear-gradient(135deg, rgba(247, 147, 26, .02) 0%, rgba(255, 179, 71, .01) 100%);
    padding: 3rem 1.5rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr auto;
    align-items: center;
}


/* --- Links & Badges --- */

a.inline {
    color: var(--bitcoin-orange);
    text-decoration: none;
    border-bottom: 1px dashed rgba(247, 147, 26, .4);
    transition: all 0.2s ease;
}

a.inline:hover {
    border-bottom-style: solid;
    color: var(--bitcoin-dark);
}

.divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--bitcoin-orange), var(--bitcoin-gold), transparent);
    border-radius: 2px;
    margin: 2rem 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    font-weight: 500;
    padding: .5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(247, 147, 26, .4);
    background: rgba(255, 255, 255, 0.9);
    color: var(--bitcoin-dark);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(247, 147, 26, .1);
}


/* --- Form improvements --- */

input,
textarea {
    border: 2px solid rgba(247, 147, 26, .2) !important;
    border-radius: 8px !important;
    background: white !important;
    color: var(--ink) !important;
    transition: border-color 0.2s ease !important;
}

input:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--bitcoin-orange) !important;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, .1) !important;
}

label {
    color: var(--ink) !important;
    font-weight: 600 !important;
}


/* --- Smooth scrolling --- */

html {
    scroll-behavior: smooth;
}


/* --- Responsive Layouts (Media Queries) --- */


/* Breakpoint for tablet-sized screens and smaller */

@media (max-width: 900px) {
    .grid.cols-2,
    .grid.cols-3 {
        grid-template-columns: 1fr;
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Breakpoint for mobile-sized screens and smaller */

@media (max-width: 768px) {
    .nav-wrap {
        /* Allow navigation items to stack on top of each other */
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    .nav-links {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    .stats {
        grid-template-columns: 1fr;
        /* Single column on very small screens */
    }
    .hero {
        padding: 4rem 1rem 3rem;
    }
    section {
        padding: 3rem 1rem;
    }
    .panel {
        padding: 1.5rem;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}


/* --- Specific component fixes for smaller screens --- */

.graph-placeholder {
    /* Fixed styles for graphs to ensure they are responsive and not oversized */
    border: 2px dashed #3b82f6;
    text-align: center;
    color: #ccc;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    margin: 1.5rem 0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.graph-placeholder img {
    /* Ensure images inside placeholders scale down */
    max-width: 100%;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}


/* The following styles for specific images were causing horizontal overflow and are removed */


/* #correlation-chart-placeholder img, #crypto-adoption-chart-placeholder img, #migrant-distribution-chart-placeholder img {
    width: 330%;
    height: 330%;
    object-fit: contain;
} */


/* --- Lightbox Styles --- */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 35px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}


/* [Your existing CSS styles remain here...] */


/* Added simple styles for graph placeholders */

.graph-placeholder {
    border: 2px dashed #3b82f6;
    text-align: center;
    color: #ccc;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    margin: 1.5rem 0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* remove extra space */
    overflow: hidden;
    /* keeps image inside rounded corners */
}

.graph-placeholder img {
    max-width: 100%;
    /* don't overflow horizontally */
    max-height: 100%;
    /* don't overflow vertically */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps aspect ratio and fits */
}

.grapha-placeholder img {
    max-width: 100%;
    /* don't overflow horizontally */
    max-height: 100%;
    /* don't overflow vertically */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps aspect ratio and fits */
}

.graphs-placeholder img {
    max-width: 100%;
    /* don't overflow horizontally */
    max-height: 100%;
    /* don't overflow vertically */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps aspect ratio and fits */
}

.graphe-placeholder img {
    max-width: 100%;
    /* don't overflow horizontally */
    max-height: 100%;
    /* don't overflow vertically */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps aspect ratio and fits */
}

.graphu-placeholder img {
    max-width: 100%;
    /* don't overflow horizontally */
    max-height: 100%;
    /* don't overflow vertically */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps aspect ratio and fits */
}

.graphi-placeholder img {
    max-width: 100%;
    /* don't overflow horizontally */
    max-height: 100%;
    /* don't overflow vertically */
    width: auto;
    height: auto;
    object-fit: contain;
    /* keeps aspect ratio and fits */
}

#correlation-chart-placeholder img,
#filtered-correlation-chart-placeholder img,
#stripplot-chart-placeholder img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}


/* Increase height of adoption and pie chart only */


/* #correlation-chart-placeholder img, */

#stripplot-chart-placeholder img,
#filtered-correlation-chart-placeholder img,
#correlation-chart-placeholder img,
#crypto-adoption-chart-placeholder img,
#migrant-distribution-chart-placeholder img {
    /* adjust as needed */
    width: 330%;
    height: 330%;
    object-fit: contain;
}


/* --- Add these styles for the lightbox --- */


/* The lightbox background (overlay) */

.lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place, covering the viewport */
    z-index: 1000;
    /* Sit on top of all other content */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    /* Black semi-transparent background */
    /* Use flexbox to center the image */
    align-items: center;
    justify-content: center;
}


/* The image inside the lightbox */

#lightbox-img {
    display: block;
    max-width: 85%;
    max-height: 85vh;
    /* Use viewport height to prevent overly large images */
}


/* The close button */

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox .close:hover {
    color: #bbb;
}


/* Add a pointer cursor to expandable images */

.expandable {
    cursor: pointer;
}


/* Loading state for form */

.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    display: none;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    display: none;
}


/* } */
