/*
Theme Name: Fathom
Theme URI: https://example.com/fathom
Author: Your Name
Author URI: https://example.com
Description: An elegant editorial weekly theme. A large nameplate masthead sits above a lead story beside a numbered reading list, with segmented section blocks — World, a dark Business block and Culture — and a dense latest-stories index. A refined serif type system (Playfair Display and Source Serif 4 with a Work Sans UI), per-category colour accents, light and dark modes, self-hosted fonts and one-click demo content with original artwork.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fathom
Tags: blog, news, magazine, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #ece7dc;
  --text: #1c2026;
  --text-2: #3a4049;
  --muted: #6b7280;
  --line: #ddd6c8;
  --accent: #2f6bff;
  --accent-ink: #ffffff;
  --accent-hover: #1c2026;
  --accent-hover-ink: #ffffff;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 800;
  --lh-display: 1.1;
  --track-display: 0;

  --radius: 4px;
  --radius-ui: 3px;
  --footer-bg: #1c2026;
  --footer-text: #f4f1ea;
  --footer-muted: #a7a295;
  --footer-line: rgba(255,255,255,.14);
  --overlay: linear-gradient(180deg, rgba(14,16,20,0) 28%, rgba(14,16,20,.92) 100%);
}
:root[data-theme="dark"] {
  --bg: #14171c;
  --surface: #1b1f26;
  --surface-2: #232830;
  --text: #ece7dc;
  --text-2: #c7c2b6;
  --muted: #8b90a0;
  --line: #2c323c;
  --accent: #6d92ff;
  --accent-ink: #14171c;
  --accent-hover: #ece7dc;
  --accent-hover-ink: #14171c;
  --footer-bg: #0e1013;
}

body { font-size: 18px; }
.meta, .cat, .primary-menu a, .mobile-menu a, .section-link, .widget-title,
.fa-dateline, .fa-readlist__num, .btn, .header-cta { font-family: var(--font-ui); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; letter-spacing: -.01em; }
h1, h2, h3, h4, .card__title, .mini__title, .entry-title, .section-title { font-family: var(--font-display); letter-spacing: -.005em; }
.entry-content { font-family: var(--font-body); }

.site-header { border-bottom: 1px solid var(--text); }
.primary-menu > li > a { font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.header-cta { background: var(--accent); color: #fff; border-radius: var(--radius-ui); text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; font-weight: 700; }
.cat { color: hsl(var(--cat-hue,215) 72% 46%); font-family: var(--font-ui); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
[data-theme="dark"] .cat { color: hsl(var(--cat-hue,215) 80% 72%); }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.section-head { border-top: 2px solid var(--text); padding-top: .7rem; align-items: center; }

/* ---------- Masthead nameplate ---------- */
.fa-masthead { border-bottom: 1px solid var(--line); padding-block: clamp(22px, 4vw, 40px) clamp(14px, 2vw, 20px); text-align: center; overflow: hidden; }
.fa-nameplate {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 11vw, 7.5rem);
  line-height: .92;
  letter-spacing: -.02em;
  color: var(--text);
  text-transform: none;
}
.fa-dateline { display: flex; justify-content: center; gap: 1.2rem; align-items: center; margin-top: clamp(8px, 1.4vw, 14px); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.fa-dateline__edition { color: var(--accent); font-weight: 700; }
.fa-dateline__edition::after { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-left: 1.2rem; vertical-align: middle; }

/* ---------- Lead + reading list ---------- */
.fa-lead-wrap { padding-top: clamp(26px, 3.5vw, 40px); }
.fa-lead { display: grid; gap: clamp(28px, 4vw, 52px); align-items: start; }
@media (min-width: 900px) { .fa-lead { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); } }
.fa-lead__main .media { margin-bottom: 1.1rem; }
.fa-lead__title { font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.04; font-weight: 800; margin: .5rem 0 .6rem; }
.fa-lead__excerpt { font-family: var(--font-body); font-size: 1.12rem; line-height: 1.65; color: var(--text-2); margin-bottom: .8rem; max-width: 60ch; }

