/* ============================================================
   THANKSGIVING THEME (seasonal overlay)
   Loaded LAST on every page. It only overrides colors and adds
   falling leaves, a squirrel and a pumpkin; nothing in
   shared-styles.css is edited.
   To restore the normal look: remove the one
   <link ... themes/thanksgiving/theme.css> line from each page,
   or restore the git tag "pre-thanksgiving-theme".
   Art: branch = OpenClipart (CC0); leaves, squirrel, pumpkin =
   "Autumn icon set clipart" (CC0) via Wikimedia Commons.
   ============================================================ */

:root {
  --navy: #4a1f12;
  --navy-mid: #8c3d1a;
  --navy-light: #8c3d1a;
  --gold: #f0a33a;
  --gold-dark: #c97a16;
  --gold-light: #f7c46a;
  --off-white: #fbf5ea;
  --light-gray: #e6d8c5;
  --mid-gray: #8f8175;
  --dark: #24100a;
  --text: #4a3a2f;
  --shadow-sm: 0 2px 8px rgba(74,31,18,0.10);
  --shadow-md: 0 8px 32px rgba(74,31,18,0.14);
  --shadow-lg: 0 20px 60px rgba(74,31,18,0.20);
  --shadow-gold: 0 4px 20px rgba(240,163,58,0.35);
}

body { background: #fffaf2; }

/* ---- Nav ---- */
body nav {
  background: rgba(36,16,10,0.97);
  border-bottom-color: rgba(240,163,58,0.28);
}
[style*="#e8b923"] { color: var(--gold) !important; }

/* ---- Hardcoded blue gradients -> autumn ---- */
body .hero,
body .spotlight-banner,
body .article-hero-image {
  background: linear-gradient(135deg, #24100a 0%, #5a2412 55%, #8c3d1a 100%);
}
body .hero-glow { background: radial-gradient(circle, rgba(240,163,58,0.16) 0%, transparent 70%); }
body .sidebar-cta,
body [style*="#042a88"] {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%) !important;
}
body .blog-card:nth-child(4n+1) .blog-card-image { background: linear-gradient(135deg, #8c3d1a, #24100a) !important; }
body .blog-card:nth-child(4n+2) .blog-card-image { background: linear-gradient(135deg, #24100a, #5a2412) !important; }
body .blog-card:nth-child(4n+3) .blog-card-image { background: linear-gradient(135deg, #a8481a, #5a2412) !important; }
body .blog-card:nth-child(4n+4) .blog-card-image { background: linear-gradient(135deg, #5a2412, #b5651d) !important; }
body .modal-overlay { background: rgba(36,16,10,0.75); }
body .compass-overlay { background: rgba(36,16,10,0.35); }
body .cta-band p { color: rgba(74,31,18,0.75); }

/* ---- Greeting pill above the homepage headline ---- */
.hero h1::before {
  content: "\1F983  Happy Thanksgiving from the Reardon Agency family";
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 20px;
  padding: 8px 18px;
  font: 600 0.78rem/1.4 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(240,163,58,0.18);
  border: 1px solid rgba(240,163,58,0.45);
  border-radius: 999px;
}

/* ---- Autumn branch with a squirrel perched on it, top-right of every hero.
        Added as an extra background layer on top of each hero's own pattern
        (the pattern is restated here unchanged). ---- */
.page-hero::before {
  background-image:
    url("hero-branch.png"),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::before {
  background-image:
    url("hero-branch.png"),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M40 40L0 0h80L40 40zm0 0L0 80h80L40 40z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero::before,
.hero::before {
  background-repeat: no-repeat, repeat;
  background-position: right -16px top 76px, 0 0;
  background-size: min(48vw, 460px) auto, auto;
}

/* ---- Pumpkin sitting on the floor of every hero ---- */
.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  right: 9%;
  bottom: 0;
  width: 84px;
  height: 74px;
  background: url("pumpkin.png") no-repeat center bottom / contain;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 600px) {
  .page-hero::before,
  .hero::before { background-position: right -10px top 74px, 0 0; background-size: 300px auto, auto; }
  .hero::after,
  .page-hero::after { right: 5%; width: 60px; height: 53px; }
}

/* ---- Homepage on desktop: the quote form covers the top-right corner, so the
        squirrel and pumpkin perch on the top edge of the quote form instead.
        (On phones and tablets the form is hidden, so the branch/pumpkin above are used.) ---- */
@media (min-width: 901px) {
  .hero::before {
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M40 40L0 0h80L40 40zm0 0L0 80h80L40 40z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-position: 0 0;
    background-size: auto;
  }
  .hero::after { display: none; }
  .hero-card { position: relative; }
  .hero-card::before,
  .hero-card::after {
    content: "";
    position: absolute;
    bottom: 100%;
    margin-bottom: -1px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
  }
  .hero-card::before { right: 28px; width: 74px; height: 80px; background-image: url("squirrel.png"); }
  .hero-card::after  { left: 28px;  width: 82px; height: 73px; background-image: url("pumpkin.png"); }
}

/* ---- Falling leaves (two layers, pure CSS, never block clicks) ---- */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 900;
  pointer-events: none;
  background-repeat: repeat;
  will-change: transform;
}
body::before {
  background-image: url("leaves-a.png");
  background-size: 480px 820px;
  width: calc(100vw + 480px);
  height: calc(100vh + 820px);
  left: -480px;
  top: -820px;
  opacity: 0.85;
  animation: tg-fall-a 95s linear infinite;
}
body::after {
  background-image: url("leaves-b.png");
  background-size: 360px 600px;
  width: calc(100vw + 360px);
  height: calc(100vh + 600px);
  left: -360px;
  top: -600px;
  opacity: 0.55;
  animation: tg-fall-b 62s linear infinite;
}
@keyframes tg-fall-a { to { transform: translate3d(480px, 820px, 0); } }
@keyframes tg-fall-b { to { transform: translate3d(360px, 600px, 0); } }

/* ---- Page content sits ABOVE the leaves, so leaves pass behind every box and never cover words.
        (Leaves stay visible against page and hero backgrounds.) ---- */
body .container,
body .hero-content,
body .page-hero-content,
body .spotlight-inner,
body .spotlight-stats,
body .spotlight-myths,
body .trust-bar > *,
body .cta-band-inner {
  position: relative;
  z-index: 901;
}
/* Boxes that were see-through get solid colors so leaves are fully hidden behind them */
body .myth-card,
body .credential-card,
body .perk-card,
body .hero-card,
body .about-value,
body .sola-benefit { background-color: #3f2016; }
body .callout-box { background-color: #fef8ef; }
body .warning-box { background-color: #fef4f4; }

@media (max-width: 600px) {
  body::after { display: none; }
  body::before { opacity: 0.7; }
  .hero h1::before { font-size: 0.7rem; letter-spacing: 0.05em; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { display: none; }
}
