/* Global styles for Obituary Ledger */
/* Old London Font */
@font-face {
    font-family: 'Old London';
    src: url('/fonts/oldlondon-webfont.woff2') format('woff2'),
         url('/fonts/oldlondon-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Newspaper design system
   A blend of two broadsheets: NYT's traditional headline typography, hairline
   rules and drop caps, with the Washington Post's cleaner spacing and restrained
   modern accents. Tokens live here so every page inherits one coherent look.
   ========================================================================== */
:root {
    /* Type families */
    --font-nameplate: 'Old London', 'UnifrakturMaguntia', 'Old English Text MT', serif;
    --font-display: 'Playfair Display', 'Times New Roman', Georgia, serif; /* headlines */
    --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;         /* body copy */
    --font-sans: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;     /* kickers, UI, metadata */

    /* Newsprint palette — warm off-white, not stark white; near-black, not #000.
       Light in value but clearly creamy in hue: you should read "paper," never
       "sterile white," and never "dim." */
    --paper: #fefcf6;
    --paper-panel: #f7f4ec;
    --ink: #1a1a1a;
    --ink-soft: #4a4744;
    --ink-faint: #6f6b66;
    --rule: #1a1a1a;
    --rule-soft: #d5d0c7;
    /* Restrained broadsheet blue for links (between NYT and WaPo) */
    --accent: #1a3a5c;
    --accent-hover: #274c73;
}

header {
    border-bottom: 1px solid var(--rule-soft);
    padding: 20px 0;
    text-align: center;
    background-color: var(--paper);
}

.site-title {
    font-family: var(--font-nameplate);
    font-size: 4rem;
    line-height: 1.2;
}

.tagline {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--ink-soft);
}

/* ---- Editorial typography primitives -------------------------------------- */

/* Section kicker / label — letter-spaced small sans, the newspaper "eyebrow" */
.kicker {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* Drop cap for a lead story's first paragraph */
.dropcap::first-letter {
    font-family: var(--font-display);
    float: left;
    font-size: 3.6rem;
    line-height: 0.82;
    font-weight: 700;
    padding: 0.05em 0.1em 0 0;
    color: var(--ink);
}

/* Column rule between broadsheet columns */
.col-rule {
    border-left: 1px solid var(--rule-soft);
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-hover);
}

.navbar-nav .nav-link {
    font-weight: 500;
}

.top-ad {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    text-align: center;
}

footer {
    border-top: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #777;
    background-color: white;
}

/* Layout styles from _Layout.cshtml */
body {
    font-family: var(--font-serif);
    background-color: var(--paper);
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.55;
    /* Prevent a stray horizontal scrollbar (a few px from grid gutters/scrollbar
       gutter) without breaking the sticky nav — `clip` does not create a scroll
       container the way `hidden`/`auto` would. */
    overflow-x: clip;
}

/* Headings default to the display serif for a broadsheet voice */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink);
}

.masthead {
    border-top: 3px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 1.1rem 0 0.9rem;
    background-color: var(--paper);
}

.masthead-title {
    font-family: var(--font-nameplate);
    font-size: 4.25rem;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.1;
    color: var(--ink);
}

/* Mobile bottom padding to account for sticky ad */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 60px; /* Height of mobile sticky ad */
    }
}

.masthead-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.masthead-date {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: var(--ink-faint);
}

.edition-selector {
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.edition-selector:hover {
    color: var(--accent);
}

.nav-menu {
    border-bottom: 1px solid var(--rule);
    border-top: 1px solid var(--rule-soft);
    padding: 0.4rem 0;
    background-color: var(--paper);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.nav-menu .nav-link {
    font-family: var(--font-sans);
    color: var(--ink);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.nav-menu .nav-link:hover {
    color: var(--accent);
    background-color: transparent;
}

.nav-menu .dropdown-menu {
    border-radius: 0;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-menu .dropdown-item {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.nav-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.nav-menu .dropdown-item .price-tag {
    float: right;
    color: #28a745;
    font-weight: bold;
}

.nav-menu .dropdown-item .price-tag.free {
    color: #17a2b8;
}

main {
    min-height: calc(100vh - 300px);
}

footer {
    border-top: 3px double var(--rule);
    padding: 1.5rem 0;
    background-color: var(--paper);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--ink-faint);
}

.auth-btn {
    font-size: 0.9625rem;
}

/* Edition Modal Styling */
/* Flex-wrap rather than a fixed 4-column grid: the picker now shows full state
   names ("Massachusetts") and metro names of varying width, which a rigid grid
   would crop or misalign. */
.edition-selector-component .state-grid,
.edition-selector-component .metro-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.edition-selector-component .state-btn,
.edition-selector-component .metro-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

/* Main content container styling */
/* The reading column is pure white — a printed sheet laid on the warm cream page.
   The body/margins keep --paper; only this sheet is #ffffff. */
.content-container {
    max-width: 1140px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 2rem 2.25rem;
    border-left: 1px solid var(--rule-soft);
    border-right: 1px solid var(--rule-soft);
}
