/* ===========================================
   monopoleai.com - Styles
   Palette: Cool Minimal
   =========================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #0A1830;
    background-color: #F4F6FA;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Neural Network Background --- */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(244, 246, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(10, 24, 48, 0.06);
}

.logotype {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 26px);
    color: #0A1830;
    letter-spacing: -0.02em;
}

.logotype-dot {
    color: #3060C0;
}

.logotype--footer {
    font-size: clamp(18px, 1.5vw, 22px);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #8090A0;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: #0A1830;
}

.nav-link--cta {
    background: #3060C0;
    color: #FFFFFF;
    padding: 8px 20px;
    border-radius: 8px;
    transition: background 0.25s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-link--cta:hover {
    background: #254da0;
    color: #FFFFFF;
    transform: scale(1.03);
}

/* --- Sections --- */
section {
    position: relative;
    z-index: 1;
    padding: 120px 40px 80px;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 48px);
    color: #0A1830;
    margin-bottom: 12px;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.2vw, 18px);
    color: #8090A0;
    line-height: 1.6;
}

/* --- Bento Grid --- */
.bento-hero {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1200px;
    width: 100%;
    grid-auto-rows: minmax(160px, auto);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    grid-auto-rows: minmax(160px, auto);
}

.bento-grid--research {
    grid-auto-rows: minmax(140px, auto);
}

.bento-grid--metrics {
    grid-auto-rows: minmax(140px, auto);
}

.bento-grid--about {
    grid-auto-rows: minmax(140px, auto);
}

/* --- Bento Cell --- */
.bento-cell {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(10, 24, 48, 0.06);
    padding: 24px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(16px);
}

.bento-cell.visible {
    opacity: 1;
    transform: translateY(0);
}

.bento-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(10, 24, 48, 0.1);
}

.bento-cell.visible:hover {
    transform: scale(1.02);
}

.bento-cell--hero {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.bento-cell--wide {
    grid-column: span 2;
}

.bento-cell--tall {
    grid-row: span 2;
}

.bento-cell--chart {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-cell--metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

/* --- Cell Label --- */
.cell-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(11px, 0.7vw, 13px);
    color: #8090A0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

/* --- Hero Content --- */
.hero-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 56px);
    color: #0A1830;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 18px);
    color: #8090A0;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3vw, 40px);
    color: #3060C0;
    line-height: 1.2;
}

.stat-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(12px, 0.8vw, 14px);
    color: #8090A0;
    margin-top: 4px;
}

.hero-cta {
    display: inline-block;
    background: #3060C0;
    color: #FFFFFF;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: 10px;
    transition: background 0.25s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-cta:hover {
    background: #254da0;
    transform: scale(1.04);
}

/* --- Charts --- */
.chart-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-container--wide {
    margin-top: 12px;
}

.perf-chart,
.accuracy-chart {
    width: 100%;
    height: auto;
}

.chart-grid-line {
    stroke: #E8F0FF;
    stroke-width: 1;
}

.chart-line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line--primary {
    stroke: #3060C0;
}

.chart-line--secondary {
    stroke: #8090A0;
    stroke-dasharray: 4 4;
}

.chart-dot {
    fill: #3060C0;
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.legend-item {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #8090A0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-item::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 2px;
    border-radius: 1px;
}

.legend-item--primary::before {
    background: #3060C0;
}

.legend-item--secondary::before {
    background: #8090A0;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    color: #8090A0;
}

/* --- Metrics --- */
.metric-large {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 56px);
    color: #3060C0;
    line-height: 1.1;
}

.metric-large--sm {
    font-size: clamp(24px, 2.5vw, 36px);
}

.metric-unit {
    font-weight: 500;
    font-size: 0.6em;
    color: #8090A0;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #8090A0;
    margin-top: 8px;
}

.metric-trend--up {
    color: #20A060;
}

.trend-arrow {
    flex-shrink: 0;
}

/* --- Sparklines --- */
.sparkline-container {
    margin-top: 12px;
    width: 100%;
}

.sparkline {
    width: 100%;
    height: 40px;
}

.sparkline-line {
    fill: none;
    stroke: #3060C0;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Products --- */
.products-section {
    background: #F4F6FA;
}

.product-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2vw, 24px);
    color: #0A1830;
    margin-bottom: 8px;
}

