/* --- FONTS --- */
@font-face {
    font-family: 'CC Ultimatum';
    src: url('../fonts/cc-ultimatum-bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* --- VARIABLES --- */
:root {
    /* Colors */
    --color-bg-dark: #0b0b0b;
    --color-bg-black: #050505;
    --color-bg-bright: #bfcad1;
    --color-bg-space: #151525;

    --color-text-white: #ffffff;
    --color-text-dark: #1a1a1a;
    --color-text-muted: #888888;

    --color-accent-red: #e2001a;
    --color-accent-yellow: #f5e400;
    --color-accent-purple: #5d2f8e;
    --color-stroke: #333333;

    /* Dimensions */
    --card-width: 400px;
    --card-height: 550px;
    --card-width-wide: 700px;
    --spacing-gutter: 20px;

    /* Z-Index Stack */
    --z-marquee: 0;
    --z-fog: 2;
    --z-content: 10;
    --z-timeline: 20;
    --z-rivalry: 30;
    --z-archive: 40;
    --z-footer: 50;
    --z-loader: 9999;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-red) var(--color-bg-black);
}

::-webkit-scrollbar {
    width: 10px;
    z-index: 9999;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-black);
    border-left: 1px solid var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-accent-red);
    border: 2px solid var(--color-bg-black);
    border-radius: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #ff1a3c;
}

::-webkit-scrollbar-thumb:active {
    background-color: var(--color-text-white);
}

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

::selection {
    background: var(--color-accent-red);
    color: var(--color-text-dark);
    text-shadow: none;
}

::-moz-selection {
    background: var(--color-accent-red);
    color: var(--color-text-dark);
    text-shadow: none;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-dark);
    font-family: 'CC Ultimatum', sans-serif;
    color: var(--color-text-white);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Fix for horizontal scroll section before JS loads */
body:not(.loaded) .timeline-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    z-index: 9000 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.timeline-section,
.rivalry-section,
.archive-section,
.newspaper-section,
.gang-section {
    content-visibility: auto;
}

.portfolio-link {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 9000;
    display: flex;
    align-items: stretch;
    text-decoration: none;
    background: rgba(11, 11, 11, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.30s ease;
    cursor: pointer;
    overflow: hidden;
}

.portfolio-link:hover {
    border-color: var(--color-accent-yellow);
}

.portfolio-link__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease;
}

.portfolio-link__label {
    font-family: 'CC Ultimatum', sans-serif;
    font-size: 0.6rem;
    color: var(--color-text-muted);
    letter-spacing: 2px;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.portfolio-link__name {
    font-family: 'CC Ultimatum', sans-serif;
    font-size: 1.1rem;
    color: var(--color-text-white);
    letter-spacing: 1px;
    line-height: 1;
    transition: color 0.3s ease;
    overflow: hidden;

    .char-box {
        text-align: center;
    }

    .char-top,
    .char-bottom {
        width: 0.7em;
    }
}

.portfolio-link:hover .portfolio-link__content {
    background-color: rgba(255, 255, 255, 0.05);
}

.portfolio-link:hover .portfolio-link__label {
    color: var(--color-text-white);
}

/* --- 1. LOADER --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: #000;
    z-index: var(--z-loader);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

.loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}

.loader__logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(226, 0, 26, 0.3));
    animation: breathe 3s ease-in-out infinite;
}

.loader__progress-track {
    width: 200px;
    height: 2px;
    background-image: repeating-linear-gradient(110deg,
            var(--color-stroke),
            var(--color-stroke) 10px,
            var(--color-bg-black) 10px,
            var(--color-bg-black) 20px);
    position: relative;
    overflow: hidden;
}

.loader__progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-image: repeating-linear-gradient(110deg,
            var(--color-accent-red),
            var(--color-accent-red) 10px,
            transparent 10px,
            transparent 20px);
    box-shadow: 0 0 15px var(--color-accent-red);
    transition: none;
}

.loader__text {
    font-size: 14px;
    letter-spacing: 4px;
    color: #666;
    text-transform: uppercase;
    animation: textFade 2s infinite alternate;
}

body.loaded .loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.loaded .loader__content {
    transform: scale(1.5);
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
        filter: drop-shadow(0 0 25px rgba(226, 0, 26, 0.6));
    }
}

@keyframes textFade {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 0.8;
    }
}

/* --- 2. BACKGROUND MARQUEE --- */
.background-marquee {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: var(--z-marquee);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    pointer-events: none;
    opacity: 0.3;
    overflow: hidden;
}

.marquee-line {
    display: flex;
    width: 100%;
    transform: translate3d(0, 0, 0) rotate(-2deg) scale(1.1);
    padding-bottom: 2.5dvh;
    will-change: transform;
    backface-visibility: hidden;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    flex-shrink: 0;
}

.marquee-text {
    font-size: 8vw;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px var(--color-stroke);
    padding-right: 2rem;
    line-height: 1.1;
}

.marquee-line--right .marquee-track {
    animation: scrollRight 30s linear infinite;
}

.marquee-line--left .marquee-track {
    animation: scrollLeft 30s linear infinite;
}

@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }

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

