/* Historex Agents – JOIN OUR MAILING LIST THEME: the everyday colours, plus everything pointing people to the mailing list */
body.theme-mailinglist {
  --ml-green: #0b7a34;
  --ml-gold: #fecd07;
  --envelope: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 28'%3E%3Crect x='1' y='1' width='38' height='26' rx='3' fill='%23fff' stroke='%23c9a400' stroke-width='1.5'/%3E%3Cpath d='M2 3l18 13L38 3' fill='none' stroke='%23c9a400' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='M2 26l13-11M38 26L25 15' stroke='%23e3cf7a' stroke-width='1.2'/%3E%3C/svg%3E");
  --envelopes-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 140'%3E%3Cdefs%3E%3Cg id='e'%3E%3Crect x='1' y='1' width='38' height='26' rx='3' fill='%23fff'/%3E%3Cpath d='M2 3l18 13L38 3' fill='none' stroke='%23c9a400' stroke-width='2'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23e' transform='translate(40 30) scale(.6) rotate(-10)' opacity='.85'/%3E%3Cuse href='%23e' transform='translate(250 80) scale(.45) rotate(8)' opacity='.7'/%3E%3Cuse href='%23e' transform='translate(390 20) scale(.55) rotate(-4)' opacity='.8'/%3E%3Cpath d='M20 44q20-6 40-2M232 92q14-5 30-1M372 32q14-5 28-2' stroke='%23fff' stroke-width='1.4' stroke-dasharray='3 4' fill='none' opacity='.5'/%3E%3C/svg%3E");
}

/* Envelopes flying across the header, like mail on its way */
.theme-mailinglist .site-header { position: relative; overflow: hidden; }
.theme-mailinglist .site-header::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -480px; right: 0; pointer-events: none; z-index: 0; opacity: .55;
  background: var(--envelopes-tile) 0 6px / 480px 140px repeat-x;
  animation: hx-mail-fly 26s linear infinite;
}
@keyframes hx-mail-fly { from { transform: translateX(0); } to { transform: translateX(480px); } }
.theme-mailinglist .site-header__inner, .theme-mailinglist .mainnav ul { position: relative; z-index: 1; }
.theme-mailinglist .mainnav { position: relative; z-index: 1; }

/* The Subscribe button in the menu glows gold and says NEW */
.theme-mailinglist .mainnav a[href$="/subscribe"] {
  position: relative; background: var(--ml-gold); color: #111; box-shadow: 0 0 0 0 rgba(254,205,7,.7);
  animation: hx-glow 2.2s ease-out infinite;
}
.theme-mailinglist .mainnav a[href$="/subscribe"]:hover { background: #ffe066; color: #111; }
.theme-mailinglist .mainnav a[href$="/subscribe"]::after {
  content: "NEW"; position: absolute; top: -7px; right: -8px; padding: 1px 6px; border-radius: 999px;
  background: #d0101e; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .06em; line-height: 1.5;
}
@keyframes hx-glow { 0% { box-shadow: 0 0 0 0 rgba(254,205,7,.75); } 70% { box-shadow: 0 0 0 12px rgba(254,205,7,0); } 100% { box-shadow: 0 0 0 0 rgba(254,205,7,0); } }

/* Banner: a bright welcome with an envelope at each side and a Join now button */
.theme-mailinglist .theme-strip {
  position: relative; background: linear-gradient(90deg, #e3f4e8, #fffbe0 50%, #e3f4e8); color: #0a5a27; padding: 13px 12px; font-size: 1.1rem;
  border-bottom: 3px solid var(--ml-green);
}
.theme-mailinglist .theme-lights { display: none; }
.theme-mailinglist .theme-strip .container::before {
  content: ""; display: inline-block; width: 30px; height: 21px; vertical-align: -4px; margin-right: .7em;
  background: var(--envelope) center / contain no-repeat;
}
.theme-cta {
  display: inline-block; margin-left: .8em; padding: 5px 16px; border-radius: 999px; vertical-align: 1px;
  background: var(--ml-green, #0b7a34); color: #fff; font-family: var(--sans); font-size: .9rem; font-weight: 800; text-decoration: none;
  box-shadow: 0 2px 0 #064d20;
}
.theme-cta:hover { background: #119a46; color: #fff; }
.theme-reassure { display: block; margin-top: 4px; font-family: var(--sans); font-weight: 500; font-size: .84rem; color: #3d5a45; letter-spacing: 0; }

/* Checkout: the mailing-list tick box stands out */
.theme-mailinglist .optin {
  border: 2px dashed var(--ml-gold); background: #fffbe0; border-radius: 10px; padding: 10px 12px;
  animation: hx-optin-glow 2.6s ease-in-out infinite;
}
@keyframes hx-optin-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(254,205,7,0); } 50% { box-shadow: 0 0 0 5px rgba(254,205,7,.35); } }

@media (prefers-reduced-motion: reduce) {
  .theme-mailinglist .site-header::after, .theme-mailinglist .mainnav a[href$="/subscribe"], .theme-mailinglist .optin { animation: none; }
}
