/* Digital Tribes: Enhanced Stylesheet */

@font-face {
    font-family: "Canvas Sans";
    src: url("../fonts/canva-sans-regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Canvas Sans";
    src: url("../fonts/canva-sans-medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
}

/* ===== Base Styles ===== */
:root {
    --politics-color: #e74c3c;
    --sports-color: #3498db;
    --dark-text: #2c3e50;
    --medium-text: #34495e;
    --light-text: #7f8c8d;
    --background: #f8f9fa;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Canvas Sans", sans-serif;
}

.flourish-embed {
    border-width: 1px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* ===== Stat Highlights ===== */
.stat-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.stat-highlight h3 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.stat-highlight p {
    margin: 1rem 0 0;
    font-size: 1.1rem;
}

/* ===== Example Boxes ===== */
.example-box {
    background: #f8f9fa;
    border-left: 4px solid var(--sports-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.example-box p {
    margin: 0.75rem 0;
}

.example-box .note {
    font-size: 0.9rem;
    color: var(--light-text);
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* ===== Visualization Containers ===== */
.visualization-container {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--light-text);
    margin-top: 1rem;
    font-style: italic;
}

/* ===== Interactive Elements ===== */
.interactive-viz {
    min-height: 400px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

/* ===== Methodology Section ===== */
.methodology-note {
    background: #e9ecef;
    border: 2px solid #dee2e6;
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 8px;
}

.methodology-note h3 {
    margin-top: 0;
    color: var(--dark-text);
}

.methodology-note p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.methodology-note strong {
    color: var(--politics-color);
}

/* ===== Print Styles ===== */
@media print {
    .hero {
        background: white;
        color: var(--dark-text);
        border: 2px solid var(--medium-text);
    }

    .stat-highlight {
        background: white;
        color: var(--dark-text);
        border: 2px solid var(--sports-color);
    }

    .visualization-container {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* ===== Accessibility ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Scroll Animations (Large Screens Only) ===== */
@media (min-width: 1024px) {
    .animate-on-scroll {
        opacity: 0;
        transition:
            opacity 0.8s ease-out,
            transform 0.8s ease-out;
    }

    .animate-on-scroll.is-visible {
        opacity: 1;
        transform: none;
    }

    .from-left {
        transform: translateX(-50px);
    }

    .from-right {
        transform: translateX(50px);
    }

    .from-bottom {
        transform: translateY(50px);
    }

    .from-top {
        transform: translateY(-50px);
    }
}
