/*
 * Seasonal styling for cleanbeansllc.com (trudj-core module `seasons`). Loaded only while seasonal styling is on in host.trudj.net,
 * or for a signed-in staff preview. The colors arrive as --season-* custom properties (seasons_css()). The site's own colors, logo, menu
 * and buttons stay as they are: the season adds a band under the header, a greeting bar on holidays, a band over the footer, and
 * the season's leaves, snow or holiday icons falling lightly over the page (never blocking a click).
 */
:root {
  --season-accent: #444;
  --season-accent-2: #888;
  --season-banner-bg: #f3f3f3;
  --season-banner-fg: #222;
}

.season-strip {
  height: 6px;
  background: repeating-linear-gradient(135deg, var(--season-accent) 0 14px, var(--season-accent-2) 14px 28px);
}

.season-banner, .season-preview {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5em;
  margin: 0; padding: .6em 1em;
  font: 700 16px/1.35 inherit; text-align: center;
}
.season-banner { background: var(--season-banner-bg); color: var(--season-banner-fg); flex-wrap: nowrap; }
.season-banner span { min-width: 0; }
.season-banner .season-icon { color: var(--season-accent); width: 1.2em; height: 1.2em; flex: none; }
.season-preview { background: #222; color: #fff; font: 400 15px/1.35 Arial, sans-serif; }
.season-preview a { color: #fff; text-decoration: underline; font-weight: 700; }
.season-preview .season-icon { color: #fff; }
.season-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; }

/* Accent only: a band over the footer in the season's color */
body[data-season] .site-footer { border-top: 4px solid var(--season-accent); }


@media (max-width: 600px) {
  .season-banner { font-size: 15px; padding: .55em .75em; }
}
@media (prefers-reduced-motion: no-preference) {
  .season-banner .season-icon { animation: season-sway 4s ease-in-out infinite; transform-origin: 50% 80%; }
  @keyframes season-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
}
@media print {
  .season-strip, .season-preview, .season-icon { display: none; }
  .season-banner { background: none; color: #000; border: 1px solid #000; }
}

/* Full-page falling layer (season_backdrop_html): leaves, snow or the holiday's icon drifting down the window */
.season-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.season-backdrop i {
  position: absolute; top: -60px; left: var(--x); width: var(--s); height: var(--s); opacity: .6;
  background: var(--season-accent); transform: rotate(var(--r));
  -webkit-mask: var(--season-particle) center / contain no-repeat; mask: var(--season-particle) center / contain no-repeat;
}
.season-backdrop i:nth-child(3n) { background: var(--season-accent-2); }
.season-backdrop[data-motion="rise"] i { top: auto; bottom: -60px; }
/* Always drifting down; with "reduce motion" each leaf stays still where it is, scattered over the page (like subhousehudson.com) */
@media all {
  .season-backdrop i { animation: season-bg-fall var(--d) linear var(--dl) infinite; }
  .season-backdrop[data-motion="rise"] i { animation-name: season-bg-rise; }
  @keyframes season-bg-fall {
    0% { transform: translate3d(0, 0, 0) rotate(var(--r)); }
    25% { transform: translate3d(var(--sw), 28vh, 0) rotate(calc(var(--r) + 90deg)); }
    50% { transform: translate3d(0, 56vh, 0) rotate(calc(var(--r) + 180deg)); }
    75% { transform: translate3d(calc(var(--sw) * -1), 84vh, 0) rotate(calc(var(--r) + 270deg)); }
    100% { transform: translate3d(0, calc(100vh + 120px), 0) rotate(calc(var(--r) + 360deg)); }
  }
  @keyframes season-bg-rise {
    0% { transform: translate3d(0, 0, 0) scale(.8); opacity: 0; }
    15% { opacity: .6; }
    100% { transform: translate3d(var(--sw), calc(-100vh - 120px), 0) scale(1.1); opacity: 0; }
  }
}
@media (prefers-reduced-motion: reduce) { .season-backdrop i { animation-play-state: paused; } }
@media print { .season-backdrop { display: none; } }
