/* matchoomnews.com - Terracotta Warm Dark Mode News */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1A1210;
    color: #F0E0D0;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Leather Texture Mixin (via pseudo-elements) === */
.leather-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-radial-gradient(circle at 17% 32%, rgba(90, 58, 32, 0.04) 0px, transparent 1px),
        repeating-radial-gradient(circle at 63% 68%, rgba(90, 58, 32, 0.03) 0px, transparent 1px),
        repeating-radial-gradient(circle at 41% 15%, rgba(90, 58, 32, 0.05) 0px, transparent 2px),
        repeating-radial-gradient(circle at 85% 80%, rgba(90, 58, 32, 0.04) 0px, transparent 1px);
    pointer-events: none;
    z-index: 1;
}

/* === Hero Viewport === */
.hero-viewport {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #1A1210;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 120vh;
    background: radial-gradient(ellipse at center, rgba(160, 96, 74, 0.08) 0%, rgba(160, 96, 74, 0.03) 35%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    animation: fadeInLogotype 1s ease-out 0.3s forwards;
}

.logotype {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(48px, 8vw, 120px);
    color: #F0E0D0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.logotype-accent {
    color: #A0604A;
}

.tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #8A6A5A;
    margin-top: 16px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

@keyframes fadeInLogotype {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Leather Navigation Bar === */
.leather-nav {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    margin-top: 60px;
    background-color: #5A3A20;
    border-radius: 4px;
    padding: 0 16px;
    opacity: 0;
    transform: translateY(-30px);
    animation: slideDownNav 0.4s ease-out 1.3s forwards;
    overflow: hidden;
}

/* Leather noise overlay for nav */
.leather-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-radial-gradient(circle at 20% 30%, rgba(26, 18, 16, 0.15) 0px, transparent 1px),
        repeating-radial-gradient(circle at 60% 70%, rgba(26, 18, 16, 0.1) 0px, transparent 1px),
        repeating-radial-gradient(circle at 80% 20%, rgba(26, 18, 16, 0.12) 0px, transparent 2px);
    pointer-events: none;
    z-index: 0;
    border-radius: 4px;
}

.nav-categories {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    list-style: none;
    position: relative;
    z-index: 1;
}

.nav-item {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: #F0E0D0;
    opacity: 0.7;
    padding: 14px 20px;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.nav-item:hover {
    opacity: 1;
}

.nav-item.active {
    opacity: 1;
    color: #C87850;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #C87850;
}

@keyframes slideDownNav {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Circuit Overlay === */
.circuit-overlay {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    z-index: 1;
}

.circuit-svg {
    width: 100%;
    height: 100%;
}

.circuit-path {
    fill: none;
    stroke: #C87850;
    stroke-width: 1;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    opacity: 0.5;
}

.circuit-path.animated {
    animation: drawCircuit 1.5s ease-in-out forwards;
}

@keyframes drawCircuit {
    to {
        stroke-dashoffset: 0;
    }
}

/* === News Section === */
.news-section {
    position: relative;
    padding: 80px 5vw 120px;
    min-height: 100vh;
}

.section-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.section-glow-1 {
    width: 600px;
    height: 600px;
    top: 10%;
    left: -5%;
    background: radial-gradient(circle, rgba(160, 96, 74, 0.06) 0%, transparent 70%);
}

.section-glow-2 {
    width: 500px;
    height: 500px;
    bottom: 10%;
    right: -5%;
    background: radial-gradient(circle, rgba(200, 120, 80, 0.05) 0%, transparent 70%);
}

/* Interest Tags */
.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.interest-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #C87850;
    border: 1px solid rgba(200, 120, 80, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Perspective Container */
.news-perspective-container {
    position: relative;
    perspective: 1200px;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

/* News Layers */
.news-layer {
    display: grid;
    gap: 30px;
    margin-bottom: 50px;
}

.news-layer-primary {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.news-layer-secondary {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.news-layer-tertiary {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* === News Cards === */
.news-card {
    background-color: #241A14;
    border-radius: 6px;
    padding: 32px;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
    overflow: hidden;
}

/* Leather noise on cards */
.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-radial-gradient(circle at 25% 25%, rgba(90, 58, 32, 0.06) 0px, transparent 1px),
        repeating-radial-gradient(circle at 75% 75%, rgba(90, 58, 32, 0.04) 0px, transparent 1px);
    pointer-events: none;
    border-radius: 6px;
    z-index: 0;
}

.news-card > * {
    position: relative;
    z-index: 1;
}

.news-card-primary {
    opacity: 1;
    transform: translateZ(0);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 80px rgba(160, 96, 74, 0.04);
    border-left: 3px solid #A0604A;
}

.news-card-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(160, 96, 74, 0.08);
}

.news-card-secondary {
    opacity: 0.7;
    transform: scale(0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-left: 2px solid rgba(200, 120, 80, 0.4);
}

.news-card-secondary:hover {
    opacity: 0.85;
    transform: scale(0.97) translateY(-2px);
}

.news-card-tertiary {
    opacity: 0.4;
    transform: scale(0.9);
    filter: blur(1px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(200, 120, 80, 0.2);
}

.news-card-tertiary:hover {
    opacity: 0.55;
    filter: blur(0.5px);
    transform: scale(0.92) translateY(-2px);
}

/* Card Content Styles */
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-category {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: #C87850;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #8A6A5A;
}

.card-headline {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(22px, 3vw, 40px);
    color: #F0E0D0;
    line-height: 1.2;
    margin-bottom: 16px;
}

.card-body {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    color: #8A6A5A;
    line-height: 1.75;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(200, 120, 80, 0.15);
}

.card-source {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #8A6A5A;
}

.card-readtime {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #A0604A;
}

/* Fade-in animation for cards */
.news-card {
    opacity: 0;
    transform: translateY(30px);
}

.news-card.visible {
    animation: fadeInCard 0.6s ease-out forwards;
}

.news-card-primary.visible {
    opacity: 1;
    transform: translateZ(0);
}

.news-card-secondary.visible {
    opacity: 0.7;
    transform: scale(0.95);
}

.news-card-tertiary.visible {
    opacity: 0.4;
    transform: scale(0.9);
    filter: blur(1px);
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Editorial Section === */
.editorial-section {
    position: relative;
    padding: 100px 5vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leather-panel {
    position: relative;
    max-width: 800px;
    width: 100%;
    background-color: #5A3A20;
    border-radius: 6px;
    padding: 60px 50px;
    overflow: hidden;
}

/* Leather texture for panel */
.leather-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-radial-gradient(circle at 15% 25%, rgba(26, 18, 16, 0.2) 0px, transparent 1px),
        repeating-radial-gradient(circle at 55% 65%, rgba(26, 18, 16, 0.15) 0px, transparent 1px),
        repeating-radial-gradient(circle at 85% 35%, rgba(26, 18, 16, 0.18) 0px, transparent 2px);
    pointer-events: none;
    border-radius: 6px;
    z-index: 0;
}

.leather-panel > * {
    position: relative;
    z-index: 1;
}

.editorial-circuit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.2;
}

.editorial-circuit-svg {
    width: 100%;
    height: 100%;
}

.circuit-path-editorial {
    fill: none;
    stroke: #C87850;
    stroke-width: 0.5;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

.circuit-path-editorial.animated {
    animation: drawCircuit 2s ease-in-out forwards;
}

.editorial-quote {
    position: relative;
    z-index: 1;
}

.editorial-quote p {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    color: #F0E0D0;
    line-height: 1.4;
    text-align: center;
}

.editorial-attribution {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    gap: 4px;
}

.editorial-author {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #C87850;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.editorial-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #8A6A5A;
}

/* === Trending Section === */
.trending-section {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.section-header {
    padding: 0 5vw;
    margin-bottom: 40px;
}

.leather-accent {
    position: relative;
}

.leather-accent::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: #A0604A;
    margin-top: 12px;
}

.section-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(28px, 3vw, 42px);
    color: #F0E0D0;
}

.section-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #8A6A5A;
    display: block;
    margin-top: 8px;
    letter-spacing: 0.05em;
}

/* Ticker */
.trending-ticker {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.trending-ticker::before,
.trending-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.trending-ticker::before {
    left: 0;
    background: linear-gradient(to right, #1A1210, transparent);
}

.trending-ticker::after {
    right: 0;
    background: linear-gradient(to left, #1A1210, transparent);
}

.ticker-track {
    display: flex;
    gap: 0;
    animation: tickerScroll 40s linear infinite;
    width: max-content;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    white-space: nowrap;
    border-right: 1px solid rgba(200, 120, 80, 0.15);
}

.ticker-rank {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: #A0604A;
    min-width: 24px;
}

.ticker-topic {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 20px;
    color: #F0E0D0;
}

.ticker-count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #8A6A5A;
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* === Deep Reads Section === */
.deep-reads-section {
    position: relative;
    padding: 80px 5vw 120px;
}

.deep-reads-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.deep-read-card {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background-color: #241A14;
    border-radius: 6px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.deep-read-card.visible {
    animation: fadeInCard 0.6s ease-out forwards;
}

.deep-read-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-radial-gradient(circle at 30% 40%, rgba(90, 58, 32, 0.05) 0px, transparent 1px),
        repeating-radial-gradient(circle at 70% 60%, rgba(90, 58, 32, 0.04) 0px, transparent 1px);
    pointer-events: none;
    border-radius: 6px;
    z-index: 0;
}

.deep-read-card > * {
    position: relative;
    z-index: 1;
}

.deep-read-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.deep-read-number {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 64px;
    color: rgba(200, 120, 80, 0.15);
    line-height: 1;
    flex-shrink: 0;
    min-width: 80px;
}

.deep-read-content {
    flex: 1;
}

.deep-read-content .card-headline {
    font-size: clamp(22px, 2.5vw, 34px);
}

/* === Footer === */
.site-footer {
    position: relative;
    padding: 80px 5vw 40px;
    background-color: #241A14;
    border-top: 1px solid rgba(200, 120, 80, 0.1);
}

.footer-circuit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    opacity: 0.15;
    overflow: hidden;
}

.footer-circuit-svg {
    width: 100%;
    height: 100%;
}

.circuit-path-footer {
    fill: none;
    stroke: #C87850;
    stroke-width: 1;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.circuit-path-footer.animated {
    animation: drawCircuit 2s ease-in-out forwards;
}

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

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

.footer-logotype {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 32px;
    color: #F0E0D0;
}

.footer-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #8A6A5A;
    margin-top: 12px;
    line-height: 1.6;
}

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

.footer-column h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: #C87850;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 14px;
    color: #8A6A5A;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-column li:hover {
    color: #F0E0D0;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(200, 120, 80, 0.1);
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-copyright {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #8A6A5A;
    letter-spacing: 0.05em;
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-categories {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        padding: 10px 14px;
        font-size: 11px;
    }

    .leather-nav {
        max-width: 100%;
        margin-left: 20px;
        margin-right: 20px;
        border-radius: 4px;
    }

    .news-layer-primary,
    .news-layer-secondary,
    .news-layer-tertiary {
        grid-template-columns: 1fr;
    }

    .news-card {
        padding: 24px;
    }

    .leather-panel {
        padding: 40px 24px;
    }

    .deep-read-card {
        flex-direction: column;
        padding: 24px;
    }

    .deep-read-number {
        font-size: 48px;
        min-width: auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        gap: 30px;
    }

    .interest-tags {
        gap: 8px;
    }

    .interest-tag {
        font-size: 10px;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .logotype {
        font-size: clamp(36px, 12vw, 60px);
    }

    .hero-viewport {
        padding: 0 20px;
    }

    .news-section {
        padding: 60px 4vw 80px;
    }

    .editorial-section {
        padding: 60px 4vw;
    }
}
