/* =============================================
   bada.news — Editorial Broadsheet Stylesheet
   ============================================= */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0B0B0F;
    color: #F0EDE6;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* --- TYPOGRAPHY --- */
h1, h2 {
    font-family: 'Playfair Display', 'Times New Roman', serif;
}

h1 {
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: #F0EDE6;
}

h2 {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: #F0EDE6;
}

p {
    max-width: 68ch;
}

/* Newspaper-style: indent subsequent paragraphs */
.spread-body p + p {
    text-indent: 2em;
}

/* --- SECTION LABELS --- */
.section-label {
    display: block;
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #B8B0A4;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* --- NAVIGATION BAR --- */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 80px;
    z-index: 1000;
    background-color: rgba(11, 11, 15, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-wordmark {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 14px;
    letter-spacing: 0.18em;
    color: #F0EDE6;
    text-transform: uppercase;
}

.nav-index-link {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: #B8B0A4;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-index-link:hover {
    color: #BFA14A;
}

/* --- INDEX OVERLAY --- */
.index-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 11, 15, 0.96);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.index-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.index-overlay-inner {
    text-align: center;
    position: relative;
}

.index-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: #F0EDE6;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.index-close:hover {
    color: #C8102E;
}

.index-list {
    list-style: none;
}

.index-list li {
    margin: 1.5rem 0;
}

.index-list a {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #F0EDE6;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.01em;
}

.index-list a:hover {
    color: #C8102E;
}

/* --- SPREADS (General) --- */
.spread {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
}

/* --- HERO SPREAD --- */
.hero-spread {
    display: flex;
    width: 100%;
    height: 100vh;
}

.hero-left {
    width: 38%;
    background-color: #0B0B0F;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 40px 80px 80px;
    position: relative;
}

.hero-dateline {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #B8B0A4;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-wordmark {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: #F0EDE6;
}

.hero-wordmark-dot {
    color: #C8102E;
}

.hero-edition {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #4A4A58;
    margin-top: 1.5rem;
    text-transform: uppercase;
}

.hero-right {
    width: 62%;
    background-color: #1A1A24;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 80px 80px 60px;
}

.hero-headline {
    margin-bottom: 2rem;
}

.hero-rule {
    width: 100%;
    height: 1px;
    background-color: #C8102E;
    margin-bottom: 1.5rem;
}

.hero-byline {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #B8B0A4;
    line-height: 1.6;
    max-width: 50ch;
}

.hero-credit {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #4A4A58;
    margin-top: 1rem;
    text-transform: uppercase;
}

