/*
Theme Name: Meadow Signal
Author: Rowan Hale
Description: A classic WordPress theme for editorial field notes, clean energy stories, and flexible PBN publishing.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: kbr-theme
*/

:root {
  --kbr-bg: #fbf9f3;
  --kbr-text: #080808;
  --kbr-muted: #5e625e;
  --kbr-soft: #ffffff;
  --kbr-line: rgba(12, 12, 12, 0.1);
  --kbr-forest: #17231c;
  --kbr-olive: #4b5d24;
  --kbr-lime: #ddff25;
  --kbr-lime-soft: #eff7bc;
  --kbr-radius: 14px;
  --kbr-radius-sm: 8px;
  --kbr-shadow: 0 22px 55px rgba(20, 24, 21, 0.08);
  --kbr-font: Geist, Inter, Arial, Helvetica, sans-serif;
  --kbr-category-font: "Arial Narrow", "Roboto Condensed", "Barlow Condensed", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--kbr-bg);
  color: var(--kbr-text);
  font-family: var(--kbr-font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.kbr-body {
  min-height: 100vh;
}

.kbr-skip-link {
  background: var(--kbr-text);
  border-radius: 0 0 var(--kbr-radius-sm) var(--kbr-radius-sm);
  color: #fff;
  left: 20px;
  padding: 10px 14px;
  position: absolute;
  top: -48px;
  transition: top 0.2s ease;
  z-index: 1000;
}

.kbr-skip-link:focus {
  top: 0;
}

.kbr-sr-only {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.kbr-header {
  padding: 22px 0 10px;
  position: relative;
  z-index: 50;
}

.kbr-header__inner {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  gap: 22px;
  margin: 0 auto;
  max-width: 1360px;
  padding: 0 46px;
}

.kbr-brand {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  justify-self: start;
}

.kbr-brand__mark {
  color: var(--kbr-olive);
  display: inline-flex;
  height: 34px;
  width: 31px;
}

.kbr-brand__text {
  color: var(--kbr-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.kbr-nav {
  align-items: center;
  display: flex;
  justify-content: center;
}

.kbr-nav__list {
  align-items: center;
  display: flex;
  gap: 34px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.kbr-nav__link {
  align-items: center;
  color: #1263ff;
  display: inline-flex;
  font-family: var(--kbr-category-font);
  font-size: 15px;
  font-stretch: condensed;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.01em;
  min-height: 44px;
  white-space: nowrap;
}

.kbr-nav__link::after {
  border-bottom: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  height: 6px;
  margin-top: -3px;
  transform: rotate(45deg);
  width: 6px;
}

.kbr-nav__item--current .kbr-nav__link {
  color: #ff5a2a;
  font-weight: 800;
}

.kbr-header__button,
.kbr-button {
  align-items: center;
  background: #080808;
  border: 1px solid #080808;
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 27px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.kbr-header__button {
  justify-self: end;
}

.kbr-header__button:hover,
.kbr-button:hover {
  transform: translateY(-1px);
}

.kbr-menu-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--kbr-text);
  cursor: pointer;
  display: none;
  height: 44px;
  justify-content: center;
  justify-self: end;
  padding: 0;
  width: 44px;
}

.kbr-menu-toggle__line {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  margin: 5px 0;
  width: 27px;
}

.kbr-main {
  min-height: 70vh;
}

.kbr-hero {
  margin: 0 auto;
  max-width: 1360px;
  padding: 46px 46px 28px;
}

.kbr-hero-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.kbr-hero__intro {
  align-self: end;
  grid-column: 1 / 7;
  min-height: 180px;
  padding: 0 0 12px 12px;
}

.kbr-hero__title {
  font-size: clamp(48px, 5vw, 66px);
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.03;
  margin: 0;
  max-width: 640px;
}

.kbr-hero__text {
  color: var(--kbr-muted);
  font-size: 18px;
  line-height: 1.45;
  margin: 16px 0 0;
  max-width: 580px;
}

.kbr-mosaic-tile {
  border-radius: var(--kbr-radius);
  min-height: 158px;
  overflow: hidden;
  position: relative;
}

.kbr-mosaic-tile img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.kbr-mosaic-tile--wind {
  grid-column: 7 / 10;
  min-height: 205px;
}

.kbr-mosaic-tile--smart {
  grid-column: 10 / 13;
  min-height: 205px;
}

.kbr-mosaic-tile--field {
  grid-column: 1 / 7;
  min-height: 252px;
}

.kbr-mosaic-tile--solar {
  grid-column: 1 / 7;
  min-height: 160px;
}

.kbr-mosaic-tile--irrigation {
  grid-column: 7 / 13;
  min-height: 160px;
}

.kbr-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--kbr-radius-sm);
  color: #222;
  display: inline-flex;
  font-family: var(--kbr-category-font);
  font-size: 13px;
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  min-height: 34px;
  padding: 0 13px;
}

.kbr-mosaic-tile .kbr-chip {
  left: 13px;
  position: absolute;
  top: 13px;
  z-index: 2;
}

.kbr-lime-card {
  background: var(--kbr-lime);
  border-radius: var(--kbr-radius);
  display: flex;
  flex-direction: column;
  grid-column: 7 / 9;
  justify-content: space-between;
  min-height: 160px;
  padding: 20px;
}

.kbr-lime-card__top {
  align-items: center;
  display: flex;
  gap: 14px;
}

.kbr-lime-card__icon {
  align-items: center;
  background: #070707;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.kbr-lime-card__title {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
}

.kbr-lime-card__line {
  background: rgba(0, 0, 0, 0.18);
  height: 1px;
  margin: 10px 0;
  width: 100%;
}

.kbr-lime-card__value {
  font-size: 36px;
  font-weight: 760;
  line-height: 1;
}

.kbr-lime-card__label {
  font-size: 14px;
  margin-top: 4px;
}

.kbr-mini-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--kbr-line);
  border-radius: var(--kbr-radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  padding: 21px;
}

.kbr-mini-card--one {
  grid-column: 9 / 11;
}

.kbr-mini-card--two {
  grid-column: 11 / 13;
}

.kbr-mini-card__icon {
  color: #070707;
  height: 34px;
  width: 34px;
}

.kbr-mini-card__value {
  display: block;
  font-size: 35px;
  font-weight: 760;
  line-height: 1;
}

.kbr-mini-card__label {
  color: #1d1d1d;
  display: block;
  font-size: 14px;
  margin-top: 8px;
}

.kbr-section {
  margin: 0 auto;
  max-width: 1360px;
  padding: 0 46px 74px;
}

.kbr-section__head {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 0 12px;
}

.kbr-section__title {
  font-size: 26px;
  font-weight: 760;
  line-height: 1.1;
  margin: 0;
}

.kbr-section__link {
  align-items: center;
  color: #111;
  display: inline-flex;
  font-size: 14px;
  gap: 12px;
  min-height: 40px;
}

.kbr-section__link::after {
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  content: "";
  height: 8px;
  transform: rotate(45deg);
  width: 8px;
}

.kbr-post-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kbr-post-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(11, 11, 11, 0.05);
  border-radius: var(--kbr-radius-sm);
  box-shadow: 0 18px 44px rgba(20, 24, 21, 0.06);
  overflow: hidden;
}

