/* =====================================================================
   MADCAT shared styles
   ---------------------------------------------------------------------
   Loaded by every page through site_head() in includes/site.php.
   Anything used on more than one page lives here: colors, the hero
   band, the main column, teaser cards, Stay Connected links, the footer
   and the back-to-top paw. Styles used by only one page stay in that
   page's own <style> block.
   ===================================================================== */

:root {
  --forest: #2F5233;
  --forest-dark: #223d26;
  --cream: #F5F1E8;
  --ink: #1A1A1A;
  --gold: #C9A961;
  --gold-dark: #b3903f;
  --stamp-red: #8B3A3A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

/* Hidden on screen, read aloud by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; top: -60px; left: 12px;
  background: var(--forest-dark); color: #fff;
  padding: 10px 18px; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem;
  text-decoration: none; z-index: 100; transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- Hero: halftone band pulled from the logo's server-rack dots.
   Inner-page sizes here; the homepage enlarges it in index.php. ---- */
.hero {
  width: 100%;
  padding: 36px 20px 32px;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle, rgba(47,82,51,0.14) 1.4px, transparent 1.6px),
    radial-gradient(circle at 85% 15%, rgba(201,169,97,0.10), transparent 45%);
  background-size: 15px 15px, 100% 100%;
  border-bottom: 3px solid var(--forest-dark);
}
.hero-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 4px;
}
.logo-link { display: inline-flex; }
.logo { width: min(160px, 45vw); height: auto; margin-bottom: 6px; }

h1 {
  font-family: 'Archivo Black', Arial, sans-serif;
  font-weight: 400; font-size: clamp(1.2rem, 4vw, 1.7rem);
  line-height: 1.25; letter-spacing: -0.01em;
  margin: 4px 0 8px; color: var(--forest-dark); max-width: 100%;
}
.tagline {
  font-size: clamp(0.95rem, 3vw, 1.03rem);
  line-height: 1.55; color: #3a3a3a; max-width: 44ch; margin: 0 0 6px;
}

/* Rubber-stamp status badge */
.stamp-badge {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  border: 3px solid var(--stamp-red); border-radius: 6px;
  padding: 10px 20px; transform: rotate(-2.5deg); color: var(--stamp-red);
}
.stamp-badge .stamp-eyebrow { font-family: 'Archivo Black', Arial, sans-serif; font-size: 0.72rem; letter-spacing: 0.12em; line-height: 1; }
.stamp-badge .stamp-main { font-family: 'Archivo Black', Arial, sans-serif; font-size: clamp(0.85rem, 2.6vw, 1rem); letter-spacing: 0.02em; line-height: 1.2; }

@media (min-width: 700px) {
  .hero-inner { flex-direction: row; align-items: center; text-align: left; gap: 28px; }
  .logo { margin-bottom: 0; flex-shrink: 0; width: 150px; }
  .hero-text { display: flex; flex-direction: column; align-items: flex-start; }
}

/* ---- Main column ---- */
.wrap {
  max-width: 760px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 32px 20px 40px;
}

.back-link {
  font-size: 0.9rem; font-weight: 500; color: var(--forest-dark);
  text-decoration: none; margin-bottom: 28px;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px;
}
.back-link:hover { color: var(--gold-dark); }
.back-link svg { width: 16px; height: 16px; }

.divider { width: 48px; height: 2px; background: rgba(47,82,51,0.25); border: none; margin: 30px 0 26px; }
/* The divider right under "Back to home" on inner pages has a little more room below it */
.back-link + .divider { margin-bottom: 30px; }

/* ---- Teaser cards (homepage and Bill Watch): red-bordered link cards ---- */
.take-action-teaser {
  display: flex; align-items: center; gap: 16px; width: 100%;
  text-align: left; text-decoration: none; background: #fff;
  border: 2px solid var(--stamp-red); border-radius: 12px;
  padding: 18px 20px; margin: 0 0 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.take-action-teaser:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.take-action-teaser:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.teaser-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--stamp-red); color: #fff; display: flex; align-items: center; justify-content: center; }
.teaser-icon svg { width: 20px; height: 20px; }
.teaser-eyebrow { display: block; font-family: 'Archivo Black', Arial, sans-serif; font-weight: 400; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stamp-red); margin: 0 0 2px; }
.teaser-title { display: block; font-size: 0.98rem; font-weight: 700; color: var(--forest-dark); margin: 0 0 2px; }
.teaser-sub { display: block; font-size: 0.85rem; color: #555; }

/* ---- Stay Connected (rendered by site_footer()) ---- */
.connect-heading {
  font-family: 'Archivo Black', Arial, sans-serif; font-weight: 400;
  font-size: 0.95rem; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--forest-dark); margin: 0 0 14px; text-align: center;
}
.links { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.links a {
  color: var(--forest-dark); text-decoration: none;
  display: flex; align-items: center; gap: 7px;
  font-size: 0.92rem; font-weight: 500;
  padding: 12px 10px; min-height: 44px;
}
.links a:hover { color: var(--gold-dark); }
.links a:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 3px; }
.links svg { width: 19px; height: 19px; flex-shrink: 0; }

.archive { font-size: 0.9rem; }
.archive a {
  color: var(--forest-dark); font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px;
}
.archive a:hover { color: var(--gold-dark); }

/* ---- Footer ---- */
footer {
  margin-top: 40px; width: 100%; font-size: 0.78rem; color: #6b6b6b; text-align: center;
  background-color: rgba(47,82,51,0.05);
  background-image: radial-gradient(circle, rgba(47,82,51,0.10) 1.2px, transparent 1.4px);
  background-size: 13px 13px;
  border-top: 3px solid var(--forest-dark); border-radius: 0 0 12px 12px;
  padding: 22px 20px 20px;
}
footer p { margin: 0 0 4px; }
footer .footer-tagline { font-family: 'Archivo Black', Arial, sans-serif; font-weight: 400; font-size: 0.85rem; letter-spacing: 0.01em; color: var(--forest-dark); margin: 0 0 10px; }
footer .copyright-line { font-size: 0.88rem; font-weight: 600; color: var(--forest-dark); margin: 0 0 10px; }
footer .host-credit { font-size: 0.74rem; font-weight: 400; color: #8a8a8a; font-style: italic; }
.ggseal { margin-top: 12px; }
.ggseal img { max-width: 150px; height: auto; opacity: 0.9; }

/* ---- Back to top (paw), rendered by site_page_end() ---- */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--forest); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.15s ease; z-index: 50;
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: var(--forest-dark); }
.back-to-top:active .paw { transform: scale(0.85) rotate(-8deg); }
.back-to-top:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.back-to-top .paw { width: 24px; height: 24px; transition: transform 0.15s ease; }
.back-to-top .tooltip {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem; font-weight: 500; white-space: nowrap; padding: 6px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.back-to-top .tooltip::after { content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left-color: var(--ink); }
.back-to-top:hover .tooltip, .back-to-top:focus-visible .tooltip { opacity: 1; }
/* Tooltip relies on hover, which isn't reliable on touch screens */
@media (max-width: 480px) { .back-to-top .tooltip { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.15s ease; }
  .back-to-top.visible { transform: none; }
  .take-action-teaser { transition: none; }
  .take-action-teaser:hover { transform: none; }
}
