/* Effects layer, Coaching (docs/FX.md). Normal and Turn it up only.
   The cards are brushed-metal plates with corner rivets and an engraved number; a plate
   flips all the way round when its reading list opens. Turn it up adds electric edges. */

@keyframes fx-plate-flip {
  0% { rotate: y 0deg; }
  45% { rotate: y 180deg; filter: brightness(1.7) saturate(1.4); }
  100% { rotate: y 360deg; filter: none; }
}
:where(html:not([data-fx="calm"])) #coaching .tiles .card {
  background:
    radial-gradient(circle at 14px 14px, #e6edf3 0 1.6px, #3e4c59 2.2px, transparent 3.4px),
    radial-gradient(circle at calc(100% - 14px) 14px, #e6edf3 0 1.6px, #3e4c59 2.2px, transparent 3.4px),
    radial-gradient(circle at 14px calc(100% - 14px), #e6edf3 0 1.6px, #3e4c59 2.2px, transparent 3.4px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), #e6edf3 0 1.6px, #3e4c59 2.2px, transparent 3.4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, rgba(183, 195, 206, 0.2), rgba(16, 14, 30, 0.55) 42%, rgba(139, 92, 246, 0.16));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.3s ease;
}
:where(html:not([data-fx="calm"])) #coaching .tiles .card:hover {
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 36px -6px var(--section-accent);
}
:where(html:not([data-fx="calm"])) #coaching .tiles .card .num {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
  opacity: 0.7;
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.8), 1px 1px 0 rgba(255, 255, 255, 0.35);
}
:where(html:not([data-fx="calm"])) #coaching .tiles .card.is-open {
  animation: fx-plate-flip 0.95s cubic-bezier(0.5, 0, 0.2, 1.3) both;
}
html[data-fx="loud"] #coaching .tiles .card::after {
  background: conic-gradient(from var(--fx-spin), transparent, #c4b5fd 30deg, #ffffff 40deg, transparent 70deg, transparent 180deg, #8b5cf6 210deg, #ffffff 220deg, transparent 250deg);
  animation-duration: 1.4s;
  padding: 2px;
}
