/*
Theme Name: Apex Pilgrim
Theme URI: https://apexpilgrim.com
Author: DB Wright
Description: Custom theme for Apex Pilgrim — ride guides, gear reviews and printables. Built from the "Apex Pilgrim Website Design" canvas.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: apexpilgrim
*/

/* ---------- Tokens ---------- */
:root {
  --paper: #F4EFE6;
  --paper-2: #FBF8F2;
  --line: #D9D1C1;
  --ink: #1B1A17;
  --ink-2: #2B2923;
  --muted: #5C574D;
  --muted-2: #3B382F;
  --orange: #B5461A;
  --orange-soft: #F7E3D6;
  --orange-ink: #3B2316;
  --forest: #1F3A33;
  --forest-2: #2A4A41;
  --forest-line: #3F5C53;
  --forest-text: #CFD9D4;
  --peach: #F0B58F;
  --ph: #DDD4C1;
  --ph-line: #9A9078;
  --ph-text: #4A463D;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --wrap: 1152px;
  --gutter: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; margin: 0; }
p { margin: 0; }
.screen-reader-text, .sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 6px;
}
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; }
.section { padding: 72px var(--gutter); }
.section--alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--forest { background: var(--forest); color: var(--paper); }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange);
}
.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange);
}
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 640px; }
.sub { font-size: 17px; color: var(--muted); }
.h-display { font-size: 64px; line-height: 1.05; }
.h-page { font-size: 56px; line-height: 1.08; }
.h-section { font-size: 40px; line-height: 1.1; }
.h-block { font-size: 34px; line-height: 1.15; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 600; font-size: 16px; padding: 14px 26px; border-radius: 6px;
  font-family: var(--sans); border: 0; cursor: pointer; line-height: 1.3;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn--orange { background: var(--orange); color: #fff; }
.btn--ghost { border: 2px solid var(--ink); color: var(--ink); padding: 12px 24px; }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); font-size: 15px; padding: 12px 22px; }
.btn--sm { font-size: 15px; padding: 12px 20px; }
.link-arrow { color: var(--orange); font-weight: 600; font-size: 15px; padding: 8px 0; display: inline-block; }

