/* cbdc.bar - Fintech Trust Blue Dashboard */

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

:root {
    --deep-navy: #0B1929;
    --navy-mid: #122640;
    --trust-blue: #2563EB;
    --royal-blue: #1D4ED8;
    --light-blue: #DBEAFE;
    --page-white: #F8FAFC;
    --card-white: #FFFFFF;
    --slate-dark: #0F172A;
    --slate-mid: #64748B;
    --slate-light: #94A3B8;
    --border-gray: #E2E8F0;
    --success-green: #10B981;
    --caution-amber: #F59E0B;
    --bar-track: #1A2E4A;
}

body {
    background-color: var(--page-white);
    color: var(--slate-dark);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ============================
   HERO: STATUS BAR
   ============================ */

#hero {
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, var(--deep-navy) 0%, var(--navy-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 90%;
    max-width: 900px;
}

#adoption-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-light);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

#adoption-label.visible {
    opacity: 1;
}

#progress-track {
    width: 80vw;
    max-width: 800px;
    height: 12px;
    background-color: var(--bar-track);
    border-radius: 6px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

#progress-track.visible {
    opacity: 1;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--trust-blue), #3B82F6);
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
    transition: width 2s cubic-bezier(0.16, 1, 0.3, 1);
}

#hero-percentage {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--card-white);
    letter-spacing: -0.02em;
}

#hero-domain {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--trust-blue);
    opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}

#hero-domain.visible {
    opacity: 1;
}

/* ============================
   METRICS ROW
   ============================ */

#metrics {
    padding: 4rem 2rem;
    background-color: var(--page-white);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.metric-card {
    background-color: var(--card-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.metric-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.metric-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--slate-mid);
}

.metric-number {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--slate-dark);
    letter-spacing: -0.02em;
}

.metric-trend {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.metric-trend.positive {
    color: var(--success-green);
}

.metric-trend.cautionary {
    color: var(--caution-amber);
}

/* ============================
   WORLD MAP
   ============================ */

#world-map-section {
    padding: 4rem 2rem;
    background-color: var(--page-white);
}

.section-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--slate-dark);
    letter-spacing: 0.01em;
    text-align: center;
    margin-bottom: 3rem;
}

#map-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

#world-map {
    width: 100%;
    height: auto;
}

.hotspot {
    fill: var(--trust-blue);
    stroke: var(--light-blue);
    stroke-width: 1;
    cursor: pointer;
    transform-origin: center;
    transform: scale(0);
    transition: r 0.2s ease, transform 0.3s ease;
}

.hotspot.visible {
    transform: scale(1);
}

.hotspot:hover {
    r: 8;
}

#map-tooltip {
    position: absolute;
    background-color: var(--slate-dark);
    color: var(--card-white);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    width: 220px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#map-tooltip.tooltip-hidden {
    opacity: 0;
    transform: translateY(8px);
}

#map-tooltip.tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-caret {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: var(--slate-dark);
}

#tooltip-country {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
}

#tooltip-status {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    color: var(--light-blue);
    margin-top: 0.25rem;
}

/* ============================
   TIMELINE
   ============================ */

#timeline-section {
    padding: 4rem 2rem;
    background-color: var(--card-white);
    border-top: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
}

#timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    padding-bottom: 1rem;
}

#timeline-track {
    display: flex;
    gap: 0;
    position: relative;
    padding: 2rem 3rem;
    min-width: max-content;
}

#timeline-track::before {
    content: '';
    position: absolute;
    top: calc(2rem + 5px);
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-gray);
}

.timeline-item {
    flex: 0 0 160px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--border-gray);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    transition: background-color 0.3s ease;
}

.timeline-dot.active {
    background-color: var(--trust-blue);
}

.timeline-year {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--trust-blue);
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--slate-mid);
    line-height: 1.5;
    max-width: 140px;
}

/* ============================
   FOOTER
   ============================ */

#report-footer {
    background-color: var(--deep-navy);
    padding: 4rem 2rem 2rem;
    color: var(--slate-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--card-white);
    margin-bottom: 0.5rem;
}

.footer-col span {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--slate-light);
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-col span:hover {
    color: var(--trust-blue);
}

.footer-bottom {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-wordmark {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--trust-blue);
}

.footer-copy {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: var(--slate-light);
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
}