@keyframes scrollRight {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* --- 3. HERO CANVAS SECTION --- */
.hero-scroll-wrapper {
    height: 250vh;
    position: relative;
    z-index: var(--z-content);
}

.sticky-viewport {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform: translate3d(0, 0, 0);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-logo {
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 48px;
    font-weight: bold;
    z-index: 20;
    letter-spacing: 2px;
    mix-blend-mode: overlay;
    pointer-events: none;
    display: grid;
    grid-template-areas: "stack";
}

.hero-logo__name {
    grid-area: stack;
    display: block;
    color: #fff;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.hero-logo__name--clark {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.hero-logo__name--super {
    opacity: 0;
    transform: translateY(10px) scale(1.1);
    filter: blur(10px);
}

.hero-logo.is-revealed .hero-logo__name--clark {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    filter: blur(10px);
}

.hero-logo.is-revealed .hero-logo__name--super {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* --- 4. TRANSITION SECTION --- */
.transition-section {
    position: relative;
    z-index: var(--z-content);
    background-color: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    min-height: 80vh;
    overflow: hidden;
    border-bottom: 1px solid var(--color-stroke);
}

.parallax-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40vw;
    max-width: 800px;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.impact-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    color: #ccc;
}

.impact-text span {
    font-size: clamp(6rem, 16vw, 16rem);
    line-height: 1.0;
}

/* --- 5. TIMELINE (HORIZONTAL) SECTION --- */
.timeline-section {
    height: 500vh;
    position: relative;
    z-index: var(--z-timeline);
}

.timeline-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    z-index: 1;
}

.timeline-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 1.0;
}

.timeline-sticky::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 40vh;
    background: linear-gradient(to bottom, rgba(191, 202, 209, 0) 0%, var(--color-bg-bright) 100%);
    z-index: var(--z-fog);
    pointer-events: none;
}

.timeline-track {
    display: flex;
    gap: 15vw;
    padding-left: 10vw;
    position: relative;
    z-index: 5;
    transform: translate3d(0, 0, 0);
}

.timeline-card {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: var(--card-width);
}

.timeline-card--wide {
    width: var(--card-width-wide);
    margin-right: 10vw;
}

.timeline-card--quote {
    width: 35vw;
}

.timeline-card:nth-child(even):not(.timeline-card--quote) {
    transform: translateY(15%);
}

.timeline-card__meta {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #0d1e30;
    margin-bottom: 1rem;
    text-transform: uppercase;
    border-bottom: 1px solid #0d1e30;
    padding-bottom: 5px;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.timeline-card__meta--clean {
    border: none;
}

.timeline-card__visual {
    width: 100%;
    height: var(--card-height);
    overflow: hidden;
    position: relative;
    background-color: #1a1a1a;
    border-radius: 4px;
}

.timeline-card__inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: block;
}

.parallax-img,
.archive-entry__img,
.rivalry-img {
    will-change: transform, filter;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-optimize-contrast: true;
}

.marquee-track,
.hero-logo,
.loader__logo,
.cape-visual {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.parallax-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, filter 0.5s ease;
    filter: grayscale(80%);
    transform: scale(1.1);
}

.timeline-card:hover .parallax-img {
    filter: grayscale(0%);
}

.timeline-card--quote p {
    font-family: 'Times New Roman', serif;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.1;
    color: var(--color-bg-dark);
    position: relative;
    z-index: 1;
}