/* ---------- Placeholders ---------- */
.ph {
  background: var(--ph); border: 1px dashed var(--ph-line); color: var(--ph-text);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 16px; font-size: 13px; border-radius: 10px;
}
.media-cover { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 24px; }
.brand .custom-logo { max-height: 48px; width: auto; }
.brand__crest { width: 44px; height: 48px; flex: none; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.main-nav__link {
  padding: 12px 2px; font-size: 16px; font-weight: 500; color: var(--ink);
  border-bottom: 2px solid transparent;
}
.main-nav__link.is-current { font-weight: 600; border-bottom-color: var(--orange); }

/* ---------- Hero ---------- */
.hero { padding: 72px var(--gutter) 80px; }
.hero__grid { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero__copy { flex: 1 1 440px; display: flex; flex-direction: column; gap: 24px; }
.hero__copy .lede { max-width: 520px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero__media { flex: 1 1 420px; min-height: 380px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; }
.hero__media.ph { font-size: 14px; padding: 24px; }
.hero__media { position: relative; }
.hero__lights { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__elf {
  position: absolute; left: 4%; bottom: 3%; width: 22%; max-width: 150px; height: auto;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); pointer-events: none;
}

/* ---------- Section headings ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head .link-arrow { font-size: 16px; padding: 10px 0; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--300 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
}
.card--on-alt { background: var(--paper); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.card__media.ph { border: 0; border-bottom: 1px dashed var(--ph-line); border-radius: 0; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card__title { font-size: 22px; line-height: 1.25; }
.card__title a { color: var(--ink); }
.card__excerpt { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card--more {
  border: 2px dashed var(--ph-line); border-radius: 10px; padding: 32px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 260px;
}
.specs {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; color: var(--muted-2);
}
.specs dt { font-weight: 600; }
.specs dd { margin: 0; }

/* Forest tiles */
.tile { background: var(--forest-2); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.tile .kicker { color: var(--peach); }
.tile h3 { font-size: 20px; line-height: 1.25; }
.tile h3 a { color: var(--paper); }
.forest-copy { font-size: 17px; line-height: 1.6; color: var(--forest-text); }

/* Printables */
.printable { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.printable__cover { aspect-ratio: 4 / 3; border-radius: 0; padding: 12px; }
.printable h3 { font-size: 20px; }
.printable__when { font-size: 14px; color: var(--muted); }

/* ---------- Filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 500; font-family: var(--sans);
  background: transparent; color: var(--ink); border: 2px solid var(--ph-line); border-radius: 999px;
  display: inline-flex; align-items: center;
}
.chip:hover { text-decoration: none; border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }

/* ---------- Notice ---------- */
.notice {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 20px; max-width: 720px; font-size: 15px; line-height: 1.6; color: var(--muted-2);
}

/* ---------- Signup ---------- */
.signup {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 48px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 32px;
}
.signup__copy { flex: 1 1 340px; display: flex; flex-direction: column; gap: 10px; }
.signup__copy p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.signup__form { flex: 1 1 380px; display: flex; flex-wrap: wrap; gap: 12px; }
.signup__form input[type=email] {
  flex: 1 1 220px; min-height: 48px; padding: 0 16px; font-size: 16px; font-family: var(--sans);
  border: 1px solid var(--ph-line); border-radius: 6px; background: #fff; color: var(--ink);
}
.signup__form .btn { min-height: 48px; padding: 0 26px; }

/* ---------- Steps (How I review) ---------- */
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { background: var(--forest-2); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.steps__num { font-family: var(--serif); font-weight: 700; font-size: 32px; color: var(--peach); }
.steps strong { font-size: 18px; }
.steps span:last-child { font-size: 15px; line-height: 1.6; color: var(--forest-text); }

/* ---------- Start here ---------- */
.path-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 32px;
  display: flex; flex-direction: column; gap: 12px; color: var(--ink);
}
.path-card:hover { text-decoration: none; border-color: var(--ph-line); }
.path-card__title { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.2; }
.path-card__text { font-size: 16px; line-height: 1.6; color: var(--muted); }
.path-card__go { font-weight: 600; color: var(--orange); padding-top: 8px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split__a { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.split__b { flex: 2 1 520px; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.7; color: #E3EAE6; }
.split__b p { margin: 0; }

/* ---------- About ---------- */
.about { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px; }
.about__photo { flex: 1 1 340px; max-width: 460px; aspect-ratio: 4 / 5; min-height: 380px; overflow: hidden; border-radius: 10px; }
.about__photo.ph { font-size: 14px; padding: 24px; }
.about__copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: 20px; }
.about__copy h1 { font-size: 52px; line-height: 1.08; }
.about__copy .entry p { font-size: 18px; line-height: 1.7; color: var(--muted-2); margin: 0 0 20px; }
.feature strong { font-size: 18px; }
.feature span { font-size: 16px; line-height: 1.6; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }

/* ---------- Article ---------- */
.article { padding: 48px var(--gutter) 88px; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); padding: 12px 0; }
.article__header { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.article__header h1 { font-size: 52px; line-height: 1.1; }
.article__dek { font-size: 20px; line-height: 1.55; color: var(--muted); }
.article__byline { font-size: 14px; color: var(--muted); }
.article__hero { aspect-ratio: 21 / 9; min-height: 240px; overflow: hidden; border-radius: 10px; }
.article__hero.ph { font-size: 14px; padding: 24px; }
.article__credit { margin-top: -22px; font-size: 13px; color: var(--muted); }
.article__credit a, .entry figcaption a { color: var(--muted); text-decoration: underline; }
.article__cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px; }
.entry {
  flex: 1 1 560px; max-width: 720px; font-size: 18px; line-height: 1.75; color: var(--ink-2);
}
.entry > * + * { margin-top: 22px; }
.entry h2 { font-size: 32px; line-height: 1.2; margin-top: 38px; }
.entry h3 { font-size: 24px; line-height: 1.25; margin-top: 30px; }
.entry a { color: var(--orange); text-decoration: underline; }
.entry ul, .entry ol { padding-left: 24px; }
.entry li + li { margin-top: 10px; }
.entry img { border-radius: 10px; }
.entry blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--orange); color: var(--muted-2); }
.entry figure { margin-left: 0; margin-right: 0; }
.entry figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
/* "Your take" callout: paragraph block style or class */
.entry .is-style-your-take, .entry .your-take {
  background: var(--orange-soft); border-radius: 10px; padding: 18px 20px;
  font-size: 16px; line-height: 1.6; color: var(--orange-ink);
}
.glance {
  flex: 1 1 280px; max-width: 340px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 24px;
}
.glance h2 { font-size: 22px; }
.glance dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; line-height: 1.5; }
.glance dt { font-weight: 600; }
.glance dd { margin: 0; }
.glance .btn { text-align: center; }
.next-box {
  max-width: 720px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.next-box strong { font-family: var(--serif); font-size: 22px; }
.next-box span { font-size: 15px; color: var(--muted); }
.disclosure-note { max-width: 720px; font-size: 14px; color: var(--muted); }

/* ---------- Generic page ---------- */
.page-body { max-width: 760px; }
.page-body.entry { flex: none; }
.pagination { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.pagination .page-numbers { padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: var(--paper); padding: 56px var(--gutter) 40px; display: flex; flex-direction: column; gap: 36px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.site-footer__about { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.site-footer__name { font-family: var(--serif); font-weight: 700; font-size: 26px; }
.site-footer__about p { font-size: 15px; line-height: 1.6; color: var(--forest-text); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 40px; align-content: flex-start; }
.footer-nav a { color: var(--paper); font-size: 15px; padding: 10px 0; }
.site-footer__bottom { border-top: 1px solid var(--forest-line); padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.site-footer__bottom p { font-size: 14px; line-height: 1.6; color: var(--forest-text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --gutter: 32px; }
  .h-display { font-size: 48px; }
  .h-page, .about__copy h1, .article__header h1 { font-size: 42px; }
  .h-section { font-size: 34px; }
  .glance { position: static; max-width: none; }
}
@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .section, .hero { padding-top: 48px; padding-bottom: 56px; }
  .h-display { font-size: 40px; }
  .h-page, .about__copy h1, .article__header h1 { font-size: 34px; }
  .h-section, .h-block { font-size: 28px; }
  .signup { padding: 28px; }
  .main-nav { gap: 0 18px; }
}
