/* Effects layer, the hero and About (docs/FX.md). Normal and Turn it up only.
   - The hero's words pour in like molten metal and cool to white.
   - The hero's frame is a thick turning chrome bezel that reflects the cursor.
   - About's pictures sit in chrome mirror frames with a glint that follows the cursor;
     in Turn it up a picture melts under the pointer. */

@property --fx-pour {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 130%;
}
@keyframes fx-pour { from { --fx-pour: -20%; } to { --fx-pour: 130%; } }
@keyframes fx-cool {
  from { text-shadow: 0 0 10px #fff, 0 0 22px #ffcf8a, 0 0 44px #ff8a3d; }
  to { text-shadow: none; }
}
:where(html:not([data-fx="calm"])) .hero :is(.kicker, .tagline, .lede) {
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--fx-pour) - 14%), rgba(0, 0, 0, 0.2) var(--fx-pour), transparent calc(var(--fx-pour) + 6%));
  mask-image: linear-gradient(100deg, #000 calc(var(--fx-pour) - 14%), rgba(0, 0, 0, 0.2) var(--fx-pour), transparent calc(var(--fx-pour) + 6%));
  animation: fx-pour 2.4s cubic-bezier(0.6, 0, 0.2, 1) 0.25s both, fx-cool 3.2s ease-out 0.25s both;
}
:where(html:not([data-fx="calm"])) .hero .tagline { animation-delay: 0.55s, 0.55s; }
:where(html:not([data-fx="calm"])) .hero .lede { animation-delay: 0.85s, 0.85s; animation-duration: 3s, 3.6s; }

:where(html:not([data-fx="calm"])) .aperture {
  padding: 5px;
  background: conic-gradient(from var(--ring), #ffffff, var(--metal-deep), var(--accent1), #ffffff, var(--metal), var(--accent2), var(--metal-deep), #ffffff);
  box-shadow: var(--shadow), 0 0 44px -6px var(--accent1), 0 0 90px -24px var(--accent2);
}
:where(html:not([data-fx="calm"])) .aperture-inner { border-radius: calc(1.8rem - 5px); }
:where(html:not([data-fx="calm"])) .aperture-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(260px circle at var(--lx, 30%) var(--ly, 20%), rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 32%);
  mix-blend-mode: screen;
}

:where(html:not([data-fx="calm"])) #about .card-media {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 0 3px color-mix(in srgb, var(--metal-bright) 70%, transparent),
    0 12px 26px -10px #000;
}
:where(html:not([data-fx="calm"])) #about .card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(220px circle at var(--lx, -40%) var(--ly, -40%), rgba(255, 255, 255, 0.6), transparent 60%),
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.24) 48%, transparent 60%);
  background-size: auto, 300% 100%;
  background-position: 0 0, var(--fx-pan) 0;
  mix-blend-mode: overlay;
  animation: fx-pan 6s ease-in-out infinite alternate;
}
html[data-fx="loud"] #about .card:hover .card-media img { filter: url(#fx-melt) saturate(1.3); }
