/* Pronounced frost, snow and blizzard overlays for the holding site.
   Transforms and opacity only. Gated by html.has-motion; off under prefers-reduced-motion. */

.ice-vignette,
.ice-wipe,
.ice-snow{
  pointer-events:none;
}

.ice-vignette{
  position:fixed;
  inset:0;
  z-index:15;
  opacity:0;
  visibility:hidden;
  background:
    linear-gradient(180deg, rgba(176,210,232,.78) 0%, rgba(176,210,232,.32) 14%, transparent 30%),
    linear-gradient(0deg, rgba(166,202,226,.72) 0%, rgba(166,202,226,.28) 16%, transparent 34%),
    linear-gradient(90deg, rgba(190,220,238,.62) 0%, transparent 18%),
    linear-gradient(270deg, rgba(190,220,238,.62) 0%, transparent 18%);
  box-shadow:
    inset 0 70px 70px -10px rgba(170,205,230,.45),
    inset 0 -80px 80px -12px rgba(160,198,224,.42),
    inset 70px 0 70px -12px rgba(180,214,236,.32),
    inset -70px 0 70px -12px rgba(180,214,236,.32);
}
.ice-vignette::before{
  content:"";
  position:absolute;
  inset:0;
  background:url(/assets/img/ice-frost.svg) center / 100% 100% no-repeat;
  opacity:.9;
}

.ice-snow{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:21;
  display:block;
}

.ice-wipe{
  position:fixed;
  inset:0;
  z-index:60;
  opacity:0;
  visibility:hidden;
  background:
    radial-gradient(130% 90% at 50% -8%, rgba(255,255,255,.98), rgba(210,232,248,.96) 42%, rgba(230,244,252,.97) 72%, rgba(236,226,214,.94));
}
.ice-wipe::before{
  content:"";
  position:absolute;
  inset:0;
  background:url(/assets/img/ice-frost.svg) center / 100% 100% no-repeat;
  opacity:.7;
}
.ice-wipe-flurry{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
}
html.ice-entering .ice-wipe{
  opacity:1;
  visibility:visible;
}

html.has-motion .card,
html.has-motion main h1,
html.has-motion main h2:not(.sr-only),
html.has-motion .band h3{
  position:relative;
  --ice-frost:1;
  --ice-shimmer:0;
  --ice-shimmer-x:-120%;
}
html.has-motion .card{
  transform:translate3d(0,14px,0);
}
html.has-motion .card.is-in{
  transform:none;
  --ice-frost:0;
  --ice-shimmer:0;
}
html.has-motion main h1.is-in,
html.has-motion main h2.is-in,
html.has-motion .band h3.is-in{
  --ice-frost:0;
  --ice-shimmer:0;
}
html.has-motion .card::before,
html.has-motion main h1::before,
html.has-motion main h2:not(.sr-only)::before,
html.has-motion .band h3::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:4;
  pointer-events:none;
  opacity:var(--ice-frost);
  background:
    linear-gradient(180deg, rgba(232,245,252,.82), rgba(200,224,240,.58) 45%, rgba(255,255,255,.4)),
    repeating-linear-gradient(-24deg, transparent 0 9px, rgba(255,255,255,.22) 9px 10px),
    repeating-linear-gradient(28deg, transparent 0 13px, rgba(210,232,248,.18) 13px 14px);
}
html.has-motion .card::after,
html.has-motion main h1::after,
html.has-motion main h2:not(.sr-only)::after,
html.has-motion .band h3::after{
  content:"";
  position:absolute;
  inset:-8% -20%;
  z-index:5;
  pointer-events:none;
  opacity:var(--ice-shimmer);
  transform:translate3d(var(--ice-shimmer-x),0,0);
  background:linear-gradient(115deg,
    transparent 28%,
    rgba(170,215,240,.45) 42%,
    rgba(255,255,255,.95) 50%,
    rgba(170,215,240,.45) 58%,
    transparent 72%);
}

html.has-motion a.btn{
  position:relative;
  overflow:hidden;
}
html.has-motion a.btn::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(115deg, transparent 28%, rgba(200,230,250,.55) 48%, rgba(255,255,255,.8) 52%, rgba(200,230,250,.4) 58%, transparent 72%);
  transform:translate3d(-120%,0,0);
  opacity:0;
  pointer-events:none;
  transition:transform .55s ease, opacity .3s ease;
}
html.has-motion a.btn:hover::after{
  transform:translate3d(120%,0,0);
  opacity:1;
}

@media (prefers-reduced-motion: reduce){
  html.has-motion .card{
    transform:none !important;
  }
  html.has-motion .card::before,
  html.has-motion .card::after,
  html.has-motion main h1::before,
  html.has-motion main h1::after,
  html.has-motion main h2:not(.sr-only)::before,
  html.has-motion main h2:not(.sr-only)::after,
  html.has-motion .band h3::before,
  html.has-motion .band h3::after,
  .ice-vignette,
  .ice-wipe,
  .ice-snow,
  html.has-motion a.btn::after{
    display:none !important;
  }
}
