/* ============================================================
   HireWire — Kelmscott-inspired edition
   Palette: warm paper, deep ink, burgundy, gold
   Typography: Playfair Display (headings), Source Serif 4 (body)
   Principles: craft, proportion, ornament, readability
   ============================================================ */

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

html {
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    color: #1A1816;
    background: #F8F4ED;
    min-height: 100vh;
}

/* --- Decorative Page Border --- */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg,
        #7A2E2B 0%, #7A2E2B 20%,
        #C4A862 20%, #C4A862 22%,
        #7A2E2B 22%, #7A2E2B 42%,
        #C4A862 42%, #C4A862 44%,
        #7A2E2B 44%, #7A2E2B 64%,
        #C4A862 64%, #C4A862 66%,
        #7A2E2B 66%, #7A2E2B 86%,
        #C4A862 86%, #C4A862 88%,
        #7A2E2B 88%, #7A2E2B 100%
    );
    z-index: 100;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #1A1816 0%, #1A1816 25%,
        #C4A862 25%, #C4A862 30%,
        #7A2E2B 30%, #7A2E2B 55%,
        #C4A862 55%, #C4A862 60%,
        #1A1816 60%, #1A1816 85%,
        #C4A862 85%, #C4A862 90%,
        #1A1816 90%, #1A1816 100%
    );
    z-index: 100;
    pointer-events: none;
}

/* --- Masthead --- */
.masthead {
    text-align: center;
    padding: 3rem 1.5rem 1.5rem;
    border-bottom: 3px double #1A1816;
    margin-bottom: 2.5rem;
    position: relative;
}

.masthead::after {
    content: '\2767';
    display: block;
    font-size: 1.2rem;
    color: #C4A862;
    margin-top: 0.75rem;
    letter-spacing: 0.5rem;
}

.masthead-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 3.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1A1816;
    margin-bottom: 0.25rem;
}

.masthead-title a {
    color: inherit;
    text-decoration: none;
}

.masthead-title a:hover {
    color: #7A2E2B;
}

.masthead-subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #5A5652;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

/* --- Masthead Navigation (Spec 7) --- */
.masthead-nav {
    margin-top: 0.75rem;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.nav-link {
    color: #5A5652;
    text-decoration: none;
    padding: 0.2em 0.5em;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: #7A2E2B;
}

.nav-sep {
    color: #D5CDC0;
    font-weight: 400;
    margin: 0 0.15rem;
}

@media (max-width: 600px) {
    .masthead-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 0.5rem;
    }
    .nav-sep {
        display: none;
    }
}

.edition-date {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7A2E2B;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* --- Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

/* --- Homepage: Two-Column Article Grid --- */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.article-card {
    background: #FFFFFF;
    border: 1px solid #E5DDD0;
    padding: 1.75rem;
    position: relative;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C4A862, #7A2E2B, #C4A862);
    opacity: 0.6;
}

.article-card:hover {
    border-color: #C4A862;
    box-shadow: 0 2px 12px rgba(26, 24, 22, 0.08);
}

.article-card-headline {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.article-card-headline a {
    color: #1A1816;
    text-decoration: none;
}

.article-card-headline a:hover {
    color: #7A2E2B;
}

.article-card-meta {
    font-size: 0.75rem;
    color: #7A2E2B;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.article-card-source {
    font-size: 0.7rem;
    color: #8A8682;
}

.article-card-source a {
    color: #5A5652;
    text-decoration: underline;
    text-decoration-color: #D5CDC0;
    text-underline-offset: 2px;
}

.article-card-source a:hover {
    color: #7A2E2B;
    text-decoration-color: #7A2E2B;
}

.article-card-summary {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4A4642;
    font-style: italic;
    border-left: 2px solid #E5DDD0;
    padding-left: 0.85rem;
    margin-top: 0.5rem;
}

/* --- Divider Rule (ornamental) --- */
.ornamental-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 2.5rem 0;
    color: #C4A862;
    font-size: 0.7rem;
    letter-spacing: 0.3rem;
    border: none;
}

.ornamental-rule::before,
.ornamental-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C4A862, transparent);
}

/* --- Full Article Page --- */
.article-full {
    max-width: 960px;
    margin: 0 auto;
}

.article-header-constrain {
    max-width: 720px;
    margin: 0 auto;
}

.article-full-headline {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 2rem;
    line-height: 1.25;
    color: #1A1816;
    margin-bottom: 0.5rem;
}

.article-full-meta {
    font-size: 0.8rem;
    color: #7A2E2B;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.article-full-meta a {
    color: #5A5652;
    text-decoration: underline;
    text-decoration-color: #D5CDC0;
    text-underline-offset: 2px;
}

.article-full-meta a:hover {
    color: #7A2E2B;
}

