/*
Theme Name: Regen Institute
Theme URI: https://regenmarketing.org
Author: The Regenerative Marketing Institute
Description: Classic theme for The Regenerative Marketing Institute. Institutional-archive typography, warm near-white ground, sage and rust accents. Page templates for Institute, Services, Research, Common Home and Contact; body copy is edited in the WordPress editor.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: regen-institute
*/

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #1c1f1b;
  --ink-2: #1c1f1b;
  --ink-3: #1c1f1b;
  --ink-4: #2b2f29;
  --ink-5: #3b403a;
  --rule: rgba(28, 31, 27, 0.12);
  --rule-2: rgba(28, 31, 27, 0.24);
  --sage: #5b7346;
  --rust: #b8551f;
  --sans: 'Archivo', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: 32px;
  --maxw: 1280px;
}

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

html, body { margin: 0; padding: 0; }

/* Force a pure white ground regardless of plugin or builder styles. */
html, body, .site, .site-main, .section, .section--panel, .wrap,
.entry-content, .wp-site-blocks, .hair > *, .site-footer {
  background-color: #fff;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rust); text-decoration: none; }
a:hover, a:focus { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
::placeholder { color: var(--ink-5); }
::selection { background: var(--sage); color: var(--bg); }

.screen-reader-text {
  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: 999;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; clip: auto; width: auto; height: auto;
  font-family: var(--mono); font-size: 12px;
}

/* ---------- layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }
.section { border-bottom: 1px solid var(--rule); }
.section--panel { background: var(--panel); }
.section__inner { padding: 56px 0; }
.section__inner--tight { padding: 48px 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 32px; min-height: 104px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding-right: 24px; border-right: 1px solid var(--rule);
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 22px; height: 22px; border: 1.5px solid var(--sage);
  border-radius: 50%; position: relative; flex: none;
}
.brand__mark::after {
  content: ''; position: absolute; inset: 5px;
  background: var(--rust); border-radius: 50%;
}
.brand__name {
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: -0.01em; line-height: 1.15;
}
.brand__logo { border-right: 1px solid var(--rule); padding-right: 24px; }
.brand__logo img { height: 60px; max-height: 60px; width: auto; }
.footer-brand__logo { width: 400px; max-width: 100%; height: auto; margin-bottom: 16px; }

.nav { display: flex; align-items: stretch; flex: 1; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: stretch; gap: 4px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.nav li { display: flex; }
.nav a {
  display: flex; align-items: center; padding: 0 14px;
  color: var(--ink-3); position: relative;
}
.nav a:hover { color: var(--ink); }
.nav .current-menu-item > a::after,
.nav .current_page_item > a::after,
.nav a[aria-current='page']::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--rust);
}

.header__actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule-2);
  padding: 9px 14px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  padding: 14px 22px; border: 1px solid transparent; cursor: pointer;
}
.btn--sm { padding: 9px 16px; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--sage); color: var(--bg); }
.btn--rust { background: var(--rust); color: var(--bg); }
.btn--rust:hover { background: var(--ink); color: var(--bg); }
.btn--ghost { border-color: var(--rule-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage); margin: 0 0 28px;
}
.label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-5);
}
.section-title {
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage); margin: 0;
}
.h-xl {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(40px, 6.2vw, 92px); line-height: 0.96;
  letter-spacing: -0.035em; margin: 0 0 32px; text-wrap: balance;
}
.h-lg {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02;
  letter-spacing: -0.03em; margin: 0; text-wrap: balance;
}
.h-md {
  font-family: var(--sans); font-weight: 600; font-size: 34px;
  letter-spacing: -0.025em; margin: 0 0 10px;
}
.h-sm {
  font-family: var(--sans); font-weight: 600; font-size: 26px;
  letter-spacing: -0.02em; margin: 0;
}
.lede { font-size: 22px; line-height: 1.5; color: var(--ink-2); margin: 0 0 40px; max-width: 34em; text-wrap: pretty; }
.lede--sm { font-size: 19px; line-height: 1.6; color: var(--ink-3); margin: 0; }
.statement { font-size: 24px; line-height: 1.42; letter-spacing: -0.01em; margin: 0 0 20px; text-wrap: pretty; }
.body-muted { font-size: 17px; line-height: 1.6; color: var(--ink-3); margin: 0; }

/* ---------- home hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.hero__main { padding: 88px 64px 72px 0; border-right: 1px solid var(--rule); }
.hero__aside {
  padding: 88px 0 72px 48px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}

.spectrum { display: grid; grid-template-columns: repeat(4, 1fr); }
.spectrum__cell { padding: 16px 8px 0 0; border-top: 2px solid var(--rule); }
.spectrum__cell--2 { border-top-color: rgba(28, 31, 27, 0.3); }
.spectrum__cell--3 { border-top-color: var(--sage); }
.spectrum__cell--4 { border-top-color: var(--rust); }
.spectrum__num { font-family: var(--mono); font-size: 10px; color: var(--ink-5); }
.spectrum__cell--3 .spectrum__num { color: var(--sage); }
.spectrum__cell--4 .spectrum__num { color: var(--rust); }
.spectrum__name {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  margin-top: 6px; color: var(--ink-4);
}
.spectrum__cell--3 .spectrum__name { color: var(--ink-2); }
.spectrum__cell--4 .spectrum__name { color: var(--ink); }

.aside-head { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.aside-foot { border-top: 1px solid var(--rule); padding-top: 20px; }
.aside-note { font-size: 16px; line-height: 1.55; color: var(--ink-4); margin: 20px 0 0; }

.latest__title {
  font-family: var(--sans); font-size: 17px; font-weight: 500;
  line-height: 1.25; letter-spacing: -0.01em; color: var(--ink);
}
a:hover .latest__title { color: var(--rust); }
.latest__meta { font-size: 15px; color: var(--ink-4); margin-top: 6px; }

/* ---------- index rows ---------- */

.index-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; padding: 56px 0 24px;
}
.link-mono {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.link-mono:hover { color: var(--ink); }

.index-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr) 40px;
  gap: 24px; align-items: start; padding: 26px 0;
  border-top: 1px solid var(--rule); color: var(--ink);
}
.index-row:last-of-type { border-bottom: 1px solid var(--rule); }
.index-row:hover { background: #f7f6f2; color: var(--ink); }
.index-row__num { font-family: var(--mono); font-size: 11px; color: var(--ink-5); padding-top: 4px; }
.index-row__text { font-size: 17px; line-height: 1.55; color: var(--ink-3); margin: 2px 0 0; }
.index-row__arrow { text-align: right; color: var(--ink-5); font-size: 18px; }

/* ---------- hairline card grids ---------- */

.hair {
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
}
.hair--open { border: none; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hair--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hair--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hair--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hair--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hair--rows { grid-template-columns: minmax(0, 1fr); }
.hair > * { background: var(--bg); }
.section--panel .hair > * { background: var(--panel); }

.card { padding: 26px 22px 30px; }
.card__title { font-family: var(--sans); font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.card__text { font-size: 16px; line-height: 1.55; color: var(--ink-4); margin: 0; }

.pub { padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.pub:hover { background: #f7f6f2; }
.pub__title {
  font-family: var(--sans); font-weight: 600; font-size: 19px;
  line-height: 1.2; letter-spacing: -0.015em; flex: 1; color: var(--ink);
}
.pub__meta { font-size: 15px; color: var(--ink-4); }

.level { padding: 22px 24px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: baseline; }
.level__name { font-family: var(--sans); font-weight: 600; font-size: 15px; }
.level__name--systems { color: var(--rust); }
.level__name--brand { color: var(--sage); }
.level__name--community { color: var(--ink); }
.level__text { font-size: 16px; line-height: 1.5; color: var(--ink-3); }

/* ---------- split blocks ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.split--start { align-items: start; }
.split--why { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
.split--rail { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.split--person { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }
.split--form { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 80px; align-items: start; }
.split--event { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }

/* ---------- research ---------- */

.table-head {
  display: grid; grid-template-columns: 88px minmax(0, 1.4fr) minmax(0, 1fr) 120px;
  gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--rule-2);
}
.table-head span:last-child { text-align: right; }
.table-row {
  display: grid; grid-template-columns: 88px minmax(0, 1.4fr) minmax(0, 1fr) 120px;
  gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.table-row__year { font-family: var(--mono); font-size: 12px; color: var(--sage); }
.table-row__title { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -0.015em; line-height: 1.25; }
.table-row__authors { font-size: 16px; color: var(--ink-3); }
.table-row__format { text-align: right; }

.frame { padding: 24px; min-height: 220px; display: flex; flex-direction: column; gap: 12px; }
.frame__bar { height: 4px; background: var(--rule); }
.frame--2 .frame__bar { background: rgba(28, 31, 27, 0.3); }
.frame--3 .frame__bar { background: var(--sage); }
.frame--4 .frame__bar { background: var(--rust); }
.frame__step { font-family: var(--mono); font-size: 10px; color: var(--ink-5); }
.frame--3 .frame__step { color: var(--sage); }
.frame--4 .frame__step { color: var(--rust); }
.frame__title { font-family: var(--sans); font-weight: 600; font-size: 18px; letter-spacing: -0.015em; }
.frame__text { font-size: 15px; line-height: 1.55; color: var(--ink-4); margin: 0; }
.frame--4 .frame__text { color: var(--ink-2); }

.journal { border: 1px solid var(--rule); padding: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.journal__form { display: flex; border: 1px solid var(--rule-2); }
.journal__form input[type='email'] { flex: 1; background: transparent; border: none; outline: none; padding: 16px; font-size: 17px; }
.journal__form button { white-space: nowrap; }

/* ---------- media placeholder ---------- */

.media-slot {
  border: 1px solid var(--rule);
  background: repeating-linear-gradient(135deg, #fff 0 8px, #f2f2f2 8px 16px);
  display: flex; align-items: flex-end; padding: 16px;
}
.media-slot--portrait { aspect-ratio: 4 / 5; }
.media-slot--square { aspect-ratio: 1 / 1; }
.media-slot img { width: 100%; height: 100%; object-fit: cover; }
.media-slot.has-image { padding: 0; background: none; border: none; }

/* ---------- person ---------- */

.person__name { font-family: var(--sans); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; margin-bottom: 6px; }
.person__role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust); margin-bottom: 20px; }
.person__bio { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; max-width: 44em; }

/* ---------- contact ---------- */

.form-grid { display: grid; gap: 24px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 1px solid var(--rule-2);
  outline: none; padding: 14px; font-size: 17px; font-family: var(--serif);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.chip { padding: 11px 16px; border: 1px solid var(--rule-2); cursor: pointer; background: none; }
.chip:hover, .chip[aria-pressed='true'] { border-color: var(--sage); color: var(--sage); }
.contact-detail { padding: 24px; }
.contact-detail a { font-size: 18px; }
.notice { border: 1px solid var(--sage); padding: 40px; }
.notice__title { font-family: var(--sans); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin-bottom: 10px; }

/* ---------- editor content ---------- */

.prose { max-width: 44em; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--sans); font-weight: 600; font-size: 30px; letter-spacing: -0.025em; line-height: 1.15; color: var(--ink); margin-top: 1.8em; }
.prose h3 { font-family: var(--sans); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; color: var(--ink); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-left: 2px solid var(--sage); margin-left: 0; padding-left: 24px; font-size: 22px; line-height: 1.45; color: var(--ink); }
.prose figcaption, .prose .wp-caption-text { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-5); }
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.alignwide { max-width: none; }

/* ---------- archive / single ---------- */

.entry-list { display: grid; gap: 1px; background: var(--rule); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.entry-row { background: var(--bg); padding: 28px 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 32px; align-items: baseline; }
.entry-row__title { font-family: var(--sans); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; }
.entry-row__excerpt { font-size: 17px; color: var(--ink-3); margin: 8px 0 0; }
.pagination { display: flex; gap: 12px; padding: 32px 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--rule); background: var(--panel); }
.site-footer__inner { padding: 48px 0 32px; }
.footer-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 48px; }
.footer-brand__name { font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.3; margin-bottom: 12px; }
.footer-brand__text { font-size: 16px; line-height: 1.55; color: var(--ink-4); margin: 0; max-width: 26em; }
.footer-col { display: grid; gap: 10px; align-content: start; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-col__head { color: var(--ink-5); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-3); }
.footer-col a:hover { color: var(--ink); }
.footer-col .widget, .footer-brand .widget { display: contents; }
.footer-col .widget_text p, .footer-brand .widget_text p { margin: 0; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-5);
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .hair--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hair--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__main { padding: 56px 0 40px; border-right: none; border-bottom: 1px solid var(--rule); }
  .hero__aside { padding: 40px 0 56px; }
  .split, .split--why, .split--rail, .split--person, .split--form, .split--event { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .index-row { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; }
  .index-row__arrow { display: none; }
  .journal { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 28px; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 72px minmax(0, 1fr); gap: 16px 20px; }
  .table-row__format { text-align: left; }
  .entry-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (max-width: 720px) {
  .hair--5, .hair--4, .hair--3, .hair--2 { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px 0;
  }
  .nav.is-open ul { flex-direction: column; gap: 0; }
  .nav.is-open a { padding: 14px var(--gutter); }
  .nav-toggle { display: block; }
  .h-xl { font-size: clamp(34px, 10vw, 52px); }
  .level { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .spectrum { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
}

@media print {
  .site-header, .nav-toggle, .btn { position: static; }
  body { background: #fff; }
}
