/*
Theme Name: Minor Human Error
Theme URI: https://www.minorhumanerror.com/
Author: Minor Human Error Books
Description: A bespoke editorial WordPress theme for Minor Human Error Books and its full-manuscript prize.
Version: 0.6.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: minor-human-error
*/

:root {
  --mhe-paper: #f3f0e8;
  --mhe-paper-deep: #e7e1d6;
  --mhe-ink: #15171a;
  --mhe-muted: #65645f;
  --mhe-violet: #5b43e6;
  --mhe-violet-dark: #3825b4;
  --mhe-acid: #d9ff56;
  --mhe-coral: #ff6954;
  --mhe-line: rgba(21, 23, 26, .18);
  --mhe-serif: Georgia, 'Times New Roman', serif;
  --mhe-sans: Arial, Helvetica, sans-serif;
  --mhe-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --mhe-width: 1240px;
  --mhe-reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mhe-paper);
  color: var(--mhe-ink);
  font-family: var(--mhe-sans);
  font-size: 18px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--mhe-violet-dark); }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
::selection { background: var(--mhe-acid); color: var(--mhe-ink); }

.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 {
  top: 12px; left: 12px; z-index: 9999; width: auto; height: auto; margin: 0;
  padding: .75rem 1rem; clip: auto; background: var(--mhe-acid); color: var(--mhe-ink);
}

.mhe-shell { width: min(calc(100% - 48px), var(--mhe-width)); margin-inline: auto; }
.mhe-rule { border: 0; border-top: 1px solid var(--mhe-line); margin: 0; }

.mhe-statusbar {
  background: var(--mhe-ink); color: #fff; font-family: var(--mhe-mono);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.mhe-statusbar__inner {
  min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.mhe-statusbar__signal { display: inline-flex; align-items: center; gap: 9px; }
.mhe-statusbar__signal::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--mhe-acid);
  box-shadow: 0 0 0 4px rgba(217,255,86,.14);
}

.site-header { border-bottom: 1px solid var(--mhe-ink); }
.site-header__inner {
  min-height: 104px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px;
}
.site-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.site-brand__mark {
  display: grid; place-items: center; width: 43px; height: 43px; background: var(--mhe-violet);
  color: #fff; border-radius: 50%; font: 700 14px/1 var(--mhe-mono); transform: rotate(-7deg);
}
.site-brand__name { font-size: clamp(19px, 2.2vw, 27px); font-weight: 900; letter-spacing: -.055em; }
.site-brand__books { font-family: var(--mhe-mono); font-size: 10px; letter-spacing: .17em; text-transform: uppercase; }

.primary-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-size: 14px; font-weight: 800; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--mhe-violet); text-decoration-thickness: 3px; }
.menu-toggle { display: none; border: 1px solid var(--mhe-ink); background: transparent; padding: 9px 12px; font: 700 12px/1 var(--mhe-mono); }

.mhe-kicker { margin: 0 0 18px; font: 700 12px/1.3 var(--mhe-mono); letter-spacing: .12em; text-transform: uppercase; }
.mhe-kicker span { background: var(--mhe-acid); padding: 5px 7px; }

