/*
Theme Name: Fresno Fig 1.0
Theme URI: https://fresnofig.com/
Author: The Fresno Fig
Description: A bespoke newspaper-style WordPress theme for The Fresno Fig, Fresno's Most Questionably Reliable News Source.
Version: 1.0.1
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: fresno-fig
*/

:root {
  --ff-ink: #171416;
  --ff-paper: #fbf8f1;
  --ff-paper-deep: #f1eadf;
  --ff-plum: #32103f;
  --ff-plum-dark: #22082d;
  --ff-olive: #5d6243;
  --ff-rust: #9f463f;
  --ff-rule: #1d1a1c;
  --ff-muted: #716b6c;
  --ff-border: #d9d0c6;
  --ff-white: #fff;
  --ff-serif: Georgia, 'Times New Roman', Times, serif;
  --ff-sans: Arial, Helvetica, sans-serif;
  --ff-content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(50,16,63,.035), transparent 28rem),
    var(--ff-paper);
  color: var(--ff-ink);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .14em; }
a:hover { color: var(--ff-plum); }
button, input, textarea, select { font: inherit; }

.ff-shell { width: min(calc(100% - 32px), var(--ff-content)); margin-inline: auto; }
.ff-screen-reader-text { position: absolute; left: -9999px; }
.ff-screen-reader-text:focus { left: 1rem; top: 1rem; z-index: 9999; background: #fff; padding: .75rem 1rem; }

/* Top utility */
.ff-topbar { border-bottom: 1px solid var(--ff-border); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.ff-topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ff-topbar-left, .ff-topbar-right { display: flex; align-items: center; gap: .65rem; }
.ff-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ff-plum); display: inline-block; }

/* Masthead */
.ff-masthead { padding: 24px 0 16px; border-bottom: 4px double var(--ff-rule); }
.ff-brand { display: flex; justify-content: center; align-items: center; text-align: center; }
.ff-brand img { width: min(100%, 1120px); max-height: 260px; object-fit: contain; }
.ff-brand-fallback { text-decoration: none; display: inline-block; }
.ff-brand-fallback .ff-name { font: 700 clamp(3.25rem, 8vw, 7.5rem)/.84 var(--ff-serif); letter-spacing: -.055em; }
.ff-brand-fallback .ff-tagline { margin-top: .8rem; font: italic 1.15rem/1.2 var(--ff-serif); }

