/* =====================================================================
 * Pest Trappers Amber — generalpestco.com theme overlay
 * ---------------------------------------------------------------------
 * Adapted from /home/dave/handoff/generalpestco/generalpestco_redesign.html
 * Targets the platform's existing class system instead of replacing
 * markup. Owner-edited content in <main class="site-main"> stays
 * editable through the playground.
 *
 * Activation: <body class="theme-pest-trappers-amber"> (or any descendant of an
 * element with that class). Without the body class, this CSS is inert.
 * ===================================================================== */

body.theme-pest-trappers-amber {
  /* Amber palette — pulled from the redesign's :root */
  --pt-ink:        #1a1208;
  --pt-amber:      #d4840a;
  --pt-amber-soft: #f0a833;
  --pt-amber-pale: #fff8ec;
  --pt-rust:       #b84c0a;
  --pt-cream:      #fdf8f2;
  --pt-tan:        #e8dcc8;
  --pt-stone:      #6e6354;        /* WCAG AA 4.6:1 on cream — darker than the redesign's #8a7b6a */
  --pt-white:      #ffffff;

  /* Override Theme Studio's --luperiq-* tokens (everything in the
     platform references these). Order matters — these come AFTER the
     inline <style>:root block in document order, so they win. */
  --luperiq-primary:        var(--pt-ink);
  --luperiq-accent:         var(--pt-amber);
  --luperiq-accent-hover:   var(--pt-rust);
  --luperiq-link:           var(--pt-rust);
  --luperiq-button-text:    var(--pt-ink);
  --luperiq-header-bg:      var(--pt-cream);
  --luperiq-header-text:    var(--pt-ink);
  --luperiq-footer-bg:      var(--pt-ink);
  --luperiq-background:     var(--pt-cream);
  --luperiq-surface:        var(--pt-white);
  --luperiq-text:           var(--pt-ink);
  --luperiq-text-muted:     var(--pt-stone);
  --luperiq-border:         var(--pt-tan);

  /* Override Theme Studio tokens so smart blocks inherit amber */
  --ts-text:           var(--pt-ink);
  --ts-text-muted:     var(--pt-stone);
  --ts-surface:        var(--pt-white);
  --ts-surface-muted:  var(--pt-cream);
  --ts-border:         var(--pt-tan);
  --ts-accent:         var(--pt-amber);

  /* Editorial type pair — Playfair Display headings, DM Sans body */
  --ts-font-serif: 'Playfair Display', Georgia, serif;
  --ts-font-sans:  'DM Sans', system-ui, sans-serif;

  background: var(--pt-cream);
  color: var(--pt-ink);
  font-family: var(--ts-font-sans);
}

/* Self-hosted fonts (loaded via @font-face when available; falls
   back to Georgia/system if not). Drop-in safe. */
body.theme-pest-trappers-amber {
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Page content (semantic markup the owner edits) ─────────────── */

body.theme-pest-trappers-amber main.site-main h1,
body.theme-pest-trappers-amber main.site-main h2,
body.theme-pest-trappers-amber main.site-main h3,
body.theme-pest-trappers-amber main.site-main h4 {
  font-family: var(--ts-font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pt-ink);
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}
body.theme-pest-trappers-amber main.site-main h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
}
body.theme-pest-trappers-amber main.site-main h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
body.theme-pest-trappers-amber main.site-main h3 {
  font-size: 1.15rem;
}
/* Hero treatment — paragraph immediately BEFORE h1 = eyebrow,
   paragraph immediately AFTER h1 = subhead. Plain text in the WAL
   becomes editorial typography here. */
body.theme-pest-trappers-amber main.site-main h1 + p {
  font-family: var(--ts-font-serif);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  color: var(--pt-stone);
  max-width: 60ch;
  margin: 0.4em 0 1.6em;
}
body.theme-pest-trappers-amber main.site-main p:has(+ h1) {
  font-family: var(--ts-font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pt-amber);
  margin: 0 0 0.4em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pt-amber-pale);
  border: 1px solid rgba(212,132,10,0.4);
  border-radius: 100px;
  padding: 0.35rem 0.85rem;
}

/* Heading-anchor wraps the entire heading text on platform pages. We
   want the heading to read in ink with amber only on hover (the
   anchor is the permalink affordance, not a separate visible link). */
body.theme-pest-trappers-amber main.site-main h2 a.heading-anchor,
body.theme-pest-trappers-amber main.site-main h3 a.heading-anchor,
body.theme-pest-trappers-amber main.site-main h4 a.heading-anchor {
  color: inherit !important;
  text-decoration: none;
}
body.theme-pest-trappers-amber main.site-main h2 a.heading-anchor:hover,
body.theme-pest-trappers-amber main.site-main h3 a.heading-anchor:hover,
body.theme-pest-trappers-amber main.site-main h4 a.heading-anchor:hover {
  color: var(--pt-amber) !important;
}

