/* ============================================================
   Homepage — seasonal theming
   ============================================================
   Mirrors the gift-card page's seasonal system but tuned for
   the homepage's ivory hero (light background).

   Activated via [data-season] on <main id="main">. Each season
   sets a small palette of CSS vars consumed by:
     - .home-banner          (thin ribbon above the hero)
     - .home-decor-*         (decoration layer inside .hero)
     - .hero-rule            (the vertical accent line)
     - .hero-eyebrow         (small uppercase label)

   Decor philosophy: photographic, not clip-art. Everything is
   built from soft-focus light (blurred bokeh orbs, glints) and
   slow organic particle drift (petals, bubbles, embers, motes)
   so it reads like depth-of-field atmosphere behind the hero —
   never flat icon shapes.

   Notes:
     - All decoration motion is muted/sparse — the homepage hero
       carries a lot of content; decor should never fight it.
     - prefers-reduced-motion freezes particles and leaves only
       static ambient light.
   ============================================================ */

/* ---------- Theme tokens (default = neutral, no override) ---------- */
main#main {
  --season-accent: var(--c-sea, #2D7F83);
  --season-accent-soft: rgba(45, 127, 131, 0.15);
  --season-accent-glow: rgba(45, 127, 131, 0.18);
  --season-ink: var(--c-deep, var(--c-deep-2));
}

/* — New Year — */
main#main[data-season="new-year"] {
  --season-accent: #C99A3F;
  --season-accent-soft: rgba(201, 154, 63, 0.18);
  --season-accent-glow: rgba(201, 154, 63, 0.22);
  --season-ink: #6E4F1D;
}

/* — Valentine's — */
main#main[data-season="valentines"] {
  --season-accent: #B96B77;
  --season-accent-soft: rgba(185, 107, 119, 0.18);
  --season-accent-glow: rgba(185, 107, 119, 0.20);
  --season-ink: #6F2C36;
}

/* — Mother's Day — */
main#main[data-season="mothers-day"] {
  --season-accent: #B07A4D;
  --season-accent-soft: rgba(176, 122, 77, 0.18);
  --season-accent-glow: rgba(176, 122, 77, 0.20);
  --season-ink: #5A3919;
}

/* — Father's Day — */
main#main[data-season="fathers-day"] {
  --season-accent: #2D7F83;
  --season-accent-soft: rgba(45, 127, 131, 0.18);
  --season-accent-glow: rgba(45, 127, 131, 0.20);
  --season-ink: var(--c-deep-2);
}

/* — 4th of July: muted red / ivory / navy Americana — */
main#main[data-season="fourth-of-july"] {
  --season-accent: #1B3B6F;
  --season-accent-soft: rgba(27, 59, 111, 0.16);
  --season-accent-glow: rgba(27, 59, 111, 0.22);
  --season-ink: #102749;
}

/* — Veterans Day: olive + brass — */
main#main[data-season="veterans-day"] {
  --season-accent: #5C6B3E;
  --season-accent-soft: rgba(92, 107, 62, 0.18);
  --season-accent-glow: rgba(92, 107, 62, 0.22);
  --season-ink: #3D4628;
}

/* — Christmas / Holidays — */
main#main[data-season="christmas"] {
  --season-accent: #4F7864;
  --season-accent-soft: rgba(79, 120, 100, 0.18);
  --season-accent-glow: rgba(79, 120, 100, 0.22);
  --season-ink: #2C4A3B;
}

/* — Birthday — */
main#main[data-season="birthday"] {
  --season-accent: #C99A3F;
  --season-accent-soft: rgba(201, 154, 63, 0.18);
  --season-accent-glow: rgba(201, 154, 63, 0.22);
  --season-ink: #6E4F1D;
}

/* ---------- Optional accent overrides on hero rule ---------- */
main#main[data-season]:not([data-season=""]):not([data-season="default"]) .hero-rule {
  background: var(--season-accent);
  opacity: 0.55;
}

/* ============================================================
   Seasonal banner — thin ribbon above the hero
   ============================================================ */