.fa-lead__side { border-top: 2px solid var(--text); padding-top: 1rem; }
@media (min-width: 900px) { .fa-lead__side { border-top: 0; border-left: 1px solid var(--line); padding-left: clamp(24px, 3vw, 40px); padding-top: 0; } }
.fa-readlist__head { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-ui); font-weight: 700; margin-bottom: .4rem; color: var(--accent); }
.fa-readlist { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.fa-readlist__item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.fa-readlist__item:last-child { border-bottom: 0; }
.fa-readlist__num { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--line); }
[data-theme="dark"] .fa-readlist__num { color: var(--surface-2); }
.fa-readlist__title { font-size: 1.12rem; line-height: 1.25; font-weight: 700; margin: .25rem 0 .35rem; }
.fa-readlist__body .cat { display: inline-block; margin-bottom: .25rem; }

/* ---------- Section blocks ---------- */
.fa-section .card__title, .fa-picks .card__title { font-size: 1.18rem; line-height: 1.22; }
.fa-section .grid--4 .card__title { font-size: 1.05rem; }

/* ---------- Dark business block ---------- */
.fa-dark { background: #1c2026; color: #f4f1ea; padding-block: clamp(36px, 5vw, 64px); margin-block: clamp(32px, 4vw, 56px); }
[data-theme="dark"] .fa-dark { background: #0e1013; }
.fa-dark__title { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; border-top: 2px solid var(--accent); padding-top: .7rem; margin-bottom: 1.5rem; }
.fa-dark__grid { display: grid; gap: clamp(24px, 3vw, 40px); align-items: start; }
@media (min-width: 900px) { .fa-dark__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.fa-dark__lead .media { aspect-ratio: 16/10; }
.fa-dark__lead .card__title { color: #fff; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.fa-dark__lead .card__title a { color: #fff; }
.fa-dark__lead .card__title a:hover { color: var(--accent); }
.fa-dark__lead .card__excerpt { color: rgba(244,241,234,.78); font-family: var(--font-body); }
.fa-dark__lead .meta, .fa-dark__lead .meta a { color: rgba(244,241,234,.6); }
.fa-dark__list { display: grid; gap: 0; }
.fa-dark .card-row { grid-template-columns: 96px 1fr; gap: 16px; padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.fa-dark .card-row:first-child { padding-top: 0; }
.fa-dark .card-row:last-child { border-bottom: 0; }
.fa-dark .card-row .media { aspect-ratio: 1; }
.fa-dark .card__title { color: #fff; font-size: 1.08rem; line-height: 1.25; }
.fa-dark .card__title a { color: #fff; }
.fa-dark .card__title a:hover { color: var(--accent); }
.fa-dark .cat { color: hsl(var(--cat-hue,162) 70% 68%); }
.fa-dark .meta, .fa-dark .meta a { color: rgba(244,241,234,.58); }

/* ---------- Dense latest index ---------- */
.fa-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 40px); }
@media (min-width: 720px) { .fa-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fa-index .mini { padding: .95rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.fa-index .mini__title { font-size: 1.08rem; line-height: 1.28; font-weight: 700; margin: .2rem 0 .3rem; }
.fa-index .mini .cat { display: inline-block; margin-bottom: .2rem; }

/* ---------- Signup band ---------- */
.fa-signup .signup--band { background: var(--text); color: var(--bg); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
[data-theme="dark"] .fa-signup .signup--band { background: var(--surface-2); }
.fa-signup .signup--band .signup__title { color: var(--bg); font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
[data-theme="dark"] .fa-signup .signup--band .signup__title { color: var(--text); }
.fa-signup .signup--band .signup__desc { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.fa-signup .signup--band .signup__form { min-width: 340px; }
.fa-signup .signup--band .signup__button { background: var(--accent); color: #fff; }
.fa-signup .signup--band .signup__note { color: color-mix(in srgb, var(--bg) 70%, transparent); }
@media (max-width: 760px) { .fa-signup .signup--band { grid-template-columns: 1fr; } .fa-signup .signup--band .signup__form { min-width: 0; } }

/* ---------- Single / reading ---------- */
.entry-title { font-weight: 800; }
.entry-content { font-size: 1.14rem; line-height: 1.75; }
.entry-content p { margin-bottom: 1.3em; }
.entry-content blockquote { border-left: 3px solid var(--accent); font-family: var(--font-display); font-size: 1.3rem; font-style: italic; line-height: 1.4; }