/* --- SCROLLING TICKER --- */
.ticker-bar {
    width: 100%;
    overflow: hidden;
    background-color: #0B0B0F;
    border-top: 1px solid #2A2A36;
    border-bottom: 1px solid #2A2A36;
    padding: 12px 0;
    position: relative;
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

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

.ticker-item {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #B8B0A4;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.3s ease;
}

.ticker-item:hover {
    color: #F0EDE6;
}

.ticker-bullet {
    font-size: 10px;
    color: #4A4A58;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* --- SECTION RULES --- */
.section-rule {
    width: 100%;
    height: 4px;
    background-color: #C8102E;
    transform-origin: left center;
    transform: scaleX(0);
    transition: none;
}

.section-rule.revealed {
    animation: rule-slide-in 800ms ease-out forwards;
}

@keyframes rule-slide-in {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* --- TEXT-DOMINANT SPREAD --- */
.text-spread {
    background-color: #0B0B0F;
    padding: 0;
}

.text-spread .spread-inner {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    min-height: 100vh;
    padding: 100px 80px 80px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.spread-main {
    max-width: 100%;
}

.spread-headline {
    margin-bottom: 2rem;
}

.spread-body p {
    margin-bottom: 0.6em;
    color: #F0EDE6;
}

.spread-body p:first-child {
    text-indent: 0;
}

/* --- DROP CAPS --- */
.drop-cap {
    float: left;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 5.5em;
    line-height: 0.78;
    color: #C8102E;
    margin-right: 0.12em;
    margin-top: 0.05em;
}

.drop-cap-paragraph {
    text-indent: 0 !important;
}

/* --- SIDEBAR --- */
.spread-sidebar {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-top: 4rem;
}

/* --- PULL QUOTES --- */
.pull-quote {
    position: relative;
    padding-left: 1.2rem;
    border-left: 3px solid #C8102E;
}

.pull-quote-mark {
    display: block;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 4em;
    line-height: 0.6;
    color: #BFA14A;
    opacity: 0.5;
    margin-bottom: 0.2em;
}

.pull-quote blockquote {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.3;
    color: #F0EDE6;
}

/* --- MARGINAL NOTES --- */
.marginal-note {
    padding-left: 0;
}

.marginal-note p {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 14px;
    line-height: 1.65;
    color: #B8B0A4;
    max-width: 100%;
}

/* --- IMAGE-DOMINANT SPREAD --- */
.image-spread {
    background-color: #1A1A24;
}

.image-spread .spread-inner {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    position: relative;
}

.spread-image-container {
    width: 75%;
    position: relative;
}

.duotone-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    border: 1px solid #4A4A58;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #2A2A36;
    position: relative;
    overflow: hidden;
}

/* Abstract pattern to simulate photography */
.image-abstract-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, #4A4A58 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, #3a3a48 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, #2A2A36 0%, transparent 60%),
        linear-gradient(160deg, #1A1A24 0%, #2A2A36 30%, #4A4A58 60%, #2A2A36 80%, #1A1A24 100%);
}

.image-abstract-pattern.pattern-two {
    background:
        radial-gradient(ellipse at 60% 30%, #4A4A58 0%, transparent 45%),
        radial-gradient(ellipse at 25% 70%, #3a3a48 0%, transparent 35%),
        radial-gradient(ellipse at 80% 80%, #2A2A36 0%, transparent 50%),
        linear-gradient(200deg, #2A2A36 0%, #1A1A24 30%, #4A4A58 55%, #1A1A24 80%, #2A2A36 100%);
}

.grain-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 2;
}

.duotone-overlay {
    position: absolute;
    inset: 0;
    background-color: #0B0B0F;
    mix-blend-mode: multiply;
    opacity: 0.3;
    z-index: 1;
}

.image-caption-block {
    margin-top: 6px;
}

.image-caption {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-style: italic;
    font-size: 13px;
    line-height: 1.5;
    color: #B8B0A4;
    max-width: 100%;
}

.image-credit {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #4A4A58;
    text-transform: uppercase;
    margin-top: 4px;
}

.spread-text-overlay {
    padding: 80px;
    max-width: 700px;
}

.image-spread .spread-inner {
    padding: 100px 80px 80px 80px;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.image-spread .spread-body p {
    color: #F0EDE6;
}

/* --- COLOPHON / FOOTER --- */
.colophon-spread {
    min-height: auto;
    padding: 120px 80px 80px 80px;
    background-color: #0B0B0F;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.colophon-inner {
    max-width: 600px;
}

.colophon-wordmark {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #F0EDE6;
    margin-bottom: 1.5rem;
}

.colophon-dot {
    color: #C8102E;
}

.colophon-rule {
    width: 60px;
    height: 2px;
    background-color: #C8102E;
    margin: 0 auto 1.5rem auto;
}

.colophon-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 14px;
    line-height: 1.7;
    color: #B8B0A4;
    max-width: 100%;
}

.colophon-date {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
    font-variant: small-caps;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #4A4A58;
    text-transform: uppercase;
    margin-top: 1.5rem;
}

/* --- SLIDE-REVEAL ANIMATION STATES --- */
.slide-from-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
}

.slide-from-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.slide-from-right {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-from-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.slide-from-below {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.slide-from-below.revealed {
    opacity: 1;
    transform: translateY(0);
}

.drop-cap-fade {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.drop-cap-fade.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Pull quote animation */
.pull-quote.slide-from-left {
    opacity: 0;
    transform: scale(0.96) translateX(-40px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.pull-quote.slide-from-left.revealed {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* --- RESPONSIVE: MOBILE --- */
@media (max-width: 768px) {
    #nav-bar {
        padding: 0 24px;
    }

    .hero-spread {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .hero-left {
        width: 100%;
        padding: 80px 24px 40px 24px;
    }

    .hero-right {
        width: 100%;
        padding: 40px 24px 60px 24px;
    }

    .text-spread .spread-inner {
        grid-template-columns: 1fr;
        padding: 80px 24px 60px 24px;
        gap: 20px;
    }

    .spread-sidebar {
        padding-top: 1rem;
    }

    .image-spread .spread-inner {
        padding: 80px 24px 60px 24px;
    }

    .spread-image-container {
        width: 100%;
    }

    .spread-text-overlay {
        padding: 0;
    }

    .colophon-spread {
        padding: 80px 24px 60px 24px;
    }

    /* Ticker becomes static on mobile */
    .ticker-track {
        animation: none;
    }

    .ticker-bar {
        padding: 12px 24px;
        overflow-x: auto;
    }

    /* Marginal notes go inline */
    .marginal-note {
        padding-left: 2em;
        border-left: 1px solid #2A2A36;
        margin: 1.5rem 0;
    }

    .drop-cap {
        font-size: 3.5em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-wordmark {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
