/* =============================================
   ARTICLE PAGE — Field Notes v2
   Editorial, tactile, and premium.
   ============================================= */

:root {
    --accent-red: #B92322;
    --text-dark: #1a1a1a;
    --paper-cream: #FDFAF2;
    --bg-aged: #F0EDE4;
    --line-color: rgba(170, 195, 220, 0.25);
    --margin-color: #E8B4B3;
}

.article-body {
    background-color: var(--bg-aged);
    margin: 0;
    padding: 0;
}

/* ---- Layout ---- */
.article-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* =============================================
   PAPER SHEET
   ============================================= */
.paper-sheet {
    background-color: var(--paper-cream);
    position: relative;
    box-shadow:
        0 2px 5px rgba(0,0,0,0.05),
        0 15px 40px rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 0 0 5rem;
    overflow: hidden;

    /* Ruled notebook lines (32px vertical rhythm) */
    background-image:
        /* Red left margin line */
        linear-gradient(to right, transparent 99px, var(--margin-color) 99px, var(--margin-color) 101px, transparent 101px),
        /* Horizontal ruled lines */
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 31px,
            var(--line-color) 31px,
            var(--line-color) 32px
        );
    background-size: 100% 32px;
}

/* Top binding / edge detail */
.paper-sheet::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.03), transparent);
    z-index: 5;
}

/* =============================================
   ARTICLE META (top bar)
   ============================================= */
.article-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 5rem 0 0 130px; /* Offset past margin */
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
}

.article-category {
    color: var(--accent-red);
    letter-spacing: 0.2em;
}

.meta-dot {
    opacity: 0.3;
    font-size: 1.2rem;
    line-height: 0;
}

/* =============================================
   HEADLINE & SUBTITLE
   ============================================= */
.article-headline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--text-dark);
    padding: 2rem 5% 1.5rem 130px;
    margin: 0;
}

.article-headline em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent-red);
}

.biro-annotation {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: var(--accent-red);
    padding: 0 5% 3rem 130px;
    margin: 0;
    opacity: 0.9;
    transform: rotate(-0.5deg);
}

/* =============================================
   HERO IMAGE (Taped Photo Look)
   ============================================= */
.article-hero-img {
    margin: 1rem 5% 4rem 130px;
    position: relative;
    display: inline-block;
    max-width: 85%;
}

.article-hero-img img {
    width: 100%;
    display: block;
    border: 12px solid #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    filter: contrast(1.05) saturate(0.95);
    background: #fff;
}

/* Masking Tape effect */
.article-hero-img::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 40%;
    width: 80px;
    height: 25px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transform: rotate(-2deg);
    z-index: 10;
}

.img-caption {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #888;
    margin-top: 1rem;
}

/* =============================================
   BODY CONTENT
   ============================================= */
.article-body-grid {
    padding-left: 130px;
    padding-right: 10%;
    max-width: 800px;
}

.article-text p {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #222;
    margin-bottom: 2rem;
}

.article-text strong {
    font-weight: 700;
    color: var(--text-dark);
}

.article-h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    margin: 4rem 0 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

/* Blockquote */
.biro-callout {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(185, 35, 34, 0.03);
    border-left: 4px solid var(--accent-red);
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    color: var(--accent-red);
    line-height: 1.3;
    transform: rotate(-0.5deg);
}

/* Notepad / List style */
.notepad-insert {
    background: #fffef0;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.02);
}

.notepad-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #ccc;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #eee;
    padding-bottom: 0.5rem;
}

.notepad-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notepad-list li {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #444;
}

.notepad-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-red);
}

/* =============================================
   FOOTER / LINKS
   ============================================= */
.article-back {
    margin-top: 5rem;
    padding-left: 130px;
}

.back-link {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-red);
    text-decoration: none;
    border: 2px solid var(--accent-red);
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link:hover {
    background: var(--accent-red);
    color: #fff;
    transform: translateY(-2px);
}

.next-article-bar {
    margin-top: 6rem;
    background: #fff;
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.next-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #bbb;
    letter-spacing: 0.1em;
}

.next-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.next-title:hover {
    color: var(--accent-red);
}

/* =============================================
   ANIMATIONS (is-visible logic)
   ============================================= */
.js-enabled .fade-in:not(.is-visible),
.js-enabled .slide-up:not(.is-visible) {
    opacity: 0;
}

.fade-in.is-visible { animation: fadeIn 1s ease forwards; }
.slide-up.is-visible { animation: slideUp 0.8s ease forwards; }

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 800px) {
    .paper-sheet {
        padding-left: 0;
        background-image: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 31px,
            var(--line-color) 31px,
            var(--line-color) 32px
        );
    }
    .article-meta, .article-headline, .biro-annotation, .article-hero-img, .article-body-grid, .article-back {
        padding-left: 2rem;
        margin-left: 0;
    }
    .article-hero-img { max-width: 90%; }
    .article-headline { font-size: 3.5rem; }
}