body.theme-pest-trappers-amber main.site-main p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4a3d2e;
  margin: 0 0 1.1em;
  max-width: 70ch;
}
body.theme-pest-trappers-amber main.site-main a {
  color: var(--pt-rust);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color .15s;
}
body.theme-pest-trappers-amber main.site-main a:hover {
  color: var(--pt-amber);
}

/* Tables — factsheet "At a glance" key/value pairs need to stay
   readable on mobile. Default styling + responsive collapse to a
   stacked layout below 600px. */
body.theme-pest-trappers-amber main.site-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0 1.6em;
  font-size: 0.95rem;
  background: var(--pt-white);
  border: 1px solid var(--pt-tan);
  border-radius: 8px;
  /* No overflow:hidden — long values must wrap, not clip. */
}
body.theme-pest-trappers-amber main.site-main table td,
body.theme-pest-trappers-amber main.site-main table th {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal !important;  /* override platform main.css */
}
body.theme-pest-trappers-amber main.site-main table th,
body.theme-pest-trappers-amber main.site-main table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 1px solid var(--pt-tan);
}
body.theme-pest-trappers-amber main.site-main table tbody tr:last-child td {
  border-bottom: none;
}
body.theme-pest-trappers-amber main.site-main table td:first-child {
  width: 36%;
  background: var(--pt-amber-pale);
  color: var(--pt-ink);
}
@media (max-width: 600px) {
  body.theme-pest-trappers-amber main.site-main table thead {
    display: none;
  }
  body.theme-pest-trappers-amber main.site-main table,
  body.theme-pest-trappers-amber main.site-main table tbody,
  body.theme-pest-trappers-amber main.site-main table tr,
  body.theme-pest-trappers-amber main.site-main table td {
    display: block;
    width: 100%;
  }
  body.theme-pest-trappers-amber main.site-main table tr {
    border-bottom: 1px solid var(--pt-tan);
    padding: 6px 0;
  }
  body.theme-pest-trappers-amber main.site-main table tr:last-child {
    border-bottom: none;
  }
  body.theme-pest-trappers-amber main.site-main table td:first-child {
    background: transparent;
    padding-bottom: 0;
    color: var(--pt-stone);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
  }
  body.theme-pest-trappers-amber main.site-main table td {
    border-bottom: none;
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

/* Lists become editorial pest-card-style stacks */
body.theme-pest-trappers-amber main.site-main ul,
body.theme-pest-trappers-amber main.site-main ol {
  padding-left: 1.5em;
  margin: 0.6em 0 1.4em;
}
body.theme-pest-trappers-amber main.site-main li {
  margin-bottom: 0.4em;
  line-height: 1.6;
}
body.theme-pest-trappers-amber main.site-main li strong {
  color: var(--pt-ink);
  font-weight: 700;
}

body.theme-pest-trappers-amber main.site-main strong {
  color: var(--pt-ink);
  font-weight: 700;
}
body.theme-pest-trappers-amber main.site-main em {
  color: var(--pt-rust);
  font-style: italic;
}

body.theme-pest-trappers-amber main.site-main blockquote {
  border-left: 3px solid var(--pt-amber);
  padding: 0.4em 0 0.4em 1.4em;
  margin: 1.4em 0;
  font-style: italic;
  color: var(--pt-stone);
  background: var(--pt-amber-pale);
  border-radius: 0 8px 8px 0;
}

/* Last-reviewed badge from apex_freshness — small, muted, end of content */
body.theme-pest-trappers-amber main.site-main span[data-apex-review] {
  display: inline-block;
  margin-top: 2em;
  font-size: 0.85rem;
  color: var(--pt-stone);
  opacity: 0.85;
}

/* ── liq-cta-bar smart block ────────────────────────────────────── */

body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar {
  background: linear-gradient(135deg, var(--pt-ink) 0%, #2a1e0a 100%) !important;
  color: var(--pt-white);
  padding: 5rem 2rem !important;
  position: relative;
  overflow: hidden;
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212,132,10,0.18) 0%, transparent 70%);
  pointer-events: none;
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar h2 {
  font-family: var(--ts-font-serif);
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 900;
  margin-bottom: 1rem !important;
  position: relative;
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar p {
  color: rgba(255,255,255,0.65) !important;
  font-size: 1rem !important;
  margin-bottom: 2.5rem !important;
  position: relative;
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar .btn-primary {
  background: var(--pt-amber) !important;
  color: var(--pt-ink) !important;
  font-weight: 700;
  padding: 1rem 2.5rem !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 24px rgba(212,132,10,0.35);
  transition: transform .15s, background .2s;
  position: relative;
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar .btn-primary:hover {
  background: var(--pt-amber-soft) !important;
  transform: translateY(-2px);
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar .liq-cta-bar__btn {
  border: 2px solid rgba(255,255,255,0.3) !important;
  color: var(--pt-white) !important;
  font-weight: 600;
  padding: 1rem 2.5rem !important;
  border-radius: 10px !important;
  background: transparent !important;
  position: relative;
  transition: border-color .2s, background .2s;
}
body.theme-pest-trappers-amber [data-smart-block="cta-bar"] .liq-cta-bar .liq-cta-bar__btn:hover {
  border-color: var(--pt-amber-soft) !important;
  background: rgba(212,132,10,0.1) !important;
}

/* ── liq-related smart block (factsheet grid) ───────────────────── */

body.theme-pest-trappers-amber [data-smart-block="related-pages"] .liq-related {
  background: var(--pt-ink) !important;
  color: var(--pt-white);
  padding: var(--pt-section-gap, 5rem) 2rem;
}
body.theme-pest-trappers-amber [data-smart-block="related-pages"] .liq-related__title {
  font-family: var(--ts-font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem) !important;
  color: var(--pt-white) !important;
  font-weight: 700;
}
body.theme-pest-trappers-amber [data-smart-block="related-pages"] .liq-related__subtitle {
  color: rgba(255,255,255,0.65) !important;
  font-size: 1.05rem !important;
}
body.theme-pest-trappers-amber [data-smart-block="related-pages"] .liq-related__card {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 8px !important;
  padding: 0.85rem 1rem !important;
  font-weight: 500 !important;
  transition: background .2s, border-color .2s, color .2s;
}
body.theme-pest-trappers-amber [data-smart-block="related-pages"] .liq-related__card:hover,
body.theme-pest-trappers-amber [data-smart-block="related-pages"] .liq-related__card:focus-visible {
  background: rgba(212,132,10,0.15) !important;
  border-color: var(--pt-amber) !important;
  color: var(--pt-amber-soft) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ── liq-top-bar (header eyebrow above nav) ─────────────────────── */

/* Top bar has inline `style="background:#0f4c81;..."` from the
   helpers — we override with !important across the relevant props. */
body.theme-pest-trappers-amber .liq-top-bar {
  background: var(--pt-ink) !important;
  color: var(--pt-tan) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.04em !important;
}
body.theme-pest-trappers-amber .liq-top-bar a,
body.theme-pest-trappers-amber .liq-top-bar-action a,
body.theme-pest-trappers-amber .liq-top-bar-text a {
  color: var(--pt-amber-soft) !important;
  text-decoration: none;
  transition: color .15s;
}
body.theme-pest-trappers-amber .liq-top-bar a:hover,
body.theme-pest-trappers-amber .liq-top-bar-action a:hover,
body.theme-pest-trappers-amber .liq-top-bar-text a:hover {
  color: var(--pt-white) !important;
}

/* ── Theme Studio header/footer blocks (luperiq-ts-*) ───────────── */

body.theme-pest-trappers-amber .luperiq-ts-block--site-brand .luperiq-ts-brand-name {
  font-family: var(--ts-font-serif);
  color: var(--pt-ink);
  font-weight: 700;
}
body.theme-pest-trappers-amber .luperiq-ts-block--nav .luperiq-ts-link {
  color: var(--pt-stone);
  font-weight: 500;
  transition: color .15s, background .15s;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
}
body.theme-pest-trappers-amber .luperiq-ts-block--nav .luperiq-ts-link:hover {
  color: var(--pt-ink);
  background: var(--pt-amber-pale);
}
body.theme-pest-trappers-amber .luperiq-ts-cta--primary {
  background: var(--pt-amber) !important;
  color: var(--pt-ink) !important;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.55rem 1.2rem;
  transition: background .2s;
}
body.theme-pest-trappers-amber .luperiq-ts-cta--primary:hover {
  background: var(--pt-rust) !important;
  color: var(--pt-white) !important;
}
body.theme-pest-trappers-amber .luperiq-ts-cta--outline {
  border-color: var(--pt-amber) !important;
  color: var(--pt-ink) !important;
}

/* ── Container width override ───────────────────────────────────── */

body.theme-pest-trappers-amber .container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Smart blocks we built (stat-band, customer-wall, testimonial-quote) — inherit via --ts-* tokens above; no per-block overrides needed unless we want amber-specific tweaks */

body.theme-pest-trappers-amber .liq-stat-band__number {
  font-family: var(--ts-font-serif);
  font-weight: 900;
  color: var(--pt-amber);
}
body.theme-pest-trappers-amber .liq-stat-band--light {
  background: var(--pt-amber-pale) !important;
  border-top: 3px solid var(--pt-amber);
  border-bottom: 3px solid var(--pt-amber);
}
body.theme-pest-trappers-amber .liq-testimonial--light {
  background: var(--pt-amber-pale) !important;
  color: var(--pt-ink) !important;
}
body.theme-pest-trappers-amber .liq-testimonial__quote {
  font-family: var(--ts-font-serif);
}