.timeline-card--quote p em {
    color: #cd0000;
    font-style: italic;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

/* --- 6. RIVALRY SECTION --- */
.rivalry-section {
    margin-top: -1px;
    position: relative;
    z-index: var(--z-rivalry);
    background-color: var(--color-bg-bright);
    color: var(--color-text-dark);
    width: 100%;
    overflow: hidden;
}

.rivalry-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rivalry-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    pointer-events: none;
}

.rivalry-text-row {
    display: block;
    font-size: 16vw;
    line-height: 0.8;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    opacity: 0;
    transform: translateY(100px);
}

.rivalry-scribble {
    font-family: 'Sedgwick Ave Display', cursive;
    font-weight: 400;
    font-size: 7vw;
    position: absolute;
    z-index: 12;
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.rivalry-scribble--kal {
    color: var(--color-accent-red);
    top: -25%;
    left: 25%;
    transform: rotate(-10deg);
}

.rivalry-scribble--lex {
    color: var(--color-accent-purple);
    bottom: -40%;
    right: 20%;
    transform: rotate(5deg);
}

.rivalry-img {
    position: absolute;
    bottom: 0;
    height: 85vh;
    width: auto;
    max-width: 50vw;
    z-index: 20;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.4s ease;
    pointer-events: auto;
}

.rivalry-img--left {
    left: 0;
    object-position: left bottom;
    transform: translateX(-100%);
}

.rivalry-img--right {
    right: 0;
    object-position: right bottom;
    transform: translateX(100%);
}

/* --- 7. ARCHIVE SECTION --- */
.archive-section {
    position: relative;
    z-index: 50;
    background-color: var(--color-bg-black);
    color: var(--color-text-white);
    padding: 150px 5vw 100px 5vw;
    border-top: 1px solid var(--color-stroke);
    overflow: visible;
    border-radius: 0 0 50% 50% / 0 0 3vw 3vw;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.archive-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    border-radius: 0 0 50% 50% / 0 0 3vw 3vw;
    background: radial-gradient(circle at 50% 30%, var(--color-bg-space) 0%, var(--color-bg-black) 80%);
}

.archive-background::before {
    /* Grid overlay for sci-fi feel */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
    pointer-events: none;
}

.archive-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: screen;
    pointer-events: none;
}

.archive-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 100px;
    max-width: 1400px;
    margin-inline: auto;
    position: relative;
}

/* Decorative line for header */
.archive-header::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--color-accent-red);
    margin-top: 30px;
    box-shadow: 0 0 15px var(--color-accent-red);
}

.archive-title {
    font-size: clamp(1.2rem, 8vw, 8rem);
    line-height: 0.9;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.archive-subtitle {
    color: var(--color-accent-yellow);
    font-style: italic;
    text-shadow: 0 0 30px rgba(245, 228, 0, 0.3);
}

.archive-description {
    margin-top: 40px;
    max-width: 500px;
    font-size: clamp(1rem, 4vw, 1.4rem);
    line-height: 1.6;
    color: var(--color-text-muted);
    border-left: 2px solid var(--color-stroke);
    padding-left: 20px;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.archive-entry {
    position: relative;
    height: 550px;
    perspective: 1200px;
    cursor: pointer;
}

.archive-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.archive-entry.is-flipped .archive-card-inner {
    transform: rotateY(180deg);
}

.archive-entry:hover .archive-card-inner {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.archive-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    background: var(--color-bg-dark);
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
}

.archive-front {
    padding: 25px;
    transform: rotateY(0deg) translateZ(1px);
}

.archive-entry__visual {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
    overflow: hidden;
}

.archive-entry__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 20px;
    pointer-events: none;
    z-index: 1;
}

.click-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--color-accent-red);
    border: 1px solid var(--color-accent-red);
    padding: 2px 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
}

.archive-entry:hover .click-hint {
    opacity: 1;
    transform: translateY(0);
}

.archive-entry__img {
    width: auto;
    max-height: 80%;
    max-width: 90%;
    object-fit: contain;
    z-index: 5;
    filter: grayscale(100%) brightness(0.7) contrast(1.2);
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: scale(0.95);
}

.archive-entry:hover .archive-entry__img {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1.1) contrast(1.1);
}

