/*
Theme Name: Editorial Signal (Twenty Twenty-Five Child)
Template: twentytwentyfive
Author: Your Site
Description: Premium editorial child theme for a blog/news/video hub. Deep ink and cool paper palette, Fraunces display serif, Work Sans body, IBM Plex Mono for data/timestamps. Signature double-rule + brass marker used across sections.
Version: 1.0
Text Domain: editorial-signal
*/

/* ==========================================================================
   Design tokens (kept in sync with theme.json; used by custom components
   below that the block editor's global styles don't reach). The Control
   Panel plugin overrides these at runtime via inline CSS in wp_head.
   ========================================================================== */
:root {
    --es-ink: #14171B;
    --es-paper: #F0F1EC;
    --es-paper-dim: #E4E4DD;
    --es-currant: #7A2233;
    --es-brass: #A9812E;
    --es-slate: #5B6066;
    --es-signal: #C1392B;
    --es-font-display: "Fraunces", Georgia, serif;
    --es-font-body: "Work Sans", -apple-system, sans-serif;
    --es-font-mono: "IBM Plex Mono", monospace;
    --es-radius: 10px;
}

/* ==========================================================================
   Layout shell: header, container, footer structure
   ========================================================================== */
body { background: var(--es-paper); color: var(--es-ink); font-family: var(--es-font-body); margin: 0; }
.es-container { max-width: 1180px; margin: 0 auto; padding: 0 24px 60px; }
.es-main-columns { display: grid; grid-template-columns: 2.4fr 1fr; gap: 40px; margin-top: 20px; }
.es-site-header { background: var(--es-paper); border-bottom: 1px solid var(--es-paper-dim); }
.es-header-inner { max-width: 1180px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.es-logo { font-family: var(--es-font-display); font-style: italic; font-weight: 600; font-size: 1.4rem; color: var(--es-ink); text-decoration: none; }
.es-nav-menu { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.es-nav-menu a { font-family: var(--es-font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--es-ink); text-decoration: none; }
.es-nav-menu a:hover { color: var(--es-currant); }
.es-search-icon { font-family: var(--es-font-mono); font-size: 12px; color: var(--es-slate); text-decoration: none; }
.es-footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.es-footer-columns { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.es-footer-menu { list-style: none; padding: 0; margin: 0; }
.es-footer-menu li { margin-bottom: 8px; }
.es-footer-menu a, .es-footer a { color: var(--es-paper); text-decoration: none; font-size: 14px; }
.es-footer-menu a:hover, .es-footer a:hover { color: var(--es-brass); }
.es-entry-content { font-family: var(--es-font-body); font-size: 17px; line-height: 1.75; max-width: 72ch; }
.es-entry-content h2, .es-entry-content h3 { font-family: var(--es-font-display); }

/* ==========================================================================
   Signature mark: double-rule with brass square. Used under headings,
   above pull-quotes, and as the base for duration/live badges.
   ========================================================================== */
.es-signature-rule {
    display: block;
    height: 9px;
    margin: 0.4em 0 1.4em;
    position: relative;
    border-top: 1px solid var(--es-ink);
}
.es-signature-rule::after {
    content: "";
    display: block;
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    border-top: 1px solid var(--es-ink);
}
.es-signature-rule::before {
    content: "";
    display: block;
    position: absolute;
    top: 3px;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--es-brass);
}

/* ==========================================================================
   Breaking news strip
   ========================================================================== */
.es-breaking-ticker {
    background: var(--es-currant);
    color: var(--es-paper);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    font-family: var(--es-font-body);
}
.es-breaking-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--es-font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--es-paper);
    color: var(--es-currant);
    padding: 3px 8px;
    border-radius: 3px;
    flex-shrink: 0;
}
.es-breaking-label::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--es-signal);
    border-radius: 50%;
    display: inline-block;
}
.es-breaking-headline {
    font-size: 14px;
}
.es-breaking-headline a { color: var(--es-paper); text-decoration: none; }
.es-breaking-headline a:hover { text-decoration: underline; }

/* ==========================================================================
   Hero (dominant story + "Also today" stack)
   ========================================================================== */
