:root { --ease-out: cubic-bezier(.22, 1, .36, 1); }
.button, .feature, .price-card, .bottom-cta, .network-node, .module-card .icon-box,
.compat-strip > div, .icon-box, .close, summary, .activity, .role-stack > span {
  transition: transform .35s var(--ease-out), background .25s, color .25s, box-shadow .35s;
}
.button > span, .text-link > span, .module-bottom > span, .announcement a > span {
  display: inline-block;
  transition: transform .3s var(--ease-out);
}
.header nav a { position: relative; padding-block: 4px; transition: color .2s; }
.header nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent); transform: scaleX(0);
  transform-origin: left; transition: transform .3s var(--ease-out);
}
.button.primary { position: relative; overflow: hidden; isolation: isolate; }
.button.primary::after {
  content: ''; position: absolute; inset: -40% -75%; pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, #ffffff50 50%, transparent 60%);
  transform: translateX(-65%); transition: transform .7s var(--ease-out);
}
.feature, .price-card, .bottom-cta { position: relative; isolation: isolate; }
.feature::after, .price-card::after, .bottom-cta::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  border-radius: inherit; opacity: 0; transition: opacity .35s;
  background: radial-gradient(380px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), #b6ef710a, transparent 75%);
}
.sparkline { display: flex; align-items: end; gap: 3px; height: 17px; line-height: 1; letter-spacing: 0; }
.sparkline > span { display: block; flex: 1; height: var(--bar-height); background: var(--accent); border-radius: 1px 1px 0 0; transform-origin: bottom; }
.network-line { transition: opacity .4s; }
summary::after { transition: transform .3s var(--ease-out), color .25s; }
details[open] summary::after { transform: rotate(180deg); color: var(--accent); }
form input { transition: background .2s, border-color .2s; }
form input:focus { background: #141d28; border-color: #7aa34f; }
.button:disabled { cursor: wait; opacity: .65; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: enter-up .85s var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-copy > :nth-child(5) { animation-delay: .32s; }
  .hero-visual { animation: enter-up 1.1s .18s var(--ease-out) both; }
  .reveal-item { transition: opacity .75s var(--ease-out), translate .75s var(--ease-out), transform .35s var(--ease-out), background .25s, box-shadow .35s; }
  .reveal-pending { opacity: 0; translate: 0 24px; }
  .reveal-item:not(.reveal-pending) { transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms, 0ms, 0ms; }
  .hero-visual .dashboard { animation: panel-float 7s ease-in-out infinite; }
  .hero-visual .float-card { animation: panel-float 5.5s -2s ease-in-out infinite; }
  .hero-visual .status-dot, .hero-visual .online i { animation: status-breathe 3.8s ease-in-out infinite; }
  .hero-visual .sparkline > span { animation: graph-breathe 3s var(--bar-delay) ease-in-out infinite; }
  .network-map .network-line { animation: connection-breathe 4s ease-in-out infinite; }
  .network-map .top-right, .network-map .bottom-left { animation-delay: -2s; }
  .hero-visual:not(.motion-in-view) *, .network-map:not(.motion-in-view) *, .motion-paused * { animation-play-state: paused !important; }
  dialog[open] { animation: dialog-enter .3s var(--ease-out) both; }
  dialog[open]::backdrop { animation: backdrop-enter .25s ease-out both; }
  details[open] > p { animation: enter-up .3s var(--ease-out) both; }
  .header nav.open { animation: enter-up .25s var(--ease-out) both; }
}
@media (hover: hover) and (pointer: fine) {
  .button:not(:disabled):hover { transform: translateY(-3px); }
  .button.primary:hover { box-shadow: 0 7px 24px #b6ef7118; }
  .button.primary:hover::after { transform: translateX(65%); }
  .button:hover > span:last-child, .text-link:hover > span, .announcement a:hover > span { transform: translate(3px, -2px); }
  .button:hover .play { transform: scale(1.12); }
  .header nav a:hover::after, .header nav a:focus-visible::after { transform: scaleX(1); }
  .feature:hover, .price-card:hover { transform: translateY(-5px); }
  .feature:hover { background: #151d26; }
  .feature:hover::after, .price-card:hover::after, .bottom-cta:hover::after { opacity: 1; }
  .feature:hover .icon-box, .pricing-aside:hover > .icon-box { transform: translateY(-3px) rotate(-6deg); }
  .module-card:hover .icon-box { transform: translateY(-4px) rotate(-7deg); }
  .module-card:hover .module-bottom > span { transform: translate(4px, -4px); }
  .module-card h3 { transition: color .25s; }
  .module-card:hover h3 { color: var(--accent); }
  .compat-strip > div:hover { color: var(--accent); transform: translateY(-4px); }
  .compat-strip > div b { transition: color .25s; }
  .compat-strip > div:hover b { color: #e0e8d9; }
  .network-node:hover { background: #1e2a27; transform: translateY(-4px); }
  .network-map:hover .network-line { opacity: .65; }
  .activity:hover { background: #ffffff03; transform: translateX(3px); }
  .role-stack > span:hover { color: var(--accent); transform: translateX(4px); }
  summary:hover { color: var(--accent); padding-left: 4px; }
  summary:hover::after { color: var(--accent); }
  .close:hover { transform: rotate(90deg); color: var(--accent); }
}
.button:not(:disabled):active { transform: translateY(0) scale(.98); }
@keyframes enter-up { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes panel-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes status-breathe { 0%, 100% { opacity: .7; box-shadow: 0 0 0 0 #b6ef7100; } 50% { opacity: 1; box-shadow: 0 0 0 4px #b6ef710c; } }
@keyframes graph-breathe { 0%, 100% { transform: scaleY(1); opacity: .8; } 50% { transform: scaleY(.72); opacity: 1; } }
@keyframes connection-breathe { 0%, 100% { opacity: .2; } 50% { opacity: .6; } }
@keyframes dialog-enter { from { opacity: 0; translate: 0 12px; transform: scale(.98); } to { opacity: 1; translate: 0 0; transform: scale(1); } }
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .reveal-pending { opacity: 1; translate: none; }
  .button, .button:hover, .button:active, .feature:hover, .price-card:hover, .icon-box, .module-card:hover .icon-box,
  .network-node:hover, .compat-strip > div:hover, .activity:hover, .role-stack > span:hover, .close:hover,
  .button > span, .text-link > span, .module-bottom > span, .announcement a > span { transform: none !important; }
}