.archive-entry__meta {
    margin-top: auto;
    display: grid;
    grid-template-areas:
        "year status"
        "name name";
    gap: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.archive-entry__year {
    grid-area: year;
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    line-height: 0.8;
    color: rgba(255, 255, 255, 0.1);
    transition: color 0.4s ease;
    align-self: end;
}

.archive-entry:hover .archive-entry__year {
    color: rgba(255, 255, 255, 0.8);
}

.archive-entry__status {
    grid-area: status;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--color-accent-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: right;
    align-self: center;
}

.archive-entry__name {
    grid-area: name;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    color: var(--color-text-white);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


.archive-back {
    transform: rotateY(180deg) translateZ(1px);
    background: var(--color-bg-black);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.back-header {
    border-bottom: 2px solid var(--color-accent-red);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.back-header h3 {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: var(--color-text-white);
    line-height: 1;
    text-transform: uppercase;
}

.back-header span {
    font-family: monospace;
    color: var(--color-accent-red);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-top: 5px;
}

.back-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.back-body::-webkit-scrollbar {
    width: 4px;
}

.back-body::-webkit-scrollbar-thumb {
    background-color: #333;
}

.stat-block {
    margin-bottom: 25px;
}

.stat-block h4 {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    border-left: 3px solid var(--color-accent-yellow);
    padding-left: 10px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-block li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #ddd;
}

.stat-block li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--color-accent-red);
    font-size: 0.8rem;
    top: 2px;
}

.stat-block strong {
    color: #fff;
    font-weight: 700;
}


/* --- 8. DAILY PLANET (FULLSCREEN REPLICA) --- */
.newspaper-section {
    position: relative;
    z-index: 40;
    background-color: #e3e3e3;
    color: #111;
    font-family: 'Playfair Display', serif;
    width: 100%;
    min-height: 100vh;
    margin-top: -5vw;
    padding: 8vw 20px 80px 20px;
    border-radius: 0;
    box-shadow: none;

    display: flex;
    justify-content: center;
}

.paper-wrapper {
    width: 100%;
    max-width: 1400px;
    /* Constrain reading width */
    position: relative;
}

.daily-planet-sheet {
    /* Pure layout container, no 3D styles */
    width: 100%;
    height: auto;
}

/* --- A. MASTHEAD --- */
.paper-masthead {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 5px;
    gap: 20px;
}

.planet-logo {
    font-family: 'UnifrakturMaguntia', cursive;
    font-size: clamp(2rem, 5vw, 7rem);
    /* Larger logo */
    margin: 0;
    line-height: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.planet-icon {
    width: 14vw;
    height: auto;
    filter: grayscale(100%) contrast(1.2);
}

.ear-box {
    font-family: 'Arial', sans-serif;
    font-size: 0.75rem;
    line-height: 1.3;
}

.ear-box.left {
    outline: 1px solid black;
    outline-offset: 5px;
    position: relative;
    border: none;
    /* Remove standard border */
    padding: 20px 10px;
    text-align: center;
    font-weight: bold;
    font-style: italic;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    background: transparent;
    z-index: 1;
    /* Ensure text is above pseudo-elements */
}

.ear-box.left span {
    position: relative;
    z-index: 2;
}

/* Outer Border Shape (Black) */
.ear-box.left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #111;
    z-index: -2;
    /* Cut top-left and bottom-right corners */
    clip-path: polygon(15px 0, 100% 0,
            100% calc(100% - 15px), calc(100% - 15px) 100%,
            0 100%, 0 15px);
}

/* Inner Fill Shape (Paper Color) */
.ear-box.left::after {
    content: '';
    position: absolute;
    inset: 3px;
    /* Controls border thickness */
    background: #e3e3e3;
    /* Matches paper background */
    z-index: -1;
    /* Slightly adjusted clip for inner cutout */
    clip-path: polygon(13px 0, 100% 0,
            100% calc(100% - 13px), calc(100% - 13px) 100%,
            0 100%, 0 13px);
}

.ear-box.right {
    text-align: justify;
    text-align-last: justify;
}

.edition {
    text-align-last: center;
    font-weight: 900;
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.weather-text {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
}

/* --- B. META BAR --- */
.paper-meta-bar {
    display: grid;
    /* Use Grid instead of Flex for exact geometric centering */
    grid-template-columns: 1fr auto 1fr;
    /* Left, Center (Fit Content), Right */
    align-items: center;
    border-top: 3px solid #000;
    /* Thick top line */
    border-bottom: 1px solid #000;
    /* Thinner bottom line */
    padding: 2px 0;
    margin-bottom: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Force left alignment for the Volume info */
.paper-meta-bar>span:first-child {
    text-align: left;
}

/* Force right alignment for the Price */
.paper-meta-bar>span:last-child {
    text-align: right;
}

.meta-center {
    text-align: center;
    white-space: nowrap;
    /* Prevent wrapping to maintain center structure */
    flex-grow: 1;
}

/* --- C. GRID BODY --- */
.paper-body {
    display: flex;
    gap: 3%;
    align-items: start;
}

/* Headlines */
.main-headline {
    display: flex;
    flex-direction: column;
    line-height: 0.82;
    margin-bottom: 30px;
    font-family: 'Anton', sans-serif;
    font-weight: 700;
    color: #050505;
}

.hl-top {
    font-size: 7vw;
    /* Condensed slab look */
    margin-bottom: 5px;
    letter-spacing: -0.5vw;
}

.hl-mid {
    font-size: 13vw;
    /* Massive */
    text-transform: uppercase;
    margin-top: 10px;
    letter-spacing: -1vw;
}

/* Article */
.front-page-story {
    padding-right: 20px;
}

.author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.author-img {
    width: 80px;
    height: 90px;
    object-fit: cover;
    /* High contrast grayscale to match the reference */
    filter: grayscale(100%) contrast(1.2);
    border: 1px solid #000;
}

.author-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Ensure serif font is used here */
    font-family: 'Playfair Display', serif;
    padding-top: 2px;
}

.byline {
    display: block;
    font-size: 1.1rem;
    color: #000;
    /* "by" is italic in the reference */
    font-style: italic;
    /* The line appears between Name and Title */
    border-bottom: 1px solid #000;
    padding-bottom: 4px;
    margin-bottom: 6px;
    line-height: 1;
}

.byline em {
    font-weight: 900;
    font-size: 1.4rem;
    margin-left: 5px;
}

.job-title {
    font-size: 0.85rem;
    font-style: italic;
    font-weight: 400;
    color: #333;
    text-transform: none;
    /* Removed uppercase */
    letter-spacing: 0;
    margin-top: 0;
    font-family: 'Georgia', serif;
}

.story-text {
    margin-left: 100px;
    /* 80 + 20 */
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    line-height: 1.5;
    text-align: justify;
    color: #111;
    margin-top: 15px;
    transform: translateY(-40px);
}

/* Visuals Column */
.col-visuals {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-top: 10px;
    max-width: 500px;
}

.news-photo {
    margin: 0;
    width: 100%;
}

.news-photo img {
    width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.1) brightness(0.95);
    border: 1px solid #333;
}

.top-photo img {
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top;
}

.bottom-photo img {
    aspect-ratio: 16/9;
    object-fit: cover;
}

.photo-credit {
    font-size: 0.8rem;
    text-align: right;
    font-style: italic;
    margin-top: 8px;
    font-family: 'Georgia', serif;
    color: #333;
}

/* Scroll Reveal Override for Newspaper */
.newspaper-section .reveal-up {
    opacity: 1;
    transform: none;
}

/* --- 9. JUSTICE GANG SECTION --- */
.gang-section {
    position: relative;
    z-index: 45;
    background-color: var(--color-bg-dark);
    padding: 50px 0 150px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin-top: -80px;
    margin-bottom: 0;
    padding-bottom: 200px;
    border-radius: 50% 50% 0 0 / 3vw 3vw 0 0;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
}

/* Header Styling */
.gang-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.gang-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.gang-icon img {
    width: 60px;
    filter: drop-shadow(0 0 20px rgba(226, 0, 26, 0.6));
}

.gang-title {
    font-family: 'CC Ultimatum', sans-serif;
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.9;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 2px;
}

.gang-subtitle {
    font-weight: 400;
    color: var(--color-accent-red);
    display: block;
    font-size: clamp(4rem, 8vw, 8rem);
    margin-top: -10px;
    text-shadow: 0 10px 40px rgba(226, 0, 26, 0.3);
}

/* --- THE FANNED DECK --- */
.gang-deck {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    padding: 20px 0;
    isolation: isolate;
}

/* --- THE CARD --- */
.gang-card {
    /* 
       Variables based on the video's logic:
       --i: Index from center (-2 to 2) 
       --abs-i: Absolute value of i (0, 1, 2)
    */
    --abs-i: max(var(--i), calc(var(--i) * -1));

    /* Dynamic Fan Configuration */
    --base-rotate: calc(var(--i) * 8deg);
    --base-y: calc(var(--abs-i) * 35px);
    /* The Arc: Center is high, sides are low */

    /* The "Push" Variable (Modified by siblings on hover) */
    --offset-x: 0px;

    position: relative;
    width: 280px;
    height: 420px;
    flex-shrink: 0;
    border-radius: 24px;

    /* Negative margin creates the "Hand of Cards" overlap */
    margin-left: -130px;

    /* 
       The Transform Stack:
       1. Rotate based on index
       2. Push Down based on index (Arch)
       3. Push Left/Right based on Hover interactions (The Video Logic)
    */
    transform:
        rotate(var(--base-rotate)) translateY(var(--base-y)) translateX(var(--offset-x));

    transform-origin: bottom center;

    /* Styling */
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    cursor: pointer;

    /* Pyramid Stacking: Center (Index 0) is highest, sides are lower */
    z-index: calc(10 - var(--abs-i));

    /* Springy Physics like the video */
    transition:
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        filter 0.3s ease,
        z-index 0s;
}

/* Reset margin for the first card so the whole deck is centered */
.gang-card:first-child {
    margin-left: 0;
}

.gang-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(60%) contrast(1.1) brightness(0.8);
    transition: filter 0.4s ease, transform 0.5s ease;
}

/* --- CARD INFO (Overlay) --- */
.gang-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 120px 20px 40px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gang-info h3 {
    font-family: 'CC Ultimatum', sans-serif;
    font-size: 2rem;
    margin: 0;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 1px;
}

.gang-info span {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--color-accent-yellow);
    font-size: 1.1rem;
}