.home-banner {
  position: relative;
  background: var(--season-accent-soft);
  border-bottom: 1px solid var(--season-accent-soft);
  color: var(--season-ink);
  padding: 14px 24px;
  z-index: 1;
}
.home-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: center;
}
@media (max-width: 767px) {
  .home-banner { padding: 12px 20px; }
  .home-banner-inner { gap: 10px; font-size: 12px; }
}
.home-banner-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--season-accent);
  flex-shrink: 0;
}
.home-banner-icon svg { width: 100%; height: 100%; display: block; }
.home-banner-text {
  font-weight: 500;
  color: var(--season-ink);
}
.home-banner-text strong {
  font-weight: 600;
  color: var(--season-accent);
}
.home-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--season-accent);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid currentColor;
  transition: opacity 200ms var(--ease-out);
}
.home-banner-cta:hover { opacity: 0.7; }
.home-banner-cta svg { width: 12px; height: 12px; }

/* Veterans Day — soft olive wash on the banner backing. */
.home-banner[data-season="veterans-day"] {
  background-color: rgba(138, 136, 98, 0.18);
  border-bottom: 1px solid rgba(92, 107, 62, 0.35);
}
.home-banner[data-season="veterans-day"] .home-banner-cta {
  background-color: #5C6B3E;
  color: #F5F1E3;
  padding: 6px 14px;
  border-radius: 999px;
  border-bottom: none;
}
.home-banner[data-season="veterans-day"] .home-banner-cta:hover {
  background-color: #4A5232;
  opacity: 1;
}

/* 4th of July — red / white / blue stripe band along the bottom.
   Banner backing stays an ivory cream so the text doesn't fight
   a saturated bg. */
.home-banner[data-season="fourth-of-july"] {
  background-color: #F5F1E3;
  border-bottom: none;
  position: relative;
}
.home-banner[data-season="fourth-of-july"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    #B22234 0 33.33%,
    #F5F1E3 33.33% 66.66%,
    #1B3B6F 66.66% 100%
  );
}
.home-banner[data-season="fourth-of-july"] .home-banner-text {
  color: #102749;
}
.home-banner[data-season="fourth-of-july"] .home-banner-text strong {
  color: #B22234;
}
.home-banner[data-season="fourth-of-july"] .home-banner-cta {
  color: #1B3B6F;
  border-color: #1B3B6F;
}

/* ============================================================
   Hero — make decor possible
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero .section-inner { position: relative; z-index: 1; }

.home-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.home-decor ul {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Reduced motion: freeze everything. Ambient light (orbs/glints)
   stays visible at a static opacity; moving particles hide. */
@media (prefers-reduced-motion: reduce) {
  .home-decor * { animation: none !important; }
  .home-fpetal, .home-bubble, .home-ember, .home-mote, .home-burst {
    display: none;
  }
}

/* ============================================================
   Atmospheric primitives
   ============================================================
   The whole seasonal layer is composed from six photographic
   building blocks. Color/size/blur arrive inline from JSX so
   one class serves every season.
   ============================================================ */

/* ---------- Bokeh orbs — out-of-focus points of light ---------- */
.home-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, var(--orb-color), transparent 70%);
  mix-blend-mode: multiply;
  opacity: calc(var(--orb-op, 0.5) * 0.55);
  animation: home-orb-breathe ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes home-orb-breathe {
  0%, 100% { opacity: calc(var(--orb-op, 0.5) * 0.55); transform: translate3d(0, 0, 0) scale(0.96); }
  50%      { opacity: var(--orb-op, 0.5);              transform: translate3d(8px, -10px, 0) scale(1.05); }
}