.kbr-post-card__image {
  aspect-ratio: 1.88 / 1;
  background: #e7eadf;
  overflow: hidden;
  position: relative;
}

.kbr-post-card__image-link {
  display: block;
  height: 100%;
}

.kbr-post-card__image img,
.kbr-post-card__image-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  width: 100%;
}

.kbr-post-card:hover .kbr-post-card__image img {
  transform: scale(1.025);
}

.kbr-post-card .kbr-chip {
  left: 13px;
  position: absolute;
  top: 13px;
  z-index: 2;
}

.kbr-post-card__body {
  padding: 16px 14px 20px;
}

.kbr-post-card__date {
  color: var(--kbr-muted);
  display: block;
  font-size: 13px;
  margin: 0 0 8px;
}

.kbr-post-card__title {
  font-size: 20px;
  font-weight: 710;
  line-height: 1.22;
  margin: 0;
}

.kbr-post-card__title a:hover,
.kbr-entry__content a:hover {
  color: var(--kbr-olive);
}

.kbr-post-card__excerpt {
  color: var(--kbr-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.kbr-archive-hero,
.kbr-single-hero {
  margin: 0 auto;
  max-width: 1360px;
  padding: 94px 46px 46px;
}

.kbr-archive-hero__title,
.kbr-single-hero__title {
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 740;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  max-width: 980px;
}

.kbr-archive-hero__text,
.kbr-single-hero__meta {
  color: var(--kbr-muted);
  font-size: 18px;
  margin: 14px 0 0;
}

.kbr-archive-grid {
  margin: 0 auto;
  max-width: 1360px;
  padding: 0 46px 80px;
}

.kbr-single-shell {
  margin: 0 auto 86px;
  width: min(80vw, 1040px);
}

.kbr-entry {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--kbr-line);
  border-radius: var(--kbr-radius);
  padding: clamp(28px, 5vw, 64px);
}

.kbr-entry__content {
  color: #171717;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.72;
}

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

.kbr-entry__content > *:last-child {
  margin-bottom: 0;
}

.kbr-entry__content h2,
.kbr-entry__content h3,
.kbr-entry__content h4 {
  line-height: 1.15;
  margin: 1.6em 0 0.55em;
}

.kbr-entry__content p,
.kbr-entry__content ul,
.kbr-entry__content ol {
  margin: 0 0 1.15em;
}

.kbr-entry__content a {
  color: #0a0a0a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.kbr-entry__content img {
  border-radius: var(--kbr-radius);
}

.kbr-post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

.kbr-post-nav a {
  color: var(--kbr-olive);
  font-weight: 650;
}

.kbr-empty {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--kbr-line);
  border-radius: var(--kbr-radius);
  padding: 32px;
}

