/* ============================================================
   gabs.news — Avant-Garde Editorial Stylesheet
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0A0A0F;
    color: #B8B8C0;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 18px;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- NAVIGATION ---------- */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: transparent;
    transition: background 0.4s ease;
}

#nav-bar.scrolled {
    background: rgba(10, 10, 15, 0.95);
}

.nav-wordmark {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 24px;
    color: #E8E8EC;
    letter-spacing: -0.04em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6A6A78;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #CDCF2A;
}

/* ---------- SPREAD (GLOBAL) ---------- */
.spread {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ---------- CADMIUM FLASH ---------- */
.cadmium-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #CDCF2A;
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
    z-index: 10;
}

.cadmium-flash.active {
    animation: cadmiumSweep 0.6s ease-out forwards;
}

@keyframes cadmiumSweep {
    0% {
        transform: scaleX(0);
        opacity: 1;
    }
    66% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 0;
    }
}

/* ---------- SPREAD 1: HERO ---------- */
.spread-hero {
    background: #0A0A0F;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
}

.hero-bg-geometry {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-bg-geometry svg {
    width: 100%;
    height: 100%;
}

.hero-masthead {
    position: absolute;
    top: 12vh;
    left: -0.05em;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 280px;
    color: #E8E8EC;
    letter-spacing: -0.04em;
    line-height: 0.85;
    z-index: 2;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-masthead.revealed {
    opacity: 1;
    transform: translateX(0);
}

.hero-chrome-rule {
    position: absolute;
    top: 61.8%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #C0C0C8;
    opacity: 0.6;
    z-index: 1;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.6s ease-out;
}

.hero-chrome-rule.revealed {
    transform: scaleX(1);
}

.hero-news-label {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3em;
    color: #CDCF2A;
    text-transform: uppercase;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.hero-news-label.revealed {
    opacity: 1;
}

.hero-headline {
    position: absolute;
    top: calc(61.8% + 40px);
    right: 60px;
    max-width: 580px;
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: 48px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #E8E8EC;
    text-align: right;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hero-headline.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- DIAGONAL DIVIDERS ---------- */
.diagonal-divider {
    position: relative;
    width: 100%;
    height: 80px;
    z-index: 5;
    overflow: hidden;
}

.divider-1 {
    background: #0A0A0F;
}

.divider-1::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    background: #0A0A0F;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
    z-index: 1;
}

.divider-1::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111118;
    z-index: 0;
}

.divider-2 {
    background: #111118;
}

.divider-2::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    background: #111118;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
    z-index: 1;
}

.divider-2::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0A0A0F;
    z-index: 0;
}

.divider-3 {
    background: #0A0A0F;
}

.divider-3::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    background: #0A0A0F;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
    z-index: 1;
}

.divider-3::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111118;
    z-index: 0;
}

/* Glowing seam on dividers */
.diagonal-divider::after {
    border-bottom: 2px solid rgba(205, 207, 42, 0.4);
}

/* ---------- SPREAD 2: EDITORIAL GRID ---------- */
.spread-editorial {
    background: #111118;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
}

.editorial-bg-geometry {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

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

.editorial-category-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #CDCF2A;
    z-index: 2;
}

.editorial-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 0;
    height: 100%;
    flex: 1;
    border: 1px solid rgba(192, 192, 200, 0.15);
}

.editorial-primary {
    padding: 40px;
    border-right: 2px solid rgba(192, 192, 200, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.editorial-secondary {
    display: flex;
    flex-direction: column;
}

.story-block {
    padding: 40px;
}

.story-block-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chrome-rule-h {
    width: 100%;
    height: 2px;
    background: rgba(192, 192, 200, 0.3);
}

.story-block-bottom {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-category {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #CDCF2A;
    margin-bottom: 16px;
    display: block;
}

.story-headline {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #E8E8EC;
    margin-bottom: 16px;
}

.editorial-primary .story-headline {
    font-size: 48px;
}

.story-excerpt {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 16px;
    line-height: 1.7;
    color: #B8B8C0;
    margin-bottom: 16px;
}

.story-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #6A6A78;
}

/* ---------- SPREAD 3: TIMELINE ---------- */
.spread-timeline {
    background: #0A0A0F;
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timeline-halftone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #1A1A24 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: 0;
}

.timeline-spine {
    position: absolute;
    left: 50%;
    top: 80px;
    bottom: 80px;
    width: 1px;
    background: rgba(192, 192, 200, 0.4);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-nodes {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 1000px;
    padding: 0 40px;
}

.timeline-node {
    display: flex;
    align-items: center;
    padding: 24px 0;
    position: relative;
}

.node-left {
    flex-direction: row;
    justify-content: flex-end;
}

.node-left .node-content {
    text-align: right;
    padding-right: 32px;
    flex: 1;
}

.node-left .node-marker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    width: 50%;
    justify-content: flex-start;
}

.node-right {
    flex-direction: row;
    justify-content: flex-start;
}

.node-right .node-content {
    text-align: left;
    padding-left: 32px;
    flex: 1;
}

.node-right .node-marker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    width: 50%;
    justify-content: flex-end;
}

.node-marker {
    width: 8px;
    height: 8px;
    background: #CDCF2A;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.node-timestamp {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: #6A6A78;
    transition: color 0.3s ease;
}

.node-headline {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #E8E8EC;
    margin-bottom: 8px;
}

.node-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 15px;
    line-height: 1.6;
    color: #B8B8C0;
}