/* Navigation */
.ff-nav-wrap { border-bottom: 1px solid var(--ff-rule); background: rgba(251,248,241,.98); position: sticky; top: 0; z-index: 100; }
.admin-bar .ff-nav-wrap { top: 32px; }
.ff-nav-inner { min-height: 43px; display: flex; align-items: center; justify-content: center; position: relative; }
.ff-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.ff-menu a { display: block; padding: .8rem .78rem .7rem; text-decoration: none; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .065em; }
.ff-menu a:hover, .ff-menu .current-menu-item > a, .ff-menu .current_page_item > a { background: var(--ff-plum); color: #fff; }
.ff-menu-toggle { display: none; border: 0; background: transparent; padding: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

/* Home newswire */
.ff-newswire { border-bottom: 1px solid var(--ff-border); }
.ff-newswire-inner { min-height: 42px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; }
.ff-newswire-label { color: var(--ff-plum); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.ff-newswire-link { min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font: 700 .94rem/1.2 var(--ff-serif); text-decoration: none; }

/* Section grammar */
.ff-section { padding: 34px 0; border-bottom: 1px solid var(--ff-rule); }
.ff-section-heading { margin: 0 0 18px; padding-bottom: 7px; border-bottom: 4px solid var(--ff-ink); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ff-section-title { margin: 0; font-size: .78rem; line-height: 1; text-transform: uppercase; font-weight: 900; letter-spacing: .14em; }
.ff-section-title::before { content: '◆'; color: var(--ff-plum); font-size: .72em; margin-right: .55rem; }
.ff-section-more { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; text-decoration: none; }

/* Hero */
.ff-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr); gap: 30px; }
.ff-lead { padding-right: 30px; border-right: 1px solid var(--ff-border); }
.ff-lead-media { aspect-ratio: 16/9; overflow: hidden; background: var(--ff-paper-deep); margin-bottom: 16px; }
.ff-lead-media img { width: 100%; height: 100%; object-fit: cover; }
.ff-kicker { color: var(--ff-plum); font-size: .7rem; line-height: 1; font-weight: 900; text-transform: uppercase; letter-spacing: .13em; margin-bottom: .55rem; }
.ff-lead-title { font: 700 clamp(2.3rem, 5vw, 4.75rem)/.92 var(--ff-serif); letter-spacing: -.045em; margin: 0; text-wrap: balance; }
.ff-lead-title a { text-decoration: none; }
.ff-lead-dek { margin: .9rem 0 0; color: #474143; font: 1.05rem/1.5 var(--ff-serif); max-width: 70ch; }
.ff-meta { margin-top: .9rem; color: var(--ff-muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.ff-trending-title { margin: 0 0 10px; padding-bottom: 7px; border-bottom: 3px solid var(--ff-plum); font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 900; }
.ff-trending-list { list-style: none; margin: 0; padding: 0; }
.ff-trending-item { padding: 15px 0; border-bottom: 1px solid var(--ff-border); }
.ff-trending-item:first-child { padding-top: 5px; }
.ff-trending-number { color: var(--ff-plum); font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.ff-trending-item h3 { margin: .2rem 0 0; font: 700 1.22rem/1.07 var(--ff-serif); letter-spacing: -.02em; }
.ff-trending-item h3 a { text-decoration: none; }

/* Cards */
.ff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.ff-card { min-width: 0; }
.ff-card + .ff-card { }
.ff-card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--ff-paper-deep); margin-bottom: 10px; }
.ff-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ff-card:hover .ff-card-media img { transform: scale(1.015); }
.ff-card-title { margin: 0; font: 700 1.55rem/1.02 var(--ff-serif); letter-spacing: -.025em; text-wrap: balance; }
.ff-card-title a { text-decoration: none; }
.ff-card-excerpt { margin: .6rem 0 0; color: #5a5355; font: .95rem/1.42 var(--ff-serif); }
.ff-grid.ff-grid-four { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.ff-grid-four .ff-card-title { font-size: 1.25rem; }

/* Category strips */
.ff-category-row { display: grid; grid-template-columns: minmax(0,1.25fr) repeat(2,minmax(0,.75fr)); gap: 24px; }
.ff-category-row .ff-card:first-child .ff-card-title { font-size: 2rem; }

/* Archive */
.ff-archive-header { padding: 34px 0 20px; border-bottom: 4px solid var(--ff-ink); }
.ff-archive-title { margin: 0; font: 700 clamp(2.4rem,6vw,5rem)/.94 var(--ff-serif); letter-spacing: -.04em; }
.ff-archive-description { margin: .75rem 0 0; max-width: 70ch; font-family: var(--ff-serif); color: #504a4b; }
.ff-list { display: grid; gap: 0; }
.ff-list-item { display: grid; grid-template-columns: minmax(190px, 31%) 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--ff-border); }
.ff-list-media { aspect-ratio: 16/10; overflow: hidden; background: var(--ff-paper-deep); }
.ff-list-media img { width: 100%; height: 100%; object-fit: cover; }
.ff-list-title { margin: 0; font: 700 clamp(1.5rem,3vw,2.45rem)/1 var(--ff-serif); letter-spacing: -.03em; }
.ff-list-title a { text-decoration: none; }
.ff-list-excerpt { margin: .7rem 0 0; font-family: var(--ff-serif); color: #544d4f; }

/* Single */
.ff-single { width: min(calc(100% - 32px), 930px); margin: 0 auto; }
.ff-single-header { padding: 44px 0 24px; text-align: center; }
.ff-single-cats { margin-bottom: .85rem; color: var(--ff-plum); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; }
.ff-single-title { margin: 0; font: 700 clamp(2.8rem,7.2vw,6.5rem)/.9 var(--ff-serif); letter-spacing: -.055em; text-wrap: balance; }
.ff-single-dek { margin: 1.15rem auto 0; max-width: 760px; color: #4f484a; font: 1.28rem/1.45 var(--ff-serif); text-wrap: balance; }
.ff-single-meta { margin-top: 1.1rem; color: var(--ff-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.ff-single-image { margin: 0 auto 28px; max-width: 1180px; }
.ff-single-image img { width: 100%; }
.ff-caption { margin-top: .45rem; color: var(--ff-muted); font-size: .72rem; }
.ff-entry-content { width: min(calc(100% - 32px), 760px); margin-inline: auto; font: 1.12rem/1.7 var(--ff-serif); }
.ff-entry-content > *:first-child { margin-top: 0; }
.ff-entry-content h2, .ff-entry-content h3 { line-height: 1.08; letter-spacing: -.025em; }
.ff-entry-content h2 { font-size: 2rem; margin-top: 2rem; }
.ff-entry-content blockquote { margin: 1.7rem 0; padding: .2rem 0 .2rem 1.25rem; border-left: 5px solid var(--ff-plum); font-size: 1.28rem; line-height: 1.45; }
.ff-entry-content figure { margin-inline: 0; }
.ff-entry-content a { color: var(--ff-plum); }
.ff-story-end { width: min(calc(100% - 32px), 760px); margin: 36px auto 44px; border-top: 4px double var(--ff-rule); padding-top: 18px; }
.ff-story-end-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 900; color: var(--ff-plum); }

/* Pagination */
.navigation.pagination { padding: 28px 0; }
.nav-links { display: flex; gap: .35rem; flex-wrap: wrap; }
.page-numbers { border: 1px solid var(--ff-border); padding: .45rem .7rem; text-decoration: none; font-weight: 700; font-size: .8rem; }
.page-numbers.current { background: var(--ff-plum); color: #fff; border-color: var(--ff-plum); }

/* Footer */
.ff-footer { margin-top: 44px; background: var(--ff-ink); color: #f8f2e8; }
.ff-footer-top { padding: 36px 0 28px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; }
.ff-footer-brand { font: 700 2rem/1 var(--ff-serif); }
.ff-footer-tagline { margin-top: .65rem; color: #d8cfd3; font-family: var(--ff-serif); font-style: italic; }
.ff-footer-disclaimer { margin-top: 1rem; max-width: 62ch; color: #c8bec2; font-size: .78rem; line-height: 1.5; }
.ff-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem 1rem; }
.ff-footer-menu a { color: #fff; text-decoration: none; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.ff-footer-bottom { border-top: 1px solid #4a4547; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #aaa1a4; font-size: .7rem; }

/* Comments */
.comments-area { width: min(calc(100% - 32px), 760px); margin: 36px auto; border-top: 1px solid var(--ff-border); padding-top: 24px; }
.comments-title, .comment-reply-title { font-family: var(--ff-serif); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--ff-border); }
.comment-meta { font-size: .75rem; }
.comment-content { font-family: var(--ff-serif); }
.comment-form textarea, .comment-form input[type='text'], .comment-form input[type='email'], .comment-form input[type='url'] { width: 100%; border: 1px solid var(--ff-border); padding: .7rem; background: #fff; }
.comment-form input[type='submit'], .ff-button { border: 0; background: var(--ff-plum); color: #fff; padding: .72rem 1rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; cursor: pointer; }

/* 404 / search */
.ff-empty { padding: 70px 0; text-align: center; }
.ff-empty h1 { margin: 0; font: 700 clamp(2.5rem,7vw,5.5rem)/.94 var(--ff-serif); letter-spacing: -.04em; }
.ff-empty p { max-width: 620px; margin: 1rem auto 0; font-family: var(--ff-serif); }
.search-form { display: flex; max-width: 560px; margin: 1.5rem auto 0; }
.search-field { flex: 1; border: 1px solid var(--ff-border); padding: .7rem .8rem; background: #fff; }
.search-submit { border: 0; background: var(--ff-plum); color: #fff; padding: .7rem 1rem; font-weight: 800; }

@media (max-width: 900px) {
  .ff-hero { grid-template-columns: 1fr; }
  .ff-lead { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--ff-border); padding-bottom: 24px; }
  .ff-grid, .ff-grid.ff-grid-four { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ff-category-row { grid-template-columns: 1fr 1fr; }
  .ff-category-row .ff-card:first-child { grid-column: 1 / -1; }
  .ff-footer-top { grid-template-columns: 1fr; }
  .ff-footer-menu { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .admin-bar .ff-nav-wrap { top: 46px; }
  .ff-topbar-right { display: none; }
  .ff-masthead { padding: 14px 0 10px; }
  .ff-brand img { max-height: 150px; }
  .ff-nav-inner { justify-content: flex-start; }
  .ff-menu-toggle { display: block; }
  .ff-menu-wrap { display: none; position: absolute; top: 100%; left: -16px; right: -16px; background: var(--ff-paper); border-bottom: 2px solid var(--ff-ink); box-shadow: 0 10px 18px rgba(0,0,0,.08); }
  .ff-menu-wrap.is-open { display: block; }
  .ff-menu { display: block; }
  .ff-menu a { padding: .8rem 16px; border-top: 1px solid var(--ff-border); }
  .ff-newswire-inner { gap: .55rem; }
  .ff-newswire-link { font-size: .85rem; }
  .ff-section { padding: 26px 0; }
  .ff-grid, .ff-grid.ff-grid-four, .ff-category-row { grid-template-columns: 1fr; }
  .ff-category-row .ff-card:first-child { grid-column: auto; }
  .ff-list-item { grid-template-columns: 1fr; gap: 12px; }
  .ff-list-media { aspect-ratio: 16/9; }
  .ff-footer-bottom { align-items: flex-start; flex-direction: column; padding: 12px 0; }
}

@media (max-width: 480px) {
  .ff-shell { width: min(calc(100% - 24px), var(--ff-content)); }
  .ff-topbar-inner { min-height: 32px; }
  .ff-topbar-left { gap: .4rem; font-size: .68rem; }
  .ff-lead-title { font-size: 2.45rem; }
  .ff-single-title { font-size: 3.05rem; }
  .ff-single-dek { font-size: 1.08rem; }
}
