/* Aimlink | Footer: physical shot impressions become registered hits.
   Kling 4.0, 1080p. Silent web encodes with a soft loop seam.
   Static first-frame poster for no JS, reduced motion and Save-Data.
   Behaviour: assets/ripple/ripple.js. */
@layer sections {
  .footer-cta { position: relative; }

  .footer-ripple {
    --rw: max(115vw, 1000px);                                  /* frame width: the rings reach the footer's edges */
    --h: calc(var(--rw) * 0.5625);                             /* 16:9 */
    --drop-y: 62%;                                             /* the impact point's height in the frame */
    --drop-gap: 10px;                                          /* impact point below the badges */
    --brand: calc(clamp(var(--space-8), 8vw, var(--space-9)) - var(--drop-gap));   /* impact point to the brand block */
    position: absolute; z-index: -1; left: 50%; translate: -50% 0;
    top: calc(100% + var(--drop-gap) - var(--h) * 0.62);
    width: var(--rw); aspect-ratio: 16 / 9; pointer-events: none;
    mix-blend-mode: lighten; opacity: 0.6;
    /* Frame edges fade out; the near half dims to 30 % where the stacked brand block sits */
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 var(--drop-y), rgb(0 0 0 / 0.3) calc(var(--drop-y) + var(--brand)), rgb(0 0 0 / 0.3) 72%, transparent 90%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 var(--drop-y), rgb(0 0 0 / 0.3) calc(var(--drop-y) + var(--brand)), rgb(0 0 0 / 0.3) 72%, transparent 90%);
  }
  .ripple-poster, .ripple-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .ripple-video { opacity: 0; transition: opacity 900ms var(--ease-out); }
  .footer-ripple.is-playing .ripple-video { opacity: 1; }

  /* A night halo round the small brand-block text keeps it readable where a ring crosses it */
  .footer-brand { text-shadow: 0 0 3px var(--bg), 0 0 8px var(--bg), 0 0 16px var(--bg); }

  /* Three columns from 1000 px: the wide rings stay bright and only the contact column, right under the
     impact point, gets a soft dimmed window */
  @media (min-width: 1000px) {
    .footer-ripple {
      --hole: radial-gradient(ellipse 230px 95px at 50% calc(var(--drop-y) + var(--brand) + 56px), rgb(0 0 0 / 0.22) 35%, #000 100%);
      --edges: linear-gradient(180deg, transparent 0%, #000 14%, #000 72%, transparent 90%);
      -webkit-mask-image: var(--hole), var(--edges); -webkit-mask-composite: source-in;
              mask-image: var(--hole), var(--edges);         mask-composite: intersect;
    }
  }

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