/* Motion only. Palette, focus rings and checkout state remain owned by the existing UI. */
body:is([data-cds-page="home"], [data-cds-page="pricing"], [data-cds-page="purchase"]) {
  --cds-motion-ease: cubic-bezier(.22, .68, 0, 1);
}

/* Independent translate/scale compose with transforms used by the existing app. */
body[data-cds-page="home"] :is(.cds-hero-actions a[href], .design-business-entry a.design-button[href], a.coryao-start-button[href], a.gg-console[href]),
html[data-coryao-theme="article"] body[data-cds-page="pricing"] #main :is(button, .button) {
  scale: 1;
  transition: scale 140ms var(--cds-motion-ease), translate 180ms var(--cds-motion-ease), background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

/* Replace the overlay's old transform press so the two scale properties do not compound. */
body[data-cds-page="home"] .cds-hero-actions a:active {
  transform: none;
}

body[data-cds-page="home"] :is(.cds-hero-actions a[href], .design-business-entry a.design-button[href], a.coryao-start-button[href], a.gg-console[href]):not([href=""]):not([href="#"]):not([aria-disabled="true"]):active,
html[data-coryao-theme="article"] body[data-cds-page="pricing"] #main :is(button:enabled, a.button[href]):not([href=""]):not([href="#"]):not([aria-disabled="true"]):active {
  scale: .98;
}

/* Match the purchase overlay's specificity and !important transitions, without replacing transform. */
html[data-coryao-console] body.coryao-console[data-cds-page="purchase"] #root .app-shell[data-route] .r100-subscription button {
  scale: 1;
  transition: scale 140ms var(--cds-motion-ease), background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease !important;
}

html[data-coryao-console] body.coryao-console[data-cds-page="purchase"] #root .app-shell[data-route] .r100-subscription button:enabled:not([aria-disabled="true"]):active {
  scale: .98;
}

/* Old home-card transform motion is replaced with the independent translate property. */
body[data-cds-page="home"] :is(.design-business-card, .coryao-offer-link),
body[data-cds-page="home"] :is(.design-business-card, .coryao-offer-link):hover {
  transform: none;
}

body[data-cds-page="home"] :is(.design-business-card, .coryao-offer-link),
html[data-coryao-theme="article"] body[data-cds-page="pricing"] .subscription-card {
  translate: 0 0;
  transition: translate 180ms var(--cds-motion-ease), border-color 160ms ease, box-shadow 160ms ease;
}

html[data-coryao-console] body.coryao-console[data-cds-page="purchase"] #root .app-shell[data-route] .r100-subscription .partition-plan {
  translate: 0 0;
  animation: none !important;
  transition: translate 180ms var(--cds-motion-ease), border-color 180ms ease, box-shadow 180ms ease !important;
}

/* Hover lift only runs on devices that can hover, avoiding sticky touch states. */
@media (hover: hover) and (pointer: fine) {
  body[data-cds-page="home"] :is(.design-business-card, .coryao-offer-link):hover,
  html[data-coryao-theme="article"] body[data-cds-page="pricing"] .subscription-card:hover,
  html[data-coryao-console] body.coryao-console[data-cds-page="purchase"] #root .app-shell[data-route] .r100-subscription .partition-plan:hover {
    translate: 0 -1.5px;
  }
}

body[data-cds-page="home"] :is(.design-business-card, .coryao-offer-link):focus-within,
html[data-coryao-theme="article"] body[data-cds-page="pricing"] .subscription-card:focus-within,
html[data-coryao-console] body.coryao-console[data-cds-page="purchase"] #root .app-shell[data-route] .r100-subscription .partition-plan:focus-within {
  translate: 0 -1.5px;
}

/* Only explicitly wrapped arrow glyphs move; action labels retain their position. */
body:is([data-cds-page="home"], [data-cds-page="pricing"]) .cds-action-arrow,
body[data-cds-page="purchase"] .r100-subscription .cds-action-arrow {
  display: inline-block;
  translate: 0 0;
  transition: translate 180ms var(--cds-motion-ease);
}

@media (hover: hover) and (pointer: fine) {
  body:is([data-cds-page="home"], [data-cds-page="pricing"]) :is(a, button):hover > .cds-action-arrow,
  body[data-cds-page="purchase"] .r100-subscription :is(a, button):hover > .cds-action-arrow {
    translate: 2px 0;
  }
}

body:is([data-cds-page="home"], [data-cds-page="pricing"]) :is(a, button):focus-visible > .cds-action-arrow,
body[data-cds-page="purchase"] .r100-subscription :is(a, button):focus-visible > .cds-action-arrow {
  translate: 2px 0;
}

@media (prefers-reduced-motion: reduce) {
  body[data-cds-page="home"] :is(.cds-hero-actions a, .design-business-entry .design-button, .coryao-start-button, .gg-console, .design-business-card, .coryao-offer-link),
  html[data-coryao-theme="article"] body[data-cds-page="pricing"] #main :is(button, .button, .subscription-card),
  html[data-coryao-console] body.coryao-console[data-cds-page="purchase"] #root .app-shell[data-route] .r100-subscription :is(button, .partition-plan),
  body:is([data-cds-page="home"], [data-cds-page="pricing"]) .cds-action-arrow,
  body[data-cds-page="purchase"] .r100-subscription .cds-action-arrow {
    animation: none !important;
    transition: none !important;
    scale: none !important;
    translate: none !important;
  }

}
