/*
Theme Name: Presence Plus Library
Theme URI: https://library.presenceplus.marketing/
Author: Presence Plus Marketing
Description: Custom editorial theme for the Presence Plus Customer Discovery Library.
Version: 1.0.5
Text Domain: presence-plus-library
*/

:root {
  --ink: #171713;
  --muted: #67645d;
  --paper: #f8f6f1;
  --paper-deep: #eee9df;
  --white: #fffefa;
  --rust: #9b4e2d;
  --rust-dark: #71351e;
  --rust-light: #c37a54;
  --accent-gradient: linear-gradient(120deg, var(--rust-dark) 0%, var(--rust) 48%, var(--rust-light) 100%);
  --accent-gradient-hover: linear-gradient(120deg, #5f2a18 0%, var(--rust-dark) 45%, var(--rust) 100%);
  --olive: #59604a;
  --line: rgba(23, 23, 19, .14);
  --line-strong: rgba(23, 23, 19, .28);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow: 0 18px 45px rgba(48, 38, 28, .09);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  background: radial-gradient(circle at 85% 5%, rgba(155, 78, 45, .06), transparent 28rem), var(--paper);
  text-rendering: optimizeLegibility;
}
a { color: var(--rust-dark); text-underline-offset: .18em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }

.site-header, .site-main, .site-footer {
  width: min(1180px, calc(100% - clamp(2rem, 7vw, 7rem)));
  margin-inline: auto;
}
.site-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  min-height: 125px;
  border-bottom: 1px solid var(--line);
}
.site-name {
  display: block;
  width: 330px;
  height: 125px;
  overflow: hidden;
  background: url("https://presenceplus.marketing/assets/presence-plus-marketing-logo.png") -32px -138px / 450px 450px no-repeat;
  text-decoration: none;
}
.site-name img { display: none; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.5rem; }
.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .02em;
  text-decoration: none;
}
.site-nav a::after { position: absolute; right: 0; bottom: -.45rem; left: 0; height: 1px; background: var(--rust); content: ""; transform: scaleX(0); transition: transform .2s ease; }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-header .site-nav > a.header-login {
  display: inline-flex;
  align-items: center;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(113, 53, 30, .18);
  transition: background-position .25s ease, box-shadow .25s ease, transform .25s ease;
}
.site-header .site-nav > a.header-login::after { display: none; }
.site-header .site-nav > a.header-login:hover,
.site-header .site-nav > a.header-login:focus-visible {
  background: var(--accent-gradient-hover);
  background-position: 100% center;
  color: var(--white);
  box-shadow: 0 9px 22px rgba(113, 53, 30, .28);
  transform: translateY(-1px);
}

.site-main { min-height: 55vh; padding-block: clamp(4rem, 8vw, 7rem); }
.library-hero { max-width: 900px; padding-bottom: clamp(3rem, 7vw, 6rem); }
.eyebrow { margin: 0 0 1rem; color: var(--rust); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin: 0 0 1rem; font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
h1 { max-width: 980px; font-size: clamp(2.75rem, 6vw, 5.3rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
.lead { max-width: 760px; color: var(--muted); font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.5; }
.category-library { padding: 0 0 clamp(4rem, 8vw, 7rem); }
.section-heading { margin-bottom: 1.5rem; }
.section-heading h2 { margin-bottom: 0; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.category-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,254,250,.68); color: var(--ink); font-weight: 700; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.category-link:hover, .category-link:focus-visible { border-color: var(--rust-light); box-shadow: 0 10px 24px rgba(48,38,28,.08); transform: translateY(-2px); }
.category-link span:last-child { color: var(--rust); font-size: 1.2rem; }

.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.post-card { display: flex; flex-direction: column; overflow: hidden; min-height: 100%; border: 1px solid rgba(255,255,255,.75); border-radius: 20px; background: rgba(255,254,250,.74); box-shadow: var(--shadow); }
.post-card__image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-deep); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card__image img { transform: scale(1.025); }
.post-card__body { display: flex; flex: 1; flex-direction: column; padding: clamp(1.5rem, 4vw, 2.25rem); }
.post-meta { margin: 0 0 .8rem; color: var(--olive); font-size: .75rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.post-card h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card p { color: var(--muted); }
.text-link { margin-top: auto; font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.article-shell { display: grid; grid-template-columns: minmax(0, 780px) minmax(220px, 1fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.article-header { grid-column: 1 / -1; max-width: 900px; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.article-content { font-size: 1.08rem; }
.article-content > * { max-width: 760px; }
.article-content h2, .article-content h3 { margin-top: 2.5rem; }
.article-content p { margin: 0 0 1.35rem; }
.article-content blockquote { margin: 2rem 0; padding: .5rem 0 .5rem 1.5rem; border-left: 3px solid var(--rust); color: var(--muted); font-family: var(--serif); font-size: 1.25rem; }
.article-content img { margin-block: 2rem; border-radius: 16px; box-shadow: var(--shadow); }
.article-aside { position: sticky; top: 2rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,254,250,.7); }
.article-aside p { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.article-aside a { font-weight: 750; }

.pagination { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.empty-state { padding: 3rem; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,254,250,.7); }

.site-footer { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 2rem 4rem; padding-block: 3rem; border-top: 1px solid var(--line); }
.footer-brand img { width: 210px; }
.footer-brand address { margin-top: 1rem; color: var(--muted); font-style: normal; font-size: .85rem; }
.footer-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-menu h2 { font-family: var(--sans); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.footer-menu a { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .85rem; text-decoration: none; }
.footer-legal { grid-column: 1 / -1; margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr; gap: 0; padding-bottom: 1.5rem; }
  .site-nav { justify-content: flex-start; }
  .post-grid, .article-shell, .category-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}
@media (max-width: 640px) {
  .site-name { width: 300px; }
  .site-nav { gap: .75rem 1rem; }
  .post-grid, .site-footer, .footer-menu { grid-template-columns: 1fr; }
  .site-main { padding-block: 3.5rem; }
}
