/* Originkit's expanding badge, in GrokIt's monochrome theme tokens. */
:root a.grokit-arrow-reveal {
  --arrow-reveal-duration: 460ms;
  --arrow-reveal-ease: cubic-bezier(.44, 0, .56, 1);
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 176px;
  min-height: 52px;
  padding: 0 24px 0 60px;
  overflow: hidden;
  border: 1px solid var(--fg);
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--lighting-action-shadow);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.grokit-arrow-reveal::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 6px;
  width: 38px;
  height: 38px;
  border-radius: inherit;
  background: var(--bg);
  pointer-events: none;
  transform: scale(1);
}

.grokit-arrow-label { position: relative; z-index: 1; }

.grokit-arrow-glyph {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--fg);
  pointer-events: none;
  transform: translateX(calc(-50% + 25px));
}

.grokit-arrow-glyph svg { display: block; }

:root a.grokit-arrow-reveal:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

/* Keyboard and mouse have the same reveal; the link keeps its accessible name. */
.grokit-arrow-reveal:focus-visible::before { transform: scale(10); }
.grokit-arrow-reveal:focus-visible .grokit-arrow-glyph { transform: translateX(0); }
.grokit-arrow-reveal:focus-visible .grokit-arrow-label { transform: translateX(8px); }

@media (hover: hover) and (pointer: fine) {
  .grokit-arrow-reveal:hover::before { transform: scale(10); }
  .grokit-arrow-reveal:hover .grokit-arrow-glyph { transform: translateX(0); }
  .grokit-arrow-reveal:hover .grokit-arrow-label { transform: translateX(8px); }
}

@media (prefers-reduced-motion: no-preference) {
  .grokit-arrow-reveal::before,
  .grokit-arrow-glyph,
  .grokit-arrow-label {
    transition: transform var(--arrow-reveal-duration) var(--arrow-reveal-ease);
  }
  :root a.grokit-arrow-reveal { transition: scale 150ms ease-out; }
  :root a.grokit-arrow-reveal:active { scale: .96; }
}

@media (prefers-reduced-motion: reduce) {
  :root a.grokit-arrow-reveal::before,
  :root a.grokit-arrow-reveal .grokit-arrow-label { transform: none; }
  :root a.grokit-arrow-reveal .grokit-arrow-glyph { transform: translateX(calc(-50% + 25px)); }
}

@media (forced-colors: active) {
  :root a.grokit-arrow-reveal { background: ButtonFace; color: ButtonText; border-color: ButtonText; box-shadow: none; }
  .grokit-arrow-reveal::before { background: ButtonText; }
  .grokit-arrow-reveal .grokit-arrow-glyph { color: ButtonFace; forced-color-adjust: none; }
  .grokit-arrow-reveal:focus-visible { outline-color: Highlight; }
}
