/*
Theme Name: OBU Signal Reconstructed
Theme URI: https://www.obusignal.com/
Author: OBU Signal archive reconstruction
Description: A clean, dependency-free editorial theme for the reconstructed OBU Signal archive.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: obusignal
*/

:root {
  --obu-purple: #4a3087;
  --obu-purple-dark: #33205f;
  --obu-purple-light: #6a52a3;
  --obu-ink: #172033;
  --obu-muted: #657083;
  --obu-paper: #ffffff;
  --obu-wash: #f3f5f7;
  --obu-border: #dce1e7;
  --obu-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--obu-ink);
  background: var(--obu-paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.68;
}
a { color: var(--obu-purple); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover, a:focus { color: var(--obu-purple-dark); }
img, video { display: block; max-width: 100%; height: auto; }
iframe { max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 1000; top: 1rem; left: 1rem; width: auto; height: auto; padding: .7rem 1rem; clip: auto; color: white; background: var(--obu-purple-dark); }
.site-wrap { width: min(calc(100% - 2rem), var(--obu-width)); margin-inline: auto; }

.site-header { border-top: 6px solid var(--obu-purple); border-bottom: 1px solid var(--obu-border); background: white; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.5rem; }
.site-branding { text-decoration: none; color: var(--obu-purple); }
.site-title { display: block; font-family: Arial, Helvetica, sans-serif; font-size: clamp(2rem, 5vw, 4.6rem); font-weight: 900; letter-spacing: -.06em; line-height: .9; text-transform: uppercase; }
.site-tagline { display: block; margin-top: .45rem; color: var(--obu-muted); font: 700 .78rem/1.2 Arial, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.site-logo { display: block; width: min(540px, 100%); text-decoration: none; }
.site-logo img { width: 100%; max-height: none; }
.header-date { color: var(--obu-muted); font: 700 .78rem/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.primary-nav { background: var(--obu-purple); }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: block; padding: .95rem 1rem; color: white; font: 800 .8rem/1 Arial, sans-serif; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.primary-nav a:hover, .primary-nav a:focus, .primary-nav .current-menu-item > a { background: var(--obu-purple-dark); }

.site-main { padding-block: 2.5rem 4rem; }
.section-kicker { margin: 0 0 .4rem; color: var(--obu-purple-dark); font: 800 .78rem/1 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.page-title { margin: 0 0 1.5rem; color: var(--obu-purple); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.035em; }
.archive-description { max-width: 70ch; color: var(--obu-muted); }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr); gap: 2rem; margin-bottom: 3rem; }
.lead-story { min-height: 28rem; display: flex; flex-direction: column; justify-content: end; padding: clamp(1.5rem, 4vw, 3rem); color: white; background: linear-gradient(135deg, var(--obu-purple-dark), var(--obu-purple-light)); }
.lead-story a { color: inherit; }
.lead-story .entry-title { margin: .4rem 0 1rem; font-size: clamp(2rem, 5vw, 4.4rem); line-height: .98; letter-spacing: -.04em; }
.lead-story .entry-summary { max-width: 55ch; color: #e6edf4; }
.lead-story .post-thumbnail { margin: calc(-1 * clamp(1.5rem, 4vw, 3rem)); margin-bottom: 1.5rem; max-height: 33rem; overflow: hidden; }
.lead-story .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.latest-list { display: grid; align-content: start; gap: 0; border-top: 5px solid var(--obu-purple); }
.latest-list article { padding: 1.25rem 0; border-bottom: 1px solid var(--obu-border); }
.latest-list h2 { margin: .3rem 0; font-size: 1.25rem; line-height: 1.2; }

.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.story-card { min-width: 0; border-top: 4px solid var(--obu-purple); }
.story-card .post-thumbnail { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--obu-wash); }
.story-card .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.story-card:hover .post-thumbnail img { transform: scale(1.025); }
.story-card h2 { margin: .65rem 0 .4rem; font-size: 1.45rem; line-height: 1.16; }
.story-card h2 a { color: var(--obu-purple); text-decoration: none; }
.story-card h2 a:hover { color: var(--obu-purple-dark); }
.story-card p { margin: .55rem 0 0; color: var(--obu-muted); font-size: .96rem; line-height: 1.55; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; color: var(--obu-muted); font: 700 .75rem/1.4 Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.entry-meta a { text-decoration: none; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.single-article .page-title { margin-bottom: 1rem; }
.single-article .featured-image { margin: 2rem 0; }
.entry-content { overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--obu-purple); line-height: 1.18; }
.entry-content blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.5rem; border-left: 5px solid var(--obu-purple); color: var(--obu-purple); font-size: 1.2rem; }
.entry-content figure, .entry-content .wp-caption { margin: 2rem 0; max-width: 100%; }
.entry-content figcaption, .entry-content .wp-caption-text { color: var(--obu-muted); font: .8rem/1.45 Arial, sans-serif; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .65rem; border: 1px solid var(--obu-border); text-align: left; }
.article-aside { position: sticky; top: 2rem; padding: 1.35rem; background: var(--obu-wash); border-top: 5px solid var(--obu-purple); }
.article-aside h2 { margin-top: 0; font: 800 1rem/1.2 Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.article-aside ul { margin: 0; padding-left: 1.2rem; }

.pagination { margin-top: 3rem; font: 700 .9rem/1 Arial, sans-serif; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination a, .pagination span { display: inline-block; padding: .7rem .85rem; border: 1px solid var(--obu-border); text-decoration: none; }
.pagination .current { color: white; background: var(--obu-purple); border-color: var(--obu-purple); }
.search-form { display: flex; gap: .5rem; }
.search-field { min-width: 0; padding: .7rem; border: 1px solid var(--obu-border); font: inherit; }
.search-submit { padding: .7rem 1rem; border: 0; color: white; background: var(--obu-purple-dark); font: 800 .8rem/1 Arial, sans-serif; text-transform: uppercase; cursor: pointer; }

.site-footer { padding-block: 2.5rem; color: #eee9f7; background: var(--obu-purple); }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; align-items: start; }
.site-footer a { color: white; }
.site-footer p { margin: 0; }
.footer-title { color: white; font: 900 1.25rem/1 Arial, sans-serif; text-transform: uppercase; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-grid, .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead, .footer-grid { align-items: flex-start; flex-direction: column; }
  .primary-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; }
  .lead-story { min-height: 0; }
}
