/* The studio's action: a cobalt invitation with a separate arrow compartment. */
.button {
  --action-height: 58px;
  --action-chamber: 58px;
  --action-label-pad: 23px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  min-height: var(--action-height);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--blue);
  border-radius: 3px 14px 3px 3px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 0 #152d9b;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  vertical-align: middle;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.button::before {
  position: absolute;
  z-index: -1;
  inset: 0 var(--action-chamber) 0 0;
  background: var(--paper);
  content: '';
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}

.button-label {
  position: relative;
  align-self: center;
  display: block;
  margin: 18px var(--action-label-pad);
  padding: 1px 0;
  overflow: hidden;
  line-height: 1.2;
  white-space: nowrap;
}

.button-label > span {
  display: block;
  transition: transform .5s var(--ease);
}

.button-label > span:first-child { color: #fff; }

.button-label > span[aria-hidden="true"] {
  position: absolute;
  inset: 1px 0 auto;
  color: var(--blue);
  transform: translateY(145%);
}

.button-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 var(--action-chamber);
  min-height: calc(var(--action-height) - 2px);
  margin: 0;
  border-left: 1px solid var(--blue);
  background: var(--paper);
  color: var(--ink);
  transition: color .35s, background .35s;
}

.button .arrow {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform .5s var(--ease);
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 7px;
}

.header-button {
  --action-height: 48px;
  --action-chamber: 47px;
  --action-label-pad: 18px;
  font-size: 12px;
  box-shadow: 0 3px 0 #152d9b;
}

.header-button .arrow { width: 18px; height: 18px; }
.header-button .button-label { margin-block: 12px; }

.hero-button {
  --action-height: 66px;
  --action-chamber: 65px;
  --action-label-pad: 25px;
  min-width: 242px;
  font-size: 14px;
}

.hero-button .arrow { width: 23px; height: 23px; }
.studio-dialog .button { --action-height: 56px; --action-chamber: 55px; }

/* Project previews use the same two compartments, drawn as a paper caption. */
.preview-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  min-height: 48px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 2px 10px 2px 2px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 11px;
  font-weight: 500;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
}

.preview-action > span { padding: 14px 18px; }

.preview-action > .arrow {
  width: 48px;
  height: 46px;
  padding: 14px;
  border-left: 1px solid var(--ink);
  stroke-width: 1.6;
  transition: background .3s, color .3s;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #152d9b;
  }
  .button:hover::before { transform: translateY(0); }
  .button:hover .button-label > span:first-child { transform: translateY(-145%); }
  .button:hover .button-label > span[aria-hidden="true"] { transform: translateY(0); }
  .button:hover .button-icon { color: #fff; background: var(--blue); }
  .button:hover .arrow { transform: translate(3px, -3px); }

  .project-preview:hover .preview-action,
  .preview-action:hover {
    background: var(--paper);
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--ink);
  }
  .project-preview:hover .preview-action > .arrow,
  .preview-action:hover > .arrow {
    background: var(--ink);
    color: var(--paper);
    transform: none;
  }
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #152d9b;
  transition-duration: .12s;
}

.project-preview:active .preview-action,
.preview-action:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

@media (hover: none), (pointer: coarse) {
  .button:hover {
    background: var(--blue);
    transform: none;
    box-shadow: 0 4px 0 #152d9b;
  }
  .button:hover .arrow { transform: none; }
  .header-button:hover { box-shadow: 0 3px 0 #152d9b; }
  .project-preview:hover .preview-action,
  .preview-action:hover {
    background: var(--paper);
    color: var(--ink);
    transform: none;
    box-shadow: 0 3px 0 var(--ink);
  }
  .preview-action:hover .arrow { transform: none; }
  .button:active { transform: translateY(3px); box-shadow: 0 1px 0 #152d9b; }
  .project-preview:active .preview-action,
  .preview-action:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
}

@media (max-width: 700px) {
  .header-button { display: none; }
  .button { --action-height: 56px; --action-chamber: 55px; }
  .hero-button {
    --action-height: 62px;
    --action-chamber: 61px;
    --action-label-pad: 24px;
    min-width: 230px;
    max-width: 100%;
  }
  .preview-action { min-height: 48px; font-size: 10px; }
  .preview-action > span { padding: 14px 12px; }
  .preview-action > .arrow { width: 44px; height: 46px; padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .button::before,
  .button .arrow,
  .button-label > span,
  .button-icon,
  .preview-action,
  .preview-action > .arrow { transition: none; }
  .button:hover,
  .button:active,
  .button:hover .arrow,
  .project-preview:hover .preview-action,
  .project-preview:active .preview-action,
  .preview-action:hover,
  .preview-action:active { transform: none; }
}
