:root {
  --motion-fast: 160ms;
  --motion-base: 240ms;
  --motion-slow: 520ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-press: cubic-bezier(0.3, 0, 0.2, 1);
}

.rh-shell {
  --motion-accent-rgb: var(--rh-green-rgb, 117, 216, 47);
  --motion-lift-shadow: 0 18px 42px rgba(var(--motion-accent-rgb), 0.13);
}

.sol-shell {
  --motion-accent-rgb: var(--sol-primary-rgb, 112, 71, 235);
}

.rh-shell :is(
    .button,
    .icon-link,
    .site-nav a,
    .rh-contract-link,
    .table-link,
    .rh-text-link,
    .text-button
  ) {
  transition:
    color var(--motion-fast) var(--ease),
    background-color var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-base) var(--ease),
    transform var(--motion-base) var(--ease);
}

.rh-shell :is(
    .rh-about-card,
    .rh-address-card,
    .step-card,
    .rh-feature,
    .sol-contract-card,
    .rh-system-card,
    .rh-home-proof article
  ) {
  transition:
    border-color var(--motion-base) var(--ease),
    box-shadow var(--motion-base) var(--ease),
    transform var(--motion-base) var(--ease),
    background-color var(--motion-base) var(--ease);
}

.rh-shell :is(.rh-impact-metric, .rh-activity-item, .rh-compact-table tbody tr) {
  transition:
    background-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-base) var(--ease),
    transform var(--motion-base) var(--ease);
}

.rh-shell .rh-mark-stage {
  transition:
    filter var(--motion-slow) var(--ease),
    transform var(--motion-slow) var(--ease);
}

.rh-shell .reveal {
  opacity: 0;
  filter: blur(2px);
  transform: translateY(20px) scale(0.99);
  transition:
    opacity var(--motion-slow) var(--ease),
    filter var(--motion-slow) var(--ease),
    transform var(--motion-slow) var(--ease);
}

.rh-shell .reveal[data-revealed="true"] {
  opacity: 1;
  filter: none;
  transform: translateY(0) scale(1);
}

@media (hover: hover) and (pointer: fine) {
  .rh-shell .button:hover {
    transform: translateY(-2px);
  }

  .rh-shell .icon-link:hover {
    transform: translateY(-2px) scale(1.03);
  }

  .rh-shell .site-nav a:hover {
    transform: translateY(-1px);
  }

  .rh-shell :is(.rh-contract-link, .table-link, .rh-text-link, .text-button):hover {
    transform: translateY(-1px);
  }

  .rh-shell :is(
      .rh-about-card,
      .rh-address-card,
      .step-card,
      .rh-feature,
      .sol-contract-card,
      .rh-system-card,
      .rh-home-proof article
    ):not(.reveal):hover,
  .rh-shell :is(
      .rh-about-card,
      .rh-address-card,
      .step-card,
      .rh-feature,
      .sol-contract-card,
      .rh-system-card,
      .rh-home-proof article
    ).reveal[data-revealed="true"]:hover {
    border-color: rgba(var(--motion-accent-rgb), 0.32);
    box-shadow: var(--motion-lift-shadow);
    transform: translateY(-4px);
  }

  .rh-shell .rh-impact-metric:hover {
    background: rgba(var(--motion-accent-rgb), 0.045);
  }

  .rh-shell .rh-activity-item:hover {
    background: rgba(var(--motion-accent-rgb), 0.05);
    transform: translateX(3px);
  }

  .rh-shell .rh-compact-table tbody tr:hover {
    box-shadow: inset 3px 0 rgba(var(--motion-accent-rgb), 0.65);
  }

  .rh-shell .rh-mark-stage:hover {
    filter: saturate(1.05);
    transform: translateY(-3px) scale(1.012);
  }
}

.rh-shell .button:active,
.rh-shell .icon-link:active,
.rh-shell :is(.rh-contract-link, .table-link, .rh-text-link, .text-button):active {
  transform: translateY(0) scale(0.975);
  transition-duration: 90ms;
  transition-timing-function: var(--ease-press);
}

.rh-shell :is(a, button, summary):focus-visible {
  outline: 3px solid rgba(var(--motion-accent-rgb), 0.28);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .rh-shell *,
  .rh-shell *::before,
  .rh-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rh-shell .reveal,
  .rh-shell .reveal[data-revealed="true"] {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