/* 2. The Active Hovered Card */
.gang-card:hover {
    z-index: 100;
    /* Pop to front */

    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
}

.gang-card:hover img {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1) contrast(1.1);
}

.gang-card:hover .gang-info {
    transform: translateY(0);
}

/* 
   3. SIBLING PUSH LOGIC (The "Parting the Sea" effect) 
   We update the --offset-x variable on the neighbors.
*/

/* Immediate Right Sibling: Push Right */
.gang-card:hover+.gang-card {
    --offset-x: 50px;
}

/* 2nd Right Sibling: Push Right slightly less */
.gang-card:hover+.gang-card+.gang-card {
    --offset-x: 25px;
}

/* Immediate Left Sibling: Push Left */
/* We use :has() to look "backwards" in the DOM */
.gang-card:has(+ .gang-card:hover) {
    --offset-x: -50px;
}

/* 2nd Left Sibling: Push Left slightly less */
.gang-card:has(+ .gang-card + .gang-card:hover) {
    --offset-x: -25px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .gang-card {
        width: 240px;
        height: 360px;
        margin-left: -100px;
    }
}

@media (max-width: 768px) {
    .gang-deck {
        flex-direction: column;
        height: auto;
        padding-bottom: 50px;
    }

    .gang-card {
        width: 85%;
        height: 400px;
        margin-left: 0;
        margin-bottom: -300px;
        /* Vertical stack */

        /* Reset transform for vertical mode */
        transform: rotate(calc(var(--i) * 3deg)) translateY(0) translateX(0);
    }

    .gang-deck:hover .gang-card {
        margin-bottom: -280px;
    }

    .gang-card:hover {
        margin-bottom: 20px;
        /* Give it space */
        transform: scale(1.05);
    }

    /* Disable the horizontal push logic on mobile */
    .gang-card:hover+.gang-card,
    .gang-card:has(+ .gang-card:hover) {
        --offset-x: 0px;
    }
}

