/* ============================================================
   Helen Burdick Archive — Stylesheet
   Aesthetic: Classic newspaper editorial, refined and timeless
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=IM+Fell+English:ital@0;1&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* --- Variables --- */
:root {
    --ink:        #1a1008;
    --paper:      #f5f0e8;
    --paper-dark: #e8e0ce;
    --rule:       #2c1810;
    --accent:     #8b1a1a;
    --muted:      #6b5f4e;
    --caption:    #4a3f30;
    --col-width:  680px;
}

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

html { font-size: 17px; scroll-behavior: smooth; }

body {
    background-color: var(--paper);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    color: var(--ink);
    font-family: 'Libre Baskerville', Georgia, serif;
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* --- Masthead --- */
.masthead {
    border-bottom: 4px double var(--rule);
    padding: 2.5rem 1rem 1.5rem;
    text-align: center;
    position: relative;
}

.masthead::before {
    content: '✦  Wichita Falls Times Record News  ✦';
    display: block;
    font-family: 'IM Fell English', serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.masthead h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--rule);
}

.masthead h1 em {
    font-style: italic;
    color: var(--accent);
}

.masthead .tagline {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.masthead-rule {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}
.masthead-rule::before,
.masthead-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* --- Hero Photo Area --- */
.hero-photo {
    max-width: var(--col-width);
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.hero-photo img {
    border: 1px solid var(--paper-dark);
    box-shadow: 4px 4px 0 var(--paper-dark), 5px 5px 0 var(--rule);
    margin: 0 auto;
    max-height: 380px;
    object-fit: cover;
    width: 100%;
}

.hero-photo figcaption {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--caption);
    margin-top: 0.5rem;
    border-top: 1px solid var(--paper-dark);
    padding-top: 0.4rem;
}

.hero-placeholder {
    background: var(--paper-dark);
    border: 2px dashed var(--muted);
    padding: 3rem 1rem;
    color: var(--muted);
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 1rem;
}

/* --- Navigation --- */
nav.main-nav {
    background: var(--rule);
    padding: 0.5rem 1rem;
    text-align: center;
}

nav.main-nav a {
    color: var(--paper);
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    margin: 0 1rem;
    text-transform: uppercase;
}

nav.main-nav a:hover {
    color: var(--paper-dark);
    text-decoration: none;
}

/* --- Layout --- */
.container {
    max-width: var(--col-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.container-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Section Headers --- */
.section-head {
    border-top: 3px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 0.4rem 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-head h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rule);
    white-space: nowrap;
}

.section-head .rule-line {
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* --- Search Bar --- */
.search-form {
    margin-bottom: 2rem;
    display: flex;
    gap: 0;
    border: 2px solid var(--rule);
}

.search-form input[type="text"] {
    flex: 1;
    padding: 0.6rem 0.9rem;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.95rem;
    border: none;
    background: white;
    color: var(--ink);
    outline: none;
}

.search-form button {
    background: var(--rule);
    color: var(--paper);
    border: none;
    padding: 0.6rem 1.2rem;
    font-family: 'IM Fell English', serif;
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 0.05em;
}

.search-form button:hover { background: var(--accent); }

/* --- Article Grid --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.article-card {
    border: 1px solid var(--paper-dark);
    background: white;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    box-shadow: 2px 2px 0 var(--paper-dark);
}

.article-card:hover {
    box-shadow: 4px 4px 0 var(--rule);
}

.article-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid var(--paper-dark);
}

.article-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: var(--paper-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 2rem;
}

.article-card-body {
    padding: 0.9rem 1rem;
}

.article-card-date {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.article-card-headline {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rule);
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

.article-card-section {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Single Article --- */
.article-full {
    max-width: var(--col-width);
    margin: 0 auto;
}

.article-full-date {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.article-full h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--rule);
    margin-bottom: 0.5rem;
}

.article-full-meta {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 0.4rem 0;
    margin: 1rem 0;
    font-size: 0.82rem;
    color: var(--muted);
    display: flex;
    gap: 1.5rem;
    font-family: 'IM Fell English', serif;
    font-style: italic;
}

.article-full-image {
    margin: 1.5rem 0;
    border: 1px solid var(--paper-dark);
    box-shadow: 4px 4px 0 var(--paper-dark), 5px 5px 0 var(--rule);
}

.article-full-ocr {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--paper-dark);
}

.article-full-ocr h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.article-full-ocr p {
    font-size: 0.88rem;
    color: var(--caption);
    white-space: pre-wrap;
    line-height: 1.8;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--rule);
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    color: var(--rule);
}

.pagination a:hover { background: var(--rule); color: var(--paper); text-decoration: none; }
.pagination .current { background: var(--rule); color: var(--paper); }

/* --- Footer --- */
footer {
    border-top: 4px double var(--rule);
    margin-top: 3rem;
    padding: 1.5rem 1rem;
    text-align: center;
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--muted);
}

/* --- Notices --- */
.notice {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border-left: 4px solid;
}
.notice-success { background: #f0f7f0; border-color: #2d6a2d; color: #2d6a2d; }
.notice-error   { background: #fdf0f0; border-color: var(--accent); color: var(--accent); }
.notice-info    { background: #f0f4f7; border-color: #2d4a6a; color: #2d4a6a; }

/* --- Responsive --- */
@media (max-width: 600px) {
    .article-grid { grid-template-columns: 1fr; }
    .masthead-rule span { display: none; }
    .article-full-meta { flex-direction: column; gap: 0.25rem; }
}
