/*
Theme Name: COAV
Theme URI: https://chroniclesofavagabond.com/
Author: Neiman Catley / Chronicles of a Vagabond
Description: Minimal classic WordPress theme for Chronicles of a Vagabond. Built for COAV Core, ACF, Gutenberg, and Slider Revolution.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: coav-theme
*/

:root {
  --coav-bg: #f6f4ee;
  --coav-surface: #ffffff;
  --coav-text: #171717;
  --coav-muted: #6f6b63;
  --coav-line: #d9d5cb;
  --coav-accent: #171717;
  --coav-max: 1440px;
  --coav-reading: 760px;
  --coav-pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--coav-bg);
  color: var(--coav-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { opacity: .72; }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 0;
  padding: 12px 16px; left: 12px; top: 12px; z-index: 100000;
  background: #fff; color: #000;
}

.coav-shell { width: min(100%, var(--coav-max)); margin-inline: auto; padding-inline: var(--coav-pad); }
.coav-reading { width: min(100%, var(--coav-reading)); margin-inline: auto; }
.coav-section { padding-block: clamp(56px, 8vw, 120px); border-top: 1px solid var(--coav-line); }
.coav-section--tight { padding-block: clamp(36px, 5vw, 72px); }

.site-header {
  position: relative; z-index: 50;
  border-bottom: 1px solid var(--coav-line);
  background: rgba(246,244,238,.96);
}
.site-header__inner {
  min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.site-branding { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.site-branding__name { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .9rem; }
.custom-logo { max-height: 44px; width: auto; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); margin: 0; padding: 0; list-style: none; }
.primary-nav a { text-decoration: none; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-toggle { display: none; border: 0; background: none; padding: 10px; cursor: pointer; }

.coav-eyebrow {
  margin: 0 0 14px; font-size: .76rem; line-height: 1.2; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase; color: var(--coav-muted);
}
.coav-title {
  margin: 0; max-width: 1100px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 8.5rem); line-height: .92; letter-spacing: -.045em; font-weight: 400;
}
.coav-title--archive { font-size: clamp(3rem, 7vw, 7rem); }
.coav-dek {
  max-width: 860px; margin: 28px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.35; color: #383632;
}
.coav-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; color: var(--coav-muted); font-size: .9rem; }
.coav-meta a { text-decoration: none; }
.coav-meta__sep::before { content: "·"; margin-right: 18px; }

.coav-hero { padding-block: clamp(56px, 8vw, 120px) clamp(36px, 6vw, 84px); }
.coav-hero-media { width: 100%; max-height: 82vh; object-fit: cover; }
.coav-hero-media-wrap { width: 100%; margin-top: 42px; }

.entry-content { font-size: 1.125rem; line-height: 1.78; }
.entry-content > * { max-width: var(--coav-reading); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: 1180px; }
.entry-content > .alignfull { max-width: none; width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.15;
  margin-top: 2.2em;
}
.entry-content h2 { font-size: clamp(2rem, 4vw, 3.8rem); }
.entry-content h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
.entry-content blockquote {
  border-left: 2px solid var(--coav-text); padding-left: 24px; margin-top: 2.2em; margin-bottom: 2.2em;
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.5vw, 2.2rem); line-height: 1.35;
}

.coav-quote {
  width: min(100%, 1000px); margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 4.5rem); line-height: 1.08; letter-spacing: -.025em;
}

.coav-section-heading { margin: 0 0 30px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.coav-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.coav-card { grid-column: span 4; }
.coav-card--wide { grid-column: span 6; }
.coav-card__image { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: #e8e4da; }
.coav-card__body { padding-top: 18px; }
.coav-card__type { margin: 0 0 8px; color: var(--coav-muted); font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.coav-card__title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 2.4vw, 2.5rem); line-height: 1.08; font-weight: 400; }
.coav-card__title a { text-decoration: none; }
.coav-card__excerpt { margin: 12px 0 0; color: #514e48; }

.coav-feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.coav-feature__image { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: #e8e4da; }
.coav-feature__title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 5rem); line-height: .98; font-weight: 400; }
.coav-feature__title a { text-decoration: none; }
.coav-feature__dek { color: #514e48; font-size: 1.05rem; }

.coav-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.coav-pill { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 13px; border: 1px solid var(--coav-line); border-radius: 999px; text-decoration: none; font-size: .82rem; }
.coav-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.coav-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 17px; border: 1px solid var(--coav-text); text-decoration: none; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.coav-button--solid { background: var(--coav-text); color: var(--coav-bg); }

.coav-embed { width: min(100%, 1180px); margin-inline: auto; }
.coav-embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

.coav-person-header { display: grid; grid-template-columns: minmax(240px, .45fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 84px); align-items: end; }
.coav-person-image { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }

.archive-header { padding-block: clamp(60px, 10vw, 150px); }
.archive-description { max-width: 800px; margin-top: 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.2rem, 2vw, 1.8rem); color: #4e4b46; }
.coav-pagination { margin-top: 64px; }
.coav-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.coav-pagination a, .coav-pagination span { min-width: 40px; padding: 8px 12px; border: 1px solid var(--coav-line); text-align: center; text-decoration: none; }

.site-footer { border-top: 1px solid var(--coav-line); padding-block: 48px; margin-top: 80px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0; margin: 0; list-style: none; }
.footer-nav a { text-decoration: none; font-size: .82rem; }
.site-footer__copy { margin: 10px 0 0; color: var(--coav-muted); font-size: .82rem; }

.coav-empty { padding: 60px 0; color: var(--coav-muted); }

@media (max-width: 900px) {
  .coav-card, .coav-card--wide { grid-column: span 6; }
  .coav-feature, .coav-person-header { grid-template-columns: 1fr; }
  .site-header__inner { min-height: 66px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--coav-bg); border-bottom: 1px solid var(--coav-line); padding: 18px var(--coav-pad) 28px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .coav-card, .coav-card--wide { grid-column: 1 / -1; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .coav-meta__sep::before { display: none; }
}