/* ---------- Glints — tiny sharp catches of light ---------- */
.home-glint {
  position: absolute;
  border-radius: 50%;
  background: var(--glint-color, #C99A3F);
  mix-blend-mode: multiply;
  opacity: calc(var(--glint-op, 0.5) * 0.4);
  animation: home-glint-twinkle ease-in-out infinite;
}
@keyframes home-glint-twinkle {
  0%, 100% { opacity: 0;                        transform: scale(0.55); }
  50%      { opacity: var(--glint-op, 0.5);     transform: scale(1); }
}

/* ---------- Falling petals — organic tumble with sway ---------- */
.home-fpetal {
  position: absolute;
  top: -48px;
  background: radial-gradient(120% 130% at 32% 22%, var(--petal-hi) 0%, var(--petal-lo) 72%, transparent 100%);
  border-radius: 72% 28% 68% 32% / 58% 40% 60% 42%;
  mix-blend-mode: multiply;
  opacity: 0;
  animation: home-petal-drift linear infinite;
  will-change: transform, opacity;
}
@keyframes home-petal-drift {
  0%   { transform: translate3d(0, -6vh, 0) rotate(8deg)   rotateX(0deg); opacity: 0; }
  6%   { opacity: var(--petal-op, 0.65); }
  28%  { transform: translate3d(2.4vw, 26vh, 0)  rotate(96deg)  rotateX(40deg); }
  52%  { transform: translate3d(-1.6vw, 52vh, 0) rotate(158deg) rotateX(-30deg); }
  78%  { transform: translate3d(2vw, 80vh, 0)    rotate(238deg) rotateX(35deg); opacity: var(--petal-op, 0.65); }
  100% { transform: translate3d(-0.6vw, 108vh, 0) rotate(312deg) rotateX(0deg); opacity: 0; }
}

/* ---------- Rising bubbles — champagne effervescence ---------- */
.home-bubble {
  position: absolute;
  bottom: -24px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255, 252, 242, 0.9) 0%, var(--bub-color) 55%, transparent 78%);
  box-shadow: inset 0 0 0 0.5px var(--bub-color);
  opacity: 0;
  animation: home-bubble-rise linear infinite;   /* constant motion, not ease-in */
  will-change: transform, opacity;
}
@keyframes home-bubble-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.85); opacity: 0; }
  8%   { opacity: var(--bub-op, 0.55); }
  34%  { transform: translate3d(7px, -34vh, 0) scale(0.92); }
  62%  { transform: translate3d(-5px, -62vh, 0) scale(1); }
  88%  { opacity: calc(var(--bub-op, 0.55) * 0.7); }
  100% { transform: translate3d(4px, -112vh, 0) scale(1.05); opacity: 0; }
}

/* ---------- Bursts — distant fireworks, fully out of focus ---------- */
.home-burst {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--burst-color) 0%, transparent 62%);
  mix-blend-mode: multiply;
  opacity: 0;
  transform: scale(0.25);
  animation: home-burst-bloom ease-out infinite;
  will-change: transform, opacity;
}
@keyframes home-burst-bloom {
  0%   { opacity: 0;    transform: scale(0.25); }
  6%   { opacity: 1;    transform: scale(0.58); }
  18%  { opacity: 0.55; transform: scale(1); }
  34%  { opacity: 0;    transform: scale(1.14); }
  100% { opacity: 0;    transform: scale(1.14); }
}

/* ---------- Embers — fine sparks sinking after a burst ---------- */
.home-ember {
  position: absolute;
  border-radius: 50%;
  background: var(--ember-color);
  mix-blend-mode: multiply;
  opacity: 0;
  animation: home-ember-fall linear infinite;
  will-change: transform, opacity;
}
@keyframes home-ember-fall {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  7%   { opacity: var(--ember-op, 0.5); }
  58%  { transform: translate3d(-10px, 52vh, 0); opacity: calc(var(--ember-op, 0.5) * 0.55); }
  100% { transform: translate3d(7px, 92vh, 0); opacity: 0; }
}

/* ---------- Motes — dust in a shaft of light, near-still ---------- */
.home-mote {
  position: absolute;
  border-radius: 50%;
  background: var(--mote-color);
  mix-blend-mode: multiply;
  opacity: 0;
  animation: home-mote-drift ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes home-mote-drift {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  14%  { opacity: var(--mote-op, 0.4); }
  50%  { transform: translate3d(16px, -26px, 0); }
  86%  { opacity: var(--mote-op, 0.4); }
  100% { transform: translate3d(-8px, -52px, 0); opacity: 0; }
}
