/* ============================================
   THE RECORD - DESIGN SYSTEM
   Ultra Modern Editorial Theme
   ============================================ */

/* ----------------------------------------
   1. DESIGN TOKENS
   All configurable values in one place
   ---------------------------------------- */
:root {
    /* Typography */
    --font-heading: 'Bricolage Grotesque', sans-serif;
    --font-serif: 'Fraunces', serif;
    --font-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;

    /* Font Sizes - Fluid Scale */
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 1rem;
    --text-lg: 1.1rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.6rem;
    --text-3xl: clamp(1.5rem, 4vw, 2.5rem);
    --text-4xl: clamp(1.8rem, 5vw, 3.2rem);
    --text-5xl: clamp(2.2rem, 8vw, 4.5rem);

    /* Font Weights */
    --weight-medium: 500;
    --weight-semibold: 700;
    --weight-bold: 800;
    --weight-black: 900;
    --weight-ultra: 950;

    /* Colors - Light Theme */
    --color-bg: #fffcf8;
    --color-text: #0a0a0a;
    --color-text-muted: #444;
    --color-accent: #ff4757;
    --color-accent-soft: #ffeaa7;
    --color-accent-glow: rgba(255, 71, 87, 0.05);
    --color-border: #111;
    --color-border-light: rgba(17, 17, 17, 0.08);

    /* Glass Effect */
    --glass-bg: rgba(255, 252, 248, 0.7);
    --glass-border: rgba(17, 17, 17, 0.1);
    --glass-blur: blur(10px);

    /* Status Colors */
    --color-info-bg: #e3f2fd;
    --color-info-text: #1565c0;
    --color-warning-bg: #fffde7;
    --color-warning-text: #fbc02d;

    /* Spacing Scale */
    --space-unit: 1rem;
    --space-xs: calc(0.25 * var(--space-unit));
    --space-sm: calc(0.5 * var(--space-unit));
    --space-md: var(--space-unit);
    --space-lg: calc(2 * var(--space-unit));
    --space-xl: calc(4 * var(--space-unit));
    --space-2xl: calc(6 * var(--space-unit));

    /* Layout */
    --container-max: 1400px;
    --content-max: 680px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Motion */
    --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
    --duration-fast: 0.2s;
    --duration-smooth: 0.6s;
    --transition-fast: var(--duration-fast) ease;
    --transition-smooth: var(--duration-smooth) var(--ease-smooth);
}

/* Dark Theme Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0d0d0d;
        --color-text: #f5f5f5;
        --color-text-muted: #ababab;
        --color-accent: #ff6b81;
        --color-accent-glow: rgba(255, 107, 129, 0.1);
        --color-border: #2a2a2a;
        --color-border-light: rgba(255, 255, 255, 0.05);
        --glass-bg: rgba(13, 13, 13, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

/* ----------------------------------------
   2. CSS RESET & BASE
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

.meta a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ----------------------------------------
   3. TYPOGRAPHY SYSTEM
   Reusable text styles
   ---------------------------------------- */

/* Heading Styles */
.heading-display,
.heading-xl,
.heading-lg,
.heading-md {
    font-family: var(--font-heading);
    line-height: 1.1;
}

.heading-display,
.heading-xl {
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 0.95;
    text-transform: uppercase;
}

.heading-xl {
    font-size: var(--text-4xl);
}

.heading-lg {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.heading-md {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    line-height: 1.2;
}

/* Text Styles */
.text-label {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-micro {
    font-size: var(--text-xs);
    font-weight: var(--weight-black);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-variant-ligatures: discretionary-ligatures;
}

.text-muted {
    color: var(--color-text-muted);
    font-weight: 400;
}

.text-accent {
    color: var(--color-accent);
    font-weight: 600;
}

/* ----------------------------------------
   4. LAYOUT UTILITIES
   ---------------------------------------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Flexible Grid System */
.page-layout {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 1100px) {
    .page-layout {
        grid-template-columns: 1fr 300px;
    }

    .sidebar-left {
        display: none;
    }
}

@media (max-width: 850px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-right {
        display: none;
    }
}

/* Spacing Utilities */
.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* Text Alignment */
.text-center {
    text-align: center;
}

/* ----------------------------------------
   5. COMPONENT LIBRARY
   ---------------------------------------- */

/* --- Glass Card & Panels --- */
.glass-panel,
.glass-card,
.sidebar-section,
.article-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur);
    padding: var(--space-lg);
}