/* Timeline node hover — border animate */
.timeline-node .node-content {
    position: relative;
    padding: 20px 32px;
    transition: background 0.3s ease;
}

.timeline-node .node-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.timeline-node:hover .node-content {
    background: rgba(26, 26, 36, 0.3);
}

.timeline-node:hover .node-content::before {
    border-color: #CDCF2A;
    animation: borderDraw 0.3s ease-out forwards;
}

.timeline-node:hover .node-marker {
    animation: markerPulse 0.4s ease-out;
}

.timeline-node:hover .node-timestamp {
    color: #CDCF2A;
}

@keyframes borderDraw {
    0% {
        clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes markerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* ---------- SPREAD 4: DEEP READ ---------- */
.spread-deepread {
    background: #111118;
    padding: 120px 40px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    height: auto;
}

.deepread-container {
    max-width: 720px;
    width: 100%;
}

.deepread-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: 48px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #E8E8EC;
    margin-bottom: 20px;
}

.deepread-byline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #6A6A78;
    display: block;
    margin-bottom: 48px;
}

.deepread-body p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 20px;
    line-height: 1.85;
    color: #B8B8C0;
    margin-bottom: 28px;
}

/* Pull quote */
.deepread-pullquote {
    position: relative;
    margin: 60px 0 60px -120px;
    padding-left: 24px;
}

.pullquote-rule {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0;
    background: #CDCF2A;
    transition: height 0.5s ease-out;
}

.deepread-pullquote.revealed .pullquote-rule {
    height: 100%;
}

.deepread-pullquote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 64px;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #CDCF2A;
}

/* ---------- FOOTER ---------- */
#site-footer {
    background: #0A0A0F;
    padding: 60px 40px;
    position: relative;
}

.footer-rule {
    width: 100%;
    height: 1px;
    background: rgba(192, 192, 200, 0.3);
    margin-bottom: 40px;
}

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

.footer-wordmark {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 28px;
    color: #E8E8EC;
    letter-spacing: -0.04em;
}

.footer-dot {
    color: #CDCF2A;
    font-size: 20px;
}

.footer-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #6A6A78;
}

/* ---------- SCROLL ANIMATIONS ---------- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pull quote specific animation */
.deepread-pullquote[data-animate] {
    transform: translateX(-60px);
}

.deepread-pullquote[data-animate].visible {
    transform: translateX(0);
}

/* ---------- RESPONSIVE: MOBILE ---------- */
@media (max-width: 768px) {
    .hero-masthead {
        font-size: 80px;
        top: 15vh;
    }

    .hero-headline {
        font-size: 28px;
        right: 20px;
        left: 20px;
        max-width: none;
        text-align: left;
        top: calc(61.8% + 24px);
    }

    .hero-news-label {
        right: 16px;
        font-size: 12px;
    }

    #nav-bar {
        padding: 16px 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .spread-editorial {
        padding: 60px 20px;
    }

    .editorial-category-label {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-bottom: 24px;
    }

    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .editorial-primary {
        border-right: none;
        border-bottom: 2px solid rgba(192, 192, 200, 0.3);
    }

    .editorial-primary .story-headline {
        font-size: 32px;
    }

    .story-headline {
        font-size: 26px;
    }

    .story-block {
        padding: 24px;
    }

    /* Timeline mobile */
    .timeline-spine {
        left: 20px;
    }

    .timeline-nodes {
        padding: 0 20px;
    }

    .timeline-node {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 36px;
    }

    .node-left, .node-right {
        flex-direction: column;
    }

    .node-left .node-content,
    .node-right .node-content {
        text-align: left;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    .node-left .node-marker-wrap,
    .node-right .node-marker-wrap {
        width: auto;
        justify-content: flex-start;
        margin-bottom: 8px;
    }

    .node-headline {
        font-size: 20px;
    }

    /* Deep read mobile */
    .spread-deepread {
        padding: 80px 20px;
    }

    .deepread-title {
        font-size: 32px;
    }

    .deepread-body p {
        font-size: 16px;
    }

    .deepread-pullquote {
        margin-left: 0;
        padding-left: 16px;
    }

    .deepread-pullquote p {
        font-size: 36px;
    }

    /* Diagonal cuts reduced */
    .diagonal-divider {
        height: 50px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-masthead {
        font-size: 64px;
    }

    .hero-headline {
        font-size: 24px;
    }

    .deepread-pullquote p {
        font-size: 28px;
    }
}
