/* The Thanksgiving landing page (/thankful), a warm autumn take on the light
   theme in campaign.css: the pitch under a few drifting leaves, beside a
   block of the map with autumn trees in the park, fallen leaves, and a pie
   on Maya's porch, then the film, three points, and the apps. Every color is
   a brand token or logo accent. */
@layer components {
  body.thankful-surface {
    --campaign-glow: rgb(233 95 64 / 26%);
    --campaign-map-shadow: 0 1.5rem 4rem rgb(198 137 16 / 16%), 0 0 0 .0625rem rgb(16 38 83 / 8%);
    --campaign-rule: rgb(198 137 16 / 22%);

    background:
      radial-gradient(40rem 28rem at 90% 0, rgb(252 190 69 / 24%), transparent),
      radial-gradient(28rem 20rem at 4% 2rem, rgb(252 121 83 / 14%), transparent),
      radial-gradient(30rem 22rem at 70% 34rem, rgb(123 193 158 / 12%), transparent);
    background-color: var(--color-cream);
    background-repeat: no-repeat;
  }

  /* Behind the pitch and the map, over the first screen. */
  .thankful-leaves {
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    block-size: min(44rem, 100svh);
    overflow: hidden;
    pointer-events: none;
  }

  .thankful-leaf {
    position: absolute;
    inset-block-start: -2rem;
    inset-inline-start: var(--leaf-x);
    inline-size: 1rem;
    block-size: auto;
    opacity: 0;
    animation: thankful-fall var(--leaf-length, 20s) linear var(--leaf-delay, 0s) infinite;
  }

  .thankful-leaf-blade {
    fill: var(--color-orange);
  }

  .thankful-leaf-vein {
    fill: none;
    stroke: var(--color-orange-dark);
    stroke-width: .8;
    stroke-linecap: round;
  }

  .thankful-leaf.is-yellow .thankful-leaf-blade {
    fill: var(--color-logo-yellow);
  }

  .thankful-leaf.is-yellow .thankful-leaf-vein {
    stroke: var(--color-logo-yellow-dark);
  }

  .thankful-leaf.is-dark .thankful-leaf-blade {
    fill: var(--color-orange-dark);
  }

  .thankful-leaf.is-dark .thankful-leaf-vein {
    stroke: var(--color-logo-yellow-dark);
  }

  /* A slow fall with a gentle sway, fading in at the top and out near the
     bottom of the first screen. */
  @keyframes thankful-fall {
    0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    10% { opacity: .55; }
    35% { transform: translate(1.5rem, 15rem) rotate(110deg); }
    65% { transform: translate(-1rem, 29rem) rotate(220deg); }
    85% { opacity: .45; }
    100% { opacity: 0; transform: translate(.5rem, 44rem) rotate(320deg); }
  }

  @media (prefers-reduced-motion: reduce) {
    .thankful-leaves {
      display: none;
    }
  }
}