.glass-card--hover,
.article-card {
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.glass-card--hover:hover,
.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

/* --- Buttons --- */
.btn,
.btn-primary,
.btn-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-heading);
    font-weight: var(--weight-black);
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-smooth);
    background: var(--color-text);
    color: var(--color-bg);
}

.btn:hover,
.btn-primary:hover,
.btn-read:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    transform: translateY(-2px);
}

/* --- Inputs --- */
.input,
.input-standard {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-fast);
}

.input:focus,
.input-standard:focus {
    background: var(--color-bg);
    border-color: var(--color-accent);
}

/* --- Status Pills --- */
.pill,
.status-pill {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.pill--info,
.status-stable {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.pill--warning,
.status-moderate {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

/* --- Underline Link (Nav Style) --- */
.link-underline,
nav a {
    position: relative;
    padding: var(--space-sm) 0;
}

.link-underline::before,
nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--color-accent);
    transition: width var(--transition-smooth);
}

.link-underline:hover::before,
nav a:hover::before {
    width: 100%;
}

/* ----------------------------------------
   6. SITE COMPONENTS
   ---------------------------------------- */

/* --- Background Decoration --- */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 10%, var(--color-accent-glow) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, var(--color-accent-glow) 0%, transparent 40%);
    filter: blur(100px);
    pointer-events: none;
}

/* --- Ticker --- */
.ticker-wrap {
    width: 100%;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.4rem 0;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    padding: 0 4rem;
    font-size: var(--text-xs);
    font-weight: var(--weight-black);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.ticker-item::after {
    content: '•';
    margin-left: 4rem;
    color: var(--color-accent);
}

/* --- Header --- */
header {
    padding: var(--space-xl) 0 var(--space-lg);
    margin-bottom: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.brand {
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -5px;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    transition: all var(--transition-smooth);
    animation: reveal 1s var(--ease-smooth);
}

.brand:hover {
    transform: scale(1.02) rotate(-1deg);
    color: var(--color-accent);
}

.brand span {
    color: var(--color-accent);
}

.tagline {
    font-size: var(--text-sm);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: var(--weight-semibold);
    color: var(--color-text-muted);
}

/* --- Navigation --- */
nav {
    margin-top: var(--space-lg);
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

nav a {
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Sidebars --- */
.sidebar {
    position: sticky;
    top: var(--space-2xl);
}

.sidebar-section {
    margin-bottom: var(--space-lg);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-weight: var(--weight-black);
    text-transform: uppercase;
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
    color: var(--color-text);
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

/* --- Ad Spaces --- */
.ad-space {
    text-align: center;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-accent-glow);
    border: 1px dashed var(--color-border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    min-height: 200px;
}

.ad-space img {
    max-width: 100%;
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-sm);
}

/* --- Footer --- */
footer {
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--color-border-light);
    text-align: center;
}

.footer-links {
    margin-bottom: var(--space-md);
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.footer-links a {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: var(--weight-medium);
}

/* ----------------------------------------
   7. PAGE-SPECIFIC STYLES
   ---------------------------------------- */

/* --- Featured Article --- */
.featured-article {
    margin-bottom: var(--space-2xl);
}

.featured-article h2 {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    line-height: 0.95;
    margin: var(--space-xs) 0 var(--space-lg);
    font-weight: var(--weight-black);
    letter-spacing: -2px;
}

.featured-article h2 a:hover {
    color: var(--color-accent);
}

.excerpt {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

/* --- News Grid --- */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.article-card h3 {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    font-weight: var(--weight-bold);
}

/* --- Single Article Prose --- */
.prose {
    max-width: var(--content-max);
    margin: 0 auto;
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    line-height: 1.8;
}

.prose p {
    margin-bottom: var(--space-lg);
}

.prose h2,
.prose h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.prose blockquote {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    background: var(--color-accent-glow);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-sans);
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    color: var(--color-text);
}

.prose blockquote p {
    margin-bottom: 0 !important;
}

.prose blockquote strong {
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Drop Cap */
.dropcap>p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    float: left;
    line-height: 0.8;
    margin-right: var(--space-sm);
    color: var(--color-accent);
    font-weight: var(--weight-ultra);
    margin-top: 0.1em;
}

.single-header h1 {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: var(--space-lg);
}

/* ----------------------------------------
   8. ANIMATIONS
   ---------------------------------------- */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ----------------------------------------
   9. SCROLLBAR & BROWSER-SPECIFIC
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ----------------------------------------
   10. PAGINATION
   ---------------------------------------- */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
}

.pagination-link {
    text-decoration: none;
}