/* --- FOOTER --- */

.fortress-footer {
    position: relative;
    background-color: #080808;
    color: #fff;
    /* Reduced padding since cape is no longer flying out the top */
    padding: 100px 4vw 40px 4vw;
    overflow: visible;
    z-index: 50;
    border-top: 1px solid #222;
}

/* 1. Background Texture */
.fortress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    background-image:
        repeating-radial-gradient(circle at 50% 0%, transparent 0, #080808 3px, #222 4px, transparent 5px),
        linear-gradient(to bottom, #000 0%, transparent 20%);
    pointer-events: none;
    z-index: 0;
}

/* 2. Main Layout Grid */
.footer-content-wrapper {
    position: relative;
    z-index: 20;
    display: grid;
    /* Columns: Nav | Center Stack | Nav */
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto 80px auto;
}

/* --- CENTER COLUMN STACKING LOGIC --- */
.col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    gap: 10vh;
}

/* Layer 1: The Slogan */
.footer-slogan {
    font-family: 'CC Ultimatum', sans-serif;
    font-size: clamp(5rem, 8vw, 10rem);
    line-height: 0.85;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    margin: 0;
    position: relative;
    z-index: 1;
    /* Lowest layer */
}

.footer-slogan span {
    display: block;
}

.slogan-highlight {
    color: var(--color-accent-red);
    text-shadow: 0 0 30px rgba(226, 0, 26, 0.4);
}

