/*
 * Modern Editorial & Magazine Design System (The Verge / Bloomberg Aesthetic)
 * Nation's Eye News Network
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&display=swap');

:root {
    --brand-crimson: #e11d48;       /* Vibrant Rose Crimson */
    --brand-crimson-hover: #be123c;
    --brand-navy: #090e1a;          /* Ultra-deep obsidian slate */
    --brand-navy-light: #111827;
    --brand-blue: #2563eb;          /* Electric Blue */
    --brand-amber: #f59e0b;         /* Market Amber */
    --brand-emerald: #10b981;       /* Bullish Green */
    --brand-gray: #f8fafc;          /* Editorial off-white surface */
    --brand-border: #e2e8f0;
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--brand-gray);
    color: #334155;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.font-editorial {
    font-family: 'Newsreader', Georgia, serif;
}

/* Custom Highlight Selection */
::selection {
    background-color: var(--brand-crimson);
    color: #ffffff;
}

/* Custom Ultra-Slim Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-track {
    background: #090e1a;
}
.dark ::-webkit-scrollbar-thumb {
    background: #1e293b;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Focus Ring for WCAG Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--brand-crimson);
    outline-offset: 2px;
}

/* Frosted Glass Navigation */
.glass-nav {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.dark .glass-nav {
    background-color: rgba(9, 14, 26, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Editorial Hero & News Card Animations */
.magazine-card {
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring), border-color 0.3s ease;
    will-change: transform, box-shadow;
}

.magazine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -15px rgba(9, 14, 26, 0.1);
}

.dark .magazine-card:hover {
    box-shadow: 0 20px 35px -15px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

.magazine-card img {
    transition: transform 0.6s var(--ease-spring), filter 0.4s ease;
}

.magazine-card:hover img {
    transform: scale(1.04);
}

/* Live Market Ticker */
.market-ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.market-ticker-track {
    display: inline-flex;
    align-items: center;
    animation: market-scroll 45s linear infinite;
}

.market-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes market-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Breaking News Marquee */
.ticker-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-animation 30s linear infinite;
    will-change: transform;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-animation {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Radar Live Pulsing Dot */
.live-radar {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.live-radar::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--brand-crimson);
    animation: radar-wave 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.75;
}

@keyframes radar-wave {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Numbered Wire Rankings (01, 02, 03) */
.wire-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dark .wire-number {
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.group:hover .wire-number {
    background: linear-gradient(180deg, var(--brand-crimson) 0%, #fb7185 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Video News Cinematic Overlay */
.video-card-glow {
    position: relative;
    overflow: hidden;
}

.video-play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.95);
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.35s var(--ease-spring);
}

.video-card-glow:hover .video-play-btn {
    transform: scale(1.15);
    background: #be123c;
    box-shadow: 0 0 0 14px rgba(225, 29, 72, 0);
}

/* Reading Progress Indicator */
#reading-progress-bar {
    box-shadow: 0 0 12px rgba(225, 29, 72, 0.8);
}

/* Editorial Article Content Formatting */
.article-body-editorial {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.dark .article-body-editorial {
    color: #cbd5e1;
}

.article-body-editorial p {
    margin-bottom: 1.6rem;
}

.article-body-editorial h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.dark .article-body-editorial h2 {
    color: #f8fafc;
}

.article-body-editorial h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

.dark .article-body-editorial h3 {
    color: #f1f5f9;
}

.article-body-editorial blockquote {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.3rem;
    line-height: 1.6;
    padding: 1.5rem 1.75rem;
    margin: 2.5rem 0;
    border-left: 4px solid var(--brand-crimson);
    background-color: #f8fafc;
    border-radius: 0 0.85rem 0.85rem 0;
    color: #334155;
    font-style: italic;
}

.dark .article-body-editorial blockquote {
    background-color: #111827;
    color: #94a3b8;
}

.drop-cap::first-letter {
    float: left;
    font-size: 3.75rem;
    line-height: 0.82;
    font-weight: 900;
    margin-right: 0.65rem;
    padding-top: 5px;
    color: var(--brand-crimson);
    font-family: 'Outfit', sans-serif;
}

/* Category Badge Tailored Color Tokens */
.badge-tag {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.6875rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.badge-politics { background-color: #e0f2fe; color: #0284c7; }
.badge-sports { background-color: #dcfce7; color: #15803d; }
.badge-business { background-color: #fef3c7; color: #b45309; }
.badge-entertainment { background-color: #fae8ff; color: #a21caf; }
.badge-crime { background-color: #fee2e2; color: #b91c1c; }
.badge-national { background-color: #f1f5f9; color: #334155; }
.badge-technology { background-color: #ede9fe; color: #6d28d9; }
.badge-world { background-color: #e0e7ff; color: #4338ca; }

.dark .badge-politics { background-color: rgba(2, 132, 199, 0.2); color: #38bdf8; }
.dark .badge-sports { background-color: rgba(21, 128, 61, 0.2); color: #4ade80; }
.dark .badge-business { background-color: rgba(180, 83, 9, 0.2); color: #fbbf24; }
.dark .badge-entertainment { background-color: rgba(162, 28, 175, 0.2); color: #e879f9; }
.dark .badge-crime { background-color: rgba(185, 28, 28, 0.2); color: #f87171; }
.dark .badge-national { background-color: rgba(51, 65, 85, 0.3); color: #cbd5e1; }
.dark .badge-technology { background-color: rgba(109, 40, 217, 0.2); color: #c084fc; }
.dark .badge-world { background-color: rgba(67, 56, 202, 0.2); color: #a5b4fc; }