.kbr-footer {
  background: var(--kbr-forest);
  color: #fff;
  margin-top: 30px;
}

.kbr-footer__inner {
  align-items: start;
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr auto;
  margin: 0 auto;
  max-width: 1360px;
  padding: 52px 46px;
}

.kbr-footer .kbr-brand__text,
.kbr-footer .kbr-brand {
  color: #fff;
}

.kbr-footer .kbr-brand__mark {
  color: var(--kbr-lime);
}

.kbr-footer__text {
  color: rgba(255, 255, 255, 0.72);
  margin: 14px 0 0;
  max-width: 420px;
}

.kbr-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: flex-end;
  max-width: 520px;
}

.kbr-footer__nav a {
  color: rgba(255, 255, 255, 0.84);
}

.kbr-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.64);
  margin: 0 auto;
  max-width: 1360px;
  padding: 20px 46px 28px;
}

@media (max-width: 1120px) {
  .kbr-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  .kbr-nav {
    justify-content: center;
  }

  .kbr-nav__list {
    gap: 20px;
  }

  .kbr-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kbr-hero-board {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .kbr-hero__intro,
  .kbr-mosaic-tile--field,
  .kbr-mosaic-tile--solar,
  .kbr-mosaic-tile--irrigation {
    grid-column: 1 / 7;
  }

  .kbr-mosaic-tile--wind,
  .kbr-lime-card,
  .kbr-mini-card--one {
    grid-column: 1 / 3;
  }

  .kbr-mosaic-tile--smart,
  .kbr-mini-card--two {
    grid-column: 3 / 5;
  }

  .kbr-mosaic-tile--wind,
  .kbr-mosaic-tile--smart {
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .kbr-header {
    padding-top: 12px;
  }

  .kbr-header__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 18px;
  }

  .kbr-brand__text {
    font-size: 23px;
  }

  .kbr-brand__mark {
    height: 30px;
    width: 27px;
  }

  .kbr-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .kbr-header__button {
    display: none;
  }

  .kbr-nav {
    align-items: stretch;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--kbr-line);
    border-radius: var(--kbr-radius);
    box-shadow: var(--kbr-shadow);
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding: 8px;
  }

  .kbr-nav.kbr-nav--open {
    display: flex;
  }

  .kbr-nav__list {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .kbr-nav__link {
    justify-content: space-between;
    padding: 8px 10px;
    width: 100%;
  }

  .kbr-hero,
  .kbr-section,
  .kbr-archive-hero,
  .kbr-single-hero,
  .kbr-archive-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .kbr-hero {
    padding-top: 38px;
  }

  .kbr-hero-board {
    display: flex;
    flex-direction: column;
  }

  .kbr-hero__intro {
    min-height: 0;
    padding: 0 0 14px;
  }

  .kbr-hero__title {
    font-size: 44px;
  }

  .kbr-hero__text {
    font-size: 16px;
  }

  .kbr-mosaic-tile,
  .kbr-lime-card,
  .kbr-mini-card {
    min-height: 178px;
  }

  .kbr-mosaic-tile--field {
    min-height: 230px;
  }

  .kbr-section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

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

  .kbr-archive-hero,
  .kbr-single-hero {
    padding-top: 56px;
  }

  .kbr-single-shell {
    width: 80vw;
  }

  .kbr-entry {
    padding: 24px;
  }

  .kbr-footer__inner {
    grid-template-columns: 1fr;
    padding: 42px 18px;
  }

  .kbr-footer__nav {
    justify-content: flex-start;
  }

  .kbr-footer__bottom {
    padding-left: 18px;
    padding-right: 18px;
  }
}
