/* globaltonecheck.com - Dashboard Analytics Dark */
/* Palette: #111827, #1f2937, #22c55e, #eab308, #ef4444, #f3f4f6, #3b82f6, #374151 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #111827;
    color: #f3f4f6;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}

/* Accent Bar */
.accent-bar {
    height: 4px;
    background: linear-gradient(to right, #3b82f6, #22c55e);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    background: #111827;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(to right, transparent, #374151, transparent);
}

.hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.25rem;
}

.globe-icon {
    opacity: 0.85;
    flex-shrink: 0;
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    color: #f3f4f6;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2.5rem;
}

/* Index Ring Display */
.index-display {
    margin: 0 auto 2rem;
}

.index-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 1rem;
}

.index-ring {
    position: relative;
    display: inline-block;
    width: 140px;
    height: 140px;
}

.ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: #1f2937;
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: #22c55e;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.5s ease-out;
}

.index-val {
    font-family: 'Fira Code', monospace;
    font-size: 2.8rem;
    font-weight: 500;
    color: #22c55e;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
}

.index-max {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #6b7280;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 60%);
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timestamp {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #6b7280;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

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

.status-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Title */
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Analysis Section */
.analysis {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.panel {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.panel:hover {
    border-color: #4b5563;
    transform: translateY(-2px);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.panel-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #f3f4f6;
}

.tone-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.tone-badge.positive {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tone-badge.neutral {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.tone-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.panel-metrics {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.panel-score {
    font-family: 'Fira Code', monospace;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
}

.panel-delta {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
}

.panel-delta.up {
    color: #22c55e;
}

.panel-delta.up::before {
    content: '\25B2 ';
    font-size: 0.55rem;
}

.panel-delta.down {
    color: #ef4444;
}

.panel-delta.down::before {
    content: '\25BC ';
    font-size: 0.55rem;
}

.panel-delta.flat {
    color: #eab308;
}

.panel-delta.flat::before {
    content: '\25C6 ';
    font-size: 0.55rem;
}

/* Color text helpers */
.green-text { color: #22c55e; }
.amber-text { color: #eab308; }
.red-text { color: #ef4444; }

/* Bar Chart */
.bar-chart {
    height: 20px;
    background: #374151;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.bar {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    width: 0;
    transition: width 1.2s ease-out;
}

.bar.green { background: #22c55e; }
.bar.amber { background: #eab308; }
.bar.red { background: #ef4444; }

.bar-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #111827;
    font-weight: 500;
}

/* Tone Breakdown */
.tone-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0.75rem;
    padding: 8px 0;
    border-top: 1px solid #374151;
    border-bottom: 1px solid #374151;
}

.tone-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tone-type {
    font-size: 0.7rem;
    color: #9ca3af;
}

.tone-pct {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
}

.panel-note {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* Comparison Section */
.comparison {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.comp-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.comp-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
    flex: 1;
    min-width: 90px;
    transition: border-color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.comp-card:hover {
    border-color: #4b5563;
    transform: translateY(-2px);
}

.comp-region {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.comp-score {
    font-family: 'Fira Code', monospace;
    font-size: 1.6rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.comp-indicator {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
}

.positive-ind { background: #22c55e; }
.neutral-ind { background: #eab308; }
.negative-ind { background: #ef4444; }

/* Trends Section */
.trends {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.trend-container {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
}

.trend-chart {
    display: flex;
    gap: 12px;
}

.trend-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 4px 28px 0;
    min-width: 28px;
}

.y-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: #6b7280;
    text-align: right;
}

.trend-area {
    flex: 1;
    position: relative;
}

.trend-svg {
    width: 100%;
    height: 200px;
    display: block;
}

.grid-line {
    stroke: #374151;
    stroke-width: 1;
    stroke-dasharray: 4,4;
}

.trend-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-out;
}

.trend-line.animated {
    stroke-dashoffset: 0;
}

.trend-na { stroke: #3b82f6; }
.trend-eu { stroke: #f3f4f6; opacity: 0.5; }
.trend-apac { stroke: #22c55e; }
.trend-mena { stroke: #ef4444; opacity: 0.7; }

.trend-x-axis {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
}

.x-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: #6b7280;
}

.trend-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #374151;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #9ca3af;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.na-dot { background: #3b82f6; }
.eu-dot { background: #f3f4f6; opacity: 0.5; }
.apac-dot { background: #22c55e; }
.mena-dot { background: #ef4444; opacity: 0.7; }

/* Summary Section */
.summary {
    text-align: center;
    padding: 4rem 1.5rem 5rem;
    position: relative;
}

.summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(to right, transparent, #374151, transparent);
}

.summary-inner {
    max-width: 560px;
    margin: 0 auto;
}

.summary-icon {
    margin-bottom: 1rem;
}

.summary-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #f3f4f6;
    margin-bottom: 0.75rem;
}

.summary-text {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.summary-footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: #4b5563;
    letter-spacing: 0.02em;
}

.summary-update {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: #374151;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }

    .comp-strip {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .trend-legend {
        gap: 10px;
    }

    .legend-item {
        font-size: 0.6rem;
    }

    .hero {
        padding: 5rem 1rem 2.5rem;
    }
}

@media (max-width: 380px) {
    .comp-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}
