/* ============================================================
   The Focal — a serif broadsheet
   Warm newsprint, quiet ink, one restrained vermilion accent.
   Mobile-first; desktop reads like a newspaper page.
   ============================================================ */

:root {
  --paper: #f6f2e8;
  --paper-deep: #efe9db;
  --ink: #1e1c18;
  --ink-soft: #4a463e;
  --muted: #7a746a;
  --rule: #d9d2c2;
  --rule-dark: #b7ad97;
  --accent: #a23c2c;
  --accent-soft: rgba(162, 60, 44, 0.08);
  --serif-display: "Fraunces", "Times New Roman", serif;
  --serif-body: "Newsreader", "Georgia", serif;
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -180px, rgba(255,255,255,0.55), transparent 60%),
    linear-gradient(180deg, var(--paper), var(--paper) 78%, var(--paper-deep));
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px 64px; }

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  padding: 18px 14px 0;
  border-top: 4px double var(--ink);
}

.dateline {
  font-family: var(--serif-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.dateline .dot { margin: 0 0.6em; color: var(--accent); }

.brand {
  font-family: var(--serif-display);
  font-weight: 520;
  font-size: clamp(1.9rem, 6.5vw, 3.1rem);
  letter-spacing: -0.01em;
  line-height: 1.02;
  margin-top: 6px;
}

.tagline {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.nav {
  margin-top: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  justify-content: flex-start;
  gap: 2px 22px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 2px 0;
  flex: 0 0 auto;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Shared bits ---------- */
.kicker {
  font-family: var(--serif-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.meta {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.deck {
  font-family: var(--serif-body);
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}
.empty { padding: 40px 0; color: var(--muted); font-style: italic; }
.empty-page { padding: 40px 0 80px; max-width: 40rem; }

.page-head { padding: 26px 0 6px; }
.page-title {
  font-family: var(--serif-display);
  font-weight: 520;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.05;
  margin-top: 4px;
}

/* ---------- Lead story ---------- */
.lead {
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--rule);
}
.lead-link {
  display: grid;
  gap: 18px;
}
.lead-img {
  overflow: hidden;
  background: var(--paper-deep);
}
.lead-img img { width: 100%; }
.lead-body { max-width: 56ch; }
.lead .kicker { line-height: 1; }
.lead-title {
  font-family: var(--serif-display);
  font-weight: 560;
  font-size: clamp(1.55rem, 4.2vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin-top: 10px;
  text-wrap: balance;
}
.lead .deck { margin-top: 10px; }
.lead .meta { margin-top: 12px; display: block; }

/* ---------- Section rails ---------- */
.section { padding: 22px 0 6px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 16px;
}
.section-name {
  font-family: var(--serif-display);
  font-weight: 540;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.more {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.more:hover { text-decoration: underline; }

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ---------- Cards ---------- */
.card { min-width: 0; }
.card-link { display: block; }
.card-img { overflow: hidden; background: var(--paper-deep); margin-bottom: 10px; }
.card-img img { width: 100%; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card-link:hover .card-img img { transform: scale(1.025); }
.card .kicker { font-size: 0.66rem; }
.card-title {
  font-family: var(--serif-display);
  font-weight: 520;
  font-size: 1.18rem;
  line-height: 1.16;
  margin-top: 6px;
  text-wrap: balance;
}
.card .deck { font-size: 0.95rem; margin-top: 7px; }
.card .meta { display: block; margin-top: 9px; }

/* animated link underline on card titles */
.card-title {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s ease;
}
.card-link:hover .card-title { text-decoration-color: var(--accent); }

/* ---------- Latest list ---------- */
.latest { padding-top: 26px; }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.latest-item:last-child { border-bottom: 0; }
.latest-title {
  font-family: var(--serif-display);
  font-weight: 520;
  font-size: 1.25rem;
  line-height: 1.18;
}
.latest-item .deck { font-size: 0.95rem; margin-top: 6px; }
.latest-item .meta { display: block; margin-top: 8px; }
.latest-item a { display: block; }
.latest-item:hover .latest-title { color: var(--accent); }

/* ---------- Article ---------- */
.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 30px 0 20px;
}
.article-title {
  font-family: var(--serif-display);
  font-weight: 560;
  font-size: clamp(1.85rem, 5.5vw, 2.85rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-top: 10px;
  text-wrap: balance;
}
.article-deck { margin-top: 14px; font-size: 1.15rem; }
.byline { margin-top: 18px; font-size: 0.85rem; letter-spacing: 0.03em; }
.article-figure { margin: 24px 0 0; }
.article-figure img { width: 100%; }
.article-figure figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

.prose {
  margin-top: 24px;
  font-size: 1.14rem;
  line-height: 1.72;
  color: var(--ink);
  hyphens: auto;
}
.prose p { margin-bottom: 1.15em; }
.prose a { text-decoration: underline; text-decoration-color: var(--rule-dark); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); color: var(--accent); }
.prose h2 {
  font-family: var(--serif-display);
  font-weight: 540;
  font-size: 1.5rem;
  margin: 1.4em 0 0.6em;
}
.prose h3 { font-family: var(--serif-display); font-weight: 520; font-size: 1.2rem; margin: 1.3em 0 0.5em; }
.prose blockquote {
  margin: 1.4em 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}
.prose img { margin: 1.2em auto; }
.prose ul, .prose ol { margin: 0 0 1.15em 1.3em; padding: 0; }
.prose li { margin-bottom: 0.4em; }

/* drop cap — the newspaper signature */
.prose > p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-weight: 560;
  float: left;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--ink);
}

.sources {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Cities index page ---------- */
.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--rule-dark);
}
.alpha a {
  font-family: var(--serif-display);
  font-weight: 540;
  font-size: 1.05rem;
  min-width: 2.2em;
  text-align: center;
  padding: 6px 0;
  border: 1px solid var(--rule);
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.alpha a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.city-block { padding: 22px 0 4px; }
.city-letter {
  font-family: var(--serif-display);
  font-weight: 560;
  font-size: 1.9rem;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.city-list { list-style: none; margin: 0; padding: 0; }
.city-item { border-bottom: 1px solid var(--rule); }
.city-link { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.city-brand {
  font-family: var(--serif-display);
  font-weight: 520;
  font-size: 1.15rem;
  color: var(--ink);
}
.city-place { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.city-tagline { flex-basis: 100%; font-style: italic; color: var(--ink-soft); font-size: 0.9rem; }
.city-link:hover .city-brand { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule-dark);
  padding: 34px 18px 40px;
  color: var(--muted);
  background: var(--paper-deep);
}
.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.footer-brand {
  font-family: var(--serif-display);
  font-weight: 520;
  font-size: 1.45rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.footer-tagline { font-style: italic; font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 8px; }
.footer-head {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: 0.92rem; color: var(--ink-soft); border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
.footer-links a:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.footer .muted { letter-spacing: 0.03em; }
.footer .muted li { list-style: none; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lead, .card, .latest-item {
    opacity: 0;
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .lead { animation-delay: 0.08s; }
  .section-grid .card:nth-child(1) { animation-delay: 0.14s; }
  .section-grid .card:nth-child(2) { animation-delay: 0.2s; }
  .section-grid .card:nth-child(3) { animation-delay: 0.26s; }
  .section-grid .card:nth-child(4) { animation-delay: 0.32s; }
  .latest-item:nth-child(1) { animation-delay: 0.18s; }
  .latest-item:nth-child(2) { animation-delay: 0.24s; }
  .latest-item:nth-child(3) { animation-delay: 0.3s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Desktop: the newspaper page ---------- */
@media (min-width: 720px) {
  .nav, .cities { justify-content: center; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .lead-link {
    grid-template-columns: 7fr 5fr;
    gap: 28px;
    align-items: center;
  }
  .section-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .section-grid > :nth-child(2),
  .section-grid > :nth-child(3) {
    border-left: 1px solid var(--rule);
    padding-left: 26px;
  }
  .latest-list { columns: 2; column-gap: 48px; column-rule: 1px solid var(--rule); }
  .latest-item { break-inside: avoid; }
  .article { padding-top: 44px; }
}

@media (min-width: 1024px) {
  .wrap { padding: 0 34px 80px; }
  .masthead { padding-top: 26px; }
  .section { padding-top: 30px; }
}