/*
Theme Name: Smart Confidence
Theme URI: https://smartconfidence.org/
Author: Paul Green
Description: A fast, editorial WordPress theme for the Smart Confidence MSP strategy archive.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: smart-confidence
*/

:root {
  --ink: #13241f;
  --muted: #5f6f69;
  --paper: #f7f4ed;
  --surface: #fffdf8;
  --line: #d9ddd7;
  --lime: #d9ff57;
  --mint: #b7f7d8;
  --blue: #b8dcff;
  --orange: #ffb770;
  --max: 1180px;
  --reading: 760px;
  --shadow: 0 22px 60px rgba(19, 36, 31, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(19, 36, 31, 0.08) 0.7px, transparent 0.7px);
  background-size: 10px 10px;
  content: "";
  opacity: 0.24;
  pointer-events: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: #32a675;
}

button,
input {
  font: inherit;
}

.wrap {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(19, 36, 31, 0.12);
  background: rgba(247, 244, 237, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: Georgia, serif;
  font-size: 19px;
  font-style: italic;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 750;
}

.site-nav a {
  text-decoration: none;
}

.nav-overe {
  padding: 9px 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.hero {
  padding: clamp(72px, 11vw, 148px) 0 76px;
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #31a472;
  content: "";
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.6fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: end;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 9.4vw, 134px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.86;
}

.hero h1 em {
  position: relative;
  display: inline-block;
  font-weight: 500;
}

.hero h1 em::after {
  position: absolute;
  z-index: -1;
  right: -0.03em;
  bottom: 0.02em;
  left: -0.03em;
  height: 0.2em;
  background: var(--lime);
  content: "";
  transform: rotate(-1.5deg);
}

.hero-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.hero-note {
  display: block;
  margin-top: 24px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  background: var(--lime);
}

.marquee-track {
  width: max-content;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  animation: sc-marquee 28s linear infinite;
}

.marquee-track span {
  margin-right: 42px;
}

@keyframes sc-marquee {
  to {
    transform: translateX(-50%);
  }
}

.section {
  padding: 100px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.section-head h2 {
  max-width: 770px;
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.section-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.post-card {
  min-height: 350px;
  grid-column: span 6;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--ink);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-card:nth-child(4n + 1) {
  background: var(--mint);
}

.post-card:nth-child(4n + 2) {
  background: var(--blue);
}

.post-card:nth-child(4n + 3) {
  background: #fff4d9;
}

.post-card:hover {
  box-shadow: 11px 11px 0 var(--ink);
  transform: translate(-4px, -4px);
}

.post-card a {
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.post-number {
  margin-bottom: auto;
  font-family: Georgia, serif;
  font-size: 52px;
  font-style: italic;
  line-height: 1;
}

.post-card h2,
.post-card h3 {
  margin: 48px 0 14px;
  font-family: Georgia, serif;
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(19, 36, 31, 0.7);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overe-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: end;
  overflow: hidden;
  padding: clamp(38px, 7vw, 80px);
  border-radius: 34px;
  background: var(--ink);
  color: white;
}

.overe-panel::after {
  position: absolute;
  width: 330px;
  height: 330px;
  right: -90px;
  top: -110px;
  border: 70px solid var(--lime);
  border-radius: 50%;
  content: "";
  opacity: 0.95;
}

.overe-panel h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.overe-copy {
  position: relative;
  z-index: 1;
  color: #ced9d4;
}

.text-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--lime);
  font-weight: 850;
}

.site-footer {
  padding: 72px 0 34px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}

.footer-title {
  max-width: 600px;
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.footer-small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.article-hero {
  padding: 94px 0 58px;
  border-bottom: 1px solid var(--line);
}

.article-hero-inner {
  max-width: 1000px;
}

.article-hero h1 {
  margin: 0 0 28px;
  font-family: Georgia, serif;
  font-size: clamp(48px, 7.5vw, 92px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.article-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, var(--reading));
  gap: clamp(35px, 7vw, 85px);
  justify-content: center;
  padding: 72px 0 110px;
}

.article-aside {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-aside a {
  display: block;
  margin-top: 12px;
}

.prose {
  min-width: 0;
  font-family: Georgia, serif;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.8;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 2.2em 0 0.7em;
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.prose h2 {
  font-size: clamp(34px, 4vw, 50px);
}

.prose h3 {
  font-size: clamp(26px, 3vw, 34px);
}

.prose p,
.prose ul,
.prose ol,
.prose figure,
.prose table {
  margin-block: 1.35em;
}

.prose img {
  display: block;
  margin: 2.4em auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow);
}

.prose blockquote {
  margin: 2.2em 0;
  padding: 4px 0 4px 28px;
  border-left: 7px solid var(--lime);
  font-size: 1.25em;
  font-style: italic;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: Inter, sans-serif;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 70px;
  padding-top: 35px;
  border-top: 1px solid var(--line);
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.archive-hero {
  padding: 100px 0 56px;
}

.archive-hero h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(54px, 9vw, 110px);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.empty-state {
  padding: 60px 0 120px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus {
  z-index: 100;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: white;
}

@media (max-width: 800px) {
  .site-nav a:not(.nav-overe) {
    display: none;
  }

  .hero-grid,
  .overe-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 540px;
  }

  .post-card {
    grid-column: 1 / -1;
    min-height: 320px;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-aside {
    display: none;
  }

  .overe-panel::after {
    width: 210px;
    height: 210px;
    border-width: 42px;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(calc(100% - 28px), var(--max));
  }

  .header-inner {
    min-height: 66px;
  }

  .brand {
    font-size: 16px;
  }

  .hero {
    padding-top: 68px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    display: block;
  }

  .section-count {
    display: block;
    margin-top: 14px;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee-track {
    animation: none;
  }

  .post-card {
    transition: none;
  }
}
