/* FM2 activity cards: quiet forest light, with no continuous animation. */
.activity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: #254934;
  box-shadow: 0 10px 25px rgb(25 56 36 / 12%);
  transition: box-shadow .32s var(--ease);
}

.activity-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgb(212 230 179 / 11%), transparent 54%, rgb(133 178 159 / 7%));
  opacity: 0;
  transition: opacity .36s var(--ease);
}

.activity-card .activity-content {
  position: relative;
  flex: 1;
  z-index: 1;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 8% 0%, rgb(112 147 89 / 24%), transparent 66%),
    radial-gradient(ellipse at 100% 100%, rgb(61 113 97 / 25%), transparent 70%),
    linear-gradient(125deg, #284c35 0%, #254934 45%, #1d3d2c 100%);
  box-shadow: inset 0 1px rgb(229 239 208 / 9%);
}

.activity-card .activity-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 25% 15%, rgb(192 211 137 / 14%), transparent 68%),
    radial-gradient(ellipse at 90% 85%, rgb(146 199 173 / 10%), transparent 65%);
  opacity: .3;
  transition: opacity .38s var(--ease);
}

.activity-card .activity-photo {
  transform-origin: 50% 60%;
  transition: transform .6s var(--ease);
}

.activity-card .button-light,
.activity-card .button-light:hover {
  color: #173b2c;
  background: linear-gradient(155deg, #fffeed 0%, #f7ecd3 48%, #ead7b3 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 95%),
    inset 0 -2px 0 rgb(116 83 42 / 13%),
    0 3px 0 rgb(12 31 19 / 20%),
    0 7px 15px rgb(8 28 17 / 18%);
  transform: none;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

.activity-card .button-light::before {
  content: "";
  position: absolute;
  inset: -25% -35%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 246 / 65%) 47%, transparent 64%);
  transform: translateX(-110%);
  opacity: 0;
  transition: none;
}

.activity-card:focus-within {
  box-shadow: 0 14px 30px rgb(22 53 34 / 21%);
}
.activity-card:focus-within::after { opacity: .65; }
.activity-card:focus-within .activity-content::before { opacity: 1; }
.activity-card .button-light:focus-visible {
  outline: 3px solid #173b2c;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff6e4, 0 9px 20px rgb(8 28 17 / 24%);
}
.activity-card .button-light:focus-visible::before {
  opacity: 1;
  transform: translateX(110%);
  transition: transform .75s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .activity-card:hover { box-shadow: 0 17px 34px rgb(22 53 34 / 21%); }
  .activity-card:hover::after { opacity: 1; }
  .activity-card:hover .activity-content::before { opacity: 1; }
  .activity-card:hover .activity-photo { transform: scale(1.015); }
  .activity-card .button-light:hover {
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 #fff,
      inset 0 -2px 0 rgb(116 83 42 / 12%),
      0 4px 0 rgb(12 31 19 / 15%),
      0 11px 22px rgb(8 28 17 / 25%);
  }
  .activity-card .button-light:hover::before {
    opacity: 1;
    transform: translateX(110%);
    transition: transform .75s var(--ease);
  }
}

/* Touch gets a short press response, without a persistent hover state. */
.activity-card:active::after { opacity: .85; transition-duration: .12s; }
.activity-card:active .activity-content::before { opacity: 1; transition-duration: .12s; }
.activity-card .button-light:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 3px rgb(91 69 30 / 13%),
    inset 0 -1px 0 rgb(255 255 255 / 60%),
    0 2px 7px rgb(8 28 17 / 20%);
  transition-duration: .12s;
}
.activity-card .button-light:active::before { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .activity-card,
  .activity-card::after,
  .activity-card .activity-content::before,
  .activity-card .activity-photo,
  .activity-card .button-light,
  .activity-card .button-light::before {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .activity-card .button-light::before { display: none; }
}
html[data-reduced="true"] .activity-card,
html[data-reduced="true"] .activity-card::after,
html[data-reduced="true"] .activity-card .activity-content::before,
html[data-reduced="true"] .activity-card .activity-photo,
html[data-reduced="true"] .activity-card .button-light,
html[data-reduced="true"] .activity-card .button-light::before {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}
html[data-reduced="true"] .activity-card .button-light::before { display: none; }