.product-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    color: #8090A0;
    line-height: 1.7;
    margin-bottom: 16px;
}

.product-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #3060C0;
    background: #E8F0FF;
    padding: 4px 12px;
    border-radius: 6px;
}

.product-metric {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

/* --- Research --- */
.research-section {
    background: #FFFFFF;
}

.paper-meta {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 12px;
}

.paper-date,
.paper-citations {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #8090A0;
}

.paper-link {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #3060C0;
    transition: color 0.2s ease;
}

.paper-link:hover {
    color: #254da0;
}

.research-stat {
    margin-top: auto;
}

.impact-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-top: 12px;
}

.impact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- Metrics Section --- */
.metrics-section {
    background: #F4F6FA;
}

/* --- Bar Chart --- */
.bar-chart-container {
    margin-top: 12px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
}

.bar {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

.bar-fill {
    width: 100%;
    height: var(--bar-height, 50%);
    background: #3060C0;
    border-radius: 4px 4px 0 0;
    transition: height 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: bottom;
}

.bar:hover .bar-fill {
    background: #254da0;
}

.bar::after {
    content: attr(data-value);
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 10px;
    color: #8090A0;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.bar:hover::after {
    opacity: 1;
}

.bar-chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    color: #8090A0;
}

/* --- Region Dots --- */
.region-dots {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.region-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E8F0FF;
}

.region-dot--active {
    background: #20A060;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- About --- */
.about-section {
    background: #FFFFFF;
}

.about-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 17px);
    color: #8090A0;
    line-height: 1.8;
}

.about-text--sm {
    font-size: clamp(13px, 0.9vw, 15px);
    margin-top: 12px;
    line-height: 1.7;
}

/* --- Contact / CTA --- */
.contact-section {
    background: #0A1830;
    padding: 100px 40px;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-section .section-title {
    color: #FFFFFF;
}

.contact-section .section-subtitle {
    color: #8090A0;
    margin-bottom: 32px;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: 10px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), background 0.25s ease, box-shadow 0.25s ease;
}

.btn--primary {
    background: #3060C0;
    color: #FFFFFF;
}

.btn--primary:hover {
    background: #3d6fd4;
    transform: scale(1.04);
    box-shadow: 0 4px 20px rgba(48, 96, 192, 0.3);
}

.btn--secondary {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.04);
}

/* --- Footer --- */
.site-footer {
    background: #0A1830;
    padding: 60px 40px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #8090A0;
    margin-top: 12px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-heading {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.footer-link {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #8090A0;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #FFFFFF;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-copy {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #8090A0;
}

.logotype--footer {
    color: #FFFFFF;
}

.logotype--footer .logotype-dot {
    color: #3060C0;
}

/* --- SVG Chart Animations --- */
.chart-line,
.sparkline-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease;
}

.chart-line.drawn,
.sparkline-line.drawn {
    stroke-dashoffset: 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .site-header {
        padding: 16px 24px;
    }

    .main-nav {
        gap: 16px;
    }

    .nav-link {
        font-size: 13px;
    }

    section {
        padding: 80px 24px 60px;
    }

    .bento-hero,
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bento-cell--hero {
        grid-column: span 2;
        grid-row: span 1;
        padding: 28px;
    }

    .hero-stats {
        gap: 20px;
    }

    .impact-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 14px 16px;
    }

    .main-nav {
        display: none;
    }

    section {
        padding: 60px 16px 40px;
    }

    .bento-hero,
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-cell--hero,
    .bento-cell--wide {
        grid-column: span 1;
    }

    .bento-cell--tall {
        grid-row: span 1;
    }

    .hero-stats {
        flex-direction: column;
        gap: 12px;
    }

    .impact-stats {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-actions {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }

    .bar-chart {
        height: 80px;
    }
}