/* Layer 2: The Cape (Smaller & Overlapping) */
.cape-container {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 5;
    margin-top: -100px;

    pointer-events: none;
    display: flex;
    justify-content: center;
}

.cape-visual {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
    animation: capeFloat 5s ease-in-out infinite;
}

@keyframes capeFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

/* --- SIDE COLUMNS --- */
.col-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-left {
    align-items: flex-start;
    text-align: left;
}

.col-right {
    align-items: flex-end;
    text-align: right;
}

.col-label {
    font-family: 'CC Ultimatum', sans-serif;
    font-size: 0.8rem;
    color: #444;
    margin-bottom: 20px;
    letter-spacing: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Links Styling */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 5px;
    /* Slight adjustment */
    overflow: hidden;
}

/* Updated Anchor Styling */
.footer-links a {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1.0;
    /* Tighter line height for the flip */
    display: inline-flex;
    /* Use flex to hold char boxes */
    position: relative;
    overflow: hidden;
}

/* Remove the old effect */
.footer-links a::after {
    content: none;
}

.footer-links a:hover {
    transform: none;
    /* Remove old transform */
    color: #fff;
    /* Keep base color */
}

/* New Staggered Character Styles */
.char-box {
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.char-top,
.char-bottom {
    display: block;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    transition-delay: calc(var(--i) * 0.025s);
    backface-visibility: hidden;
    will-change: transform;
}

.char-bottom {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(100%);
    color: var(--color-accent-yellow);
    /* Hover color */
}

/* Hover Actions */
.footer-links a:hover .char-top {
    transform: translateY(-100%);
}

.footer-links a:hover .char-bottom {
    transform: translateY(0);
}

/* Fix for Right Column Alignment */
.col-right .footer-links a {
    justify-content: flex-end;
}

/* Hover Animations for Portfolio Link */
.portfolio-link:hover .char-top {
    transform: translateY(-100%);
}

.portfolio-link:hover .char-bottom {
    transform: translateY(0);
}

/* --- BOTTOM BAR --- */
.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sponsor-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.sponsor-bar:hover {
    opacity: 1;
}

.sponsor-bar img {
    height: 48px;
}

.sponsor-logo {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    text-transform: uppercase;
}

.legal-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.75rem;
    color: #555;
    font-family: monospace;
}