.mhe-hero { border-bottom: 1px solid var(--mhe-ink); overflow: hidden; }
.mhe-hero__grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .65fr); min-height: 690px; }
.mhe-hero__main { padding: clamp(70px, 10vw, 132px) 7vw clamp(72px, 9vw, 116px) 0; border-right: 1px solid var(--mhe-ink); }
.mhe-hero h1 {
  max-width: 900px; margin: 0 0 30px; font-family: var(--mhe-serif); font-size: clamp(54px, 8vw, 116px);
  font-weight: 400; line-height: .91; letter-spacing: -.064em;
}
.mhe-hero h1 em { color: var(--mhe-violet); font-weight: 400; }
.mhe-hero__lede { max-width: 720px; margin: 0 0 38px; font-size: clamp(20px, 2vw, 27px); line-height: 1.4; }
.mhe-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mhe-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  padding: 13px 18px; border: 1px solid var(--mhe-ink); background: var(--mhe-ink); color: #fff;
  font-size: 14px; font-weight: 800; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease;
}
.mhe-button::after { content: '↗'; font-family: var(--mhe-mono); }
.mhe-button:hover { color: #fff; transform: translate(-3px,-3px); box-shadow: 5px 5px 0 var(--mhe-violet); }
.mhe-button--light { background: transparent; color: var(--mhe-ink); }
.mhe-button--light:hover { color: var(--mhe-ink); box-shadow: 5px 5px 0 var(--mhe-acid); }

.mhe-casefile { position: relative; padding: 42px 0 42px 36px; display: flex; flex-direction: column; justify-content: space-between; }
.mhe-casefile::before {
  content: ''; position: absolute; inset: 0 -100vw 0 0; z-index: -1;
  background: linear-gradient(rgba(21,23,26,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(21,23,26,.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.mhe-casefile__number { font: 700 12px/1.3 var(--mhe-mono); letter-spacing: .1em; text-transform: uppercase; }
.mhe-orbit { position: relative; width: min(100%, 330px); aspect-ratio: 1; margin: 46px auto; }
.mhe-orbit::before, .mhe-orbit::after { content: ''; position: absolute; border: 1px solid var(--mhe-ink); border-radius: 50%; }
.mhe-orbit::before { inset: 8%; }
.mhe-orbit::after { inset: 28%; background: var(--mhe-violet); border: 0; }
.mhe-orbit span { position: absolute; left: 3%; top: 47%; width: 18px; height: 18px; border-radius: 50%; background: var(--mhe-coral); }
.mhe-casefile__stamp {
  align-self: flex-end; max-width: 230px; border: 3px solid var(--mhe-violet); color: var(--mhe-violet);
  padding: 12px 15px; font: 900 14px/1.15 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(-5deg);
}

.mhe-section { padding: clamp(76px, 10vw, 132px) 0; border-bottom: 1px solid var(--mhe-ink); }
.mhe-section--ink { background: var(--mhe-ink); color: #fff; }
.mhe-section--violet { background: var(--mhe-violet); color: #fff; }
.mhe-section__head { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; margin-bottom: 62px; }
.mhe-section__index { font: 700 12px/1.3 var(--mhe-mono); letter-spacing: .12em; text-transform: uppercase; }
.mhe-section h2 { margin: 0; font-family: var(--mhe-serif); font-size: clamp(42px, 6vw, 78px); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.mhe-section__intro { max-width: 760px; margin: 26px 0 0; font-size: clamp(19px, 2vw, 25px); }

.mhe-beliefs { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid currentColor; }
.mhe-belief { min-height: 330px; padding: 30px; border-right: 1px solid currentColor; display: flex; flex-direction: column; justify-content: space-between; }
.mhe-belief:last-child { border-right: 0; }
.mhe-belief__number { font: 700 12px/1 var(--mhe-mono); opacity: .72; }
.mhe-belief h3 { margin: 0; font-family: var(--mhe-serif); font-size: clamp(27px, 3vw, 40px); line-height: 1.04; font-weight: 400; }
.mhe-belief p { margin: 22px 0 0; font-size: 15px; opacity: .8; }

.mhe-prize-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(46px, 8vw, 110px); align-items: start; }
.mhe-prize-name { margin: 0 0 24px; font-family: var(--mhe-serif); font-size: clamp(54px, 8vw, 104px); line-height: .92; letter-spacing: -.055em; font-weight: 400; }
.mhe-prize-deck { max-width: 650px; font-size: 23px; }
.mhe-prize-status { border-top: 1px solid var(--mhe-line); margin-top: 40px; }
.mhe-status-row { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--mhe-line); font-size: 15px; }
.mhe-status-row dt { font: 700 11px/1.45 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; }
.mhe-status-row dd { margin: 0; }

.mhe-outcomes { background: #fff; border: 1px solid var(--mhe-ink); box-shadow: 12px 12px 0 var(--mhe-acid); }
.mhe-outcomes__label { padding: 16px 22px; background: var(--mhe-ink); color: #fff; font: 700 11px/1.2 var(--mhe-mono); letter-spacing: .1em; text-transform: uppercase; }
.mhe-outcomes ul { list-style: none; margin: 0; padding: 0; }
.mhe-outcomes li { padding: 22px; border-bottom: 1px solid var(--mhe-line); font-family: var(--mhe-serif); font-size: 25px; line-height: 1.15; }
.mhe-outcomes li:last-child { border-bottom: 0; }
.mhe-outcomes li::before { content: '✓'; display: inline-block; width: 30px; color: var(--mhe-violet); font-family: var(--mhe-sans); font-weight: 900; }

.mhe-author-promise {
  display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(45px, 9vw, 125px); align-items: start;
}
.mhe-author-promise__note {
  position: sticky; top: 28px; border: 1px solid var(--mhe-ink); padding: 25px;
  background: var(--mhe-acid); box-shadow: 10px 10px 0 var(--mhe-ink);
}
.mhe-author-promise__note strong { display: block; font-family: var(--mhe-serif); font-size: 34px; line-height: 1.05; font-weight: 400; }
.mhe-author-promise__note span { display: block; margin-top: 22px; font: 700 11px/1.45 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; }
.mhe-benefit-list { border-top: 1px solid var(--mhe-ink); }
.mhe-benefit {
  display: grid; grid-template-columns: 70px 1fr; gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--mhe-ink);
}
.mhe-benefit__number { font: 700 12px/1.3 var(--mhe-mono); }
.mhe-benefit h3 { margin: 0 0 8px; font-family: var(--mhe-serif); font-size: 32px; font-weight: 400; line-height: 1.05; }
.mhe-benefit p { margin: 0; font-size: 16px; }

.mhe-proof {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.35);
}
.mhe-proof__story { background: var(--mhe-violet); padding: 34px; min-height: 260px; }
.mhe-proof__story--wide { grid-column: 1 / -1; min-height: auto; background: #fff; color: var(--mhe-ink); }
.mhe-proof__story h3 { margin: 0 0 50px; font-family: var(--mhe-serif); font-size: 42px; font-weight: 400; line-height: 1; }
.mhe-proof__story p { max-width: 700px; margin: 0; }
.mhe-proof__story small { display: block; margin-top: 24px; font: 700 10px/1.45 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

.mhe-timeline { border-top: 1px solid var(--mhe-ink); }
.mhe-timeline__item {
  display: grid; grid-template-columns: 190px 105px 1fr; gap: 26px; align-items: start;
  padding: 27px 0; border-bottom: 1px solid var(--mhe-ink);
}
.mhe-timeline__date { font: 800 12px/1.45 var(--mhe-mono); letter-spacing: .05em; text-transform: uppercase; }
.mhe-timeline__phase { color: var(--mhe-violet-dark); font: 800 11px/1.45 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; }
.mhe-timeline__item h3 { margin: 0 0 6px; font-family: var(--mhe-serif); font-size: 29px; line-height: 1.08; font-weight: 400; }
.mhe-timeline__item p { margin: 0; font-size: 15px; }
.mhe-fine-print { max-width: 780px; margin: 28px 0 0 auto; font: 700 11px/1.65 var(--mhe-mono); color: var(--mhe-muted); }

.mhe-genres { display: flex; flex-wrap: wrap; gap: 11px; }
.mhe-chip { border: 1px solid currentColor; border-radius: 99px; padding: 10px 15px; font: 700 13px/1 var(--mhe-mono); }
.mhe-quote { max-width: 980px; margin: 70px 0 0 auto; font-family: var(--mhe-serif); font-size: clamp(35px, 5vw, 65px); line-height: 1.08; letter-spacing: -.035em; }
.mhe-quote small { display: block; margin-top: 22px; font: 700 12px/1.4 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; }

.mhe-human-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 10vw, 150px); }
.mhe-human-mark { width: 230px; height: 230px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; text-align: center; font: 900 15px/1.2 var(--mhe-mono); text-transform: uppercase; transform: rotate(7deg); }
.mhe-human-copy p { max-width: 720px; font-size: 21px; }
.mhe-human-list { list-style: none; padding: 0; margin: 35px 0 0; border-top: 1px solid rgba(255,255,255,.35); }
.mhe-human-list li { padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.35); font-weight: 700; }

.mhe-cta { text-align: center; }
.mhe-cta h2 { max-width: 1000px; margin-inline: auto; }
.mhe-cta p { max-width: 690px; margin: 30px auto 38px; font-size: 21px; }

.site-footer { background: var(--mhe-ink); color: #fff; padding: 65px 0 30px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 50px; padding-bottom: 60px; }
.site-footer__statement { max-width: 570px; margin: 18px 0 0; font-family: var(--mhe-serif); font-size: 30px; line-height: 1.15; }
.site-footer h2 { margin: 0 0 16px; font: 700 11px/1.3 var(--mhe-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mhe-acid); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--mhe-acid); }
.site-footer__base { border-top: 1px solid rgba(255,255,255,.25); padding-top: 22px; display: flex; justify-content: space-between; gap: 25px; font: 700 10px/1.5 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; }

.mhe-page-head { padding: 80px 0 60px; border-bottom: 1px solid var(--mhe-ink); }
.mhe-page-head h1 { max-width: 980px; margin: 0; font-family: var(--mhe-serif); font-size: clamp(52px, 8vw, 100px); line-height: .95; letter-spacing: -.055em; font-weight: 400; }
.mhe-content { width: min(calc(100% - 48px), var(--mhe-reading)); margin: 70px auto 110px; }
.mhe-content > * { margin-top: 0; margin-bottom: 1.4em; }
.mhe-content h2, .mhe-content h3 { margin-top: 1.7em; font-family: var(--mhe-serif); line-height: 1.08; letter-spacing: -.03em; }
.mhe-content h2 { font-size: 45px; }
.mhe-content h3 { font-size: 30px; }
.mhe-content blockquote { margin: 2.2em 0; padding: 0 0 0 24px; border-left: 5px solid var(--mhe-violet); font-family: var(--mhe-serif); font-size: 29px; line-height: 1.25; }
.mhe-content li { margin-bottom: .55em; }
.mhe-content h2[id] { scroll-margin-top: 32px; }
.mhe-document-status {
  margin-bottom: 42px; padding: 20px 22px; border: 1px solid var(--mhe-ink);
  background: var(--mhe-acid); box-shadow: 8px 8px 0 var(--mhe-ink); font-size: 15px;
}
.mhe-rules-intro { font-family: var(--mhe-serif); font-size: 27px; line-height: 1.35; }
.mhe-rules-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 42px 0 58px; padding: 20px;
  border: 1px solid var(--mhe-line); background: #fff;
}
.mhe-rules-nav strong { width: 100%; margin-bottom: 5px; font: 800 11px/1.4 var(--mhe-mono); letter-spacing: .09em; text-transform: uppercase; }
.mhe-rules-nav a { padding: 7px 10px; border: 1px solid var(--mhe-ink); font: 700 12px/1.3 var(--mhe-mono); text-decoration: none; }
.mhe-rules-nav a:hover { background: var(--mhe-violet); color: #fff; }
.mhe-table-wrap { overflow-x: auto; margin: 2.2em 0; }
.mhe-budget-table { width: 100%; min-width: 580px; border-collapse: collapse; background: #fff; }
.mhe-budget-table th, .mhe-budget-table td { padding: 14px 16px; border: 1px solid var(--mhe-ink); text-align: left; vertical-align: top; }
.mhe-budget-table thead th { background: var(--mhe-ink); color: #fff; font: 800 11px/1.4 var(--mhe-mono); letter-spacing: .08em; text-transform: uppercase; }
.mhe-budget-table td:last-child, .mhe-budget-table th:last-child { width: 190px; white-space: nowrap; }
.mhe-budget-table tfoot th { background: var(--mhe-acid); }

.mhe-posts { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--mhe-ink); border: 1px solid var(--mhe-ink); margin: 70px 0 110px; }
.mhe-post-card { background: var(--mhe-paper); padding: 34px; min-height: 280px; }
.mhe-post-card__meta { font: 700 11px/1.4 var(--mhe-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--mhe-muted); }
.mhe-post-card h2 { margin: 55px 0 15px; font-family: var(--mhe-serif); font-size: 34px; line-height: 1.05; font-weight: 400; }
.mhe-post-card h2 a { text-decoration: none; }
.mhe-post-card p { font-size: 15px; }
.nav-links { display: flex; gap: 12px; margin: 30px 0 80px; }
.nav-links a, .nav-links span { padding: 8px 12px; border: 1px solid var(--mhe-ink); }

.error404 .mhe-page-head h1 { font-size: clamp(80px, 16vw, 190px); color: var(--mhe-violet); }

@media (max-width: 900px) {
  .mhe-shell { width: min(calc(100% - 32px), var(--mhe-width)); }
  .site-header__inner { min-height: 82px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; grid-column: 1 / -1; padding-bottom: 22px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: flex-start; flex-direction: column; gap: 13px; }
  .mhe-hero__grid { grid-template-columns: 1fr; }
  .mhe-hero__main { border-right: 0; padding-right: 0; }
  .mhe-casefile { min-height: 420px; padding-left: 0; border-top: 1px solid var(--mhe-ink); }
  .mhe-casefile::before { inset: 0 -50vw; }
  .mhe-orbit { width: 270px; margin: 20px auto; }
  .mhe-section__head, .mhe-prize-grid, .mhe-human-grid, .mhe-author-promise { grid-template-columns: 1fr; }
  .mhe-author-promise__note { position: static; }
  .mhe-timeline__item { grid-template-columns: 150px 90px 1fr; }
  .mhe-beliefs { grid-template-columns: 1fr; }
  .mhe-belief { min-height: 230px; border-right: 0; border-bottom: 1px solid currentColor; }
  .mhe-belief:last-child { border-bottom: 0; }
  .mhe-human-mark { width: 180px; height: 180px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .mhe-statusbar__inner { min-height: 44px; }
  .mhe-statusbar__inner > span:last-child { display: none; }
  .site-brand__mark { width: 36px; height: 36px; }
  .site-brand__books { display: none; }
  .mhe-hero__grid { min-height: auto; }
  .mhe-hero h1 { font-size: clamp(50px, 17vw, 74px); }
  .mhe-actions { align-items: stretch; flex-direction: column; }
  .mhe-button { width: 100%; }
  .mhe-section__head { margin-bottom: 40px; }
  .mhe-status-row { grid-template-columns: 1fr; gap: 5px; }
  .mhe-posts { grid-template-columns: 1fr; }
  .mhe-proof { grid-template-columns: 1fr; }
  .mhe-proof__story--wide { grid-column: auto; }
  .mhe-benefit { grid-template-columns: 45px 1fr; }
  .mhe-timeline__item { grid-template-columns: 1fr; gap: 7px; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__brand { grid-column: auto; }
  .site-footer__base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
