/*
Theme Name: Stop The Rot
Theme URI: https://stop-the-rot.org/
Description: Astra child theme — calmer editorial styling that matches the Stop The Rot homepage without the poster treatment.
Author: Stop The Rot
Template: astra
Version: 1.0.6
*/

:root {
  --str-ink: #140c08;
  --str-ink-2: #1c140f;
  --str-paper: #faf6ee;
  --str-paper-page: #efe6d6;
  --str-paper-dim: #d9ccb4;
  --str-rust: #c4491d;
  --str-rust-hot: #e25a24;
  --str-blue: #1f6feb;
  --str-blue-deep: #1554c0;
  --str-muted: #6d6256;
}

body,
button,
input,
select,
textarea {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--str-ink-2);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.entry-title a,
.site-title,
.site-title a,
.ast-archive-title {
  color: var(--str-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
}

.ast-separate-container,
.ast-separate-container .site-content {
  background-color: var(--str-paper-page) !important;
}

#page {
  background: var(--str-paper-page);
}

/* Header */
.site-header,
.main-header-bar,
.ast-primary-header-bar,
.ast-mobile-header-wrap,
.ast-main-header-wrap,
header .ast-builder-grid-row-container {
  background: var(--str-paper) !important;
}

.main-header-bar,
.ast-primary-header-bar {
  border-bottom: 1px solid rgba(20, 12, 8, 0.1);
  box-shadow: 0 1px 0 rgba(196, 73, 29, 0.35);
}

.site-title,
.site-title a {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--str-ink) !important;
}

.main-header-menu a,
.ast-header-account-wrap,
.ast-builder-menu a {
  font-family: "Barlow", Helvetica, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
  color: var(--str-ink) !important;
}

.main-header-menu .current-menu-item > a,
.main-header-menu a:hover,
.main-header-menu a:focus {
  color: var(--str-blue) !important;
}

.ast-mobile-menu-buttons button,
.menu-toggle,
.main-header-menu-toggle {
  color: var(--str-ink) !important;
}

/* Cards / posts */
.blog .ast-article-inner,
.archive .ast-article-inner,
.search .ast-article-inner {
  background: var(--str-paper);
  border: 1px solid rgba(20, 12, 8, 0.08);
  border-top: 3px solid var(--str-rust);
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(20, 12, 8, 0.06);
}

.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-single:not(.ast-related-post),
.ast-separate-container .ast-404-layout-1,
.ast-separate-container .no-results,
.ast-separate-container .comments-area,
.ast-separate-container .comment-respond {
  background: var(--str-paper) !important;
  border: 1px solid rgba(20, 12, 8, 0.08);
  border-top: 3px solid var(--str-rust);
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(20, 12, 8, 0.05);
}

.ast-blog-single-element.ast-taxonomy-container a,
.cat-links a,
.entry-content .taxonomy-category a {
  font-family: "Barlow", Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem !important;
  color: var(--str-rust) !important;
}

.entry-title a:hover,
.entry-title a:focus {
  color: var(--str-blue);
}

.ast-blog-meta-container,
.entry-meta,
.entry-meta * {
  font-family: "Barlow", Helvetica, sans-serif;
  font-weight: 600;
  color: var(--str-muted) !important;
}

.entry-meta a {
  color: var(--str-blue) !important;
}

/* Archive banner — less empty white slab */
.ast-archive-description,
.ast-separate-container .ast-archive-description,
body.archive .ast-archive-description {
  background: var(--str-paper) !important;
  border: 1px solid rgba(20, 12, 8, 0.08);
  border-left: 4px solid var(--str-rust);
  box-shadow: none;
  padding: 1em 1.35em !important;
  min-height: 0;
}

.ast-archive-title {
  font-size: 1.85rem;
  margin: 0;
}

.ast-archive-description p:empty {
  display: none;
}

/* Inner pages */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.7;
}

.entry-content a {
  color: var(--str-blue);
}

.entry-content a:hover {
  color: var(--str-blue-deep);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.4em;
}

.page .entry-header .entry-title,
.single .entry-header .entry-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
}

/* Buttons / search / comments — not the mobile menu toggle */
button:not(.menu-toggle):not(.main-header-menu-toggle):not(.ast-menu-toggle):not(.menu-toggle-close),
.ast-button,
input[type="submit"],
.search-submit,
.wp-block-search__button {
  background-color: var(--str-blue) !important;
  border-color: var(--str-blue) !important;
  font-family: "Barlow", Helvetica, sans-serif !important;
  font-weight: 700 !important;
  border-radius: 4px;
}

button:not(.menu-toggle):not(.main-header-menu-toggle):not(.ast-menu-toggle):not(.menu-toggle-close):hover,
.ast-button:hover,
input[type="submit"]:hover {
  background-color: var(--str-blue-deep) !important;
  border-color: var(--str-blue-deep) !important;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  background: #fff;
  border: 1px solid rgba(20, 12, 8, 0.16);
}