.es-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    padding: 40px 0;
}
.es-hero-main .es-kicker {
    font-family: var(--es-font-display);
    font-style: italic;
    color: var(--es-currant);
    font-size: 15px;
    margin-bottom: 6px;
}
.es-hero-main h1 {
    font-family: var(--es-font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    margin: 0 0 14px;
    color: var(--es-ink);
}
.es-hero-main p {
    font-family: var(--es-font-body);
    color: var(--es-slate);
    font-size: 17px;
    max-width: 44ch;
}
.es-also-today { border-left: 1px solid var(--es-paper-dim); padding-left: 28px; }
.es-also-today h2 {
    font-family: var(--es-font-display);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--es-slate);
    margin-bottom: 14px;
}
.es-also-today ul { list-style: none; margin: 0; padding: 0; }
.es-also-today li { padding: 12px 0; border-bottom: 1px solid var(--es-paper-dim); }
.es-also-today li:first-child { padding-top: 0; }
.es-also-today a {
    font-family: var(--es-font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--es-ink);
    text-decoration: none;
    line-height: 1.3;
    display: block;
}
.es-also-today a:hover { color: var(--es-currant); }
.es-also-today time {
    font-family: var(--es-font-mono);
    font-size: 11px;
    color: var(--es-slate);
    display: block;
    margin-top: 4px;
}

/* ==========================================================================
   Video rail
   ========================================================================== */
.es-video-rail {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.es-video-card { flex: 0 0 260px; }
.es-video-thumb {
    position: relative;
    border-radius: var(--es-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--es-paper-dim);
}
.es-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.es-video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--es-ink);
    color: var(--es-paper);
    font-family: var(--es-font-mono);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}
.es-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.es-video-play::before {
    content: "";
    width: 46px;
    height: 46px;
    background: var(--es-brass);
    border-radius: 50%;
    opacity: 0.92;
}
.es-video-title {
    font-family: var(--es-font-body);
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    color: var(--es-ink);
}

/* ==========================================================================
   Latest stories grid (asymmetric: 1 large + smaller cards)
   ========================================================================== */
.es-story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.es-story-card.is-featured { grid-column: span 2; grid-row: span 2; }
.es-story-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--es-radius);
    margin-bottom: 12px;
}
.es-story-card h3 {
    font-family: var(--es-font-display);
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--es-ink);
}
.es-story-card.is-featured h3 { font-size: 1.7rem; }
.es-story-meta {
    font-family: var(--es-font-mono);
    font-size: 11px;
    color: var(--es-slate);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ==========================================================================
   Trending sidebar (numbered — order is genuinely meaningful: rank by views)
   ========================================================================== */
.es-trending { background: var(--es-paper-dim); border-radius: var(--es-radius); padding: 24px; }
.es-trending ol { list-style: none; margin: 0; padding: 0; counter-reset: es-rank; }
.es-trending li {
    counter-increment: es-rank;
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.es-trending li:last-child { border-bottom: none; }
.es-trending li::before {
    content: counter(es-rank);
    font-family: var(--es-font-display);
    font-weight: 700;
    font-size: 28px;
    color: rgba(20,23,27,0.16);
    line-height: 1;
}
.es-trending a {
    font-family: var(--es-font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--es-ink);
    text-decoration: none;
}
.es-trending a:hover { color: var(--es-currant); }

/* ==========================================================================
   Pull-quote using the signature mark
   ========================================================================== */
.es-pullquote {
    font-family: var(--es-font-display);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--es-ink);
    padding: 20px 0;
    max-width: 60ch;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.es-footer {
    background: var(--es-ink);
    color: var(--es-paper);
    padding: 48px 0 28px;
}
.es-footer a { color: var(--es-paper); }
.es-footer-rule { border-top: 2px solid var(--es-brass); margin-bottom: 32px; }

@media (max-width: 780px) {
    .es-hero { grid-template-columns: 1fr; }
    .es-also-today { border-left: none; padding-left: 0; border-top: 1px solid var(--es-paper-dim); padding-top: 20px; }
    .es-story-grid { grid-template-columns: 1fr; }
    .es-story-card.is-featured { grid-column: span 1; }
}