/* --- Legal Disclaimer Banner --- */
.legal-disclaimer {
    background: #FFFFFF;
    border: 1px solid #E5DDD0;
    border-left: 4px solid #7A2E2B;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #5A5652;
}

.legal-disclaimer strong {
    color: #7A2E2B;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.legal-disclaimer a {
    color: #7A2E2B;
    text-decoration: underline;
    text-decoration-color: #D5CDC0;
    text-underline-offset: 2px;
}

.legal-disclaimer a:hover {
    text-decoration-color: #7A2E2B;
}

/* --- Drop Cap for First Paragraph --- */
.article-section.news-section p:first-of-type::first-letter {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.2rem;
    font-weight: 900;
    float: left;
    line-height: 0.85;
    margin: 0.15rem 0.4rem 0 0;
    color: #7A2E2B;
}

/* --- Section Labels --- */
.article-section {
    margin-bottom: 2rem;
}

.section-label {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7A2E2B;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #E5DDD0;
    position: relative;
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 2rem;
    height: 2px;
    background: #C4A862;
}

/* --- Section Body --- */
.article-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.85rem;
    color: #2A2826;
}

.article-section p:last-child {
    margin-bottom: 0;
}

/* --- Legacy takeaway (for old articles) --- */
.legacy-takeaway-box {
    background: #FFFFFF;
    border: 1px solid #E5DDD0;
    border-left: 4px solid #C4A862;
    padding: 1.5rem;
    margin-top: 1rem;
}

.legacy-takeaway-box p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #2A2826;
}

/* --- Article Bottom Two-Column Layout --- */
.article-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E5DDD0;
}

@media (max-width: 768px) {
    .article-bottom-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- Vertical Takeaway Stack --- */
.takeaway-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.takeaway-card {
    background: #FFFFFF;
    border: 1px solid #E5DDD0;
    padding: 1.25rem;
    position: relative;
}

.takeaway-card-connect { border-top: 3px solid #7A2E2B; }
.takeaway-card-inspect { border-top: 3px solid #C4A862; }
.takeaway-card-reflect { border-top: 3px solid #5A5652; }

.takeaway-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.takeaway-card-connect .takeaway-card-title { color: #7A2E2B; }
.takeaway-card-inspect .takeaway-card-title { color: #8A7A4A; }
.takeaway-card-reflect .takeaway-card-title { color: #4A4642; }

.takeaway-card-subtitle {
    font-size: 0.7rem;
    color: #8A8682;
    font-style: italic;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.takeaway-card p {
    font-size: 0.85rem;
    line-height: 1.65;
    color: #2A2826;
}

.takeaway-card p:last-child {
    margin-bottom: 0;
}

/* --- Back Link --- */
.back-link {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5DDD0;
}

.back-link a {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7A2E2B;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* --- Pagination Navigation --- */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5DDD0;
}

.pagination-link {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7A2E2B;
    text-decoration: none;
    padding: 0.5em 0.75em;
    border: 1px solid #E5DDD0;
    background: #FFFFFF;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pagination-link:hover {
    border-color: #C4A862;
    background: #FFFCF5;
    text-decoration: underline;
}

.pagination-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5A5652;
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 3px double #1A1816;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #8A8682;
}

.footer a {
    color: #5A5652;
    text-decoration: underline;
    text-decoration-color: #D5CDC0;
    text-underline-offset: 2px;
    margin: 0 0.5rem;
}

.footer a:hover {
    color: #7A2E2B;
}

.edition-count {
    color: #C4A862;
    letter-spacing: 0.08em;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

/* --- Archive Page --- */
.archive-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1A1816;
}

.archive-page-subtitle {
    text-align: center;
    font-style: italic;
    color: #5A5652;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.archive-edition {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #FFFFFF;
    border: 1px solid #E5DDD0;
}

.archive-edition h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    color: #7A2E2B;
    margin-bottom: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.archive-edition ul {
    list-style: none;
}

.archive-edition li {
    padding: 0.4rem 0;
    border-bottom: 1px dotted #E5DDD0;
    font-size: 0.85rem;
}

.archive-edition li:last-child {
    border-bottom: none;
}

.archive-edition a {
    color: #1A1816;
    text-decoration: none;
}

.archive-edition a:hover {
    color: #7A2E2B;
}

/* --- Daily Archive --- */
.daily-archive-articles {
    max-width: 720px;
    margin: 0 auto;
}

.daily-article-item {
    padding: 1rem 0;
    border-bottom: 1px dotted #E5DDD0;
}

.daily-article-item:last-child {
    border-bottom: none;
}

.daily-article-item a {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1A1816;
    text-decoration: none;
}

.daily-article-item a:hover {
    color: #7A2E2B;
}

.daily-article-source {
    font-size: 0.75rem;
    color: #8A8682;
    margin-top: 0.15rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem;
    font-style: italic;
    color: #8A8682;
    font-size: 1rem;
}