@media (min-width: 922px) {
  .archive .ast-blog-layout-4-grid .ast-article-post:first-child:last-child {
    width: 50%;
    max-width: 28rem;
  }
}

/* Footer */
.site-footer,
.ast-footer-overlay,
.ast-small-footer,
footer .site-primary-footer-wrap,
footer .site-below-footer-wrap,
.site-below-footer-wrap[data-section="section-below-footer-builder"] {
  background: var(--str-ink) !important;
  color: var(--str-paper-dim);
  border-top-color: #3a2418 !important;
}

.site-footer a,
.ast-footer-copyright,
.ast-footer-copyright a {
  color: var(--str-paper) !important;
  font-family: "Barlow", Helvetica, sans-serif;
}

.site-footer a:hover {
  color: #fff !important;
}

.ast-footer-copyright,
.ast-footer-copyright.site-footer-focus-item {
  color: var(--str-paper-dim) !important;
  letter-spacing: 0.03em;
}

.ast-footer-copyright p {
  font-size: 0;
}

.ast-footer-copyright p::before {
  content: "Copyright © 2026 Stop The Rot";
  font-size: 1rem;
  font-family: "Barlow", Helvetica, sans-serif;
}

.ast-footer-copyright a {
  display: none !important;
}

/* 404 */
.error404 .page-title,
.search .page-title {
  font-family: "Source Serif 4", Georgia, serif;
}

@media (max-width: 921px) {
  .ast-mobile-popup-content,
  .ast-mobile-header-content {
    background: var(--str-paper);
  }

  /* Phone menu control: hamburger + Menu, not a blue square */
  .ast-button-wrap .main-header-menu-toggle,
  .menu-toggle.main-header-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 6px 12px 6px 10px !important;
    background: #fff !important;
    border: 1px solid rgba(20, 12, 8, 0.22) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    color: var(--str-ink) !important;
    line-height: 1;
  }

  .ast-button-wrap .main-header-menu-toggle:hover,
  .ast-button-wrap .main-header-menu-toggle:focus,
  .menu-toggle.main-header-menu-toggle:hover {
    background: #fff !important;
    border-color: var(--str-ink) !important;
    color: var(--str-ink) !important;
  }

  .main-header-menu-toggle .ast-mobile-svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .main-header-menu-toggle .mobile-menu-toggle-icon::after {
    content: "Menu";
    font-family: "Barlow", Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .main-header-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-icon::after,
  .main-header-menu-toggle.toggled .mobile-menu-toggle-icon::after {
    content: "Close";
  }
}

/* Pages use Astra plain-container, not separate-container */
.page.ast-plain-container,
.page.ast-plain-container .site-content {
  background: var(--str-paper-page) !important;
}

.page .ast-article-single {
  max-width: 48rem;
  margin: 2.25em auto 3em;
  padding: 2em 2.2em !important;
  background: var(--str-paper) !important;
  border: 1px solid rgba(20, 12, 8, 0.08);
  border-top: 3px solid var(--str-rust);
  box-shadow: 0 10px 28px rgba(20, 12, 8, 0.05);
}

body.archive .ast-archive-description {
  max-width: 28rem;
  width: auto;
}

/* Contact page — topic key for the form dropdown */
.contact-topics {
  margin: 1.25em 0 1.85em;
  padding: 1em 1.15em 1.05em;
  border: 1px solid rgba(20, 12, 8, 0.18);
  background: rgba(20, 12, 8, 0.035);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--str-muted);
}

.entry-content .contact-topics > h2 {
  margin: 0 0 0.85em;
  font-family: "Barlow", Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--str-rust);
}

.contact-topics dl {
  margin: 0;
}

.contact-topics dt {
  margin: 0.75em 0 0;
  font-family: "Barlow", Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--str-ink);
}

.contact-topics dt:first-of-type {
  margin-top: 0;
}

.contact-topics dd {
  margin: 0.2em 0 0;
  padding: 0;
}

.contact-topics .note {
  margin: 0.9em 0 0;
  font-size: 0.88rem;
}

/* Contribute / donation buttons */
.str-donate {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.4em 0 1.1em;
}

.str-donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 4px;
  font-family: "Barlow", Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none !important;
}

.str-donate-btn.primary {
  background: var(--str-rust);
  color: #fff !important;
}

.str-donate-btn.primary:hover,
.str-donate-btn.primary:focus-visible {
  background: var(--str-rust-hot);
}

.str-donate-btn.secondary {
  background: transparent;
  color: var(--str-ink) !important;
  border: 1px solid rgba(20, 12, 8, 0.28);
}

.str-donate-btn.secondary:hover,
.str-donate-btn.secondary:focus-visible {
  background: rgba(20, 12, 8, 0.05);
}

.str-donate-note {
  font-size: 0.92rem;
  color: var(--str-muted);
}