.ai-disclosure {
    max-width: 450px;
    margin: 0;
    line-height: 1.4;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    .footer-content-wrapper {
        grid-template-columns: 1fr;
        /* Stack vertically */
        text-align: center;
        gap: 60px;
    }

    .col-center {
        order: 1;
    }

    .col-left {
        order: 2;
        align-items: center;
        text-align: center;
    }

    .col-right {
        order: 3;
        align-items: center;
        text-align: center;
    }

    .col-right .footer-links a::after {
        left: 0;
        right: auto;
    }

    .footer-slogan {
        font-size: 15vw;
    }

    .cape-container {
        max-width: 300px;
        /* Even smaller on mobile */
        margin-top: -30px;
        margin-bottom: -40px;
    }

    .sponsor-bar {
        justify-content: center;
        gap: 30px;
    }

    .legal-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    :root {
        --card-width: 60vw;
        --card-width-wide: 80vw;
    }

    /* Relax the marquee for tablets */
    .marquee-text {
        font-size: 10vw;
    }

    .archive-section {
        margin-bottom: -20px;
    }

    /* --- 4. RIVALRY --- */
    .rivalry-text-row {
        font-size: 20vw;
        /* Stacked text needs to be smaller or wrap */
    }

    .rivalry-center-text {
        z-index: 25;
        /* Bring text above images on mobile */
    }

    /* Move images to background/opacity on mobile to keep text readable */
    .rivalry-img {
        height: 50vh;
        max-width: 80vw;
    }

    .rivalry-img--left {
        top: 0;
        /* Move up */
        left: -10%;
    }

    .rivalry-img--right {
        right: -10%;
    }
}

@media (max-width: 768px) {
    :root {
        --card-width: 85vw;
        /* Cards take up most of screen on mobile */
        --card-width-wide: 85vw;
        --card-height: 450px;
    }

    .portfolio-link {
        top: 20px;
        right: 20px;
        transform: scale(0.85);
        transform-origin: top right;
    }

    /* --- 1. HERO --- */
    .hero-logo {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        text-align: center;
        padding: 0 20px;
    }

    .hero-logo__name {
        font-size: 12vw;
        /* Scale text to viewport width */
    }

    /* --- 2. TRANSITION --- */
    .impact-text span {
        font-size: 20vw;
        /* Make massive */
        line-height: 0.9;
    }

    .parallax-logo {
        width: 80vw;
    }

    /* --- 3. TIMELINE --- */
    /* Reduce scroll distance on mobile so it doesn't feel infinite */
    .timeline-section {
        height: 350vh;
    }

    .timeline-card {
        margin-right: 5vw;
    }

    /* Remove the vertical stagger on mobile for cleaner scroll */
    .timeline-card:nth-child(even):not(.timeline-card--quote) {
        transform: translateY(0);
    }

    .timeline-card--quote {
        width: 80vw;
    }

    .timeline-card--quote p {
        font-size: 8vw;
    }

    /* --- 5. NEWSPAPER (CRITICAL FIX) --- */
    .newspaper-section {
        padding-top: 50px;
        margin-top: 0;
    }

    /* Break the Masthead Grid */
    .paper-masthead {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .ear-box {
        width: 100%;
        padding: 15px;
        font-size: 0.9rem;
    }

    .ear-box.right {
        order: -1;
        /* Move date/weather to top */
        border-bottom: 2px solid #000;
    }

    .planet-logo {
        font-size: 13vw;
        /* Massive logo for mobile */
    }

    .planet-icon {
        width: 10vw;
    }

    /* Fix Meta Bar */
    .paper-meta-bar {
        display: flex;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .paper-meta-bar>span {
        text-align: center;
    }

    /* Fix Body Columns */
    .paper-body {
        flex-direction: column;
    }

    .col-visuals {
        max-width: 100%;
        order: -1;
        /* Images first on mobile */
        margin-bottom: 30px;
    }

    .main-headline {
        margin-top: 20px;
    }

    .story-text {
        margin-left: 0;
        /* Remove left margin indentation */
        transform: translateY(0);
        font-size: 1.1rem;
    }

    /* --- 6. ARCHIVE --- */
    .archive-header {
        margin-bottom: 50px;
    }

    .archive-grid {
        gap: 40px;
    }

    .archive-entry__year {
        font-size: 4rem;
        /* Make year easier to tap/read */
    }

    .gang-card {
        /* Force vertical stack explicitly */
        transform: none !important;
        margin-left: 0 !important;
        margin-bottom: 20px !important;
        width: 90% !important;
        height: auto;
        aspect-ratio: 3/4;
    }

    .gang-deck {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .gang-info {
        /* Always show info on mobile, don't wait for hover */
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6));
        padding-top: 20px;
    }

    .gang-card:hover {
        transform: scale(1.02) !important;
        margin-bottom: 20px !important;
    }

    /* --- 8. FOOTER --- */
    .footer-slogan {
        font-size: 12vw;
    }

    .cape-container {
        margin-top: -20px;
    }

    .footer-links a {
        font-size: 2rem;
    }
}
